diff --git a/application/App-UIKit.xcodeproj/project.pbxproj b/application/App-UIKit.xcodeproj/project.pbxproj deleted file mode 100644 index a3c16d03..00000000 --- a/application/App-UIKit.xcodeproj/project.pbxproj +++ /dev/null @@ -1,474 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 77; - objects = { - -/* Begin PBXBuildFile section */ - 4CDC163EDC862E662071595D /* Pods_App_UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 587E01B54BF4E51087F4D6E9 /* Pods_App_UIKit.framework */; }; - B3C8DE052E44C1B600F7FE10 /* GenerateTestUserSig.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3C8DE032E44C1B600F7FE10 /* GenerateTestUserSig.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 4A821A5154B7140084F76002 /* Pods-App-UIKit.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-App-UIKit.debug.xcconfig"; path = "Target Support Files/Pods-App-UIKit/Pods-App-UIKit.debug.xcconfig"; sourceTree = ""; }; - 57948B4C3B6EFD00B09C2237 /* Pods-App-UIKit.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-App-UIKit.release.xcconfig"; path = "Target Support Files/Pods-App-UIKit/Pods-App-UIKit.release.xcconfig"; sourceTree = ""; }; - 587E01B54BF4E51087F4D6E9 /* Pods_App_UIKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_App_UIKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - B3C8DDA02E44C02400F7FE10 /* App-UIKit.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "App-UIKit.app"; sourceTree = BUILT_PRODUCTS_DIR; }; - B3C8DE032E44C1B600F7FE10 /* GenerateTestUserSig.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GenerateTestUserSig.swift; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */ - B3C8DDB22E44C02500F7FE10 /* Exceptions for "App-UIKit" folder in "App-UIKit" target */ = { - isa = PBXFileSystemSynchronizedBuildFileExceptionSet; - membershipExceptions = ( - Info.plist, - ); - target = B3C8DD9F2E44C02400F7FE10 /* App-UIKit */; - }; -/* End PBXFileSystemSynchronizedBuildFileExceptionSet section */ - -/* Begin PBXFileSystemSynchronizedRootGroup section */ - B3C8DDA22E44C02400F7FE10 /* App-UIKit */ = { - isa = PBXFileSystemSynchronizedRootGroup; - exceptions = ( - B3C8DDB22E44C02500F7FE10 /* Exceptions for "App-UIKit" folder in "App-UIKit" target */, - ); - path = "App-UIKit"; - sourceTree = ""; - }; -/* End PBXFileSystemSynchronizedRootGroup section */ - -/* Begin PBXFrameworksBuildPhase section */ - B3C8DD9D2E44C02400F7FE10 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 4CDC163EDC862E662071595D /* Pods_App_UIKit.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 6A09F16F3F56F9C484CC99B0 /* Frameworks */ = { - isa = PBXGroup; - children = ( - 587E01B54BF4E51087F4D6E9 /* Pods_App_UIKit.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - B3C8DD972E44C02400F7FE10 = { - isa = PBXGroup; - children = ( - B3C8DE042E44C1B600F7FE10 /* Debug */, - B3C8DDA22E44C02400F7FE10 /* App-UIKit */, - B3C8DDA12E44C02400F7FE10 /* Products */, - ED03A799A52CD83573764C17 /* Pods */, - 6A09F16F3F56F9C484CC99B0 /* Frameworks */, - ); - sourceTree = ""; - }; - B3C8DDA12E44C02400F7FE10 /* Products */ = { - isa = PBXGroup; - children = ( - B3C8DDA02E44C02400F7FE10 /* App-UIKit.app */, - ); - name = Products; - sourceTree = ""; - }; - B3C8DE042E44C1B600F7FE10 /* Debug */ = { - isa = PBXGroup; - children = ( - B3C8DE032E44C1B600F7FE10 /* GenerateTestUserSig.swift */, - ); - path = Debug; - sourceTree = ""; - }; - ED03A799A52CD83573764C17 /* Pods */ = { - isa = PBXGroup; - children = ( - 4A821A5154B7140084F76002 /* Pods-App-UIKit.debug.xcconfig */, - 57948B4C3B6EFD00B09C2237 /* Pods-App-UIKit.release.xcconfig */, - ); - path = Pods; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - B3C8DD9F2E44C02400F7FE10 /* App-UIKit */ = { - isa = PBXNativeTarget; - buildConfigurationList = B3C8DDB32E44C02500F7FE10 /* Build configuration list for PBXNativeTarget "App-UIKit" */; - buildPhases = ( - 2D9091D8CE8132F9FB2B9201 /* [CP] Check Pods Manifest.lock */, - B3C8DD9C2E44C02400F7FE10 /* Sources */, - B3C8DD9D2E44C02400F7FE10 /* Frameworks */, - B3C8DD9E2E44C02400F7FE10 /* Resources */, - 28B4535AE90D4FB1F163B770 /* [CP] Embed Pods Frameworks */, - FD88996CC8451445C3B1B56D /* [CP] Copy Pods Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - fileSystemSynchronizedGroups = ( - B3C8DDA22E44C02400F7FE10 /* App-UIKit */, - ); - name = "App-UIKit"; - productName = "App-UIKit"; - productReference = B3C8DDA02E44C02400F7FE10 /* App-UIKit.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - B3C8DD982E44C02400F7FE10 /* Project object */ = { - isa = PBXProject; - attributes = { - BuildIndependentTargetsInParallel = 1; - LastSwiftUpdateCheck = 1640; - LastUpgradeCheck = 1640; - TargetAttributes = { - B3C8DD9F2E44C02400F7FE10 = { - CreatedOnToolsVersion = 16.4; - }; - }; - }; - buildConfigurationList = B3C8DD9B2E44C02400F7FE10 /* Build configuration list for PBXProject "App-UIKit" */; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ar, - ja, - "zh-Hans", - "zh-Hant", - ); - mainGroup = B3C8DD972E44C02400F7FE10; - minimizedProjectReferenceProxies = 1; - preferredProjectObjectVersion = 77; - productRefGroup = B3C8DDA12E44C02400F7FE10 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - B3C8DD9F2E44C02400F7FE10 /* App-UIKit */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - B3C8DD9E2E44C02400F7FE10 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 28B4535AE90D4FB1F163B770 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-App-UIKit/Pods-App-UIKit-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-App-UIKit/Pods-App-UIKit-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-App-UIKit/Pods-App-UIKit-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - 2D9091D8CE8132F9FB2B9201 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-App-UIKit-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - FD88996CC8451445C3B1B56D /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-App-UIKit/Pods-App-UIKit-resources-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Copy Pods Resources"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-App-UIKit/Pods-App-UIKit-resources-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-App-UIKit/Pods-App-UIKit-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - B3C8DD9C2E44C02400F7FE10 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - B3C8DE052E44C1B600F7FE10 /* GenerateTestUserSig.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - B3C8DDB42E44C02500F7FE10 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 4A821A5154B7140084F76002 /* Pods-App-UIKit.debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = ""; - "DEVELOPMENT_TEAM[sdk=iphoneos*]" = F8A3GH6Q4W; - ENABLE_USER_SCRIPT_SANDBOXING = NO; - GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_FILE = "App-UIKit/Info.plist"; - INFOPLIST_KEY_NSCameraUsageDescription = "TUIKit APP 需要访问你的相机权限,开启后录制的视频才会有画面"; - INFOPLIST_KEY_NSMicrophoneUsageDescription = "TUIKit APP 需要访问您的麦克风权限,开启后录制的视频才会有声音"; - INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "TUIKit APP 需要访问你的相册"; - INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; - INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; - INFOPLIST_KEY_UIMainStoryboardFile = Main; - INFOPLIST_KEY_UIRequiresFullScreen = YES; - INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - INFOPLIST_KEY_UIUserInterfaceStyle = Light; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.aby.livekit.demo; - PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE_SPECIFIER = ""; - "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = abyWildcardDev; - SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; - SUPPORTS_MACCATALYST = NO; - SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = 1; - }; - name = Debug; - }; - B3C8DDB52E44C02500F7FE10 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 57948B4C3B6EFD00B09C2237 /* Pods-App-UIKit.release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - CODE_SIGN_IDENTITY = "Apple Development"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; - CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = ""; - "DEVELOPMENT_TEAM[sdk=iphoneos*]" = F8A3GH6Q4W; - ENABLE_USER_SCRIPT_SANDBOXING = NO; - GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_FILE = "App-UIKit/Info.plist"; - INFOPLIST_KEY_NSCameraUsageDescription = "TUIKit APP 需要访问你的相机权限,开启后录制的视频才会有画面"; - INFOPLIST_KEY_NSMicrophoneUsageDescription = "TUIKit APP 需要访问您的麦克风权限,开启后录制的视频才会有声音"; - INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "TUIKit APP 需要访问你的相册"; - INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; - INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; - INFOPLIST_KEY_UIMainStoryboardFile = Main; - INFOPLIST_KEY_UIRequiresFullScreen = YES; - INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - INFOPLIST_KEY_UIUserInterfaceStyle = Light; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.tencent.fx.livekit.demo; - PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE_SPECIFIER = ""; - "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = com.tencent.fx.livekit.demo_IOS_APP_STORE; - SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; - SUPPORTS_MACCATALYST = NO; - SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = 1; - }; - name = Release; - }; - B3C8DDB62E44C02500F7FE10 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - ENABLE_USER_SCRIPT_SANDBOXING = YES; - GCC_C_LANGUAGE_STANDARD = gnu17; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 18.5; - LOCALIZATION_PREFERS_STRING_CATALOGS = YES; - MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; - MTL_FAST_MATH = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - }; - name = Debug; - }; - B3C8DDB72E44C02500F7FE10 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_USER_SCRIPT_SANDBOXING = YES; - GCC_C_LANGUAGE_STANDARD = gnu17; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 18.5; - LOCALIZATION_PREFERS_STRING_CATALOGS = YES; - MTL_ENABLE_DEBUG_INFO = NO; - MTL_FAST_MATH = YES; - SDKROOT = iphoneos; - SWIFT_COMPILATION_MODE = wholemodule; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - B3C8DD9B2E44C02400F7FE10 /* Build configuration list for PBXProject "App-UIKit" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - B3C8DDB62E44C02500F7FE10 /* Debug */, - B3C8DDB72E44C02500F7FE10 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - B3C8DDB32E44C02500F7FE10 /* Build configuration list for PBXNativeTarget "App-UIKit" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - B3C8DDB42E44C02500F7FE10 /* Debug */, - B3C8DDB52E44C02500F7FE10 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = B3C8DD982E44C02400F7FE10 /* Project object */; -} diff --git a/application/App-UIKit.xcodeproj/xcshareddata/xcschemes/App-UIKit.xcscheme b/application/App-UIKit.xcodeproj/xcshareddata/xcschemes/App-UIKit.xcscheme deleted file mode 100644 index ad977e04..00000000 --- a/application/App-UIKit.xcodeproj/xcshareddata/xcschemes/App-UIKit.xcscheme +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/application/App-UIKit/2dMotionRes.bundle/video_boys/4pic.pag b/application/App-UIKit/2dMotionRes.bundle/video_boys/4pic.pag deleted file mode 100644 index 41a3efb4..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_boys/4pic.pag and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_boys/9pic.pag b/application/App-UIKit/2dMotionRes.bundle/video_boys/9pic.pag deleted file mode 100644 index 3da56d50..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_boys/9pic.pag and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_boys/B.pag b/application/App-UIKit/2dMotionRes.bundle/video_boys/B.pag deleted file mode 100644 index d893ce54..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_boys/B.pag and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_boys/CustomGraph.zip b/application/App-UIKit/2dMotionRes.bundle/video_boys/CustomGraph.zip deleted file mode 100644 index c57df5d3..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_boys/CustomGraph.zip and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_boys/DeviceCameraTexture.tex b/application/App-UIKit/2dMotionRes.bundle/video_boys/DeviceCameraTexture.tex deleted file mode 100644 index 119ca577..00000000 --- a/application/App-UIKit/2dMotionRes.bundle/video_boys/DeviceCameraTexture.tex +++ /dev/null @@ -1,4 +0,0 @@ -{ - "type": "TextureData", - "key": "DeviceCameraTexture" -} \ No newline at end of file diff --git a/application/App-UIKit/2dMotionRes.bundle/video_boys/RenderTarget.rdt b/application/App-UIKit/2dMotionRes.bundle/video_boys/RenderTarget.rdt deleted file mode 100644 index a98616e9..00000000 --- a/application/App-UIKit/2dMotionRes.bundle/video_boys/RenderTarget.rdt +++ /dev/null @@ -1 +0,0 @@ -{"type":"RenderTarget","path":"RenderTarget.rdt","key":"RenderTarget","input":"DeviceCameraTexture"} \ No newline at end of file diff --git a/application/App-UIKit/2dMotionRes.bundle/video_boys/RenderTarget_Snapshot_2.rdt b/application/App-UIKit/2dMotionRes.bundle/video_boys/RenderTarget_Snapshot_2.rdt deleted file mode 100644 index fc150d0f..00000000 --- a/application/App-UIKit/2dMotionRes.bundle/video_boys/RenderTarget_Snapshot_2.rdt +++ /dev/null @@ -1,5 +0,0 @@ -{ - "type": "RenderTarget", - "key": "RenderTarget", - "input": "" -} \ No newline at end of file diff --git a/application/App-UIKit/2dMotionRes.bundle/video_boys/bg1.mp3 b/application/App-UIKit/2dMotionRes.bundle/video_boys/bg1.mp3 deleted file mode 100644 index b71e7913..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_boys/bg1.mp3 and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_boys/gridViewTwo.pag b/application/App-UIKit/2dMotionRes.bundle/video_boys/gridViewTwo.pag deleted file mode 100644 index 5cd682f1..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_boys/gridViewTwo.pag and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_boys/screen_A.pag b/application/App-UIKit/2dMotionRes.bundle/video_boys/screen_A.pag deleted file mode 100644 index 067b1349..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_boys/screen_A.pag and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_boys/screen_B.pag b/application/App-UIKit/2dMotionRes.bundle/video_boys/screen_B.pag deleted file mode 100644 index 02a9a111..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_boys/screen_B.pag and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_boys/screen_C.pag b/application/App-UIKit/2dMotionRes.bundle/video_boys/screen_C.pag deleted file mode 100644 index b85ffbc9..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_boys/screen_C.pag and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_boys/screen_D.pag b/application/App-UIKit/2dMotionRes.bundle/video_boys/screen_D.pag deleted file mode 100644 index fd83361b..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_boys/screen_D.pag and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_boys/screen_E.pag b/application/App-UIKit/2dMotionRes.bundle/video_boys/screen_E.pag deleted file mode 100644 index 0640b854..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_boys/screen_E.pag and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_boys/screen_F.pag b/application/App-UIKit/2dMotionRes.bundle/video_boys/screen_F.pag deleted file mode 100644 index 4a4e59ad..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_boys/screen_F.pag and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_boys/screen_G.pag b/application/App-UIKit/2dMotionRes.bundle/video_boys/screen_G.pag deleted file mode 100644 index d86a8911..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_boys/screen_G.pag and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_boys/screen_H.pag b/application/App-UIKit/2dMotionRes.bundle/video_boys/screen_H.pag deleted file mode 100644 index 34d372cf..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_boys/screen_H.pag and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_boys/screen_I.pag b/application/App-UIKit/2dMotionRes.bundle/video_boys/screen_I.pag deleted file mode 100644 index b4c14295..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_boys/screen_I.pag and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_boys/screen_J.pag b/application/App-UIKit/2dMotionRes.bundle/video_boys/screen_J.pag deleted file mode 100644 index af16a9ab..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_boys/screen_J.pag and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_boys/script_mv.js b/application/App-UIKit/2dMotionRes.bundle/video_boys/script_mv.js deleted file mode 100644 index 7c64d197..00000000 --- a/application/App-UIKit/2dMotionRes.bundle/video_boys/script_mv.js +++ /dev/null @@ -1,370 +0,0 @@ -// 加载 AEJSBridge.js -light.execute("light://js/AEJSBridge.js"); -(function () { - //定义素材对象 - //并挂在global对象下 - var global = global || (function () { - return this; - }()); - var template = {}; - global.template = template; - - var resourcePool = { - "4pic": new Resource("4pic.pag"), - "9pic": new Resource("9pic.pag"), - "B": new Resource("B.pag"), - "bg1": new Resource("bg1.mp3"), - "gridViewTwo": new Resource("gridViewTwo.pag"), - "screen_A": new Resource("screen_A.pag"), - "screen_B": new Resource("screen_B.pag"), - "screen_C": new Resource("screen_C.pag"), - "screen_D": new Resource("screen_D.pag"), - "screen_E": new Resource("screen_E.pag"), - "screen_F": new Resource("screen_F.pag"), - "screen_G": new Resource("screen_G.pag"), - "screen_H": new Resource("screen_H.pag"), - "screen_I": new Resource("screen_I.pag"), - "screen_J": new Resource("screen_J.pag"), - "sh": new Resource("sh.pag"), - }; - global.resourcePool = resourcePool; - - - template.scaleUp_1 = new Map([ - [0.0, 1.0], - [0.286, 1.53], - [0.572, 1.7], - [1.0, 0], - ]); - - template.alphaUp_1 = new Map([ - [0.0, 0.6], - [0.286, 0.25], - [0.572, 0], - [1.0, 0], - ]); - - template.scaleMid_1 = new Map([ - [0.0, 1.0], - [0.143, 1.0], - [0.429, 1.53], - [0.714, 1.7], - [1.0, 0], - ]); - - template.alphaMid_1 = new Map([ - [0.0, 1.0], - [0.143, 0.4], - [0.429, 0.2], - [0.714, 0], - [1.0, 0], - ]); - - template.scaleUp_2 = new Map([ - [0.0, 1.0], - [0.336, 1.53], - [0.667, 1.7], - [1.0, 0], - ]); - - template.alphaUp_2 = new Map([ - [0.0, 0.6], - [0.336, 0.25], - [0.667, 0], - [1.0, 0], - ]); - - template.scaleMid_2 = new Map([ - [0.0, 1.0], - [0.167, 1.0], - [0.5, 1.53], - [0.833, 1.7], - [1.0, 0], - ]); - - template.alphaMid_2 = new Map([ - [0.0, 1.0], - [0.167, 0.4], - [0.5, 0.2], - [0.833, 0], - [1.0, 0], - ]); - - - template.scaleUp_3 = new Map([ - [0.0, 1.0], - [0.222, 1.53], - [0.444, 1.7], - [1.0, 0], - ]); - - template.alphaUp_3 = new Map([ - [0.0, 0.6], - [0.222, 0.25], - [0.444, 0], - [1.0, 0], - ]); - - template.scaleMid_3 = new Map([ - [0.0, 1.0], - [0.111, 1.0], - [0.333, 1.53], - [0.556, 1.7], - [1.0, 0], - ]); - - template.alphaMid_3 = new Map([ - [0.0, 1.0], - [0.111, 0.4], - [0.333, 0.2], - [0.556, 0], - [1.0, 0], - ]); - - template.getValue = function (easeCurve, start, startProgress, end, endProgress, curProgress) { - var value = 0; - var progress = (curProgress - startProgress) / (endProgress - startProgress); - value = (end - start) * progress + start; - return value; - } - - template.getMapProgress = function (jsonMap, progress) { - const arr = Array.from(jsonMap.keys()); - console.log(arr); - for (i = 0; i < arr.length; i++) { - if (progress <= arr[0]) { - // var key = arr[0].tostring; - //console.log(arr[0], jsonMap.get(arr[0])); - return jsonMap.get(arr[0]); - } - if (progress <= arr[i] && i > 0) { - return template.getValue(0, jsonMap.get(arr[i - 1]), arr[i - 1], jsonMap.get(arr[i]), arr[i], progress); - } - } - return 0; - } - - - template.actionList = []; - template.oneLoopTime = 6500; //6.5s - template.lastTime = 0; - template.needAction = function (action) { - var needAction = template.actionList.indexOf(action) == -1; - if (needAction) { - template.actionList.push(action); - } - return needAction; - } - template.resetAction = function () { - template.actionList = []; - } - - - template.onTemplateInit = function (entityManager, eventManager) { - template.def_PAGAsset_2 = light.getComponent(entityManager.getEntity(19), "PAGAsset"); - template.def_PAGAsset_9 = light.getComponent(entityManager.getEntity(20), "PAGAsset"); - template.def_PAGAsset_4 = light.getComponent(entityManager.getEntity(21), "PAGAsset"); - template.B_Image = light.getComponent(entityManager.getEntity(24), "Image"); - template.sh_Image = light.getComponent(entityManager.getEntity(22), "Image"); - // 1格 - template.screen_A_Image = light.getComponent(entityManager.getEntity(25), "Image"); - template.screen_A_Image.enabled = true; - - template.uniformJson = { - "uniformMap": { - "Custom1": { - "scales": [0, 0, 0, 0], - "alphaRatios": [0, 0, 0, 0], - "layers": 3 - } - } - }; - // shaka init - template.Custom = light.getComponent(entityManager.getEntity(42), "CustomGraph"); - template.Custom.enabled = true; - template.uniformJson.uniformMap.Custom1.scales = [1,0,0,0]; - template.uniformJson.uniformMap.Custom1.alphaRatios = [1,0,0,0]; - template.uniformJson.uniformMap.Custom1.layers = 1; - - template.def_PAGAsset_4.enabled = false; - template.def_PAGAsset_9.enabled = false; - template.def_PAGAsset_2.enabled = false; - template.screen_B_Image = light.getComponent(entityManager.getEntity(26), "Image"); - template.screen_B_Image.enabled = false; - template.screen_C_Image = light.getComponent(entityManager.getEntity(27), "Image"); - template.screen_C_Image.enabled = false; - template.screen_D_Image = light.getComponent(entityManager.getEntity(28), "Image"); - template.screen_D_Image.enabled = false; - template.screen_E_Image = light.getComponent(entityManager.getEntity(29), "Image"); - template.screen_E_Image.enabled = false; - template.screen_F_Image = light.getComponent(entityManager.getEntity(30), "Image"); - template.screen_F_Image.enabled = false; - template.screen_G_Image = light.getComponent(entityManager.getEntity(31), "Image"); - template.screen_G_Image.enabled = false; - template.screen_H_Image = light.getComponent(entityManager.getEntity(32), "Image"); - template.screen_H_Image.enabled = false; - template.screen_I_Image = light.getComponent(entityManager.getEntity(33), "Image"); - template.screen_I_Image.enabled = false; - template.screen_J_Image = light.getComponent(entityManager.getEntity(34), "Image"); - template.screen_J_Image.enabled = false; - - } - - //每帧调用 传入参数为开始加载素材至调用该函数经过的时间 - template.onFrameUpdate = function (currentTime, entityManager, eventManager) { - //此处处理MV循环逻辑,修改template.oneLoopTime设置一次MV的总时长 - var time = currentTime % template.oneLoopTime; - if (time < template.lastTime) { - template.resetAction(); - } - template.lastTime = time; - //action0:初始化片段 - if (time < 1000) { - if (template.needAction("action0")) { - - console.log("wy part1: 1格") - // 1格 - template.screen_A_Image.enabled = true; - template.def_PAGAsset_4.enabled = false; - template.def_PAGAsset_9.enabled = false; - template.def_PAGAsset_2.enabled = false; - template.screen_B_Image.enabled = false; - template.screen_C_Image.enabled = false; - template.screen_D_Image.enabled = false; - template.screen_E_Image.enabled = false; - template.screen_F_Image.enabled = false; - template.screen_G_Image.enabled = false; - template.screen_H_Image.enabled = false; - template.screen_I_Image.enabled = false; - template.screen_J_Image.enabled = false; - } - } else if (time < 1750) { - if (template.needAction("action1")) { - console.log("wy part2: 2格") - //2格 - template.screen_A_Image.enabled = false; - template.screen_B_Image.enabled = true; - template.def_PAGAsset_2.enabled = true; - } - } else if (time < 2330) { - if (template.needAction("action2")) { - //2格 - template.screen_B_Image.enabled = false; - template.screen_C_Image.enabled = true; - - // template.CustomGraph.enabled = true; - - } - let progress = (time - 1750) / 580; - template.uniformJson.uniformMap.Custom1.scales[0] = template.getMapProgress(template.scaleUp_1, progress); - template.uniformJson.uniformMap.Custom1.scales[1] = template.getMapProgress(template.scaleMid_1, progress);; - template.uniformJson.uniformMap.Custom1.scales[2] = 1; - template.uniformJson.uniformMap.Custom1.scales[3] = 0; - template.uniformJson.uniformMap.Custom1.alphaRatios[0] = template.getMapProgress(template.alphaUp_1, progress); - template.uniformJson.uniformMap.Custom1.alphaRatios[1] = template.getMapProgress(template.alphaMid_1, progress);; - template.uniformJson.uniformMap.Custom1.alphaRatios[2] = 1; - template.uniformJson.uniformMap.Custom1.alphaRatios[3] = 0; - template.uniformJson.uniformMap.Custom1.layers = 3; - } else if (time < 3000) { - if (template.needAction("action3")) { - //2格 - template.screen_D_Image.enabled = true; - template.screen_C_Image.enabled = false; - - // shaka reset - template.uniformJson.uniformMap.Custom1.scales = [1, 0, 0, 0]; - template.uniformJson.uniformMap.Custom1.alphaRatios = [1, 0, 0, 0]; - template.uniformJson.uniformMap.Custom1.layers = 1; - - } - } else if (time < 3500) { - if (template.needAction("action4")) { - //2格 - template.screen_D_Image.enabled = false; - template.screen_E_Image.enabled = true; - - } - } else if (time < 4000) { - if (template.needAction("action5")) { - //4格 - template.screen_F_Image.enabled = true; - template.def_PAGAsset_4.enabled = true; - template.def_PAGAsset_2.enabled = false; - template.screen_E_Image.enabled = false; - - - } - let progress = (time - 3500) / 500; - template.uniformJson.uniformMap.Custom1.scales[0] = template.getMapProgress(template.scaleUp_2, progress); - template.uniformJson.uniformMap.Custom1.scales[1] = template.getMapProgress(template.scaleMid_2, progress); - template.uniformJson.uniformMap.Custom1.scales[2] = 1; - template.uniformJson.uniformMap.Custom1.scales[3] = 0; - template.uniformJson.uniformMap.Custom1.alphaRatios[0] = template.getMapProgress(template.alphaUp_2, progress); - template.uniformJson.uniformMap.Custom1.alphaRatios[1] = template.getMapProgress(template.alphaMid_2, progress); - template.uniformJson.uniformMap.Custom1.alphaRatios[2] = 1; - template.uniformJson.uniformMap.Custom1.alphaRatios[3] = 0; - template.uniformJson.uniformMap.Custom1.layers = 3; - } else if (time < 5000) { - if (template.needAction("action6")) { - //4格 - template.screen_F_Image.enabled = false; - template.screen_G_Image.enabled = true; - - // // shaka reset - template.uniformJson.uniformMap.Custom1.scales = [1, 0, 0, 0]; - template.uniformJson.uniformMap.Custom1.alphaRatios = [1, 0, 0, 0]; - template.uniformJson.uniformMap.Custom1.layers = 1; - - } - } else if (time < 5250) { - if (template.needAction("action7")) { - //4格 - template.screen_G_Image.enabled = false; - template.screen_H_Image.enabled = true; - } - } else if (time < 6000) { - if (template.needAction("action8")) { - //9格 - template.screen_H_Image.enabled = false; - template.screen_I_Image.enabled = true; - template.def_PAGAsset_4.enabled = false; - template.def_PAGAsset_9.enabled = true; - - - } - let progress = (time - 5250) / 750; - template.uniformJson.uniformMap.Custom1.scales[0] = template.getMapProgress(template.scaleUp_3, progress); - template.uniformJson.uniformMap.Custom1.scales[1] = template.getMapProgress(template.scaleMid_3, progress); - template.uniformJson.uniformMap.Custom1.scales[2] = 1; - template.uniformJson.uniformMap.Custom1.scales[3] = 0; - template.uniformJson.uniformMap.Custom1.alphaRatios[0] = template.getMapProgress(template.alphaUp_3, progress); - template.uniformJson.uniformMap.Custom1.alphaRatios[1] = template.getMapProgress(template.alphaMid_3, progress); - template.uniformJson.uniformMap.Custom1.alphaRatios[2] = 1; - template.uniformJson.uniformMap.Custom1.alphaRatios[3] = 0; - template.uniformJson.uniformMap.Custom1.layers = 3; - } else { - if (template.needAction("action9")) { - //9格 - template.screen_I_Image.enabled = false; - template.screen_J_Image.enabled = true; - - // shaka reset - template.uniformJson.uniformMap.Custom1.scales = [1, 0, 0, 0]; - template.uniformJson.uniformMap.Custom1.alphaRatios = [1, 0, 0, 0]; - template.uniformJson.uniformMap.Custom1.layers = 1; - - } - } - - let alphaSum = 0; - for (var i = 0; i < 4; i++) { - alphaSum += template.uniformJson.uniformMap.Custom1.alphaRatios[i]; - } - for (var i = 0; i < 4; i++) { - template.uniformJson.uniformMap.Custom1.alphaRatios[i] /= alphaSum; - } - // console.log(template.uniformJson.uniformMap.Custom1.scales); - template.Custom.uniformJson = JSON.stringify(template.uniformJson); - - } -}()); \ No newline at end of file diff --git a/application/App-UIKit/2dMotionRes.bundle/video_boys/sh.pag b/application/App-UIKit/2dMotionRes.bundle/video_boys/sh.pag deleted file mode 100644 index 9abd94c0..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_boys/sh.pag and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_boys/template.json b/application/App-UIKit/2dMotionRes.bundle/video_boys/template.json deleted file mode 100644 index 400189de..00000000 --- a/application/App-UIKit/2dMotionRes.bundle/video_boys/template.json +++ /dev/null @@ -1,1909 +0,0 @@ -{ - "componentLevel": 3, - "madeIn": "LightStudio", - "root": { - "id": 16, - "name": "拍摄模板", - "children": [ - { - "id": 18, - "name": "2D画板", - "children": [ - { - "id": 22, - "name": "人脸跟随贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -206, - "right": 206, - "top": 49, - "bottom": -49 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "entityId": 22, - "objectEnabled": true, - "version": 1, - "enabled": true, - "componentID": 0 - }, - { - "componentID": 12, - "enabled": true, - "entityId": 22, - "scaleMode": 1, - "src": "84eecb90-ca0a-43a6-9886-b9326ab9a6a2", - "type": "Image", - "version": 2 - }, - { - "alpha": 1, - "mode": "normal", - "type": "BlendMode", - "enabled": true, - "entityId": 22, - "componentID": 13 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "type": "FaceTracking", - "enabled": true, - "entityId": 22, - "componentID": 14, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "" - }, - { - "type": "EntityIdentifier", - "name": "人脸跟随贴纸", - "id": 22 - } - ] - }, - { - "id": 24, - "name": "前景贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 24, - "type": "ScreenTransform", - "version": 3, - "enabled": true, - "componentID": 17 - }, - { - "componentID": 18, - "enabled": true, - "entityId": 24, - "scaleMode": 3, - "src": "55b15b87-7236-4c24-81f6-d71596363f4f", - "type": "Image", - "version": 4 - }, - { - "alpha": 1, - "componentID": 19, - "enabled": true, - "entityId": 24, - "mode": "add", - "type": "BlendMode", - "version": 2 - }, - { - "type": "EntityIdentifier", - "name": "前景贴纸", - "id": 24 - } - ] - }, - { - "id": 42, - "name": "custom", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 42, - "componentID": 54 - }, - { - "componentID": 60, - "enabled": true, - "entityId": 42, - "type": "CustomGraph", - "version": 3, - "resourcePath": "b44ab9a7-3987-46f1-8107-2a9adc2c7e8d" - }, - { - "type": "EntityIdentifier", - "name": "custom", - "id": 42 - } - ] - }, - { - "id": 83, - "name": "截帧", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 83, - "componentID": 61 - }, - { - "type": "Snapshot", - "enabled": true, - "outTextureId": "RenderTarget2", - "entityId": 83, - "componentID": 62 - }, - { - "type": "EntityIdentifier", - "name": "截帧", - "id": 83 - } - ] - }, - { - "id": 23, - "name": "背景音乐", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "enabled": true, - "entityId": 23, - "componentID": 11, - "objectEnabled": true - }, - { - "componentID": 15, - "enabled": true, - "entityId": 23, - "speed": 1, - "type": "AudioSource", - "version": 7, - "volume": 1, - "volumeEffects": [], - "audioSourceType": 1, - "src": "27457a4c-498a-48c1-9ee0-58b82e1453ec" - }, - { - "type": "EntityIdentifier", - "name": "背景音乐", - "id": 23 - } - ] - }, - { - "id": 21, - "name": "PAG", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "entityId": 21, - "componentID": 9, - "type": "ScreenTransform", - "enabled": true, - "version": 2, - "objectEnabled": true - }, - { - "componentID": 10, - "enabled": true, - "entityId": 21, - "musicID": "", - "scaleMode": 3, - "src": "6f018db8-ecb5-4dd4-b07c-f39dacfd5413", - "type": "PAGAsset", - "usage": 0, - "version": 44, - "replacement": [ - { - "index": 0, - "src": "RenderTarget2", - "replaceType": 2, - "sourceIndex": 0, - "scaleMode": 3 - }, - { - "index": 1, - "src": "RenderTarget2", - "replaceType": 2, - "sourceIndex": 1, - "scaleMode": 3 - }, - { - "index": 2, - "src": "RenderTarget2", - "replaceType": 2, - "sourceIndex": 2, - "scaleMode": 3 - }, - { - "index": 3, - "src": "RenderTarget2", - "replaceType": 2, - "sourceIndex": 3, - "scaleMode": 3 - } - ] - }, - { - "type": "EntityIdentifier", - "name": "PAG", - "id": 21 - } - ] - }, - { - "id": 20, - "name": "PAG", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "entityId": 20, - "componentID": 8, - "type": "ScreenTransform", - "enabled": true, - "version": 2, - "objectEnabled": true - }, - { - "componentID": 16, - "enabled": true, - "entityId": 20, - "musicID": "", - "scaleMode": 3, - "src": "762d5244-7d17-4589-86e5-1e37ada36a4a", - "type": "PAGAsset", - "usage": 0, - "version": 96, - "replacement": [ - { - "index": 0, - "src": "RenderTarget2", - "replaceType": 2, - "sourceIndex": 0, - "scaleMode": 3 - }, - { - "index": 1, - "src": "RenderTarget2", - "replaceType": 2, - "sourceIndex": 1, - "scaleMode": 3 - }, - { - "index": 2, - "src": "RenderTarget2", - "replaceType": 2, - "sourceIndex": 2, - "scaleMode": 3 - }, - { - "index": 3, - "src": "RenderTarget2", - "replaceType": 2, - "sourceIndex": 3, - "scaleMode": 3 - }, - { - "index": 4, - "src": "RenderTarget2", - "replaceType": 2, - "sourceIndex": 4, - "scaleMode": 3 - }, - { - "index": 5, - "src": "RenderTarget2", - "replaceType": 2, - "sourceIndex": 5, - "scaleMode": 3 - }, - { - "index": 6, - "src": "RenderTarget2", - "replaceType": 2, - "sourceIndex": 6, - "scaleMode": 3 - }, - { - "index": 7, - "src": "RenderTarget2", - "replaceType": 2, - "sourceIndex": 7, - "scaleMode": 3 - }, - { - "index": 8, - "src": "RenderTarget2", - "replaceType": 2, - "sourceIndex": 8, - "scaleMode": 3 - } - ] - }, - { - "type": "EntityIdentifier", - "name": "PAG", - "id": 20 - } - ] - }, - { - "id": 19, - "name": "PAG", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 19, - "componentID": 20, - "type": "ScreenTransform", - "enabled": true, - "version": 4 - }, - { - "backgroundVolume": 1, - "componentID": 21, - "enabled": true, - "entityId": 19, - "musicID": "", - "scaleMode": 3, - "src": "8c27dce9-cf85-4fc9-a4a1-e04de9ee0e3e", - "type": "PAGAsset", - "usage": 0, - "version": 38, - "replacement": [ - { - "index": 0, - "src": "RenderTarget2", - "replaceType": 2, - "sourceIndex": 0, - "scaleMode": 3 - }, - { - "index": 1, - "src": "RenderTarget2", - "replaceType": 2, - "sourceIndex": 1, - "scaleMode": 3 - } - ] - }, - { - "type": "EntityIdentifier", - "name": "PAG", - "id": 19 - } - ] - }, - { - "id": 25, - "name": "前景贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 25, - "type": "ScreenTransform", - "version": 3, - "enabled": true, - "componentID": 22 - }, - { - "componentID": 23, - "enabled": true, - "entityId": 25, - "scaleMode": 1, - "src": "02eb4036-3742-4855-9322-7584bc2a04d1", - "type": "Image", - "version": 2 - }, - { - "alpha": 1, - "componentID": 24, - "enabled": true, - "entityId": 25, - "mode": "screen", - "type": "BlendMode", - "version": 2 - }, - { - "type": "EntityIdentifier", - "name": "前景贴纸", - "id": 25 - } - ] - }, - { - "id": 26, - "name": "前景贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 26, - "type": "ScreenTransform", - "version": 3, - "enabled": true, - "componentID": 25 - }, - { - "componentID": 26, - "enabled": true, - "entityId": 26, - "scaleMode": 3, - "src": "db027b98-90d7-4566-8268-c99efb4cc859", - "type": "Image", - "version": 4 - }, - { - "alpha": 1, - "componentID": 27, - "enabled": true, - "entityId": 26, - "mode": "screen", - "type": "BlendMode", - "version": 2 - }, - { - "type": "EntityIdentifier", - "name": "前景贴纸", - "id": 26 - } - ] - }, - { - "id": 27, - "name": "前景贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 27, - "type": "ScreenTransform", - "version": 3, - "enabled": true, - "componentID": 28 - }, - { - "componentID": 29, - "enabled": true, - "entityId": 27, - "scaleMode": 3, - "src": "be5ffa99-c1f1-4722-8cb6-b56424fdc7be", - "type": "Image", - "version": 4 - }, - { - "alpha": 1, - "componentID": 30, - "enabled": true, - "entityId": 27, - "mode": "screen", - "type": "BlendMode", - "version": 2 - }, - { - "type": "EntityIdentifier", - "name": "前景贴纸", - "id": 27 - } - ] - }, - { - "id": 28, - "name": "前景贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 28, - "type": "ScreenTransform", - "version": 5, - "enabled": true, - "componentID": 31 - }, - { - "componentID": 32, - "enabled": true, - "entityId": 28, - "scaleMode": 3, - "src": "ee54419a-76a8-4cc4-b17e-04dc150c78f3", - "type": "Image", - "version": 4 - }, - { - "alpha": 1, - "componentID": 33, - "enabled": true, - "entityId": 28, - "mode": "screen", - "type": "BlendMode", - "version": 2 - }, - { - "type": "EntityIdentifier", - "name": "前景贴纸", - "id": 28 - } - ] - }, - { - "id": 29, - "name": "前景贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 29, - "type": "ScreenTransform", - "version": 3, - "enabled": true, - "componentID": 34 - }, - { - "componentID": 35, - "enabled": true, - "entityId": 29, - "scaleMode": 1, - "src": "76a87db0-c594-4065-a056-8552a435d4f3", - "type": "Image", - "version": 2 - }, - { - "alpha": 1, - "componentID": 36, - "enabled": true, - "entityId": 29, - "mode": "screen", - "type": "BlendMode", - "version": 2 - }, - { - "type": "EntityIdentifier", - "name": "前景贴纸", - "id": 29 - } - ] - }, - { - "id": 30, - "name": "前景贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 30, - "type": "ScreenTransform", - "version": 3, - "enabled": true, - "componentID": 37 - }, - { - "componentID": 38, - "enabled": true, - "entityId": 30, - "scaleMode": 3, - "src": "bdf222d6-2f9d-4546-a1ce-d510fdcb5a2d", - "type": "Image", - "version": 4 - }, - { - "alpha": 1, - "componentID": 39, - "enabled": true, - "entityId": 30, - "mode": "screen", - "type": "BlendMode", - "version": 2 - }, - { - "type": "EntityIdentifier", - "name": "前景贴纸", - "id": 30 - } - ] - }, - { - "id": 31, - "name": "前景贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 31, - "type": "ScreenTransform", - "version": 5, - "enabled": true, - "componentID": 40 - }, - { - "componentID": 41, - "enabled": true, - "entityId": 31, - "scaleMode": 3, - "src": "5b4091d5-84d4-4f8f-aa43-9faf5e63a334", - "type": "Image", - "version": 4 - }, - { - "alpha": 1, - "componentID": 42, - "enabled": true, - "entityId": 31, - "mode": "screen", - "type": "BlendMode", - "version": 2 - }, - { - "type": "EntityIdentifier", - "name": "前景贴纸", - "id": 31 - } - ] - }, - { - "id": 32, - "name": "前景贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 32, - "type": "ScreenTransform", - "version": 3, - "enabled": true, - "componentID": 43 - }, - { - "componentID": 44, - "enabled": true, - "entityId": 32, - "scaleMode": 3, - "src": "e11ce1d5-f4f2-4f57-97aa-0481ffde59b3", - "type": "Image", - "version": 4 - }, - { - "alpha": 1, - "componentID": 45, - "enabled": true, - "entityId": 32, - "mode": "screen", - "type": "BlendMode", - "version": 2 - }, - { - "type": "EntityIdentifier", - "name": "前景贴纸", - "id": 32 - } - ] - }, - { - "id": 33, - "name": "前景贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 33, - "type": "ScreenTransform", - "version": 3, - "enabled": true, - "componentID": 46 - }, - { - "componentID": 47, - "enabled": true, - "entityId": 33, - "scaleMode": 1, - "src": "fb609a81-0d61-4c53-830f-1f2ea69403b1", - "type": "Image", - "version": 2 - }, - { - "alpha": 1, - "componentID": 48, - "enabled": true, - "entityId": 33, - "mode": "screen", - "type": "BlendMode", - "version": 2 - }, - { - "type": "EntityIdentifier", - "name": "前景贴纸", - "id": 33 - } - ] - }, - { - "id": 34, - "name": "前景贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 34, - "type": "ScreenTransform", - "version": 5, - "enabled": true, - "componentID": 49 - }, - { - "componentID": 50, - "enabled": true, - "entityId": 34, - "scaleMode": 3, - "src": "56de3641-4ca7-4f75-b152-3187ea9a85b4", - "type": "Image", - "version": 4 - }, - { - "alpha": 1, - "componentID": 51, - "enabled": true, - "entityId": 34, - "mode": "screen", - "type": "BlendMode", - "version": 2 - }, - { - "type": "EntityIdentifier", - "name": "前景贴纸", - "id": 34 - } - ] - }, - { - "id": 36, - "name": "脚本", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "enabled": true, - "entityId": 36, - "componentID": 52, - "objectEnabled": true - }, - { - "componentID": 53, - "enabled": true, - "entityId": 36, - "scriptPath": "de372300-3af6-4d91-9bf0-0236bdafe701", - "type": "Script", - "version": 8 - }, - { - "type": "EntityIdentifier", - "name": "脚本", - "id": 36 - } - ] - } - ], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "anchor": { - "top": 1, - "bottom": -1, - "left": -1, - "right": 1 - }, - "offset": { - "top": 0, - "bottom": 0, - "left": 0, - "right": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 18, - "componentID": 4 - }, - { - "renderTargetKey": "RenderTarget", - "type": "Camera", - "enabled": true, - "entityId": 18, - "componentID": 5 - }, - { - "type": "EntityIdentifier", - "name": "2D画板", - "id": 18 - } - ] - } - ], - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "entityId": 16, - "componentID": 1, - "type": "ScreenTransform", - "enabled": true, - "version": 2, - "objectEnabled": true - }, - { - "type": "EntityIdentifier", - "name": "拍摄模板", - "id": 16 - } - ], - "enabled": true, - "version": 0 - }, - "inputSources": { - "27457a4c-498a-48c1-9ee0-58b82e1453ec": { - "key": "27457a4c-498a-48c1-9ee0-58b82e1453ec", - "type": "AudioClipData", - "path": "bg1.mp3", - "label": "bg1.mp3", - "timeRange": { - "startTime": 0, - "duration": 6523625 - }, - "loopCount": -1 - }, - "6f018db8-ecb5-4dd4-b07c-f39dacfd5413": { - "key": "6f018db8-ecb5-4dd4-b07c-f39dacfd5413", - "type": "PAGFileData", - "path": "4pic.pag", - "label": "4pic.pag", - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "loopCount": -1 - }, - "762d5244-7d17-4589-86e5-1e37ada36a4a": { - "key": "762d5244-7d17-4589-86e5-1e37ada36a4a", - "type": "PAGFileData", - "path": "9pic.pag", - "label": "9pic.pag", - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "loopCount": -1 - }, - "8c27dce9-cf85-4fc9-a4a1-e04de9ee0e3e": { - "key": "8c27dce9-cf85-4fc9-a4a1-e04de9ee0e3e", - "type": "PAGFileData", - "path": "gridViewTwo.pag", - "label": "gridViewTwo.pag", - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "loopCount": -1 - }, - "RenderTarget": { - "key": "RenderTarget", - "type": "RenderTarget", - "path": "RenderTarget.rdt", - "label": "RenderTarget.rdt", - "inputKey": "DeviceCameraTexture" - }, - "DeviceCameraTexture": { - "key": "DeviceCameraTexture", - "type": "TextureData", - "path": "DeviceCameraTexture.tex", - "label": "DeviceCameraTexture.tex" - }, - "84eecb90-ca0a-43a6-9886-b9326ab9a6a2": { - "key": "84eecb90-ca0a-43a6-9886-b9326ab9a6a2", - "type": "PAGFileData", - "path": "sh.pag", - "label": "sh.pag", - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "loopCount": -1 - }, - "55b15b87-7236-4c24-81f6-d71596363f4f": { - "key": "55b15b87-7236-4c24-81f6-d71596363f4f", - "type": "PAGFileData", - "path": "B.pag", - "label": "B.pag", - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "loopCount": -1 - }, - "b44ab9a7-3987-46f1-8107-2a9adc2c7e8d": { - "key": "b44ab9a7-3987-46f1-8107-2a9adc2c7e8d", - "type": "zip", - "path": "CustomGraph.zip", - "label": "CustomGraph.zip" - }, - "RenderTarget2": { - "key": "RenderTarget2", - "type": "RenderTarget", - "path": "RenderTarget_Snapshot_2.rdt", - "label": "RenderTarget_Snapshot_2.rdt", - "inputKey": "" - }, - "02eb4036-3742-4855-9322-7584bc2a04d1": { - "key": "02eb4036-3742-4855-9322-7584bc2a04d1", - "type": "PAGFileData", - "path": "screen_A.pag", - "label": "screen_A.pag", - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "loopCount": -1 - }, - "db027b98-90d7-4566-8268-c99efb4cc859": { - "key": "db027b98-90d7-4566-8268-c99efb4cc859", - "type": "PAGFileData", - "path": "screen_B.pag", - "label": "screen_B.pag", - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "loopCount": -1 - }, - "be5ffa99-c1f1-4722-8cb6-b56424fdc7be": { - "key": "be5ffa99-c1f1-4722-8cb6-b56424fdc7be", - "type": "PAGFileData", - "path": "screen_C.pag", - "label": "screen_C.pag", - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "loopCount": -1 - }, - "ee54419a-76a8-4cc4-b17e-04dc150c78f3": { - "key": "ee54419a-76a8-4cc4-b17e-04dc150c78f3", - "type": "PAGFileData", - "path": "screen_D.pag", - "label": "screen_D.pag", - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "loopCount": -1 - }, - "76a87db0-c594-4065-a056-8552a435d4f3": { - "key": "76a87db0-c594-4065-a056-8552a435d4f3", - "type": "PAGFileData", - "path": "screen_E.pag", - "label": "screen_E.pag", - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "loopCount": -1 - }, - "bdf222d6-2f9d-4546-a1ce-d510fdcb5a2d": { - "key": "bdf222d6-2f9d-4546-a1ce-d510fdcb5a2d", - "type": "PAGFileData", - "path": "screen_F.pag", - "label": "screen_F.pag", - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "loopCount": -1 - }, - "5b4091d5-84d4-4f8f-aa43-9faf5e63a334": { - "key": "5b4091d5-84d4-4f8f-aa43-9faf5e63a334", - "type": "PAGFileData", - "path": "screen_G.pag", - "label": "screen_G.pag", - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "loopCount": -1 - }, - "e11ce1d5-f4f2-4f57-97aa-0481ffde59b3": { - "key": "e11ce1d5-f4f2-4f57-97aa-0481ffde59b3", - "type": "PAGFileData", - "path": "screen_H.pag", - "label": "screen_H.pag", - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "loopCount": -1 - }, - "fb609a81-0d61-4c53-830f-1f2ea69403b1": { - "key": "fb609a81-0d61-4c53-830f-1f2ea69403b1", - "type": "PAGFileData", - "path": "screen_I.pag", - "label": "screen_I.pag", - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "loopCount": -1 - }, - "56de3641-4ca7-4f75-b152-3187ea9a85b4": { - "key": "56de3641-4ca7-4f75-b152-3187ea9a85b4", - "type": "PAGFileData", - "path": "screen_J.pag", - "label": "screen_J.pag", - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "loopCount": -1 - }, - "de372300-3af6-4d91-9bf0-0236bdafe701": { - "key": "de372300-3af6-4d91-9bf0-0236bdafe701", - "type": "js", - "path": "script_mv.js", - "label": "script_mv.js" - }, - "a12c0ba0-c70f-4031-9a9d-f5cb7fa9795e": { - "key": "a12c0ba0-c70f-4031-9a9d-f5cb7fa9795e", - "type": "JsonData", - "path": "CustomGraph/CustomRender.json", - "label": "CustomRender.json" - }, - "68fdc051-1d25-4688-97c7-eb6ec556533a": { - "key": "68fdc051-1d25-4688-97c7-eb6ec556533a", - "type": "gltf_bin", - "path": "CustomGraph/fs_shaka_triple_fade_transform.bin", - "label": "fs_shaka_triple_fade_transform.bin" - }, - "4636bc51-e2ad-443e-ade4-683674386727": { - "key": "4636bc51-e2ad-443e-ade4-683674386727", - "type": "gltf_bin", - "path": "CustomGraph/vs_shaka_triple_fade_transform.bin", - "label": "vs_shaka_triple_fade_transform.bin" - } - }, - "preset": {}, - "properties": { - "layout": { - "width": 720, - "height": 1280 - }, - "boundsTrackerPlaceHolders": [], - "musicIDs": [], - "fonts": [], - "movieConfig": { - "sourceType": 2, - "minClipAssetCount": 1, - "maxClipAssetCount": 999, - "minImageDuration": 1000000, - "maxImageDuration": 10000000, - "minVideoDuration": 2000000, - "preferredCoverTime": 1000000, - "originVolume": 1 - }, - "resourceIDs": [] - } -} \ No newline at end of file diff --git a/application/App-UIKit/2dMotionRes.bundle/video_boys/template.png b/application/App-UIKit/2dMotionRes.bundle/video_boys/template.png deleted file mode 100644 index 3b0603a4..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_boys/template.png and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_boys/template.studio b/application/App-UIKit/2dMotionRes.bundle/video_boys/template.studio deleted file mode 100644 index 605da3f4..00000000 --- a/application/App-UIKit/2dMotionRes.bundle/video_boys/template.studio +++ /dev/null @@ -1,1811 +0,0 @@ -{ - "name": "template", - "type": "empty_shooting", - "author": "happy", - "category": 1, - "scene": { - "id": 16, - "name": "拍摄模板", - "children": [ - { - "id": 18, - "name": "2D画板", - "children": [ - { - "id": 22, - "name": "人脸跟随贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -206, - "right": 206, - "top": 49, - "bottom": -49 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "entityId": 22, - "objectEnabled": true, - "version": 1, - "enabled": true, - "componentID": 0 - }, - { - "componentID": 12, - "enabled": true, - "entityId": 22, - "scaleMode": 1, - "src": "84eecb90-ca0a-43a6-9886-b9326ab9a6a2", - "type": "Image", - "version": 2 - }, - { - "alpha": 1, - "mode": "normal", - "type": "BlendMode", - "enabled": true, - "entityId": 22, - "componentID": 13 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "type": "FaceTracking", - "enabled": true, - "entityId": 22, - "componentID": 14, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true - } - ] - }, - { - "id": 24, - "name": "前景贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 24, - "type": "ScreenTransform", - "version": 3, - "enabled": true, - "componentID": 17 - }, - { - "componentID": 18, - "enabled": true, - "entityId": 24, - "scaleMode": 3, - "src": "55b15b87-7236-4c24-81f6-d71596363f4f", - "type": "Image", - "version": 4 - }, - { - "alpha": 1, - "componentID": 19, - "enabled": true, - "entityId": 24, - "mode": "add", - "type": "BlendMode", - "version": 2 - } - ] - }, - { - "id": 42, - "name": "custom", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 42, - "componentID": 54 - }, - { - "componentID": 60, - "enabled": true, - "entityId": 42, - "type": "CustomGraph", - "version": 3, - "resourcePath": "b44ab9a7-3987-46f1-8107-2a9adc2c7e8d" - } - ] - }, - { - "id": 83, - "name": "截帧", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 83, - "componentID": 61 - }, - { - "type": "Snapshot", - "enabled": true, - "outTextureId": "RenderTarget2", - "entityId": 83, - "componentID": 62 - } - ] - }, - { - "id": 23, - "name": "背景音乐", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "enabled": true, - "entityId": 23, - "componentID": 11, - "objectEnabled": true - }, - { - "componentID": 15, - "eAudioMeta": { - "rhythmPath": "", - "startTime": 0, - "duration": 6520000, - "enableRhythm": true - }, - "eAudioType": 1, - "eHasVolumeEffects": false, - "eKey": "audioSource", - "enabled": true, - "entityId": 23, - "speed": 1, - "type": "AudioSource", - "version": 6, - "volume": 1, - "volumeEffects": [ - { - "duration": 2000000, - "eAlignMode": 2, - "end": 1, - "endOffset": 0, - "interpolationType": 1, - "start": 1, - "startOffset": 0 - } - ], - "ePath": "27457a4c-498a-48c1-9ee0-58b82e1453ec", - "audioSourceType": 1 - } - ] - }, - { - "id": 21, - "name": "PAG", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "entityId": 21, - "componentID": 9, - "type": "ScreenTransform", - "enabled": true, - "version": 2, - "objectEnabled": true - }, - { - "componentID": 10, - "enabled": true, - "entityId": 21, - "imageLayers": [ - { - "index": 0, - "key": "RenderTarget2", - "name": "timg-2.jpeg 3", - "scaleMode": 3, - "sourceIndex": -1 - }, - { - "index": 1, - "key": "RenderTarget2", - "name": "timg-2.jpeg 2", - "scaleMode": 3, - "sourceIndex": -1 - }, - { - "index": 2, - "key": "RenderTarget2", - "name": "timg-2.jpeg", - "scaleMode": 3, - "sourceIndex": -1 - }, - { - "index": 3, - "key": "RenderTarget2", - "name": "timg-2.jpeg 4", - "scaleMode": 3, - "sourceIndex": -1 - } - ], - "musicID": "", - "scaleMode": 3, - "src": "6f018db8-ecb5-4dd4-b07c-f39dacfd5413", - "textLayers": [], - "type": "PAGAsset", - "usage": 0, - "version": 44 - } - ] - }, - { - "id": 20, - "name": "PAG", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "entityId": 20, - "componentID": 8, - "type": "ScreenTransform", - "enabled": true, - "version": 2, - "objectEnabled": true - }, - { - "componentID": 16, - "enabled": true, - "entityId": 20, - "imageLayers": [ - { - "index": 0, - "key": "RenderTarget2", - "name": "720x1280 copy.png", - "scaleMode": 3, - "sourceIndex": -1 - }, - { - "index": 1, - "key": "RenderTarget2", - "name": "720x1280 copy.png 2", - "scaleMode": 3, - "sourceIndex": -1 - }, - { - "index": 2, - "key": "RenderTarget2", - "name": "720x1280 copy.png 3", - "scaleMode": 3, - "sourceIndex": -1 - }, - { - "index": 3, - "key": "RenderTarget2", - "name": "720x1280 copy.png 4", - "scaleMode": 3, - "sourceIndex": -1 - }, - { - "index": 4, - "key": "RenderTarget2", - "name": "720x1280 copy.png 5", - "scaleMode": 3, - "sourceIndex": -1 - }, - { - "index": 5, - "key": "RenderTarget2", - "name": "720x1280 copy.png 6", - "scaleMode": 3, - "sourceIndex": -1 - }, - { - "index": 6, - "key": "RenderTarget2", - "name": "720x1280 copy.png 7", - "scaleMode": 3, - "sourceIndex": -1 - }, - { - "index": 7, - "key": "RenderTarget2", - "name": "720x1280 copy.png 8", - "scaleMode": 3, - "sourceIndex": -1 - }, - { - "index": 8, - "key": "RenderTarget2", - "name": "720x1280 copy.png 9", - "scaleMode": 3, - "sourceIndex": -1 - } - ], - "musicID": "", - "scaleMode": 3, - "src": "762d5244-7d17-4589-86e5-1e37ada36a4a", - "textLayers": [], - "type": "PAGAsset", - "usage": 0, - "version": 96 - } - ] - }, - { - "id": 19, - "name": "PAG", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 19, - "componentID": 20, - "type": "ScreenTransform", - "enabled": true, - "version": 4 - }, - { - "backgroundVolume": 1, - "componentID": 21, - "enabled": true, - "entityId": 19, - "imageLayers": [ - { - "index": 0, - "key": "RenderTarget2", - "name": "Untitled.png", - "scaleMode": 3, - "sourceIndex": -1 - }, - { - "index": 1, - "key": "RenderTarget2", - "name": "Untitled.png", - "scaleMode": 3, - "sourceIndex": -1 - } - ], - "musicID": "", - "scaleMode": 3, - "src": "8c27dce9-cf85-4fc9-a4a1-e04de9ee0e3e", - "textLayers": [], - "type": "PAGAsset", - "usage": 0, - "version": 38 - } - ] - }, - { - "id": 25, - "name": "前景贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 25, - "type": "ScreenTransform", - "version": 3, - "enabled": true, - "componentID": 22 - }, - { - "componentID": 23, - "enabled": true, - "entityId": 25, - "scaleMode": 1, - "src": "02eb4036-3742-4855-9322-7584bc2a04d1", - "type": "Image", - "version": 2 - }, - { - "alpha": 1, - "componentID": 24, - "enabled": true, - "entityId": 25, - "mode": "screen", - "type": "BlendMode", - "version": 2 - } - ] - }, - { - "id": 26, - "name": "前景贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 26, - "type": "ScreenTransform", - "version": 3, - "enabled": true, - "componentID": 25 - }, - { - "componentID": 26, - "enabled": true, - "entityId": 26, - "scaleMode": 3, - "src": "db027b98-90d7-4566-8268-c99efb4cc859", - "type": "Image", - "version": 4 - }, - { - "alpha": 1, - "componentID": 27, - "enabled": true, - "entityId": 26, - "mode": "screen", - "type": "BlendMode", - "version": 2 - } - ] - }, - { - "id": 27, - "name": "前景贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 27, - "type": "ScreenTransform", - "version": 3, - "enabled": true, - "componentID": 28 - }, - { - "componentID": 29, - "enabled": true, - "entityId": 27, - "scaleMode": 3, - "src": "be5ffa99-c1f1-4722-8cb6-b56424fdc7be", - "type": "Image", - "version": 4 - }, - { - "alpha": 1, - "componentID": 30, - "enabled": true, - "entityId": 27, - "mode": "screen", - "type": "BlendMode", - "version": 2 - } - ] - }, - { - "id": 28, - "name": "前景贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 28, - "type": "ScreenTransform", - "version": 5, - "enabled": true, - "componentID": 31 - }, - { - "componentID": 32, - "enabled": true, - "entityId": 28, - "scaleMode": 3, - "src": "ee54419a-76a8-4cc4-b17e-04dc150c78f3", - "type": "Image", - "version": 4 - }, - { - "alpha": 1, - "componentID": 33, - "enabled": true, - "entityId": 28, - "mode": "screen", - "type": "BlendMode", - "version": 2 - } - ] - }, - { - "id": 29, - "name": "前景贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 29, - "type": "ScreenTransform", - "version": 3, - "enabled": true, - "componentID": 34 - }, - { - "componentID": 35, - "enabled": true, - "entityId": 29, - "scaleMode": 1, - "src": "76a87db0-c594-4065-a056-8552a435d4f3", - "type": "Image", - "version": 2 - }, - { - "alpha": 1, - "componentID": 36, - "enabled": true, - "entityId": 29, - "mode": "screen", - "type": "BlendMode", - "version": 2 - } - ] - }, - { - "id": 30, - "name": "前景贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 30, - "type": "ScreenTransform", - "version": 3, - "enabled": true, - "componentID": 37 - }, - { - "componentID": 38, - "enabled": true, - "entityId": 30, - "scaleMode": 3, - "src": "bdf222d6-2f9d-4546-a1ce-d510fdcb5a2d", - "type": "Image", - "version": 4 - }, - { - "alpha": 1, - "componentID": 39, - "enabled": true, - "entityId": 30, - "mode": "screen", - "type": "BlendMode", - "version": 2 - } - ] - }, - { - "id": 31, - "name": "前景贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 31, - "type": "ScreenTransform", - "version": 5, - "enabled": true, - "componentID": 40 - }, - { - "componentID": 41, - "enabled": true, - "entityId": 31, - "scaleMode": 3, - "src": "5b4091d5-84d4-4f8f-aa43-9faf5e63a334", - "type": "Image", - "version": 4 - }, - { - "alpha": 1, - "componentID": 42, - "enabled": true, - "entityId": 31, - "mode": "screen", - "type": "BlendMode", - "version": 2 - } - ] - }, - { - "id": 32, - "name": "前景贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 32, - "type": "ScreenTransform", - "version": 3, - "enabled": true, - "componentID": 43 - }, - { - "componentID": 44, - "enabled": true, - "entityId": 32, - "scaleMode": 3, - "src": "e11ce1d5-f4f2-4f57-97aa-0481ffde59b3", - "type": "Image", - "version": 4 - }, - { - "alpha": 1, - "componentID": 45, - "enabled": true, - "entityId": 32, - "mode": "screen", - "type": "BlendMode", - "version": 2 - } - ] - }, - { - "id": 33, - "name": "前景贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 33, - "type": "ScreenTransform", - "version": 3, - "enabled": true, - "componentID": 46 - }, - { - "componentID": 47, - "enabled": true, - "entityId": 33, - "scaleMode": 1, - "src": "fb609a81-0d61-4c53-830f-1f2ea69403b1", - "type": "Image", - "version": 2 - }, - { - "alpha": 1, - "componentID": 48, - "enabled": true, - "entityId": 33, - "mode": "screen", - "type": "BlendMode", - "version": 2 - } - ] - }, - { - "id": 34, - "name": "前景贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 34, - "type": "ScreenTransform", - "version": 5, - "enabled": true, - "componentID": 49 - }, - { - "componentID": 50, - "enabled": true, - "entityId": 34, - "scaleMode": 3, - "src": "56de3641-4ca7-4f75-b152-3187ea9a85b4", - "type": "Image", - "version": 4 - }, - { - "alpha": 1, - "componentID": 51, - "enabled": true, - "entityId": 34, - "mode": "screen", - "type": "BlendMode", - "version": 2 - } - ] - }, - { - "id": 36, - "name": "脚本", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "enabled": true, - "entityId": 36, - "componentID": 52, - "objectEnabled": true - }, - { - "componentID": 53, - "enabled": true, - "entityId": 36, - "scriptPath": "de372300-3af6-4d91-9bf0-0236bdafe701", - "type": "Script", - "version": 8 - } - ] - } - ], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "anchor": { - "top": 1, - "bottom": -1, - "left": -1, - "right": 1 - }, - "offset": { - "top": 0, - "bottom": 0, - "left": 0, - "right": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 18, - "componentID": 4 - }, - { - "renderTargetKey": "RenderTarget", - "type": "Camera", - "enabled": true, - "entityId": 18, - "componentID": 5 - } - ] - } - ], - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 0, - "x": 0, - "y": 0, - "z": 0 - }, - "entityId": 16, - "componentID": 1, - "type": "ScreenTransform", - "enabled": true, - "version": 2, - "objectEnabled": true - } - ], - "enabled": true, - "version": 0 - }, - "path": "/Users/ash/Desktop/表情包线上素材/video_boys/", - "resources": { - "items": [ - { - "key": "6f018db8-ecb5-4dd4-b07c-f39dacfd5413", - "type": "PAGFileData", - "path": "4pic.pag", - "label": "4pic.pag", - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "loopCount": -1 - }, - { - "key": "762d5244-7d17-4589-86e5-1e37ada36a4a", - "type": "PAGFileData", - "path": "9pic.pag", - "label": "9pic.pag", - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "loopCount": -1 - }, - { - "key": "55b15b87-7236-4c24-81f6-d71596363f4f", - "type": "PAGFileData", - "path": "B.pag", - "label": "B.pag", - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "loopCount": -1 - }, - { - "key": "27457a4c-498a-48c1-9ee0-58b82e1453ec", - "type": "AudioClipData", - "path": "bg1.mp3", - "label": "bg1.mp3", - "timeRange": { - "startTime": 0, - "duration": 6523625 - }, - "loopCount": -1 - }, - { - "key": "a12c0ba0-c70f-4031-9a9d-f5cb7fa9795e", - "type": "JsonData", - "path": "CustomGraph/CustomRender.json", - "label": "CustomRender.json" - }, - { - "key": "68fdc051-1d25-4688-97c7-eb6ec556533a", - "type": "gltf_bin", - "path": "CustomGraph/fs_shaka_triple_fade_transform.bin", - "label": "fs_shaka_triple_fade_transform.bin" - }, - { - "key": "4636bc51-e2ad-443e-ade4-683674386727", - "type": "gltf_bin", - "path": "CustomGraph/vs_shaka_triple_fade_transform.bin", - "label": "vs_shaka_triple_fade_transform.bin" - }, - { - "key": "b44ab9a7-3987-46f1-8107-2a9adc2c7e8d", - "type": "zip", - "path": "CustomGraph.zip", - "label": "CustomGraph.zip" - }, - { - "key": "DeviceCameraTexture", - "type": "TextureData", - "path": "DeviceCameraTexture.tex", - "label": "DeviceCameraTexture.tex" - }, - { - "key": "8c27dce9-cf85-4fc9-a4a1-e04de9ee0e3e", - "type": "PAGFileData", - "path": "gridViewTwo.pag", - "label": "gridViewTwo.pag", - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "loopCount": -1 - }, - { - "key": "RenderTarget", - "type": "RenderTarget", - "path": "RenderTarget.rdt", - "label": "RenderTarget.rdt", - "inputKey": "DeviceCameraTexture" - }, - { - "key": "RenderTarget2", - "type": "RenderTarget", - "path": "RenderTarget_Snapshot_2.rdt", - "label": "RenderTarget_Snapshot_2.rdt", - "inputKey": "" - }, - { - "key": "02eb4036-3742-4855-9322-7584bc2a04d1", - "type": "PAGFileData", - "path": "screen_A.pag", - "label": "screen_A.pag", - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "loopCount": -1 - }, - { - "key": "db027b98-90d7-4566-8268-c99efb4cc859", - "type": "PAGFileData", - "path": "screen_B.pag", - "label": "screen_B.pag", - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "loopCount": -1 - }, - { - "key": "be5ffa99-c1f1-4722-8cb6-b56424fdc7be", - "type": "PAGFileData", - "path": "screen_C.pag", - "label": "screen_C.pag", - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "loopCount": -1 - }, - { - "key": "ee54419a-76a8-4cc4-b17e-04dc150c78f3", - "type": "PAGFileData", - "path": "screen_D.pag", - "label": "screen_D.pag", - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "loopCount": -1 - }, - { - "key": "76a87db0-c594-4065-a056-8552a435d4f3", - "type": "PAGFileData", - "path": "screen_E.pag", - "label": "screen_E.pag", - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "loopCount": -1 - }, - { - "key": "bdf222d6-2f9d-4546-a1ce-d510fdcb5a2d", - "type": "PAGFileData", - "path": "screen_F.pag", - "label": "screen_F.pag", - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "loopCount": -1 - }, - { - "key": "5b4091d5-84d4-4f8f-aa43-9faf5e63a334", - "type": "PAGFileData", - "path": "screen_G.pag", - "label": "screen_G.pag", - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "loopCount": -1 - }, - { - "key": "e11ce1d5-f4f2-4f57-97aa-0481ffde59b3", - "type": "PAGFileData", - "path": "screen_H.pag", - "label": "screen_H.pag", - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "loopCount": -1 - }, - { - "key": "fb609a81-0d61-4c53-830f-1f2ea69403b1", - "type": "PAGFileData", - "path": "screen_I.pag", - "label": "screen_I.pag", - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "loopCount": -1 - }, - { - "key": "56de3641-4ca7-4f75-b152-3187ea9a85b4", - "type": "PAGFileData", - "path": "screen_J.pag", - "label": "screen_J.pag", - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "loopCount": -1 - }, - { - "key": "de372300-3af6-4d91-9bf0-0236bdafe701", - "type": "js", - "path": "script_mv.js", - "label": "script_mv.js" - }, - { - "key": "84eecb90-ca0a-43a6-9886-b9326ab9a6a2", - "type": "PAGFileData", - "path": "sh.pag", - "label": "sh.pag", - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "loopCount": -1 - } - ] - }, - "cloudResourceData": [], - "componentLevel": 3 -} \ No newline at end of file diff --git a/application/App-UIKit/2dMotionRes.bundle/video_camera_move_face_rhythm/DeviceCameraTexture.tex b/application/App-UIKit/2dMotionRes.bundle/video_camera_move_face_rhythm/DeviceCameraTexture.tex deleted file mode 100644 index 119ca577..00000000 --- a/application/App-UIKit/2dMotionRes.bundle/video_camera_move_face_rhythm/DeviceCameraTexture.tex +++ /dev/null @@ -1,4 +0,0 @@ -{ - "type": "TextureData", - "key": "DeviceCameraTexture" -} \ No newline at end of file diff --git a/application/App-UIKit/2dMotionRes.bundle/video_camera_move_face_rhythm/RenderTarget.rdt b/application/App-UIKit/2dMotionRes.bundle/video_camera_move_face_rhythm/RenderTarget.rdt deleted file mode 100644 index a98616e9..00000000 --- a/application/App-UIKit/2dMotionRes.bundle/video_camera_move_face_rhythm/RenderTarget.rdt +++ /dev/null @@ -1 +0,0 @@ -{"type":"RenderTarget","path":"RenderTarget.rdt","key":"RenderTarget","input":"DeviceCameraTexture"} \ No newline at end of file diff --git a/application/App-UIKit/2dMotionRes.bundle/video_camera_move_face_rhythm/cropImage/default_lut.png b/application/App-UIKit/2dMotionRes.bundle/video_camera_move_face_rhythm/cropImage/default_lut.png deleted file mode 100755 index 39d4db9e..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_camera_move_face_rhythm/cropImage/default_lut.png and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_camera_move_face_rhythm/script_yunjing.js b/application/App-UIKit/2dMotionRes.bundle/video_camera_move_face_rhythm/script_yunjing.js deleted file mode 100644 index 2c11cf01..00000000 --- a/application/App-UIKit/2dMotionRes.bundle/video_camera_move_face_rhythm/script_yunjing.js +++ /dev/null @@ -1,75 +0,0 @@ -/*** light-js-config -***/ - - -let progress = 1.0; -let shadowProgress = 1.0; -let shadowAlpha = 0.0; -let shadowY = 0.0; -let STEP = 0.02;//MAX需要是STEP的整数倍 -let MAX = 1.4;//MAX需要是STEP的整数倍 -let SECOND_MAX = 1.2 -let period = 0;//放大1-还原-放大2-还原 -light.update = function (deltaTime, entityManager, eventManager) { - let canvasYunjing = entityManager.getEntityByName("canvas_yunjing"); - let transform_comp = canvasYunjing.getComponent("ScreenTransform"); - - let shadow = entityManager.getEntityByName("canvas_shadow"); - let shadowBlendMode = shadow.getComponent("BlendMode"); - let shadowTransform = shadow.getComponent("ScreenTransform"); - - if (period == 0){ - progress += STEP; - if (MAX - progress < 0.00001){ - period = 1; - } - shadowProgress = 1.0; - shadowAlpha = 0.0; - shadowY = 0.0; - } else if (period == 1){ - progress -= STEP; - if (progress - 1.0 < 0.00001){ - period = 2; - } - shadowProgress = 1.0; - shadowAlpha = 0.0; - shadowY = 0.0; - } else if (period == 2){ - progress += STEP; - if (SECOND_MAX - progress < 0.00001){ - period = 3; - } - shadowProgress += 0.1; - shadowAlpha = 0.25; - shadowY -= 0.04; - } else if (period == 3){ - progress -= STEP; - if (progress - 1.0 < 0.00001){ - period = 0; - } - shadowProgress = 1.0; - shadowAlpha = 0.0; - shadowY = 0.0; - } - - var comp_scale = transform_comp.scale; - comp_scale.x = progress; - comp_scale.y = progress; - comp_scale.z = 1.0; - transform_comp.SetScale(comp_scale); - - shadowBlendMode.alpha = shadowAlpha; - - let comp_scale2 = shadowTransform.scale; - comp_scale2.x = shadowProgress; - comp_scale2.y = shadowProgress; - comp_scale2.z = 1.0; - shadowTransform.SetScale(comp_scale2); - - var shadow_pos = shadowTransform.pivot; - shadow_pos.y = shadowY; - shadowTransform.pivot(shadow_pos); - -} - - diff --git a/application/App-UIKit/2dMotionRes.bundle/video_camera_move_face_rhythm/template.json b/application/App-UIKit/2dMotionRes.bundle/video_camera_move_face_rhythm/template.json deleted file mode 100644 index 206a44c0..00000000 --- a/application/App-UIKit/2dMotionRes.bundle/video_camera_move_face_rhythm/template.json +++ /dev/null @@ -1,473 +0,0 @@ -{ - "isFragment": false, - "componentLevel": 350, - "madeIn": "LightStudio", - "root": { - "id": 16, - "name": "CanvasTemplate", - "children": [ - { - "id": 17, - "name": "2DCanvas", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 17, - "componentID": 17001, - "type": "ScreenTransform", - "enabled": true, - "version": 6, - "level": 350 - }, - { - "componentID": 17002, - "duplicateInput": 0, - "enabled": true, - "entityId": 17, - "level": 2, - "renderTargetKey": "RenderTarget", - "type": "Camera", - "version": 7 - }, - { - "componentID": 17003, - "enabled": true, - "entityId": 17, - "level": 4, - "scriptPath": "8676d86b-a169-4f92-b7f8-f6bb470123e2", - "type": "Script", - "version": 32 - }, - { - "type": "EntityIdentifier", - "name": "2DCanvas", - "id": 17, - "originID": 17, - "enabled": true - } - ] - }, - { - "id": 19, - "name": "canvas_yunjing", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 19, - "componentID": 19001, - "type": "ScreenTransform", - "enabled": true, - "version": 3051, - "interactive": false, - "attachToParent": true, - "level": 350 - }, - { - "componentID": 19002, - "enabled": true, - "entityId": 19, - "level": 1, - "scaleMode": 2, - "src": "RenderTarget", - "type": "Image", - "version": 4 - }, - { - "alpha": 1, - "componentID": 19003, - "enabled": true, - "entityId": 19, - "level": 2, - "mode": "normal", - "type": "BlendMode", - "version": 44 - }, - { - "startOffset": 0, - "duration": 2000000, - "endOffset": -2147483648, - "loopCount": -1, - "type": "TimeOffset", - "enabled": true, - "entityId": 19, - "componentID": 19004, - "level": 1, - "version": 1 - }, - { - "type": "EntityIdentifier", - "name": "canvas_yunjing", - "id": 19, - "originID": 19, - "enabled": true - } - ] - }, - { - "id": 23, - "name": "canvas_shadow", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "eKeepRatio": true, - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 23, - "componentID": 23001, - "type": "ScreenTransform", - "enabled": true, - "version": 2, - "interactive": false, - "attachToParent": true, - "level": 350 - }, - { - "componentID": 23002, - "enabled": true, - "entityId": 23, - "level": 1, - "scaleMode": 2, - "src": "RenderTarget", - "type": "Image", - "version": 6 - }, - { - "alpha": 0, - "componentID": 23003, - "enabled": true, - "entityId": 23, - "level": 2, - "mode": "multiply", - "type": "BlendMode", - "version": 237 - }, - { - "startOffset": 0, - "duration": 2000000, - "endOffset": -2147483648, - "loopCount": -1, - "type": "TimeOffset", - "enabled": true, - "entityId": 23, - "componentID": 23004, - "level": 1, - "version": 2 - }, - { - "type": "EntityIdentifier", - "name": "canvas_shadow", - "id": 23, - "originID": 23, - "enabled": true - } - ] - } - ], - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 16, - "componentID": 16001, - "type": "ScreenTransform", - "enabled": true, - "version": 4, - "level": 350 - }, - { - "defaultCameraPosition": 0, - "enableDowngradeAsset": true, - "enableRotation": true, - "needAutoBeauty": false, - "needVoiceDecibel": false, - "resetWhenStartRecord": true, - "supportCameraPosition": 0, - "sync3dRenderEnable": false, - "type": "ExtraSetting", - "enabled": true, - "version": 1, - "entityId": 16, - "componentID": 16002, - "level": 4, - "requireAbility": [] - }, - { - "type": "EntityIdentifier", - "name": "CanvasTemplate", - "id": 16, - "originID": 16, - "enabled": true - } - ], - "enabled": true, - "version": 0 - }, - "inputSources": { - "RenderTarget": { - "type": "RenderTarget", - "commandMap": {}, - "inputColor": "#ffffffff", - "sizeType": 0, - "useForDisplay": false, - "compatibilityMode": true, - "depthType": "DEPTH24", - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": false, - "samplerType": "SAMPLER_2D" - }, - "key": "RenderTarget", - "path": "RenderTarget.rdt", - "label": "RenderTarget.rdt", - "inputKey": "DeviceCameraTexture", - "input": "DeviceCameraTexture", - "level": 2, - "width": 0, - "height": 0 - }, - "DeviceCameraTexture": { - "type": "TextureData", - "commandMap": {}, - "key": "DeviceCameraTexture", - "path": "DeviceCameraTexture.tex", - "label": "DeviceCameraTexture.tex", - "level": 2 - }, - "8676d86b-a169-4f92-b7f8-f6bb470123e2": { - "type": "js", - "commandMap": {}, - "key": "8676d86b-a169-4f92-b7f8-f6bb470123e2", - "label": "script_yunjing.js", - "path": "script_yunjing.js", - "level": 2, - "requireAbilities": [] - }, - "9ac4a680-c97e-442f-9520-364a5c2a85ea": { - "type": "folder", - "commandMap": {}, - "key": "9ac4a680-c97e-442f-9520-364a5c2a85ea", - "label": "root", - "path": "./", - "level": 2 - }, - "ae612a09-c6f8-469a-b866-e536cf7b93bb": { - "type": "folder", - "commandMap": {}, - "key": "ae612a09-c6f8-469a-b866-e536cf7b93bb", - "label": "cropImage", - "path": "cropImage", - "level": 2 - }, - "9ca19259-3b9f-47a9-8882-a15ecfcf0772": { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "reSize": 1, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "key": "9ca19259-3b9f-47a9-8882-a15ecfcf0772", - "label": "default_lut.png", - "path": "cropImage/default_lut.png", - "level": 2, - "actualSize": 219654, - "resolution": { - "height": 512, - "width": 512 - }, - "width": 512, - "height": 512 - } - }, - "preset": {}, - "properties": { - "layout": { - "width": 720, - "height": 1280 - }, - "boundsTrackerPlaceHolders": [], - "musicIDs": [], - "fonts": [], - "movieConfig": { - "sourceType": 2, - "minClipAssetCount": 1, - "maxClipAssetCount": 999, - "minImageDuration": 1000000, - "maxImageDuration": 10000000, - "minVideoDuration": 2000000, - "minFreezePointInterval": 0, - "preferredCoverTime": 1000000, - "originVolume": 1, - "cropEvents": [ - "SlowRhythmTrail" - ], - "imageCropSpace": 0, - "videoCropSpace": -1, - "disableEventsWhileTransition": true, - "useInternalRhythm": true, - "headProtectDuration": 0 - }, - "materialConfigs": [], - "resourceIDs": [] - } -} \ No newline at end of file diff --git a/application/App-UIKit/2dMotionRes.bundle/video_camera_move_face_rhythm/template.png b/application/App-UIKit/2dMotionRes.bundle/video_camera_move_face_rhythm/template.png deleted file mode 100644 index 084a34ef..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_camera_move_face_rhythm/template.png and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_camera_move_face_rhythm/video_yunjing.studio b/application/App-UIKit/2dMotionRes.bundle/video_camera_move_face_rhythm/video_yunjing.studio deleted file mode 100644 index 724881cf..00000000 --- a/application/App-UIKit/2dMotionRes.bundle/video_camera_move_face_rhythm/video_yunjing.studio +++ /dev/null @@ -1,423 +0,0 @@ -{ - "name": "video_yunjing", - "author": "jiangpeng", - "category": 1, - "scene": { - "id": 16, - "name": "CanvasTemplate", - "children": [ - { - "id": 17, - "name": "2DCanvas", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 0, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 17, - "componentID": 17001, - "type": "ScreenTransform", - "enabled": true, - "version": 6, - "level": 350 - }, - { - "componentID": 17002, - "duplicateInput": 0, - "enabled": true, - "entityId": 17, - "level": 2, - "renderTargetKey": "RenderTarget", - "type": "Camera", - "version": 7 - }, - { - "componentID": 17003, - "enabled": true, - "entityId": 17, - "level": 4, - "scriptPath": "8676d86b-a169-4f92-b7f8-f6bb470123e2", - "type": "Script", - "version": 32 - } - ] - }, - { - "id": 19, - "name": "canvas_yunjing", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 19, - "componentID": 19001, - "type": "ScreenTransform", - "enabled": true, - "version": 3051, - "interactive": false, - "attachToParent": true, - "level": 350 - }, - { - "componentID": 19002, - "enabled": true, - "entityId": 19, - "level": 1, - "scaleMode": 2, - "src": "RenderTarget", - "type": "Image", - "version": 4 - }, - { - "alpha": 1, - "componentID": 19003, - "enabled": true, - "entityId": 19, - "level": 2, - "mode": "normal", - "type": "BlendMode", - "version": 44 - }, - { - "eAlignMode": 2, - "startOffset": 0, - "duration": 2000000, - "endOffset": 0, - "loopCount": -1, - "type": "TimeOffset", - "enabled": true, - "entityId": 19, - "componentID": 19004, - "level": 1, - "version": 1 - } - ] - }, - { - "id": 23, - "name": "canvas_shadow", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "eKeepRatio": true, - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 23, - "componentID": 23001, - "type": "ScreenTransform", - "enabled": true, - "version": 2, - "interactive": false, - "attachToParent": true, - "level": 350 - }, - { - "componentID": 23002, - "enabled": true, - "entityId": 23, - "level": 1, - "scaleMode": 2, - "src": "RenderTarget", - "type": "Image", - "version": 6 - }, - { - "alpha": 0, - "componentID": 23003, - "enabled": true, - "entityId": 23, - "level": 2, - "mode": "multiply", - "type": "BlendMode", - "version": 237 - }, - { - "eAlignMode": 2, - "startOffset": 0, - "duration": 2000000, - "endOffset": 0, - "loopCount": -1, - "type": "TimeOffset", - "enabled": true, - "entityId": 23, - "componentID": 23004, - "level": 1, - "version": 2 - } - ] - } - ], - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 0, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 16, - "componentID": 16001, - "type": "ScreenTransform", - "enabled": true, - "version": 4, - "level": 350 - }, - { - "defaultCameraPosition": 0, - "enableDowngradeAsset": true, - "enableRotation": true, - "needAutoBeauty": false, - "needVoiceDecibel": false, - "resetWhenStartRecord": true, - "supportCameraPosition": 0, - "sync3dRenderEnable": false, - "type": "ExtraSetting", - "enabled": true, - "version": 1, - "entityId": 16, - "componentID": 16002, - "level": 4 - } - ], - "enabled": true, - "version": 0 - }, - "resources": { - "items": [ - { - "type": "folder", - "commandMap": {}, - "key": "9ac4a680-c97e-442f-9520-364a5c2a85ea", - "label": "root", - "path": "./", - "level": 2 - }, - { - "type": "folder", - "commandMap": {}, - "key": "ae612a09-c6f8-469a-b866-e536cf7b93bb", - "label": "cropImage", - "path": "cropImage", - "level": 2 - }, - { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "reSize": 1, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "key": "9ca19259-3b9f-47a9-8882-a15ecfcf0772", - "label": "default_lut.png", - "path": "cropImage/default_lut.png", - "level": 2, - "actualSize": 219654, - "resolution": { - "height": 512, - "width": 512 - }, - "width": 512, - "height": 512 - }, - { - "type": "TextureData", - "commandMap": {}, - "key": "DeviceCameraTexture", - "path": "DeviceCameraTexture.tex", - "label": "DeviceCameraTexture.tex", - "level": 2 - }, - { - "type": "RenderTarget", - "commandMap": {}, - "inputColor": "#ffffffff", - "sizeType": 0, - "useForDisplay": false, - "compatibilityMode": true, - "depthType": "DEPTH24", - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": false, - "samplerType": "SAMPLER_2D" - }, - "key": "RenderTarget", - "path": "RenderTarget.rdt", - "label": "RenderTarget.rdt", - "inputKey": "DeviceCameraTexture", - "input": "DeviceCameraTexture", - "level": 2, - "width": 0, - "height": 0 - }, - { - "type": "js", - "commandMap": {}, - "key": "8676d86b-a169-4f92-b7f8-f6bb470123e2", - "label": "script_yunjing.js", - "path": "script_yunjing.js", - "level": 2, - "requireAbilities": [] - } - ] - }, - "cloudResourceData": [], - "componentLevel": 350, - "creationTime": "2023-11-28 11:19:28", - "updateTime": "2024-01-18 16:43:34", - "path": "/Users/jiangpeng/XMagic/light-sdk-youtu/assets/MotionRes/2dMotionRes/video_camera_move_face_rhythm/", - "downloadMusicList": [] -} \ No newline at end of file diff --git a/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/DeviceCameraTexture.tex b/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/DeviceCameraTexture.tex deleted file mode 100755 index 119ca577..00000000 --- a/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/DeviceCameraTexture.tex +++ /dev/null @@ -1,4 +0,0 @@ -{ - "type": "TextureData", - "key": "DeviceCameraTexture" -} \ No newline at end of file diff --git a/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/RenderTarget.rdt b/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/RenderTarget.rdt deleted file mode 100755 index a98616e9..00000000 --- a/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/RenderTarget.rdt +++ /dev/null @@ -1 +0,0 @@ -{"type":"RenderTarget","path":"RenderTarget.rdt","key":"RenderTarget","input":"DeviceCameraTexture"} \ No newline at end of file diff --git a/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/Ring.mp3 b/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/Ring.mp3 deleted file mode 100755 index ed2c10bd..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/Ring.mp3 and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/blbl.pag b/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/blbl.pag deleted file mode 100755 index 4c59b91a..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/blbl.pag and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/cropImage/eye_mult_crop.png b/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/cropImage/eye_mult_crop.png deleted file mode 100755 index 9ad3a5f9..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/cropImage/eye_mult_crop.png and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/cropImage/qqBasic_mask_crop.png b/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/cropImage/qqBasic_mask_crop.png deleted file mode 100644 index a8413384..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/cropImage/qqBasic_mask_crop.png and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/cropImage/yj_crop.png b/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/cropImage/yj_crop.png deleted file mode 100755 index 7a2a6352..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/cropImage/yj_crop.png and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/cropImage/zc_Mask_crop.png b/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/cropImage/zc_Mask_crop.png deleted file mode 100755 index a8413384..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/cropImage/zc_Mask_crop.png and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/cropImage/zc_crop.png b/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/cropImage/zc_crop.png deleted file mode 100755 index 08529af9..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/cropImage/zc_crop.png and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/eye.png b/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/eye.png deleted file mode 100755 index f29f0ce0..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/eye.png and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/eye_mult.png b/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/eye_mult.png deleted file mode 100755 index e395a69c..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/eye_mult.png and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/gogo_bmp_1.pag b/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/gogo_bmp_1.pag deleted file mode 100755 index ba160d28..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/gogo_bmp_1.pag and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/gougoubizi.pag b/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/gougoubizi.pag deleted file mode 100755 index b27705b9..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/gougoubizi.pag and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/gougouerduo.pag b/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/gougouerduo.pag deleted file mode 100755 index 13ee9956..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/gougouerduo.pag and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/gougousaihong.png b/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/gougousaihong.png deleted file mode 100755 index 46b99444..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/gougousaihong.png and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/liti_qingxin.png b/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/liti_qingxin.png deleted file mode 100755 index 136bb6fd..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/liti_qingxin.png and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/mask_1.png b/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/mask_1.png deleted file mode 100755 index 11069a33..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/mask_1.png and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/mianmo.png b/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/mianmo.png deleted file mode 100755 index 53305705..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/mianmo.png and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/mouth.png b/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/mouth.png deleted file mode 100755 index 20104542..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/mouth.png and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/peachmask.2021-08-20-06-26-19-675Z.bak b/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/peachmask.2021-08-20-06-26-19-675Z.bak deleted file mode 100755 index 541ca4ce..00000000 --- a/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/peachmask.2021-08-20-06-26-19-675Z.bak +++ /dev/null @@ -1,1451 +0,0 @@ -{ - "name": "peachmask", - "author": "chenziyu", - "category": 1, - "scene": { - "id": 16, - "name": "拍摄模板", - "children": [ - { - "id": 17, - "name": "2D画板", - "children": [ - { - "id": 20, - "name": "滤镜", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 20, - "componentID": 20001 - }, - { - "componentID": 20002, - "enabled": true, - "entityId": 20, - "intensity": 1, - "src": "9e681a9c-f709-4422-a12e-a902b4ea5d86", - "type": "LUTFilter", - "version": 136 - }, - { - "eAlignMode": 0, - "startOffset": 0, - "duration": 2000000, - "endOffset": 0, - "loopCount": 0, - "type": "TimeOffset", - "enabled": true, - "entityId": 20, - "componentID": 20003, - "version": null - } - ] - }, - { - "id": 38, - "name": "脸妆V7", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 38, - "componentID": 38001 - }, - { - "componentID": 38002, - "enabled": true, - "entityId": 38, - "faceImage": "4e1dd035-e55b-469a-8efd-84919d1a4f47", - "type": "MakeupFaceV7", - "visMethod": 0, - "version": 2 - }, - { - "alpha": 1, - "componentID": 38003, - "enabled": true, - "entityId": 38, - "mode": "softlight", - "type": "BlendMode", - "version": 16 - }, - { - "alignPoints": [ - 64 - ], - "componentID": 38004, - "enabled": true, - "entityId": 38, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "genderBinding": "", - "isAllFrameFaceDetect": false, - "isRefine": true, - "isWaitFirstFrameDetect": false, - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "type": "FaceTracking", - "xAxisRotateTrack": true, - "xAxisScale": true, - "xAxisTrack": true, - "yAxisRotateTrack": true, - "yAxisScale": true, - "yAxisTrack": true, - "zAxisRotateTrack": true, - "version": 2 - } - ] - }, - { - "id": 34, - "name": "眼妆", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 34, - "componentID": 34001 - }, - { - "componentID": 34002, - "cropRect": { - "bottom": 1050, - "left": 397, - "right": 1135, - "top": 790 - }, - "enabled": true, - "entityId": 34, - "eyeCropImageName": "cropImage/eye_mult_crop.png", - "eyeImageName": "86abd5a0-b037-4ae3-8e43-625ffc57ee43", - "minVisibility": 0, - "type": "MakeupEyeV6", - "version": 14, - "visMethod": 0 - }, - { - "alpha": 1, - "componentID": 34003, - "enabled": true, - "entityId": 34, - "mode": "multiply", - "type": "BlendMode", - "version": 19 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "female", - "type": "FaceTracking", - "enabled": true, - "entityId": 34, - "componentID": 34004 - } - ] - }, - { - "id": 173, - "name": "眼妆", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 173, - "componentID": 173001 - }, - { - "componentID": 173002, - "cropRect": { - "bottom": 1078, - "left": 362, - "right": 1168, - "top": 807 - }, - "enabled": true, - "entityId": 173, - "eyeCropImageName": "cropImage/eye_crop.png", - "eyeImageName": "ce01cc56-63c4-46bb-bf8f-b7985194143b", - "minVisibility": 0, - "type": "MakeupEyeV6", - "version": 15, - "visMethod": 0 - }, - { - "alpha": 1, - "componentID": 173003, - "enabled": true, - "entityId": 173, - "mode": "multiply", - "type": "BlendMode", - "version": 19 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "female", - "type": "FaceTracking", - "enabled": true, - "entityId": 173, - "componentID": 173004 - } - ] - }, - { - "id": 130, - "name": "脸妆", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 130, - "componentID": 130001 - }, - { - "componentID": 130002, - "enabled": true, - "entityId": 130, - "faceExchangeImageDisableFaceCrop": true, - "faceExchangeImageEnableOpacity": false, - "faceImage": "5117b269-78de-4cc5-b809-7ce863d67d88", - "faceMask": "none", - "facePointsFile": "", - "facePointsOption": false, - "makeupFaceVersion": "v6", - "maskImage": "", - "type": "MakeupFaceV6", - "version": 24, - "visMethod": 2 - }, - { - "alpha": 1, - "mode": "normal", - "type": "BlendMode", - "enabled": true, - "entityId": 130, - "componentID": 130003 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "female", - "type": "FaceTracking", - "enabled": true, - "entityId": 130, - "componentID": 130004 - } - ] - }, - { - "id": 82, - "name": "唇彩", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 82, - "componentID": 82001 - }, - { - "closeMouseMask": "", - "componentID": 82002, - "enabled": true, - "entityId": 82, - "lipsColor": "", - "lipsImage": "5145fe7d-8d32-47fe-a90d-2af27540bbf0", - "lipsImageCrop": "cropImage/mouth_crop.png", - "lipsImageCropRect": { - "bottom": 1417, - "left": 541, - "right": 1001, - "top": 981 - }, - "lipsLut": "", - "lipsMask": "Default", - "lipsMaskCrop": "cropImage/default_mask_crop.png", - "lipsMaskCropRect": { - "bottom": 2048, - "left": 0, - "right": 1536, - "top": 0 - }, - "lipsMaskEnum": 0, - "lipsType": "Image", - "minVisibility": 0, - "openMouseMask": "", - "type": "MakeupLipsV6", - "version": 4, - "visMethod": 0 - }, - { - "alpha": 1, - "componentID": 82003, - "enabled": true, - "entityId": 82, - "mode": "multiply", - "type": "BlendMode", - "version": 100 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "female", - "type": "FaceTracking", - "enabled": true, - "entityId": 82, - "componentID": 82004 - } - ] - }, - { - "id": 79, - "name": "人脸跟随贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "left": -0.008398371196638582, - "right": -0.008398371196638582, - "top": 0.012581720400201668, - "bottom": 0.012581720400201668 - }, - "offset": { - "left": -64.445, - "right": 64.445, - "top": 60, - "bottom": -60 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "eKeepRatio": true, - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "objectEnabled": true, - "entityId": 79, - "componentID": 79001, - "type": "ScreenTransform", - "enabled": true, - "version": 148 - }, - { - "componentID": 79002, - "enabled": true, - "entityId": 79, - "scaleMode": 2, - "src": "36c9b2e6-2bf2-40f0-9a60-968609db10e4", - "type": "Image", - "version": 2 - }, - { - "alpha": 1, - "mode": "normal", - "type": "BlendMode", - "enabled": true, - "entityId": 79, - "componentID": 79003 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "", - "type": "FaceTracking", - "enabled": true, - "entityId": 79, - "componentID": 79004 - }, - { - "componentID": 79005, - "duration": 500000, - "eAlignMode": 2, - "enabled": true, - "endOffset": 0, - "entityId": 79, - "loopCount": -1, - "startOffset": 0, - "type": "TimeOffset", - "version": 4 - } - ] - }, - { - "id": 202, - "name": "人脸跟随贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": 0.29314251766395705, - "left": 0.006368977141375409, - "right": 0.006368977141375409, - "top": 0.29314251766395705 - }, - "offset": { - "bottom": -200, - "left": -411.9133333333333, - "right": 411.9133333333333, - "top": 200 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "eKeepRatio": true, - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 202, - "componentID": 202001, - "type": "ScreenTransform", - "version": 68 - }, - { - "componentID": 202002, - "enabled": true, - "entityId": 202, - "scaleMode": 2, - "src": "1ea62d59-8cb6-449c-af98-1125bd6fb24d", - "type": "Image", - "version": 2 - }, - { - "alpha": 1, - "mode": "normal", - "type": "BlendMode", - "enabled": true, - "entityId": 202, - "componentID": 202003 - }, - { - "alignPoints": [ - 83 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "", - "type": "FaceTracking", - "enabled": true, - "entityId": 202, - "componentID": 202004, - "version": 1 - }, - { - "eAlignMode": 2, - "startOffset": 0, - "duration": 1000000, - "endOffset": 0, - "loopCount": -1, - "type": "TimeOffset", - "enabled": true, - "entityId": 202, - "componentID": 202005, - "version": null - } - ] - }, - { - "id": 234, - "name": "音乐", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 234, - "componentID": 234001 - }, - { - "audioSourceType": 0, - "componentID": 234002, - "eAudioMeta": { - "rhythmPath": "", - "startTime": 0, - "duration": 10529000, - "enableRhythm": true - }, - "eAudioType": 1, - "eHasVolumeEffects": false, - "eKey": "audioSource", - "enabled": true, - "entityId": 234, - "speed": 1, - "type": "AudioSource", - "version": 10, - "volume": 1, - "volumeEffects": [ - { - "duration": 2000000, - "eAlignMode": 2, - "end": 1, - "endOffset": 0, - "interpolationType": 1, - "loopCount": -1, - "start": 1, - "startOffset": 0 - } - ], - "ePath": "f9d28601-d9b8-4504-937b-615edaf809c8" - }, - { - "componentID": 234003, - "duration": 10530000, - "eAlignMode": 2, - "enabled": true, - "endOffset": 0, - "entityId": 234, - "loopCount": 0, - "startOffset": 0, - "type": "TimeOffset", - "version": 2 - } - ] - } - ], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 0, - "x": 0, - "y": 0, - "z": 0 - }, - "entityId": 17, - "componentID": 17001, - "type": "ScreenTransform", - "enabled": true, - "version": 2, - "objectEnabled": true - }, - { - "componentID": 17002, - "enabled": true, - "entityId": 17, - "renderTargetKey": "RenderTarget", - "type": "Camera", - "version": 2 - } - ] - }, - { - "id": 18, - "name": "流程管理", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 18, - "componentID": 18001 - }, - { - "eGraphData": { - "graph": { - "last_node_id": 14, - "last_link_id": 24, - "nodes": [], - "links": [], - "groups": [], - "config": {}, - "version": 0.4 - } - }, - "type": "FlowGraph", - "enabled": true, - "entityId": 18, - "componentID": 18002, - "customNodes": [], - "version": 259 - } - ] - } - ], - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 0, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 16, - "componentID": 16001, - "type": "ScreenTransform", - "enabled": true, - "version": 134 - }, - { - "enableRotation": true, - "resetWhenStartRecord": true, - "type": "ExtraSetting", - "enabled": true, - "version": 1, - "entityId": 16, - "componentID": 16002 - }, - { - "componentID": 16003, - "customImage": "", - "customTips": "点头可切换哦~", - "customTipsInfo1": "提示用户拍摄时如何触发", - "customTipsInfo2": "例如:\"请比心\"", - "enabled": true, - "entityId": 16, - "image": "", - "tips": "", - "type": "Tips", - "version": 9 - } - ], - "enabled": true, - "version": 0 - }, - "resources": { - "items": [ - { - "type": "folder", - "commandMap": {}, - "key": "a5cbc90b-28dc-40a6-9f08-f0ffa233a06c", - "label": "root", - "path": "./" - }, - { - "type": "TextureData", - "commandMap": {}, - "key": "DeviceCameraTexture", - "path": "DeviceCameraTexture.tex", - "label": "DeviceCameraTexture.tex" - }, - { - "type": "PAGFileData", - "commandMap": {}, - "key": "1ea62d59-8cb6-449c-af98-1125bd6fb24d", - "label": "ear2.pag", - "path": "ear2.pag", - "duration": 1000000, - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "loopCount": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "NEAREST", - "minFilter": "NEAREST", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "resolution": { - "width": 1314, - "height": 638 - }, - "frameRate": 24, - "hasAudio": false - }, - { - "type": "ImageData", - "commandMap": {}, - "key": "ce01cc56-63c4-46bb-bf8f-b7985194143b", - "label": "eye.png", - "path": "eye.png", - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "actualSize": 316638, - "resolution": { - "height": 2048, - "width": 1536 - }, - "compression": 0 - }, - { - "type": "ImageData", - "commandMap": {}, - "key": "86abd5a0-b037-4ae3-8e43-625ffc57ee43", - "label": "eye_mult.png", - "path": "eye_mult.png", - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "actualSize": 270010, - "resolution": { - "height": 2048, - "width": 1536 - }, - "compression": 0 - }, - { - "type": "ImageData", - "commandMap": {}, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "4e1dd035-e55b-469a-8efd-84919d1a4f47", - "label": "liti_qingxin.png", - "path": "liti_qingxin.png", - "actualSize": 292441, - "resolution": { - "height": 2048, - "width": 1536 - }, - "compression": 0 - }, - { - "type": "ImageData", - "commandMap": {}, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "5117b269-78de-4cc5-b809-7ce863d67d88", - "label": "mask.png", - "path": "mask.png", - "actualSize": 321045, - "resolution": { - "height": 1024, - "width": 768 - }, - "compression": 0 - }, - { - "type": "ImageData", - "commandMap": {}, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "9e681a9c-f709-4422-a12e-a902b4ea5d86", - "label": "mianmo.png", - "path": "mianmo.png", - "actualSize": 293804, - "resolution": { - "height": 512, - "width": 512 - }, - "compression": 0 - }, - { - "type": "ImageData", - "commandMap": {}, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "5145fe7d-8d32-47fe-a90d-2af27540bbf0", - "label": "mouth.png", - "path": "mouth.png", - "actualSize": 104143, - "resolution": { - "height": 2048, - "width": 1536 - }, - "compression": 0 - }, - { - "type": "PAGFileData", - "commandMap": {}, - "key": "36c9b2e6-2bf2-40f0-9a60-968609db10e4", - "label": "nose.pag", - "path": "nose.pag", - "duration": 500000, - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "loopCount": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "NEAREST", - "minFilter": "NEAREST", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "resolution": { - "width": 232, - "height": 216 - }, - "frameRate": 12, - "hasAudio": false - }, - { - "type": "RenderTarget", - "commandMap": {}, - "width": 0, - "height": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "NEAREST", - "minFilter": "NEAREST", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "RenderTarget", - "path": "RenderTarget.rdt", - "label": "RenderTarget.rdt", - "inputKey": "DeviceCameraTexture", - "input": "DeviceCameraTexture" - }, - { - "type": "js", - "commandMap": {}, - "key": "91ebcbf1-1c2d-4212-856f-a4723421a00b", - "label": "script.js", - "path": "script.js" - }, - { - "type": "folder", - "commandMap": {}, - "key": "3d06b23d-d604-4f75-8962-83395bc49846", - "label": "scripts", - "path": "scripts" - }, - { - "type": "js", - "commandMap": {}, - "key": "3129fb72-d4c9-4cb6-9fba-8c881c1d1674", - "label": "18.flow.js", - "path": "scripts/18.flow.js" - }, - { - "type": "js", - "commandMap": {}, - "key": "d0d309d7-6863-4938-9ab3-d0031567b744", - "label": "light.js", - "path": "scripts/light.js" - }, - { - "type": "AudioClipData", - "commandMap": {}, - "key": "f9d28601-d9b8-4504-937b-615edaf809c8", - "label": "Ring.mp3", - "path": "Ring.mp3", - "duration": 10529250, - "timeRange": { - "startTime": 0, - "duration": 10529250 - }, - "loopCount": 0 - } - ] - }, - "cloudResourceData": [], - "componentLevel": 4, - "path": "/Volumes/PITUWORK/天天P图/animation/妆容(新)/抖音美容美型相关/抖音素材还原/狗狗面膜/video_diejia_dogmask/", - "updateTime": "2021-08-19 23:14:37" -} \ No newline at end of file diff --git a/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/peachmask.2021-08-31-07-21-00-494Z.bak b/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/peachmask.2021-08-31-07-21-00-494Z.bak deleted file mode 100755 index aae74920..00000000 --- a/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/peachmask.2021-08-31-07-21-00-494Z.bak +++ /dev/null @@ -1,2970 +0,0 @@ -{ - "name": "peachmask", - "author": "chenziyu", - "category": 1, - "scene": { - "id": 16, - "name": "拍摄模板", - "children": [ - { - "id": 17, - "name": "2D画板", - "children": [ - { - "id": 20, - "name": "滤镜", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 20, - "componentID": 20001 - }, - { - "componentID": 20002, - "enabled": true, - "entityId": 20, - "intensity": 0.7000000000000001, - "src": "9e681a9c-f709-4422-a12e-a902b4ea5d86", - "type": "LUTFilter", - "version": 140 - }, - { - "eAlignMode": 0, - "startOffset": 0, - "duration": 2000000, - "endOffset": 0, - "loopCount": 0, - "type": "TimeOffset", - "enabled": true, - "entityId": 20, - "componentID": 20003, - "version": null - } - ] - }, - { - "id": 38, - "name": "脸妆V7", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 38, - "componentID": 38001 - }, - { - "componentID": 38002, - "enabled": true, - "entityId": 38, - "faceImage": "4e1dd035-e55b-469a-8efd-84919d1a4f47", - "type": "MakeupFaceV7", - "visMethod": 0, - "version": 2 - }, - { - "alpha": 1, - "componentID": 38003, - "enabled": true, - "entityId": 38, - "mode": "softlight", - "type": "BlendMode", - "version": 16 - }, - { - "alignPoints": [ - 64 - ], - "componentID": 38004, - "enabled": true, - "entityId": 38, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "genderBinding": "", - "isAllFrameFaceDetect": false, - "isRefine": true, - "isWaitFirstFrameDetect": false, - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "type": "FaceTracking", - "xAxisRotateTrack": true, - "xAxisScale": true, - "xAxisTrack": true, - "yAxisRotateTrack": true, - "yAxisScale": true, - "yAxisTrack": true, - "zAxisRotateTrack": true, - "version": 2 - } - ] - }, - { - "id": 34, - "name": "眼妆", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 34, - "componentID": 34001 - }, - { - "componentID": 34002, - "cropRect": { - "bottom": 1050, - "left": 397, - "right": 1135, - "top": 790 - }, - "enabled": true, - "entityId": 34, - "eyeCropImageName": "cropImage/eye_mult_crop.png", - "eyeImageName": "86abd5a0-b037-4ae3-8e43-625ffc57ee43", - "minVisibility": 0, - "type": "MakeupEyeV6", - "version": 14, - "visMethod": 0 - }, - { - "alpha": 0.68, - "componentID": 34003, - "enabled": true, - "entityId": 34, - "mode": "multiply", - "type": "BlendMode", - "version": 117 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "female", - "type": "FaceTracking", - "enabled": true, - "entityId": 34, - "componentID": 34004 - } - ] - }, - { - "id": 173, - "name": "眼妆", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 173, - "componentID": 173001 - }, - { - "componentID": 173002, - "cropRect": { - "bottom": 1049, - "left": 381, - "right": 1158, - "top": 803 - }, - "enabled": true, - "entityId": 173, - "eyeCropImageName": "cropImage/yj_crop.png", - "eyeImageName": "2f904822-be62-405c-ad1b-91e51d3ee0ca", - "minVisibility": 0, - "type": "MakeupEyeV6", - "version": 17, - "visMethod": 0 - }, - { - "alpha": 0.58, - "componentID": 173003, - "enabled": true, - "entityId": 173, - "mode": "multiply", - "type": "BlendMode", - "version": 59 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "female", - "type": "FaceTracking", - "enabled": true, - "entityId": 173, - "componentID": 173004 - } - ] - }, - { - "id": 130, - "name": "脸妆", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 130, - "componentID": 130001 - }, - { - "componentID": 130002, - "enabled": true, - "entityId": 130, - "faceExchangeImageDisableFaceCrop": true, - "faceExchangeImageEnableOpacity": true, - "faceImage": "e40218d9-1eb9-4e76-b71c-dbf1084a73d3", - "faceMask": "none", - "facePointsFile": "", - "facePointsOption": false, - "makeupFaceVersion": "v6", - "maskImage": "", - "type": "MakeupFaceV6", - "version": 58, - "visMethod": 2 - }, - { - "alpha": 1, - "mode": "normal", - "type": "BlendMode", - "enabled": true, - "entityId": 130, - "componentID": 130003 - }, - { - "alignPoints": [ - 64 - ], - "componentID": 130004, - "enabled": true, - "entityId": 130, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "genderBinding": "", - "isAllFrameFaceDetect": false, - "isRefine": true, - "isWaitFirstFrameDetect": false, - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "type": "FaceTracking", - "xAxisRotateTrack": true, - "xAxisScale": true, - "xAxisTrack": true, - "yAxisRotateTrack": true, - "yAxisScale": true, - "yAxisTrack": true, - "zAxisRotateTrack": true, - "version": 2 - } - ] - }, - { - "id": 82, - "name": "唇彩", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 82, - "componentID": 82001 - }, - { - "closeMouseMask": "", - "componentID": 82002, - "enabled": true, - "entityId": 82, - "lipsColor": "", - "lipsImage": "a2520e66-3e8b-49bf-bd16-a26b9e5ae654", - "lipsImageCrop": "cropImage/zc_crop.png", - "lipsImageCropRect": { - "bottom": 1411, - "left": 622, - "right": 918, - "top": 1260 - }, - "lipsLut": "", - "lipsMask": "Basic", - "lipsMaskCrop": "cropImage/qqBasic_mask_crop.png", - "lipsMaskCropRect": { - "bottom": 1430, - "left": 604, - "right": 954, - "top": 1269 - }, - "lipsMaskEnum": 6, - "lipsType": "Image", - "minVisibility": 0, - "openMouseMask": "", - "type": "MakeupLipsV6", - "version": 21, - "visMethod": 2 - }, - { - "alpha": 1, - "componentID": 82003, - "enabled": true, - "entityId": 82, - "mode": "multiply", - "type": "BlendMode", - "version": 120 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "female", - "type": "FaceTracking", - "enabled": true, - "entityId": 82, - "componentID": 82004 - } - ] - }, - { - "id": 79, - "name": "人脸跟随贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "left": -0.00292872824517423, - "right": -0.00292872824517423, - "top": 0.0078117461364996255, - "bottom": 0.0078117461364996255 - }, - "offset": { - "left": -427.2503419972641, - "right": 434.5827633378934, - "top": 648.4199726402188, - "bottom": -499.9110807113543 - }, - "pivot": { - "x": -0.008507936507936508, - "y": -0.12932585206628308 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "eKeepRatio": true, - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "objectEnabled": true, - "entityId": 79, - "componentID": 79001, - "type": "ScreenTransform", - "enabled": true, - "version": 520 - }, - { - "componentID": 79002, - "enabled": true, - "entityId": 79, - "scaleMode": 2, - "src": "b1983b43-cbe1-46ba-be68-1539092b0faf", - "type": "Image", - "version": 4 - }, - { - "alpha": 1, - "mode": "normal", - "type": "BlendMode", - "enabled": true, - "entityId": 79, - "componentID": 79003 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "", - "type": "FaceTracking", - "enabled": true, - "entityId": 79, - "componentID": 79004 - }, - { - "componentID": 79005, - "duration": 1080000, - "eAlignMode": 2, - "enabled": true, - "endOffset": 0, - "entityId": 79, - "loopCount": -1, - "startOffset": 0, - "type": "TimeOffset", - "version": 5 - } - ] - }, - { - "id": 202, - "name": "人脸跟随贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "left": -0.4782236111111111, - "right": -0.4782236111111111, - "top": 0.19121806640625028, - "bottom": 0.19121806640625028 - }, - "offset": { - "left": -382.4106480008484, - "right": 517.5893519991515, - "top": 576.5934881747797, - "bottom": -623.3853006681512 - }, - "pivot": { - "x": -0.15019855999811454, - "y": 0.03899386633199582 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 202, - "componentID": 202001, - "type": "ScreenTransform", - "version": 598, - "enabled": true - }, - { - "componentID": 202002, - "enabled": true, - "entityId": 202, - "scaleMode": 2, - "src": "76367a50-d377-4e2e-853f-fe9dd2162813", - "type": "Image", - "version": 4 - }, - { - "alpha": 1, - "mode": "normal", - "type": "BlendMode", - "enabled": true, - "entityId": 202, - "componentID": 202003 - }, - { - "alignPoints": [ - 89 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "", - "type": "FaceTracking", - "enabled": true, - "entityId": 202, - "componentID": 202004, - "version": 6 - }, - { - "eAlignMode": 2, - "startOffset": 0, - "duration": 1080000, - "endOffset": 0, - "loopCount": -1, - "type": "TimeOffset", - "enabled": true, - "entityId": 202, - "componentID": 202005, - "version": 1 - } - ] - }, - { - "id": 41, - "name": "人脸跟随贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": 0.1905305664062501, - "left": 0.4439986111111111, - "right": 0.4439986111111111, - "top": 0.1905305664062501 - }, - "offset": { - "bottom": -623.3853006681512, - "left": -382.4106480008484, - "right": 517.5893519991515, - "top": 576.5934881747797 - }, - "pivot": { - "x": -0.15019855999811454, - "y": 0.03899386633199582 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": -1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 41, - "componentID": 41001, - "type": "ScreenTransform", - "version": 764, - "enabled": true - }, - { - "componentID": 41002, - "enabled": true, - "entityId": 41, - "scaleMode": 2, - "src": "76367a50-d377-4e2e-853f-fe9dd2162813", - "type": "Image", - "version": 4 - }, - { - "alpha": 1, - "mode": "normal", - "type": "BlendMode", - "enabled": true, - "entityId": 41, - "componentID": 41003 - }, - { - "alignPoints": [ - 89 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "", - "type": "FaceTracking", - "enabled": true, - "entityId": 41, - "componentID": 41004, - "version": 6 - }, - { - "eAlignMode": 2, - "startOffset": 0, - "duration": 1080000, - "endOffset": 0, - "loopCount": -1, - "type": "TimeOffset", - "enabled": true, - "entityId": 41, - "componentID": 41005, - "version": 1 - } - ] - }, - { - "id": 234, - "name": "音乐", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 234, - "componentID": 234001 - }, - { - "audioSourceType": 0, - "componentID": 234002, - "eAudioMeta": { - "rhythmPath": "", - "startTime": 0, - "duration": 10529000, - "enableRhythm": true - }, - "eAudioType": 1, - "eHasVolumeEffects": false, - "eKey": "audioSource", - "enabled": true, - "entityId": 234, - "speed": 1, - "type": "AudioSource", - "version": 10, - "volume": 1, - "volumeEffects": [ - { - "duration": 2000000, - "eAlignMode": 2, - "end": 1, - "endOffset": 0, - "interpolationType": 1, - "loopCount": -1, - "start": 1, - "startOffset": 0 - } - ], - "ePath": "f9d28601-d9b8-4504-937b-615edaf809c8" - }, - { - "componentID": 234003, - "duration": 10530000, - "eAlignMode": 2, - "enabled": true, - "endOffset": 0, - "entityId": 234, - "loopCount": -1, - "startOffset": 0, - "type": "TimeOffset", - "version": 4 - } - ] - }, - { - "id": 55, - "name": "脸妆", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 55, - "componentID": 55001 - }, - { - "componentID": 55002, - "enabled": true, - "entityId": 55, - "faceExchangeImageDisableFaceCrop": true, - "faceExchangeImageEnableOpacity": false, - "faceImage": "800dcd22-e78f-4d20-9d25-a8c639e0c107", - "faceMask": "none", - "facePointsFile": "", - "facePointsOption": false, - "makeupFaceVersion": "v6", - "maskImage": "", - "type": "MakeupFaceV6", - "visMethod": 0, - "version": 2 - }, - { - "alpha": 1, - "componentID": 55003, - "enabled": true, - "entityId": 55, - "mode": "multiply", - "type": "BlendMode", - "version": 8 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "female", - "type": "FaceTracking", - "enabled": true, - "entityId": 55, - "componentID": 55004 - } - ] - }, - { - "id": 26, - "name": "人脸跟随贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0.4781930555555556, - "right": 0.4781930555555556, - "top": 0.33562431640625007, - "bottom": 0.33562431640625007 - }, - "offset": { - "left": -370.8550000000001, - "right": 370.8550000000001, - "top": 306.255, - "bottom": -306.255 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "entityId": 26, - "componentID": 26001, - "version": 350, - "enabled": true - }, - { - "componentID": 26002, - "enabled": true, - "entityId": 26, - "scaleMode": 2, - "src": "099c357d-fa0a-44b7-852e-c725bd6bac70", - "type": "Image", - "version": 3 - }, - { - "alpha": 1, - "mode": "normal", - "type": "BlendMode", - "enabled": true, - "entityId": 26, - "componentID": 26003 - }, - { - "alignPoints": [ - 89 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "", - "type": "FaceTracking", - "enabled": true, - "entityId": 26, - "componentID": 26004, - "version": 1 - }, - { - "eAlignMode": 2, - "startOffset": 0, - "duration": 1260000, - "endOffset": 0, - "loopCount": -1, - "type": "TimeOffset", - "enabled": true, - "entityId": 26, - "componentID": 26005, - "version": null - } - ] - }, - { - "id": 72, - "name": "人脸跟随贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0.46283195652442966, - "w": 0.8864460389779901 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": -0.6824180555555558, - "right": -0.6824180555555558, - "top": 0.12317119140624991, - "bottom": 0.12317119140624991 - }, - "offset": { - "left": -492.92, - "right": 462.06, - "top": 409.1049999999999, - "bottom": -379.5249999999999 - }, - "pivot": { - "x": 0.03231481287566232, - "y": -0.03750808363871524 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "entityId": 72, - "componentID": 72001, - "version": 774, - "enabled": true - }, - { - "componentID": 72002, - "enabled": true, - "entityId": 72, - "scaleMode": 2, - "src": "099c357d-fa0a-44b7-852e-c725bd6bac70", - "type": "Image", - "version": 3 - }, - { - "alpha": 1, - "mode": "normal", - "type": "BlendMode", - "enabled": true, - "entityId": 72, - "componentID": 72003 - }, - { - "alignPoints": [ - 89 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "", - "type": "FaceTracking", - "enabled": true, - "entityId": 72, - "componentID": 72004, - "version": 1 - }, - { - "componentID": 72005, - "duration": 1360000, - "eAlignMode": 2, - "enabled": true, - "endOffset": 0, - "entityId": 72, - "loopCount": -1, - "startOffset": 400000, - "type": "TimeOffset", - "version": 10 - } - ] - }, - { - "id": 116, - "name": "人脸跟随贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0.243784282674591, - "w": 0.9698294816723376 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0.8475263888888886, - "right": 0.8475263888888886, - "top": -0.21211005859374993, - "bottom": -0.21211005859374993 - }, - "offset": { - "left": -370.8550000000001, - "right": 370.8550000000001, - "top": 306.255, - "bottom": -306.255 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "entityId": 116, - "componentID": 116001, - "version": 481, - "enabled": true - }, - { - "componentID": 116002, - "enabled": true, - "entityId": 116, - "scaleMode": 2, - "src": "099c357d-fa0a-44b7-852e-c725bd6bac70", - "type": "Image", - "version": 3 - }, - { - "alpha": 1, - "componentID": 116003, - "enabled": true, - "entityId": 116, - "mode": "hardlight", - "type": "BlendMode", - "version": 5 - }, - { - "alignPoints": [ - 89 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "", - "type": "FaceTracking", - "enabled": true, - "entityId": 116, - "componentID": 116004, - "version": 1 - }, - { - "componentID": 116005, - "duration": 1360000, - "eAlignMode": 2, - "enabled": true, - "endOffset": 0, - "entityId": 116, - "loopCount": -1, - "startOffset": 300000, - "type": "TimeOffset", - "version": 7 - } - ] - }, - { - "id": 156, - "name": "人脸跟随贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": -0.8332513888888893, - "right": -0.8332513888888893, - "top": -0.1803444335937501, - "bottom": -0.1803444335937501 - }, - "offset": { - "left": -306.49999999999994, - "right": 306.49999999999994, - "top": 252.95000000000002, - "bottom": -252.95000000000002 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "entityId": 156, - "componentID": 156001, - "version": 651, - "enabled": true - }, - { - "componentID": 156002, - "enabled": true, - "entityId": 156, - "scaleMode": 2, - "src": "099c357d-fa0a-44b7-852e-c725bd6bac70", - "type": "Image", - "version": 3 - }, - { - "alpha": 1, - "componentID": 156003, - "enabled": true, - "entityId": 156, - "mode": "hardlight", - "type": "BlendMode", - "version": 12 - }, - { - "alignPoints": [ - 89 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "", - "type": "FaceTracking", - "enabled": true, - "entityId": 156, - "componentID": 156004, - "version": 1 - }, - { - "eAlignMode": 2, - "startOffset": 0, - "duration": 1260000, - "endOffset": 0, - "loopCount": -1, - "type": "TimeOffset", - "enabled": true, - "entityId": 156, - "componentID": 156005, - "version": null - } - ] - }, - { - "id": 199, - "name": "人脸跟随贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": -0.2540847222222225, - "right": -0.2540847222222225, - "top": 0.18682744140624996, - "bottom": 0.18682744140624996 - }, - "offset": { - "left": -319.685, - "right": 319.685, - "top": 260, - "bottom": -260 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "entityId": 199, - "componentID": 199001, - "version": 1283, - "enabled": true - }, - { - "componentID": 199002, - "enabled": true, - "entityId": 199, - "scaleMode": 2, - "src": "099c357d-fa0a-44b7-852e-c725bd6bac70", - "type": "Image", - "version": 3 - }, - { - "alpha": 0.49, - "componentID": 199003, - "enabled": true, - "entityId": 199, - "mode": "normal", - "type": "BlendMode", - "version": 2 - }, - { - "alignPoints": [ - 89 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "", - "type": "FaceTracking", - "enabled": true, - "entityId": 199, - "componentID": 199004, - "version": 1 - }, - { - "eAlignMode": 2, - "startOffset": 0, - "duration": 1260000, - "endOffset": 0, - "loopCount": -1, - "type": "TimeOffset", - "enabled": true, - "entityId": 199, - "componentID": 199005, - "version": null - } - ] - }, - { - "id": 85, - "name": "美容型捏脸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 85, - "componentID": 85001 - }, - { - "cheekboneThin": 0, - "chin": 0.20000000000000018, - "componentID": 85002, - "editMode": false, - "enabled": true, - "enlargeEye": 0.6000000000000001, - "entityId": 85, - "eyeAngle": 0, - "eyeDistance": 0, - "foreHead": 0, - "height": 2048, - "lastPoints": [], - "mouthHeight": 0, - "mouthPosition": 0.30000000000000004, - "mouthSize": 0, - "mouthWidth": 0, - "noseHeight": 0, - "noseSize": 0, - "noseWing": 0, - "overallFactor": 0.8, - "pinchFaceEnabled": true, - "points": [ - { - "fixed": true, - "positionX": 381.2483215332031, - "positionY": 968.1102905273438 - }, - { - "fixed": true, - "positionX": 416.1995849609375, - "positionY": 1162.833984375 - }, - { - "fixed": true, - "positionX": 469.4100341796875, - "positionY": 1306.3858642578125 - }, - { - "fixed": true, - "positionX": 571.165283203125, - "positionY": 1417.846923828125 - }, - { - "fixed": true, - "positionX": 635.0916748046875, - "positionY": 1472.1412353515625 - }, - { - "fixed": true, - "positionX": 769.0972900390625, - "positionY": 1532.72021484375 - }, - { - "fixed": true, - "positionX": 901.3433837890625, - "positionY": 1472.0382080078125 - }, - { - "fixed": true, - "positionX": 965.1058349609375, - "positionY": 1417.74853515625 - }, - { - "fixed": true, - "positionX": 1066.718994140625, - "positionY": 1306.30029296875 - }, - { - "fixed": true, - "positionX": 1119.87109375, - "positionY": 1162.749267578125 - }, - { - "fixed": true, - "positionX": 1154.7723388671875, - "positionY": 968.04931640625 - }, - { - "fixed": true, - "positionX": 420, - "positionY": 855 - }, - { - "fixed": true, - "positionX": 508.3151550292969, - "positionY": 855.9776000976562 - }, - { - "fixed": false, - "positionX": 699.8558349609375, - "positionY": 866.9613647460938 - }, - { - "fixed": true, - "positionX": 499.62255859375, - "positionY": 812.0860595703125 - }, - { - "fixed": true, - "positionX": 1116, - "positionY": 855 - }, - { - "fixed": true, - "positionX": 1027.6904296875, - "positionY": 855.966796875 - }, - { - "fixed": false, - "positionX": 836.1618041992188, - "positionY": 866.9578857421875 - }, - { - "fixed": true, - "positionX": 1036.3780517578125, - "positionY": 812.0860595703125 - }, - { - "fixed": true, - "positionX": 500.9525146484375, - "positionY": 945.6005859375 - }, - { - "fixed": true, - "positionX": 544.707275390625, - "positionY": 968.685546875 - }, - { - "fixed": true, - "positionX": 580.7925415039062, - "positionY": 981.59814453125 - }, - { - "fixed": true, - "positionX": 618.0525512695312, - "positionY": 976.9537353515625 - }, - { - "fixed": false, - "positionX": 665.0792236328125, - "positionY": 968.9744873046875 - }, - { - "fixed": false, - "positionX": 632.9474487304688, - "positionY": 930.57080078125 - }, - { - "fixed": false, - "positionX": 594.3089599609375, - "positionY": 912.2919921875 - }, - { - "fixed": false, - "positionX": 549.611083984375, - "positionY": 918.4812622070312 - }, - { - "fixed": true, - "positionX": 1035.0491943359375, - "positionY": 945.6005859375 - }, - { - "fixed": true, - "positionX": 991.3195190429688, - "positionY": 968.6734619140625 - }, - { - "fixed": true, - "positionX": 955.240478515625, - "positionY": 981.5890502929688 - }, - { - "fixed": true, - "positionX": 917.983642578125, - "positionY": 976.9483032226562 - }, - { - "fixed": false, - "positionX": 870.9589233398438, - "positionY": 968.971435546875 - }, - { - "fixed": false, - "positionX": 903.0806884765625, - "positionY": 930.5664672851562 - }, - { - "fixed": false, - "positionX": 941.713134765625, - "positionY": 912.2855834960938 - }, - { - "fixed": false, - "positionX": 986.407958984375, - "positionY": 918.4703979492188 - }, - { - "fixed": false, - "positionX": 718.6995239257812, - "positionY": 967.3453979492188 - }, - { - "fixed": false, - "positionX": 710.6118774414062, - "positionY": 1086.4404296875 - }, - { - "fixed": true, - "positionX": 689.3953247070312, - "positionY": 1156.743896484375 - }, - { - "fixed": false, - "positionX": 710.5078735351562, - "positionY": 1196.9625244140625 - }, - { - "fixed": false, - "positionX": 768.0589599609375, - "positionY": 1206.55859375 - }, - { - "fixed": false, - "positionX": 825.6014404296875, - "positionY": 1196.9537353515625 - }, - { - "fixed": true, - "positionX": 846.701416015625, - "positionY": 1156.7293701171875 - }, - { - "fixed": false, - "positionX": 825.462158203125, - "positionY": 1086.434814453125 - }, - { - "fixed": false, - "positionX": 817.3405151367188, - "positionY": 967.3443603515625 - }, - { - "fixed": false, - "positionX": 768.0462646484375, - "positionY": 1138.8211669921875 - }, - { - "fixed": true, - "positionX": 612.4192504882812, - "positionY": 1287.485595703125 - }, - { - "fixed": true, - "positionX": 923.5807495117188, - "positionY": 1287.485595703125 - }, - { - "fixed": false, - "positionX": 768.1617431640625, - "positionY": 1392.7696533203125 - }, - { - "fixed": false, - "positionX": 844.4039916992188, - "positionY": 1321.534912109375 - }, - { - "fixed": false, - "positionX": 768.1033325195312, - "positionY": 1337.728515625 - }, - { - "fixed": false, - "positionX": 691.7477416992188, - "positionY": 1321.5511474609375 - }, - { - "fixed": false, - "positionX": 670.4691162109375, - "positionY": 1275.3924560546875 - }, - { - "fixed": false, - "positionX": 725.6043701171875, - "positionY": 1267.037109375 - }, - { - "fixed": false, - "positionX": 810.5358276367188, - "positionY": 1267.029541015625 - }, - { - "fixed": false, - "positionX": 865.6524658203125, - "positionY": 1275.3746337890625 - }, - { - "fixed": false, - "positionX": 842.0701904296875, - "positionY": 1300.002197265625 - }, - { - "fixed": false, - "positionX": 768.0865478515625, - "positionY": 1305.5965576171875 - }, - { - "fixed": false, - "positionX": 694.072265625, - "positionY": 1300.016845703125 - }, - { - "fixed": false, - "positionX": 768.0203247070312, - "positionY": 966.8074340820312 - }, - { - "fixed": true, - "positionX": 768, - "positionY": 864 - }, - { - "fixed": false, - "positionX": 581.6300048828125, - "positionY": 556.4579467773438 - }, - { - "fixed": false, - "positionX": 954.3408203125, - "positionY": 556.4439697265625 - }, - { - "fixed": false, - "positionX": 767.9866333007812, - "positionY": 543.6483154296875 - }, - { - "fixed": false, - "positionX": 422.3842468261719, - "positionY": 662.1156005859375 - }, - { - "fixed": false, - "positionX": 1113.590087890625, - "positionY": 662.0865478515625 - }, - { - "fixed": true, - "positionX": 529, - "positionY": 1148 - }, - { - "fixed": true, - "positionX": 1007, - "positionY": 1148 - }, - { - "fixed": false, - "positionX": 597.8045654296875, - "positionY": 1337.8426513671875 - }, - { - "fixed": false, - "positionX": 938.3582763671875, - "positionY": 1337.788818359375 - }, - { - "fixed": false, - "positionX": 768.0322875976562, - "positionY": 1052.8072509765625 - }, - { - "fixed": true, - "positionX": 670, - "positionY": 683 - }, - { - "fixed": true, - "positionX": 866, - "positionY": 683 - }, - { - "fixed": false, - "positionX": 560.044677734375, - "positionY": 726.7130737304688 - }, - { - "fixed": false, - "positionX": 975.9483642578125, - "positionY": 726.7044067382812 - }, - { - "fixed": true, - "positionX": 674, - "positionY": 1372 - }, - { - "fixed": true, - "positionX": 862, - "positionY": 1372 - }, - { - "fixed": false, - "positionX": 768.0735473632812, - "positionY": 1267.0753173828125 - }, - { - "fixed": false, - "positionX": 661.2979736328125, - "positionY": 1400.0338134765625 - }, - { - "fixed": false, - "positionX": 874.9606323242188, - "positionY": 1399.9873046875 - }, - { - "fixed": false, - "positionX": 768.25146484375, - "positionY": 1436.438720703125 - }, - { - "fixed": true, - "positionX": 396.8787841796875, - "positionY": 1083.9658203125 - }, - { - "fixed": true, - "positionX": 434.0381774902344, - "positionY": 1240.051025390625 - }, - { - "fixed": true, - "positionX": 516.288818359375, - "positionY": 1368.573974609375 - }, - { - "fixed": false, - "positionX": 442.4998779296875, - "positionY": 957.6348876953125 - }, - { - "fixed": false, - "positionX": 462.2112731933594, - "positionY": 1052.2294921875 - }, - { - "fixed": true, - "positionX": 1139.1689453125, - "positionY": 1083.88671875 - }, - { - "fixed": true, - "positionX": 1102.0531005859375, - "positionY": 1239.9708251953125 - }, - { - "fixed": true, - "positionX": 1019.8887329101562, - "positionY": 1368.482177734375 - }, - { - "fixed": false, - "positionX": 1093.521484375, - "positionY": 957.5970458984375 - }, - { - "fixed": false, - "positionX": 1073.833251953125, - "positionY": 1052.1805419921875 - }, - { - "fixed": true, - "positionX": 373.27703857421875, - "positionY": 887.7207641601562 - }, - { - "fixed": true, - "positionX": 1162.72509765625, - "positionY": 887.6768798828125 - }, - { - "fixed": false, - "positionX": 424.0460205078125, - "positionY": 792.3617553710938 - }, - { - "fixed": false, - "positionX": 1111.9447021484375, - "positionY": 792.3394165039062 - } - ], - "reformFacialType": 0, - "strength": 100, - "stretchEnabled": false, - "symmetry": true, - "thinFace": 0, - "type": "FacialReform", - "vFace": 0, - "version": 1955, - "width": 1536 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "", - "type": "FaceTracking", - "enabled": true, - "entityId": 85, - "componentID": 85003 - } - ] - } - ], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 0, - "x": 0, - "y": 0, - "z": 0 - }, - "entityId": 17, - "componentID": 17001, - "type": "ScreenTransform", - "enabled": true, - "version": 2, - "objectEnabled": true - }, - { - "componentID": 17002, - "enabled": true, - "entityId": 17, - "renderTargetKey": "RenderTarget", - "type": "Camera", - "version": 2 - } - ] - }, - { - "id": 18, - "name": "流程管理", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 18, - "componentID": 18001 - }, - { - "eGraphData": { - "graph": { - "last_node_id": 14, - "last_link_id": 24, - "nodes": [], - "links": [], - "groups": [], - "config": {}, - "version": 0.4 - } - }, - "type": "FlowGraph", - "enabled": true, - "entityId": 18, - "componentID": 18002, - "customNodes": [], - "version": 259 - } - ] - } - ], - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 0, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 16, - "componentID": 16001, - "type": "ScreenTransform", - "enabled": true, - "version": 148 - }, - { - "enableRotation": true, - "resetWhenStartRecord": true, - "type": "ExtraSetting", - "enabled": true, - "version": 1, - "entityId": 16, - "componentID": 16002 - }, - { - "componentID": 16003, - "customImage": "", - "customTips": "点头可切换哦~", - "customTipsInfo1": "提示用户拍摄时如何触发", - "customTipsInfo2": "例如:\"请比心\"", - "enabled": true, - "entityId": 16, - "image": "", - "tips": "", - "type": "Tips", - "version": 9 - } - ], - "enabled": true, - "version": 0 - }, - "resources": { - "items": [ - { - "type": "folder", - "commandMap": {}, - "key": "a5cbc90b-28dc-40a6-9f08-f0ffa233a06c", - "label": "root", - "path": "./" - }, - { - "type": "PAGFileData", - "commandMap": {}, - "loopCount": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "NEAREST", - "minFilter": "NEAREST", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "099c357d-fa0a-44b7-852e-c725bd6bac70", - "label": "blbl.pag", - "path": "blbl.pag", - "duration": 1260000, - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "resolution": { - "width": 1085, - "height": 896 - }, - "frameRate": 11.111114501953125, - "hasAudio": false - }, - { - "type": "TextureData", - "commandMap": {}, - "key": "DeviceCameraTexture", - "path": "DeviceCameraTexture.tex", - "label": "DeviceCameraTexture.tex" - }, - { - "type": "ImageData", - "commandMap": {}, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "ce01cc56-63c4-46bb-bf8f-b7985194143b", - "label": "eye.png", - "path": "eye.png", - "actualSize": 316638, - "resolution": { - "height": 2048, - "width": 1536 - }, - "compression": 0 - }, - { - "type": "ImageData", - "commandMap": {}, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "86abd5a0-b037-4ae3-8e43-625ffc57ee43", - "label": "eye_mult.png", - "path": "eye_mult.png", - "actualSize": 270010, - "resolution": { - "height": 2048, - "width": 1536 - }, - "compression": 0 - }, - { - "type": "PAGFileData", - "commandMap": {}, - "loopCount": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "NEAREST", - "minFilter": "NEAREST", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "b1983b43-cbe1-46ba-be68-1539092b0faf", - "label": "gougoubizi.pag", - "path": "gougoubizi.pag", - "duration": 1080000, - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "resolution": { - "width": 1536, - "height": 2048 - }, - "frameRate": 11.111114501953125, - "hasAudio": false - }, - { - "type": "PAGFileData", - "commandMap": {}, - "loopCount": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "NEAREST", - "minFilter": "NEAREST", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "76367a50-d377-4e2e-853f-fe9dd2162813", - "label": "gougouerduo.pag", - "path": "gougouerduo.pag", - "duration": 1080000, - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "resolution": { - "width": 1536, - "height": 2048 - }, - "frameRate": 11.111114501953125, - "hasAudio": false - }, - { - "type": "ImageData", - "commandMap": {}, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "800dcd22-e78f-4d20-9d25-a8c639e0c107", - "label": "gougousaihong.png", - "path": "gougousaihong.png", - "actualSize": 266517, - "resolution": { - "height": 2048, - "width": 1536 - }, - "compression": 0 - }, - { - "type": "ImageData", - "commandMap": {}, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "4e1dd035-e55b-469a-8efd-84919d1a4f47", - "label": "liti_qingxin.png", - "path": "liti_qingxin.png", - "actualSize": 292441, - "resolution": { - "height": 2048, - "width": 1536 - }, - "compression": 0 - }, - { - "type": "ImageData", - "commandMap": {}, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "e40218d9-1eb9-4e76-b71c-dbf1084a73d3", - "label": "mask_1.png", - "path": "mask_1.png", - "actualSize": 705527, - "resolution": { - "height": 2048, - "width": 1536 - }, - "compression": 0 - }, - { - "type": "ImageData", - "commandMap": {}, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "9e681a9c-f709-4422-a12e-a902b4ea5d86", - "label": "mianmo.png", - "path": "mianmo.png", - "actualSize": 293804, - "resolution": { - "height": 512, - "width": 512 - }, - "compression": 0 - }, - { - "type": "ImageData", - "commandMap": {}, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "5145fe7d-8d32-47fe-a90d-2af27540bbf0", - "label": "mouth.png", - "path": "mouth.png", - "actualSize": 104143, - "resolution": { - "height": 2048, - "width": 1536 - }, - "compression": 0 - }, - { - "type": "default", - "commandMap": {}, - "key": "9047772b-d713-41f6-9c03-e803318db62d", - "label": "peachmask.2021-08-20-06-26-19-675Z.bak", - "path": "peachmask.2021-08-20-06-26-19-675Z.bak" - }, - { - "type": "RenderTarget", - "commandMap": {}, - "width": 0, - "height": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "NEAREST", - "minFilter": "NEAREST", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "RenderTarget", - "path": "RenderTarget.rdt", - "label": "RenderTarget.rdt", - "inputKey": "DeviceCameraTexture", - "input": "DeviceCameraTexture" - }, - { - "type": "AudioClipData", - "commandMap": {}, - "loopCount": 0, - "key": "f9d28601-d9b8-4504-937b-615edaf809c8", - "label": "Ring.mp3", - "path": "Ring.mp3", - "duration": 10529250, - "timeRange": { - "startTime": 0, - "duration": 10529250 - } - }, - { - "type": "js", - "commandMap": {}, - "key": "91ebcbf1-1c2d-4212-856f-a4723421a00b", - "label": "script.js", - "path": "script.js" - }, - { - "type": "folder", - "commandMap": {}, - "key": "3d06b23d-d604-4f75-8962-83395bc49846", - "label": "scripts", - "path": "scripts" - }, - { - "type": "js", - "commandMap": {}, - "key": "3129fb72-d4c9-4cb6-9fba-8c881c1d1674", - "label": "18.flow.js", - "path": "scripts/18.flow.js" - }, - { - "type": "js", - "commandMap": {}, - "key": "d0d309d7-6863-4938-9ab3-d0031567b744", - "label": "light.js", - "path": "scripts/light.js" - }, - { - "type": "ImageData", - "commandMap": {}, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "2f904822-be62-405c-ad1b-91e51d3ee0ca", - "label": "yj.png", - "path": "yj.png", - "actualSize": 52614, - "resolution": { - "height": 2048, - "width": 1536 - } - }, - { - "type": "ImageData", - "commandMap": {}, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "a2520e66-3e8b-49bf-bd16-a26b9e5ae654", - "label": "zc.png", - "path": "zc.png", - "actualSize": 30981, - "resolution": { - "height": 2048, - "width": 1536 - }, - "compression": 0 - }, - { - "type": "ImageData", - "commandMap": {}, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "ef0f767a-8f23-4f56-9a22-81bd64853b6f", - "label": "zc_crop.png", - "path": "zc_crop.png", - "actualSize": 10127, - "resolution": { - "height": 151, - "width": 296 - }, - "compression": 0 - } - ] - }, - "cloudResourceData": [], - "componentLevel": 4, - "path": "/Users/suenfan/Downloads/video_diejia_dogmask/", - "updateTime": "2021-08-20 19:20:57" -} \ No newline at end of file diff --git a/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/peachmask.studio b/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/peachmask.studio deleted file mode 100755 index 9343f078..00000000 --- a/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/peachmask.studio +++ /dev/null @@ -1,3118 +0,0 @@ -{ - "name": "peachmask", - "author": "chenziyu", - "category": 1, - "scene": { - "id": 16, - "name": "拍摄模板", - "children": [ - { - "id": 17, - "name": "2D画板", - "children": [ - { - "id": 20, - "name": "滤镜", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 20, - "componentID": 20001, - "level": 1 - }, - { - "componentID": 20002, - "enabled": true, - "entityId": 20, - "intensity": 0.7000000000000001, - "src": "9e681a9c-f709-4422-a12e-a902b4ea5d86", - "type": "LUTFilter", - "version": 140, - "level": 1 - }, - { - "eAlignMode": 0, - "startOffset": 0, - "duration": 2000000, - "endOffset": 0, - "loopCount": 0, - "type": "TimeOffset", - "enabled": true, - "entityId": 20, - "componentID": 20003, - "version": null, - "level": 1 - } - ] - }, - { - "id": 38, - "name": "脸妆V7", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 38, - "componentID": 38001, - "level": 1 - }, - { - "componentID": 38002, - "enabled": true, - "entityId": 38, - "faceImage": "4e1dd035-e55b-469a-8efd-84919d1a4f47", - "type": "MakeupFaceV7", - "visMethod": 0, - "version": 2, - "level": 2 - }, - { - "alpha": 1, - "componentID": 38003, - "enabled": true, - "entityId": 38, - "mode": "softlight", - "type": "BlendMode", - "version": 16, - "level": 2 - }, - { - "alignPoints": [ - 64 - ], - "componentID": 38004, - "enabled": true, - "entityId": 38, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "genderBinding": "", - "isAllFrameFaceDetect": false, - "isRefine": true, - "isWaitFirstFrameDetect": false, - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "type": "FaceTracking", - "xAxisRotateTrack": true, - "xAxisScale": true, - "xAxisTrack": true, - "yAxisRotateTrack": true, - "yAxisScale": true, - "yAxisTrack": true, - "zAxisRotateTrack": true, - "version": 2, - "level": 2 - } - ] - }, - { - "id": 34, - "name": "眼妆", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 34, - "componentID": 34001, - "level": 1 - }, - { - "componentID": 34002, - "cropRect": { - "bottom": 1050, - "left": 397, - "right": 1135, - "top": 790 - }, - "enabled": true, - "entityId": 34, - "eyeCropImageName": "cropImage/eye_mult_crop.png", - "eyeImageName": "86abd5a0-b037-4ae3-8e43-625ffc57ee43", - "minVisibility": 0, - "type": "MakeupEyeV6", - "version": 14, - "visMethod": 0, - "level": 2 - }, - { - "alpha": 0.68, - "componentID": 34003, - "enabled": true, - "entityId": 34, - "mode": "multiply", - "type": "BlendMode", - "version": 117, - "level": 2 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "female", - "type": "FaceTracking", - "enabled": true, - "entityId": 34, - "componentID": 34004, - "level": 2 - } - ] - }, - { - "id": 173, - "name": "眼妆", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 173, - "componentID": 173001, - "level": 1 - }, - { - "componentID": 173002, - "cropRect": { - "bottom": 1049, - "left": 381, - "right": 1158, - "top": 803 - }, - "enabled": true, - "entityId": 173, - "eyeCropImageName": "cropImage/yj_crop.png", - "eyeImageName": "2f904822-be62-405c-ad1b-91e51d3ee0ca", - "minVisibility": 0, - "type": "MakeupEyeV6", - "version": 17, - "visMethod": 0, - "level": 2 - }, - { - "alpha": 0.58, - "componentID": 173003, - "enabled": true, - "entityId": 173, - "mode": "multiply", - "type": "BlendMode", - "version": 59, - "level": 2 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "female", - "type": "FaceTracking", - "enabled": true, - "entityId": 173, - "componentID": 173004, - "level": 2 - } - ] - }, - { - "id": 130, - "name": "脸妆", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 130, - "componentID": 130001, - "level": 1 - }, - { - "componentID": 130002, - "enabled": true, - "entityId": 130, - "faceExchangeImageDisableFaceCrop": true, - "faceExchangeImageEnableOpacity": true, - "faceImage": "e40218d9-1eb9-4e76-b71c-dbf1084a73d3", - "faceMask": "none", - "facePointsFile": "", - "facePointsOption": false, - "level": 2, - "makeupFaceVersion": "v6", - "maskImage": "", - "type": "MakeupFaceV6", - "version": 60, - "visMethod": 2, - "extraFlag": 1 - }, - { - "alpha": 1, - "mode": "normal", - "type": "BlendMode", - "enabled": true, - "entityId": 130, - "componentID": 130003, - "level": 2 - }, - { - "alignPoints": [ - 64 - ], - "componentID": 130004, - "enabled": true, - "entityId": 130, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "genderBinding": "", - "isAllFrameFaceDetect": false, - "isRefine": true, - "isWaitFirstFrameDetect": false, - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "type": "FaceTracking", - "xAxisRotateTrack": true, - "xAxisScale": true, - "xAxisTrack": true, - "yAxisRotateTrack": true, - "yAxisScale": true, - "yAxisTrack": true, - "zAxisRotateTrack": true, - "version": 2, - "level": 2 - } - ] - }, - { - "id": 82, - "name": "唇彩", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 82, - "componentID": 82001, - "level": 1 - }, - { - "closeMouseMask": "", - "componentID": 82002, - "enabled": true, - "entityId": 82, - "level": 2, - "lipsColor": "", - "lipsImage": "a2520e66-3e8b-49bf-bd16-a26b9e5ae654", - "lipsImageCrop": "cropImage/zc_crop.png", - "lipsImageCropRect": { - "bottom": 1411, - "left": 622, - "right": 918, - "top": 1260 - }, - "lipsLut": "", - "lipsMask": "Basic", - "lipsMaskCrop": "cropImage/qqBasic_mask_crop.png", - "lipsMaskCropRect": { - "bottom": 1430, - "left": 604, - "right": 954, - "top": 1269 - }, - "lipsMaskEnum": 6, - "lipsType": "Image", - "minVisibility": 0, - "openMouseMask": "", - "type": "MakeupLipsV6", - "version": 24, - "visMethod": 2 - }, - { - "alpha": 1, - "componentID": 82003, - "enabled": true, - "entityId": 82, - "mode": "multiply", - "type": "BlendMode", - "version": 120, - "level": 2 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "female", - "type": "FaceTracking", - "enabled": true, - "entityId": 82, - "componentID": 82004, - "level": 2 - } - ] - }, - { - "id": 79, - "name": "人脸跟随贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "left": -0.00292872824517423, - "right": -0.00292872824517423, - "top": 0.0078117461364996255, - "bottom": 0.0078117461364996255 - }, - "offset": { - "left": -427.2503419972641, - "right": 434.5827633378934, - "top": 648.4199726402188, - "bottom": -499.9110807113543 - }, - "pivot": { - "x": -0.008507936507936508, - "y": -0.12932585206628308 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "eKeepRatio": true, - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "objectEnabled": true, - "entityId": 79, - "componentID": 79001, - "type": "ScreenTransform", - "enabled": true, - "version": 520, - "level": 1 - }, - { - "componentID": 79002, - "enabled": true, - "entityId": 79, - "scaleMode": 2, - "src": "b1983b43-cbe1-46ba-be68-1539092b0faf", - "type": "Image", - "version": 4, - "level": 1 - }, - { - "alpha": 1, - "mode": "normal", - "type": "BlendMode", - "enabled": true, - "entityId": 79, - "componentID": 79003, - "level": 2 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "", - "type": "FaceTracking", - "enabled": true, - "entityId": 79, - "componentID": 79004, - "level": 2 - }, - { - "componentID": 79005, - "duration": 1080000, - "eAlignMode": 2, - "enabled": true, - "endOffset": 0, - "entityId": 79, - "loopCount": -1, - "startOffset": 0, - "type": "TimeOffset", - "version": 5, - "level": 1 - } - ] - }, - { - "id": 195, - "name": "人脸跟随贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "left": 0.34766871790922094, - "right": 0.34766871790922094, - "top": 0.21519250610125923, - "bottom": 0.21519250610125923 - }, - "offset": { - "left": -242.28280961182992, - "right": 82.80036968576711, - "top": 83.13000616142945, - "bottom": -239.27295132470732 - }, - "pivot": { - "x": 0.4905896400750554, - "y": 0.4843099032985514 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": -1, - "y": 1, - "z": 1 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "objectEnabled": true, - "entityId": 195, - "componentID": 195001, - "type": "ScreenTransform", - "enabled": true, - "version": 2033, - "level": 1 - }, - { - "componentID": 195002, - "enabled": true, - "entityId": 195, - "scaleMode": 2, - "src": "62b436c8-148a-4d42-be46-a1ed7471aae2", - "type": "Image", - "version": 8, - "level": 1 - }, - { - "alpha": 1, - "mode": "normal", - "type": "BlendMode", - "enabled": true, - "entityId": 195, - "componentID": 195003, - "level": 2 - }, - { - "alignPoints": [ - 89 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "", - "type": "FaceTracking", - "enabled": true, - "entityId": 195, - "componentID": 195004, - "version": 6, - "level": 2 - }, - { - "eAlignMode": 2, - "startOffset": 0, - "duration": 1000000, - "endOffset": 0, - "loopCount": -1, - "type": "TimeOffset", - "enabled": true, - "entityId": 195, - "componentID": 195005, - "version": 3, - "level": 1 - } - ] - }, - { - "id": 41, - "name": "人脸跟随贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "left": -0.35916704576572916, - "right": -0.35916704576572916, - "top": 0.21177483820230664, - "bottom": 0.21177483820230664 - }, - "offset": { - "left": -242.28280961182998, - "right": 82.80036968576712, - "top": 83.13000616142945, - "bottom": -239.27295132470732 - }, - "pivot": { - "x": 0.4905896400750554, - "y": 0.4843099032985514 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "objectEnabled": true, - "entityId": 41, - "componentID": 41001, - "type": "ScreenTransform", - "enabled": true, - "version": 1897, - "level": 1 - }, - { - "componentID": 41002, - "enabled": true, - "entityId": 41, - "scaleMode": 2, - "src": "62b436c8-148a-4d42-be46-a1ed7471aae2", - "type": "Image", - "version": 8, - "level": 1 - }, - { - "alpha": 1, - "mode": "normal", - "type": "BlendMode", - "enabled": true, - "entityId": 41, - "componentID": 41003, - "level": 2 - }, - { - "alignPoints": [ - 89 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "", - "type": "FaceTracking", - "enabled": true, - "entityId": 41, - "componentID": 41004, - "version": 6, - "level": 2 - }, - { - "eAlignMode": 2, - "startOffset": 0, - "duration": 1000000, - "endOffset": 0, - "loopCount": -1, - "type": "TimeOffset", - "enabled": true, - "entityId": 41, - "componentID": 41005, - "version": 3, - "level": 1 - } - ] - }, - { - "id": 234, - "name": "音乐", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 234, - "componentID": 234001, - "level": 1 - }, - { - "audioSourceType": 0, - "componentID": 234002, - "eAudioMeta": { - "rhythmPath": "", - "startTime": 0, - "duration": 10529000, - "enableRhythm": true - }, - "eAudioType": 1, - "eHasVolumeEffects": false, - "eKey": "audioSource", - "enabled": true, - "entityId": 234, - "speed": 1, - "type": "AudioSource", - "version": 10, - "volume": 1, - "volumeEffects": [ - { - "duration": 2000000, - "eAlignMode": 2, - "end": 1, - "endOffset": 0, - "interpolationType": 1, - "loopCount": -1, - "start": 1, - "startOffset": 0 - } - ], - "ePath": "f9d28601-d9b8-4504-937b-615edaf809c8", - "level": 4 - }, - { - "componentID": 234003, - "duration": 10530000, - "eAlignMode": 2, - "enabled": true, - "endOffset": 0, - "entityId": 234, - "loopCount": -1, - "startOffset": 0, - "type": "TimeOffset", - "version": 4, - "level": 1 - } - ] - }, - { - "id": 55, - "name": "脸妆", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 55, - "componentID": 55001, - "level": 1 - }, - { - "componentID": 55002, - "enabled": true, - "entityId": 55, - "faceExchangeImageDisableFaceCrop": true, - "faceExchangeImageEnableOpacity": false, - "faceImage": "800dcd22-e78f-4d20-9d25-a8c639e0c107", - "faceMask": "none", - "facePointsFile": "", - "facePointsOption": false, - "level": 2, - "makeupFaceVersion": "v6", - "maskImage": "", - "type": "MakeupFaceV6", - "version": 4, - "visMethod": 0, - "extraFlag": 1 - }, - { - "alpha": 1, - "componentID": 55003, - "enabled": true, - "entityId": 55, - "mode": "multiply", - "type": "BlendMode", - "version": 8, - "level": 2 - }, - { - "alignPoints": [ - 64 - ], - "componentID": 55004, - "enabled": true, - "entityId": 55, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "genderBinding": "", - "isAllFrameFaceDetect": false, - "isRefine": true, - "isWaitFirstFrameDetect": false, - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "type": "FaceTracking", - "xAxisRotateTrack": true, - "xAxisScale": true, - "xAxisTrack": true, - "yAxisRotateTrack": true, - "yAxisScale": true, - "yAxisTrack": true, - "zAxisRotateTrack": true, - "version": 2, - "level": 2 - } - ] - }, - { - "id": 26, - "name": "人脸跟随贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0.4781930555555556, - "right": 0.4781930555555556, - "top": 0.33562431640625007, - "bottom": 0.33562431640625007 - }, - "offset": { - "left": -370.8550000000001, - "right": 370.8550000000001, - "top": 306.255, - "bottom": -306.255 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "entityId": 26, - "componentID": 26001, - "version": 350, - "enabled": true, - "level": 1 - }, - { - "componentID": 26002, - "enabled": true, - "entityId": 26, - "scaleMode": 2, - "src": "099c357d-fa0a-44b7-852e-c725bd6bac70", - "type": "Image", - "version": 3, - "level": 1 - }, - { - "alpha": 1, - "mode": "normal", - "type": "BlendMode", - "enabled": true, - "entityId": 26, - "componentID": 26003, - "level": 2 - }, - { - "alignPoints": [ - 89 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "", - "type": "FaceTracking", - "enabled": true, - "entityId": 26, - "componentID": 26004, - "version": 1, - "level": 2 - }, - { - "eAlignMode": 2, - "startOffset": 0, - "duration": 1260000, - "endOffset": 0, - "loopCount": -1, - "type": "TimeOffset", - "enabled": true, - "entityId": 26, - "componentID": 26005, - "version": null, - "level": 1 - } - ] - }, - { - "id": 72, - "name": "人脸跟随贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0.46283195652442966, - "w": 0.8864460389779901 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": -0.6824180555555558, - "right": -0.6824180555555558, - "top": 0.12317119140624991, - "bottom": 0.12317119140624991 - }, - "offset": { - "left": -492.92, - "right": 462.06, - "top": 409.1049999999999, - "bottom": -379.5249999999999 - }, - "pivot": { - "x": 0.03231481287566232, - "y": -0.03750808363871524 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "entityId": 72, - "componentID": 72001, - "version": 774, - "enabled": true, - "level": 1 - }, - { - "componentID": 72002, - "enabled": true, - "entityId": 72, - "scaleMode": 2, - "src": "099c357d-fa0a-44b7-852e-c725bd6bac70", - "type": "Image", - "version": 3, - "level": 1 - }, - { - "alpha": 1, - "mode": "normal", - "type": "BlendMode", - "enabled": true, - "entityId": 72, - "componentID": 72003, - "level": 2 - }, - { - "alignPoints": [ - 89 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "", - "type": "FaceTracking", - "enabled": true, - "entityId": 72, - "componentID": 72004, - "version": 1, - "level": 2 - }, - { - "componentID": 72005, - "duration": 1360000, - "eAlignMode": 2, - "enabled": true, - "endOffset": 0, - "entityId": 72, - "loopCount": -1, - "startOffset": 400000, - "type": "TimeOffset", - "version": 10, - "level": 1 - } - ] - }, - { - "id": 116, - "name": "人脸跟随贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0.243784282674591, - "w": 0.9698294816723376 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0.8475263888888886, - "right": 0.8475263888888886, - "top": -0.21211005859374993, - "bottom": -0.21211005859374993 - }, - "offset": { - "left": -370.8550000000001, - "right": 370.8550000000001, - "top": 306.255, - "bottom": -306.255 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "entityId": 116, - "componentID": 116001, - "version": 481, - "enabled": true, - "level": 1 - }, - { - "componentID": 116002, - "enabled": true, - "entityId": 116, - "scaleMode": 2, - "src": "099c357d-fa0a-44b7-852e-c725bd6bac70", - "type": "Image", - "version": 3, - "level": 1 - }, - { - "alpha": 1, - "componentID": 116003, - "enabled": true, - "entityId": 116, - "mode": "hardlight", - "type": "BlendMode", - "version": 5, - "level": 2 - }, - { - "alignPoints": [ - 89 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "", - "type": "FaceTracking", - "enabled": true, - "entityId": 116, - "componentID": 116004, - "version": 1, - "level": 2 - }, - { - "componentID": 116005, - "duration": 1360000, - "eAlignMode": 2, - "enabled": true, - "endOffset": 0, - "entityId": 116, - "loopCount": -1, - "startOffset": 300000, - "type": "TimeOffset", - "version": 7, - "level": 1 - } - ] - }, - { - "id": 156, - "name": "人脸跟随贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": -0.8310471199880313, - "right": -0.8310471199880313, - "top": -0.170067082830734, - "bottom": -0.170067082830734 - }, - "offset": { - "left": -307.3698384201077, - "right": 305.6283662477558, - "top": 246.38689407540397, - "bottom": -259.51077199281866 - }, - "pivot": { - "x": 0.002840909090909091, - "y": 0.025941764110935638 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "entityId": 156, - "componentID": 156001, - "version": 682, - "enabled": true, - "level": 1 - }, - { - "componentID": 156002, - "enabled": true, - "entityId": 156, - "scaleMode": 2, - "src": "099c357d-fa0a-44b7-852e-c725bd6bac70", - "type": "Image", - "version": 3, - "level": 1 - }, - { - "alpha": 1, - "componentID": 156003, - "enabled": true, - "entityId": 156, - "mode": "hardlight", - "type": "BlendMode", - "version": 12, - "level": 2 - }, - { - "alignPoints": [ - 89 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "", - "type": "FaceTracking", - "enabled": true, - "entityId": 156, - "componentID": 156004, - "version": 1, - "level": 2 - }, - { - "eAlignMode": 2, - "startOffset": 0, - "duration": 1260000, - "endOffset": 0, - "loopCount": -1, - "type": "TimeOffset", - "enabled": true, - "entityId": 156, - "componentID": 156005, - "version": null, - "level": 1 - } - ] - }, - { - "id": 199, - "name": "人脸跟随贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": -0.2540847222222225, - "right": -0.2540847222222225, - "top": 0.18682744140624996, - "bottom": 0.18682744140624996 - }, - "offset": { - "left": -319.685, - "right": 319.685, - "top": 260, - "bottom": -260 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "entityId": 199, - "componentID": 199001, - "version": 1283, - "enabled": true, - "level": 1 - }, - { - "componentID": 199002, - "enabled": true, - "entityId": 199, - "scaleMode": 2, - "src": "099c357d-fa0a-44b7-852e-c725bd6bac70", - "type": "Image", - "version": 3, - "level": 1 - }, - { - "alpha": 0.49, - "componentID": 199003, - "enabled": true, - "entityId": 199, - "mode": "normal", - "type": "BlendMode", - "version": 2, - "level": 2 - }, - { - "alignPoints": [ - 89 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "", - "type": "FaceTracking", - "enabled": true, - "entityId": 199, - "componentID": 199004, - "version": 1, - "level": 2 - }, - { - "eAlignMode": 2, - "startOffset": 0, - "duration": 1260000, - "endOffset": 0, - "loopCount": -1, - "type": "TimeOffset", - "enabled": true, - "entityId": 199, - "componentID": 199005, - "version": null, - "level": 1 - } - ] - }, - { - "id": 85, - "name": "美容型捏脸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 85, - "componentID": 85001, - "level": 1 - }, - { - "cheekboneThin": 0, - "chin": 0.20000000000000018, - "componentID": 85002, - "editMode": false, - "enabled": true, - "enlargeEye": 0.6000000000000001, - "entityId": 85, - "eyeAngle": 0, - "eyeDistance": 0, - "foreHead": 0, - "height": 2048, - "lastPoints": [], - "mouthHeight": 0, - "mouthPosition": 0.30000000000000004, - "mouthSize": 0, - "mouthWidth": 0, - "noseHeight": 0, - "noseSize": 0, - "noseWing": 0, - "overallFactor": 0.8, - "pinchFaceEnabled": true, - "points": [ - { - "fixed": true, - "positionX": 381.2483215332031, - "positionY": 968.1102905273438 - }, - { - "fixed": true, - "positionX": 416.1995849609375, - "positionY": 1162.833984375 - }, - { - "fixed": true, - "positionX": 469.4100341796875, - "positionY": 1306.3858642578125 - }, - { - "fixed": true, - "positionX": 571.165283203125, - "positionY": 1417.846923828125 - }, - { - "fixed": true, - "positionX": 635.0916748046875, - "positionY": 1472.1412353515625 - }, - { - "fixed": true, - "positionX": 769.0972900390625, - "positionY": 1532.72021484375 - }, - { - "fixed": true, - "positionX": 901.3433837890625, - "positionY": 1472.0382080078125 - }, - { - "fixed": true, - "positionX": 965.1058349609375, - "positionY": 1417.74853515625 - }, - { - "fixed": true, - "positionX": 1066.718994140625, - "positionY": 1306.30029296875 - }, - { - "fixed": true, - "positionX": 1119.87109375, - "positionY": 1162.749267578125 - }, - { - "fixed": true, - "positionX": 1154.7723388671875, - "positionY": 968.04931640625 - }, - { - "fixed": true, - "positionX": 420, - "positionY": 855 - }, - { - "fixed": true, - "positionX": 508.3151550292969, - "positionY": 855.9776000976562 - }, - { - "fixed": false, - "positionX": 699.8558349609375, - "positionY": 866.9613647460938 - }, - { - "fixed": true, - "positionX": 499.62255859375, - "positionY": 812.0860595703125 - }, - { - "fixed": true, - "positionX": 1116, - "positionY": 855 - }, - { - "fixed": true, - "positionX": 1027.6904296875, - "positionY": 855.966796875 - }, - { - "fixed": false, - "positionX": 836.1618041992188, - "positionY": 866.9578857421875 - }, - { - "fixed": true, - "positionX": 1036.3780517578125, - "positionY": 812.0860595703125 - }, - { - "fixed": true, - "positionX": 500.9525146484375, - "positionY": 945.6005859375 - }, - { - "fixed": true, - "positionX": 544.707275390625, - "positionY": 968.685546875 - }, - { - "fixed": true, - "positionX": 580.7925415039062, - "positionY": 981.59814453125 - }, - { - "fixed": true, - "positionX": 618.0525512695312, - "positionY": 976.9537353515625 - }, - { - "fixed": false, - "positionX": 665.0792236328125, - "positionY": 968.9744873046875 - }, - { - "fixed": false, - "positionX": 632.9474487304688, - "positionY": 930.57080078125 - }, - { - "fixed": false, - "positionX": 594.3089599609375, - "positionY": 912.2919921875 - }, - { - "fixed": false, - "positionX": 549.611083984375, - "positionY": 918.4812622070312 - }, - { - "fixed": true, - "positionX": 1035.0491943359375, - "positionY": 945.6005859375 - }, - { - "fixed": true, - "positionX": 991.3195190429688, - "positionY": 968.6734619140625 - }, - { - "fixed": true, - "positionX": 955.240478515625, - "positionY": 981.5890502929688 - }, - { - "fixed": true, - "positionX": 917.983642578125, - "positionY": 976.9483032226562 - }, - { - "fixed": false, - "positionX": 870.9589233398438, - "positionY": 968.971435546875 - }, - { - "fixed": false, - "positionX": 903.0806884765625, - "positionY": 930.5664672851562 - }, - { - "fixed": false, - "positionX": 941.713134765625, - "positionY": 912.2855834960938 - }, - { - "fixed": false, - "positionX": 986.407958984375, - "positionY": 918.4703979492188 - }, - { - "fixed": false, - "positionX": 718.6995239257812, - "positionY": 967.3453979492188 - }, - { - "fixed": false, - "positionX": 710.6118774414062, - "positionY": 1086.4404296875 - }, - { - "fixed": true, - "positionX": 689.3953247070312, - "positionY": 1156.743896484375 - }, - { - "fixed": false, - "positionX": 710.5078735351562, - "positionY": 1196.9625244140625 - }, - { - "fixed": false, - "positionX": 768.0589599609375, - "positionY": 1206.55859375 - }, - { - "fixed": false, - "positionX": 825.6014404296875, - "positionY": 1196.9537353515625 - }, - { - "fixed": true, - "positionX": 846.701416015625, - "positionY": 1156.7293701171875 - }, - { - "fixed": false, - "positionX": 825.462158203125, - "positionY": 1086.434814453125 - }, - { - "fixed": false, - "positionX": 817.3405151367188, - "positionY": 967.3443603515625 - }, - { - "fixed": false, - "positionX": 768.0462646484375, - "positionY": 1138.8211669921875 - }, - { - "fixed": true, - "positionX": 612.4192504882812, - "positionY": 1287.485595703125 - }, - { - "fixed": true, - "positionX": 923.5807495117188, - "positionY": 1287.485595703125 - }, - { - "fixed": false, - "positionX": 768.1617431640625, - "positionY": 1392.7696533203125 - }, - { - "fixed": false, - "positionX": 844.4039916992188, - "positionY": 1321.534912109375 - }, - { - "fixed": false, - "positionX": 768.1033325195312, - "positionY": 1337.728515625 - }, - { - "fixed": false, - "positionX": 691.7477416992188, - "positionY": 1321.5511474609375 - }, - { - "fixed": false, - "positionX": 670.4691162109375, - "positionY": 1275.3924560546875 - }, - { - "fixed": false, - "positionX": 725.6043701171875, - "positionY": 1267.037109375 - }, - { - "fixed": false, - "positionX": 810.5358276367188, - "positionY": 1267.029541015625 - }, - { - "fixed": false, - "positionX": 865.6524658203125, - "positionY": 1275.3746337890625 - }, - { - "fixed": false, - "positionX": 842.0701904296875, - "positionY": 1300.002197265625 - }, - { - "fixed": false, - "positionX": 768.0865478515625, - "positionY": 1305.5965576171875 - }, - { - "fixed": false, - "positionX": 694.072265625, - "positionY": 1300.016845703125 - }, - { - "fixed": false, - "positionX": 768.0203247070312, - "positionY": 966.8074340820312 - }, - { - "fixed": true, - "positionX": 768, - "positionY": 864 - }, - { - "fixed": false, - "positionX": 581.6300048828125, - "positionY": 556.4579467773438 - }, - { - "fixed": false, - "positionX": 954.3408203125, - "positionY": 556.4439697265625 - }, - { - "fixed": false, - "positionX": 767.9866333007812, - "positionY": 543.6483154296875 - }, - { - "fixed": false, - "positionX": 422.3842468261719, - "positionY": 662.1156005859375 - }, - { - "fixed": false, - "positionX": 1113.590087890625, - "positionY": 662.0865478515625 - }, - { - "fixed": true, - "positionX": 529, - "positionY": 1148 - }, - { - "fixed": true, - "positionX": 1007, - "positionY": 1148 - }, - { - "fixed": false, - "positionX": 597.8045654296875, - "positionY": 1337.8426513671875 - }, - { - "fixed": false, - "positionX": 938.3582763671875, - "positionY": 1337.788818359375 - }, - { - "fixed": false, - "positionX": 768.0322875976562, - "positionY": 1052.8072509765625 - }, - { - "fixed": true, - "positionX": 670, - "positionY": 683 - }, - { - "fixed": true, - "positionX": 866, - "positionY": 683 - }, - { - "fixed": false, - "positionX": 560.044677734375, - "positionY": 726.7130737304688 - }, - { - "fixed": false, - "positionX": 975.9483642578125, - "positionY": 726.7044067382812 - }, - { - "fixed": true, - "positionX": 674, - "positionY": 1372 - }, - { - "fixed": true, - "positionX": 862, - "positionY": 1372 - }, - { - "fixed": false, - "positionX": 768.0735473632812, - "positionY": 1267.0753173828125 - }, - { - "fixed": false, - "positionX": 661.2979736328125, - "positionY": 1400.0338134765625 - }, - { - "fixed": false, - "positionX": 874.9606323242188, - "positionY": 1399.9873046875 - }, - { - "fixed": false, - "positionX": 768.25146484375, - "positionY": 1436.438720703125 - }, - { - "fixed": true, - "positionX": 396.8787841796875, - "positionY": 1083.9658203125 - }, - { - "fixed": true, - "positionX": 434.0381774902344, - "positionY": 1240.051025390625 - }, - { - "fixed": true, - "positionX": 516.288818359375, - "positionY": 1368.573974609375 - }, - { - "fixed": false, - "positionX": 442.4998779296875, - "positionY": 957.6348876953125 - }, - { - "fixed": false, - "positionX": 462.2112731933594, - "positionY": 1052.2294921875 - }, - { - "fixed": true, - "positionX": 1139.1689453125, - "positionY": 1083.88671875 - }, - { - "fixed": true, - "positionX": 1102.0531005859375, - "positionY": 1239.9708251953125 - }, - { - "fixed": true, - "positionX": 1019.8887329101562, - "positionY": 1368.482177734375 - }, - { - "fixed": false, - "positionX": 1093.521484375, - "positionY": 957.5970458984375 - }, - { - "fixed": false, - "positionX": 1073.833251953125, - "positionY": 1052.1805419921875 - }, - { - "fixed": true, - "positionX": 373.27703857421875, - "positionY": 887.7207641601562 - }, - { - "fixed": true, - "positionX": 1162.72509765625, - "positionY": 887.6768798828125 - }, - { - "fixed": false, - "positionX": 424.0460205078125, - "positionY": 792.3617553710938 - }, - { - "fixed": false, - "positionX": 1111.9447021484375, - "positionY": 792.3394165039062 - } - ], - "reformFacialType": 0, - "strength": 100, - "stretchEnabled": false, - "symmetry": true, - "thinFace": 0, - "type": "FacialReform", - "vFace": 0, - "version": 1955, - "width": 1536, - "level": 4 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "", - "type": "FaceTracking", - "enabled": true, - "entityId": 85, - "componentID": 85003, - "level": 2 - } - ] - } - ], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 0, - "x": 0, - "y": 0, - "z": 0 - }, - "entityId": 17, - "componentID": 17001, - "type": "ScreenTransform", - "enabled": true, - "version": 2, - "objectEnabled": true, - "level": 1 - }, - { - "componentID": 17002, - "enabled": true, - "entityId": 17, - "renderTargetKey": "RenderTarget", - "type": "Camera", - "version": 2, - "level": 2 - } - ] - }, - { - "id": 18, - "name": "流程管理", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 18, - "componentID": 18001, - "level": 1 - }, - { - "eGraphData": { - "graph": { - "last_node_id": 14, - "last_link_id": 24, - "nodes": [], - "links": [], - "groups": [], - "config": {}, - "version": 0.4 - } - }, - "type": "FlowGraph", - "enabled": true, - "entityId": 18, - "componentID": 18002, - "customNodes": [], - "version": 259, - "level": 2 - } - ] - } - ], - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 0, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 16, - "componentID": 16001, - "type": "ScreenTransform", - "enabled": true, - "version": 156, - "level": 1 - }, - { - "enableRotation": true, - "resetWhenStartRecord": true, - "type": "ExtraSetting", - "enabled": true, - "version": 1, - "entityId": 16, - "componentID": 16002, - "level": 4 - }, - { - "componentID": 16003, - "customImage": "", - "customTips": "点头可切换哦~", - "customTipsInfo1": "提示用户拍摄时如何触发", - "customTipsInfo2": "例如:\"请比心\"", - "enabled": true, - "entityId": 16, - "image": "", - "tips": "", - "type": "Tips", - "version": 9, - "level": 2 - } - ], - "enabled": true, - "version": 0 - }, - "resources": { - "items": [ - { - "type": "folder", - "commandMap": {}, - "key": "a5cbc90b-28dc-40a6-9f08-f0ffa233a06c", - "label": "root", - "path": "./", - "level": 2 - }, - { - "type": "PAGFileData", - "commandMap": {}, - "loopCount": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "NEAREST", - "minFilter": "NEAREST", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "099c357d-fa0a-44b7-852e-c725bd6bac70", - "label": "blbl.pag", - "path": "blbl.pag", - "duration": 1260000, - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "resolution": { - "width": 1085, - "height": 896 - }, - "frameRate": 11.111114501953125, - "hasAudio": false, - "level": 2 - }, - { - "type": "TextureData", - "commandMap": {}, - "key": "DeviceCameraTexture", - "path": "DeviceCameraTexture.tex", - "label": "DeviceCameraTexture.tex", - "level": 2 - }, - { - "type": "ImageData", - "commandMap": {}, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "ce01cc56-63c4-46bb-bf8f-b7985194143b", - "label": "eye.png", - "path": "eye.png", - "actualSize": 316638, - "resolution": { - "height": 2048, - "width": 1536 - }, - "compression": 0, - "level": 2 - }, - { - "type": "ImageData", - "commandMap": {}, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "86abd5a0-b037-4ae3-8e43-625ffc57ee43", - "label": "eye_mult.png", - "path": "eye_mult.png", - "actualSize": 270010, - "resolution": { - "height": 2048, - "width": 1536 - }, - "compression": 0, - "level": 2 - }, - { - "type": "PAGFileData", - "commandMap": {}, - "loopCount": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "NEAREST", - "minFilter": "NEAREST", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "62b436c8-148a-4d42-be46-a1ed7471aae2", - "label": "gogo_bmp_1.pag", - "path": "gogo_bmp_1.pag", - "duration": 1000000, - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "resolution": { - "width": 720, - "height": 720 - }, - "frameRate": 24, - "hasAudio": false, - "level": 2 - }, - { - "type": "PAGFileData", - "commandMap": {}, - "loopCount": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "NEAREST", - "minFilter": "NEAREST", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "b1983b43-cbe1-46ba-be68-1539092b0faf", - "label": "gougoubizi.pag", - "path": "gougoubizi.pag", - "duration": 1080000, - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "resolution": { - "width": 1536, - "height": 2048 - }, - "frameRate": 11.111114501953125, - "hasAudio": false, - "level": 2 - }, - { - "type": "PAGFileData", - "commandMap": {}, - "loopCount": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "NEAREST", - "minFilter": "NEAREST", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "76367a50-d377-4e2e-853f-fe9dd2162813", - "label": "gougouerduo.pag", - "path": "gougouerduo.pag", - "duration": 1080000, - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "resolution": { - "width": 1536, - "height": 2048 - }, - "frameRate": 11.111114501953125, - "hasAudio": false, - "level": 2 - }, - { - "type": "ImageData", - "commandMap": {}, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "800dcd22-e78f-4d20-9d25-a8c639e0c107", - "label": "gougousaihong.png", - "path": "gougousaihong.png", - "actualSize": 266517, - "resolution": { - "height": 2048, - "width": 1536 - }, - "compression": 0, - "level": 2 - }, - { - "type": "ImageData", - "commandMap": {}, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "4e1dd035-e55b-469a-8efd-84919d1a4f47", - "label": "liti_qingxin.png", - "path": "liti_qingxin.png", - "actualSize": 292441, - "resolution": { - "height": 2048, - "width": 1536 - }, - "compression": 0, - "level": 2 - }, - { - "type": "ImageData", - "commandMap": {}, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "e40218d9-1eb9-4e76-b71c-dbf1084a73d3", - "label": "mask_1.png", - "path": "mask_1.png", - "actualSize": 705527, - "resolution": { - "height": 2048, - "width": 1536 - }, - "compression": 0, - "level": 2 - }, - { - "type": "ImageData", - "commandMap": {}, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "9e681a9c-f709-4422-a12e-a902b4ea5d86", - "label": "mianmo.png", - "path": "mianmo.png", - "actualSize": 293804, - "resolution": { - "height": 512, - "width": 512 - }, - "compression": 0, - "level": 2 - }, - { - "type": "ImageData", - "commandMap": {}, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "5145fe7d-8d32-47fe-a90d-2af27540bbf0", - "label": "mouth.png", - "path": "mouth.png", - "actualSize": 104143, - "resolution": { - "height": 2048, - "width": 1536 - }, - "compression": 0, - "level": 2 - }, - { - "type": "default", - "commandMap": {}, - "key": "9047772b-d713-41f6-9c03-e803318db62d", - "label": "peachmask.2021-08-20-06-26-19-675Z.bak", - "path": "peachmask.2021-08-20-06-26-19-675Z.bak", - "level": 2 - }, - { - "type": "default", - "commandMap": {}, - "key": "20d79961-4f5a-4a39-be9d-f41ac8076d25", - "label": "peachmask.2021-08-31-07-21-00-494Z.bak", - "path": "peachmask.2021-08-31-07-21-00-494Z.bak", - "level": 2 - }, - { - "type": "RenderTarget", - "commandMap": {}, - "inputColor": "#ffffffff", - "sizeType": 0, - "compatibilityMode": true, - "depthType": "DEPTH24", - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "NEAREST", - "minFilter": "NEAREST", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "width": 0, - "height": 0, - "key": "RenderTarget", - "path": "RenderTarget.rdt", - "label": "RenderTarget.rdt", - "inputKey": "DeviceCameraTexture", - "input": "DeviceCameraTexture", - "level": 2 - }, - { - "type": "AudioClipData", - "commandMap": {}, - "loopCount": 0, - "key": "f9d28601-d9b8-4504-937b-615edaf809c8", - "label": "Ring.mp3", - "path": "Ring.mp3", - "duration": 10529250, - "timeRange": { - "startTime": 0, - "duration": 10529250 - }, - "level": 2 - }, - { - "type": "js", - "commandMap": {}, - "key": "91ebcbf1-1c2d-4212-856f-a4723421a00b", - "label": "script.js", - "path": "script.js", - "level": 2, - "requireAbilities": [] - }, - { - "type": "folder", - "commandMap": {}, - "key": "3d06b23d-d604-4f75-8962-83395bc49846", - "label": "scripts", - "path": "scripts", - "level": 2 - }, - { - "type": "js", - "commandMap": {}, - "key": "3129fb72-d4c9-4cb6-9fba-8c881c1d1674", - "label": "18.flow.js", - "path": "scripts/18.flow.js", - "level": 2, - "requireAbilities": [] - }, - { - "type": "js", - "commandMap": {}, - "key": "d0d309d7-6863-4938-9ab3-d0031567b744", - "label": "light.js", - "path": "scripts/light.js", - "level": 2, - "requireAbilities": [] - }, - { - "type": "ImageData", - "commandMap": {}, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "2f904822-be62-405c-ad1b-91e51d3ee0ca", - "label": "yj.png", - "path": "yj.png", - "actualSize": 52614, - "resolution": { - "height": 2048, - "width": 1536 - }, - "level": 2 - }, - { - "type": "ImageData", - "commandMap": {}, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "a2520e66-3e8b-49bf-bd16-a26b9e5ae654", - "label": "zc.png", - "path": "zc.png", - "actualSize": 30981, - "resolution": { - "height": 2048, - "width": 1536 - }, - "compression": 0, - "level": 2 - }, - { - "type": "ImageData", - "commandMap": {}, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "ef0f767a-8f23-4f56-9a22-81bd64853b6f", - "label": "zc_crop.png", - "path": "zc_crop.png", - "actualSize": 10127, - "resolution": { - "height": 151, - "width": 296 - }, - "compression": 0, - "level": 2 - } - ] - }, - "cloudResourceData": [], - "componentLevel": 4, - "path": "/Users/v_lyusliu/Desktop/0111洗素材/video_diejia_dogmask/", - "updateTime": "2022-01-11 14:34:53" -} \ No newline at end of file diff --git a/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/script.js b/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/script.js deleted file mode 100755 index c6dd1369..00000000 --- a/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/script.js +++ /dev/null @@ -1,110 +0,0 @@ - -// 加载 AEJSBridge.js -light.execute("light://js/AEJSBridge.js"); - -(function () { - //定义素材对象 - var global = global || (function () { - return this; - }()); - var template = {}; - global.template = template; - var resourcePool = { - "sweat_1": new Resource("sweat_1.png"), - "peach_1": new Resource("peach_1.png"), - "icecream_1": new Resource("icecream_1.png") - }; - global.resourcePool = resourcePool; - - template.genderType = 0; - - template.actionList = []; - template.oneLoopTime = 999000; - template.lastTime = 0; - template.needAction = function (action) { - var needAction = template.actionList.indexOf(action) === -1; - if (needAction) { - template.actionList.push(action); - } - return needAction; - } - template.resetAction = function () { - template.actionList = []; - } - - template.currentTouchState = false; - template.previewTouchState = false; - - template.onTemplateInit = function (entityManager, eventManager) { - //指定JS需要从AEDataCenter里获取哪些值 - template.script_component_1 = light.getComponent(entityManager.getEntity(19), "Script"); - - // 场景一 桃子 - template.peach_1_Image = light.getComponent(entityManager.getEntity(104), "Image"); - template.peach_2_Image = light.getComponent(entityManager.getEntity(147), "Image"); - template.peach_3_Image = light.getComponent(entityManager.getEntity(196), "Image"); - // 场景二 冰淇淋 - template.icecream_1_Image = light.getComponent(entityManager.getEntity(33), "Image"); - template.icecream_2_Image = light.getComponent(entityManager.getEntity(59), "Image"); - template.icecream_3_Image = light.getComponent(entityManager.getEntity(91), "Image"); - // 场景三 汗 - template.sweat_1_Image = light.getComponent(entityManager.getEntity(22), "Image"); - template.init() - } - - template.init = function(){ - template.icecream_1_Image.enabled = false; - template.icecream_2_Image.enabled = false; - template.icecream_3_Image.enabled = false; - template.sweat_1_Image.enabled = false; - } - - var currentMv = 1; - - template.onFrameUpdate = function (currentTime, entityManager, eventManager) { - // light._disableDefaultBeauty([BASIC_STRETCH, BASIC_LIQUIFY, BASIC_SMOOTH]); - if (!template.previewTouchState && template.currentTouchState) { - if (currentMv == 1) { - // 冰淇淋出现 - template.icecream_1_Image.enabled = true; - template.icecream_2_Image.enabled = true; - template.icecream_3_Image.enabled = true; - // 桃子消失 - template.peach_1_Image.enabled = false; - template.peach_2_Image.enabled = false; - template.peach_3_Image.enabled = false; - currentMv = 2; - } else if (currentMv == 2) { - // 汗出现 - template.sweat_1_Image.enabled = true; - // 冰淇淋消失 - template.icecream_1_Image.enabled = false; - template.icecream_2_Image.enabled = false; - template.icecream_3_Image.enabled = false; - currentMv = 3; - } else if (currentMv == 3) { - // 汗消失 - template.sweat_1_Image.enabled = false; - // 桃子出现 - template.peach_1_Image.enabled = true; - template.peach_2_Image.enabled = true; - template.peach_3_Image.enabled = true; - currentMv = 1; - } - } - - template.previewTouchState = template.currentTouchState; - - template.currentTouchState = false; - } - - template.onInputEvent = function (params) { - var hasTouch = params["event.touchPoint"]; - if (hasTouch) { - console.log(params["event.touchPoint"]); - template.currentTouchState = true; - } - } - -} -()); diff --git a/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/scripts/18.flow.js b/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/scripts/18.flow.js deleted file mode 100755 index 4ed01b8b..00000000 --- a/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/scripts/18.flow.js +++ /dev/null @@ -1,11 +0,0 @@ -/*** light-js-config -***/ -/* 该脚本流程面板生成 */ -// 开始 Flow 生成代码 -light.on('start',function (entityManager, eventManager, scriptSystem) { - var context = new light.NodeContext(entityManager, eventManager, scriptSystem); - // 实例化 - // 属性赋值 - // 数据连接 - // 事件连接 -}); \ No newline at end of file diff --git a/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/scripts/light.js b/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/scripts/light.js deleted file mode 100755 index 3ae1acba..00000000 --- a/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/scripts/light.js +++ /dev/null @@ -1,7303 +0,0 @@ -/*** light-js-config - //@requireAbility -***/ - -(function (light) { - if(light.studioLibLoaded) { - return; - } - light.studioLibLoaded = true; -var SDKRuntime = /** @class */ (function () { - function SDKRuntime() { - this.currentTime = 0; - this.behaviors = []; - } - SDKRuntime.prototype.initialize = function (entityManager, eventManager, scriptSystem) { - var _this = this; - var entities = entityManager.entitiesWithComponents(light.ScriptBehaviors.componentType); - entities.forEach(function (entity) { - var idComponent = entity.getComponent(light.EntityIdentifier); - var lightBehaviorComponent = entity.getComponent(light.ScriptBehaviors); - console.log("JS::lightBehaviorComponent: " + JSON.stringify(lightBehaviorComponent)); - if (!lightBehaviorComponent) { - return; - } - lightBehaviorComponent.behaviorProperties.forEach(function (behaviorPropertiesJson) { - console.log("JS::behaviorPropertiesJson: " + behaviorPropertiesJson); - var behaviorProperties = JSON.parse(behaviorPropertiesJson); - var BehaviorClass = SDKRuntime.BehaviorClasses[behaviorProperties.type]; - var behavior = new BehaviorClass(idComponent.id, entityManager, eventManager, scriptSystem); - Object.assign(behavior, behaviorProperties); - _this.addBehavior(behavior); - }); - }); - this.behaviors.forEach(function (b) { - if (b.configure) { - b.configure(); - } - }); - var maps = light.NodeContext.getAllNodesMap(); - light.FlowNodeClasses.forEach(function (node) { - if (!maps[node.definition.meta.nodeType]) { - node.nodeType = node.definition.meta.nodeType; - light.NodeContext.unregisterNode(node.nodeType); - light.NodeContext.registerNode(node); - } - }); - }; - SDKRuntime.prototype.addBehavior = function (it) { - this.behaviors.push(it); - }; - SDKRuntime.prototype.removeBehavior = function (it) { - var index = this.behaviors.indexOf(it); - if (index >= 0) { - this.behaviors.splice(index, 1); - } - }; - SDKRuntime.prototype.update = function (time, entityManager, eventManager) { - this.currentTime = time; - this.behaviors.forEach(function (b) { - if (b.enabled === false || b.destroyed) { - return; - } - b.entityManager = entityManager; - b.eventManager = eventManager; - if (b.update) { - b.update(time); - } - }); - }; - SDKRuntime.prototype.destroy = function () { - this.behaviors.forEach(function (b) { var _a; return (_a = b.destroy) === null || _a === void 0 ? void 0 : _a.call(b); }); - }; - SDKRuntime.BehaviorClasses = {}; - return SDKRuntime; -}()); -light.SDKRuntime = SDKRuntime; -light.runtime = new SDKRuntime(); -var BaseBehavior = /** @class */ (function () { - function BaseBehavior(entityId, entityManager, eventManager, scriptSystem) { - this.enabled = true; - this.destroyed = false; - this._entity = undefined; - this.entityId = entityId; - this.eventManager = eventManager; - this.entityManager = entityManager; - this.scriptSystem = scriptSystem; - this._entity = this.entityManager.getEntityById(this.entityId); - light.runtime.addBehavior(this); - } - Object.defineProperty(BaseBehavior.prototype, "entity", { - get: function () { - return this.entityManager.getEntityById(this.entityId); - }, - enumerable: false, - configurable: true - }); - BaseBehavior.prototype.destroy = function () { - this.destroyed = true; - this.enabled = false; - light.runtime.removeBehavior(this); - }; - BaseBehavior.definition = null; - return BaseBehavior; -}()); -light.BaseBehavior = BaseBehavior; -light.Behavior = function (definition) { - return function _Behavior(constructor) { - var selfProps = (constructor.prototype._definition - || {}); - var superProps = JSON.parse(JSON.stringify(constructor.definition || {})); - if (!definition.properties) { - definition.properties = []; - } - constructor.definition = definition; - definition.properties = definition.properties - .concat(superProps.properties || []) - .concat(selfProps.properties || []); - delete constructor.prototype._definition; - Object.defineProperty(constructor.prototype, 'definition', { - get: function () { - return constructor.definition; - }, - }); - SDKRuntime.BehaviorClasses[definition.type] = constructor; - return constructor; - }; -}; -light.Property = function Property(type) { - return function (target, propertyKey) { - var proto = target; - if (!proto._definition) { - proto._definition = { - type: 'object', - properties: [], - }; - } - type.name = propertyKey; - if (type.editable !== false) { - type.editable = true; - } - proto._definition.properties.push(type); - }; -}; -var GestureAction; -(function (GestureAction) { - GestureAction[GestureAction["HEART"] = 0] = "HEART"; - GestureAction[GestureAction["PAPER"] = 1] = "PAPER"; - GestureAction[GestureAction["SCISSOR"] = 2] = "SCISSOR"; - GestureAction[GestureAction["FIST"] = 3] = "FIST"; - GestureAction[GestureAction["ONE"] = 4] = "ONE"; - GestureAction[GestureAction["LOVE"] = 5] = "LOVE"; - GestureAction[GestureAction["LIKE"] = 6] = "LIKE"; - GestureAction[GestureAction["OK"] = 7] = "OK"; - GestureAction[GestureAction["ROCK"] = 8] = "ROCK"; - GestureAction[GestureAction["SIX"] = 9] = "SIX"; - GestureAction[GestureAction["EIGHT"] = 10] = "EIGHT"; - GestureAction[GestureAction["LIFT"] = 11] = "LIFT"; - GestureAction[GestureAction["CONGRATULATE"] = 12] = "CONGRATULATE"; -})(GestureAction || (GestureAction = {})); -light.GestureAction = GestureAction; -var FaceAction; -(function (FaceAction) { - FaceAction[FaceAction["FaceDetected"] = 0] = "FaceDetected"; - FaceAction[FaceAction["OpenMouth"] = 1] = "OpenMouth"; - FaceAction[FaceAction["BlinkEyebrow"] = 2] = "BlinkEyebrow"; - FaceAction[FaceAction["BlinkEye"] = 3] = "BlinkEye"; - FaceAction[FaceAction["ShakeHead"] = 4] = "ShakeHead"; - FaceAction[FaceAction["Kiss"] = 5] = "Kiss"; - FaceAction[FaceAction["BlinkLeftEye"] = 6] = "BlinkLeftEye"; - FaceAction[FaceAction["BlinkRightEye"] = 7] = "BlinkRightEye"; - FaceAction[FaceAction["Nod"] = 8] = "Nod"; - FaceAction[FaceAction["Smile"] = 9] = "Smile"; - FaceAction[FaceAction["MouthOccluded"] = 10] = "MouthOccluded"; - FaceAction[FaceAction["LeftEyeOccluded"] = 11] = "LeftEyeOccluded"; - FaceAction[FaceAction["RightEyeOccluded"] = 12] = "RightEyeOccluded"; - FaceAction[FaceAction["DoubleEyeOccluded"] = 13] = "DoubleEyeOccluded"; -})(FaceAction || (FaceAction = {})); -light.FaceAction = FaceAction; -var NodeClasses = {}; -light.NodeContext = /** @class */ (function () { - function NodeContext(entityManager, eventManager, scriptSystem) { - this.entityManager = entityManager; - this.eventManager = eventManager; - this.scriptSystem = scriptSystem; - } - NodeContext.registerNode = function (clazz) { - NodeClasses[clazz.nodeType] = clazz; - }; - NodeContext.unregisterNode = function (nodeType) { - if (NodeClasses[nodeType]) { - delete NodeClasses[nodeType]; - } - }; - NodeContext.getAllNodesMap = function () { - return NodeClasses; - }; - NodeContext.prototype.create = function (type) { - var Clazz = NodeClasses[type]; - if (Clazz) { - var it = new Clazz(); - it.entityManager = this.entityManager; - it.eventManager = this.eventManager; - it.scriptSystem = this.scriptSystem; - return it; - } - console.log("Cannot find node: " + type); - }; - NodeContext.prototype.connectData = function (source, property, target, targetProperty) { - // 重写应该基于 instance - var descriptor = { - configurable: true, - enumerable: true, - get: function () { - return source[property]; - }, - }; - Object.defineProperty(target, targetProperty, descriptor); - }; - NodeContext.prototype.connectEvent = function (source, property, target, targetProperty) { - var propertyTasksName = property + "Tasks__"; - if (!source[propertyTasksName]) { - // 重写应该基于 instance - var descriptor = { - configurable: true, - enumerable: true, - value: function () { - var tasks = this[propertyTasksName]; - tasks.forEach(function (task) { return task(); }); - }, - }; - Object.defineProperty(source, property, descriptor); - source[propertyTasksName] = []; - } - var tasks = source[propertyTasksName]; - var task = target[targetProperty]; - tasks.push(task.bind(target)); - }; - return NodeContext; -}()); -light.FlowNodeClasses = light.FlowNodeClasses || []; -light['afterconfigure'] = function (entityManager, eventManager, scriptSystem) { - var _a; - (_a = light.BehaviorClasses) === null || _a === void 0 ? void 0 : _a.forEach(function (clazz) { - light.SDKRuntime.BehaviorClasses[clazz.definition.type] = clazz; - }); - light.runtime.initialize(entityManager, eventManager, scriptSystem); - light.emit('start', entityManager, eventManager, scriptSystem); -}; -function update(time, entityManager, eventManager) { - light.runtime.update(time, entityManager, eventManager); - light.emit('update', time, entityManager, eventManager); -} -light.getCurrentTime = function () { - return light.runtime.currentTime; -}; -light.update = update; -light.receive = function (event) { - console.log(event.type()); - if (event.type() === 'CustomDataEvent') { - var cEvent = event; - light.emit(cEvent.event_type, JSON.parse(cEvent.json_data)); - } - else { - light.emit(event.type(), event); - } -}; - -/*! ***************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */ -/* global Reflect, Promise */ - -var extendStatics = function(d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); -}; - -function __extends(d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -} - -var constant = function(x){ - return function(){ - return x; - } -}; - -function linear(a, d) { - return function(t) { - return a + t * d; - }; -} - -function exponential(a, b, y) { - return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function(t) { - return Math.pow(a + t * b, y); - }; -} - -function gamma(y) { - return (y = +y) === 1 ? nogamma : function(a, b) { - return b - a ? exponential(a, b, y) : constant(isNaN(a) ? b : a); - }; -} - -function nogamma(a, b) { - var d = b - a; - return d ? linear(a, d) : constant(isNaN(a) ? b : a); -} - -function define(constructor, factory, prototype) { - constructor.prototype = factory.prototype = prototype; - prototype.constructor = constructor; -} - -function extend(parent, definition) { - var prototype = Object.create(parent.prototype); - for (var key in definition) prototype[key] = definition[key]; - return prototype; -} - -function Color() {} - -var darker = 0.7; -var brighter = 1 / darker; - -var reI = "\\s*([+-]?\\d+)\\s*", - reN = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*", - reP = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*", - reHex = /^#([0-9a-f]{3,8})$/, - reRgbInteger = new RegExp("^rgb\\(" + [reI, reI, reI] + "\\)$"), - reRgbPercent = new RegExp("^rgb\\(" + [reP, reP, reP] + "\\)$"), - reRgbaInteger = new RegExp("^rgba\\(" + [reI, reI, reI, reN] + "\\)$"), - reRgbaPercent = new RegExp("^rgba\\(" + [reP, reP, reP, reN] + "\\)$"), - reHslPercent = new RegExp("^hsl\\(" + [reN, reP, reP] + "\\)$"), - reHslaPercent = new RegExp("^hsla\\(" + [reN, reP, reP, reN] + "\\)$"); - -var named = { - aliceblue: 0xf0f8ff, - antiquewhite: 0xfaebd7, - aqua: 0x00ffff, - aquamarine: 0x7fffd4, - azure: 0xf0ffff, - beige: 0xf5f5dc, - bisque: 0xffe4c4, - black: 0x000000, - blanchedalmond: 0xffebcd, - blue: 0x0000ff, - blueviolet: 0x8a2be2, - brown: 0xa52a2a, - burlywood: 0xdeb887, - cadetblue: 0x5f9ea0, - chartreuse: 0x7fff00, - chocolate: 0xd2691e, - coral: 0xff7f50, - cornflowerblue: 0x6495ed, - cornsilk: 0xfff8dc, - crimson: 0xdc143c, - cyan: 0x00ffff, - darkblue: 0x00008b, - darkcyan: 0x008b8b, - darkgoldenrod: 0xb8860b, - darkgray: 0xa9a9a9, - darkgreen: 0x006400, - darkgrey: 0xa9a9a9, - darkkhaki: 0xbdb76b, - darkmagenta: 0x8b008b, - darkolivegreen: 0x556b2f, - darkorange: 0xff8c00, - darkorchid: 0x9932cc, - darkred: 0x8b0000, - darksalmon: 0xe9967a, - darkseagreen: 0x8fbc8f, - darkslateblue: 0x483d8b, - darkslategray: 0x2f4f4f, - darkslategrey: 0x2f4f4f, - darkturquoise: 0x00ced1, - darkviolet: 0x9400d3, - deeppink: 0xff1493, - deepskyblue: 0x00bfff, - dimgray: 0x696969, - dimgrey: 0x696969, - dodgerblue: 0x1e90ff, - firebrick: 0xb22222, - floralwhite: 0xfffaf0, - forestgreen: 0x228b22, - fuchsia: 0xff00ff, - gainsboro: 0xdcdcdc, - ghostwhite: 0xf8f8ff, - gold: 0xffd700, - goldenrod: 0xdaa520, - gray: 0x808080, - green: 0x008000, - greenyellow: 0xadff2f, - grey: 0x808080, - honeydew: 0xf0fff0, - hotpink: 0xff69b4, - indianred: 0xcd5c5c, - indigo: 0x4b0082, - ivory: 0xfffff0, - khaki: 0xf0e68c, - lavender: 0xe6e6fa, - lavenderblush: 0xfff0f5, - lawngreen: 0x7cfc00, - lemonchiffon: 0xfffacd, - lightblue: 0xadd8e6, - lightcoral: 0xf08080, - lightcyan: 0xe0ffff, - lightgoldenrodyellow: 0xfafad2, - lightgray: 0xd3d3d3, - lightgreen: 0x90ee90, - lightgrey: 0xd3d3d3, - lightpink: 0xffb6c1, - lightsalmon: 0xffa07a, - lightseagreen: 0x20b2aa, - lightskyblue: 0x87cefa, - lightslategray: 0x778899, - lightslategrey: 0x778899, - lightsteelblue: 0xb0c4de, - lightyellow: 0xffffe0, - lime: 0x00ff00, - limegreen: 0x32cd32, - linen: 0xfaf0e6, - magenta: 0xff00ff, - maroon: 0x800000, - mediumaquamarine: 0x66cdaa, - mediumblue: 0x0000cd, - mediumorchid: 0xba55d3, - mediumpurple: 0x9370db, - mediumseagreen: 0x3cb371, - mediumslateblue: 0x7b68ee, - mediumspringgreen: 0x00fa9a, - mediumturquoise: 0x48d1cc, - mediumvioletred: 0xc71585, - midnightblue: 0x191970, - mintcream: 0xf5fffa, - mistyrose: 0xffe4e1, - moccasin: 0xffe4b5, - navajowhite: 0xffdead, - navy: 0x000080, - oldlace: 0xfdf5e6, - olive: 0x808000, - olivedrab: 0x6b8e23, - orange: 0xffa500, - orangered: 0xff4500, - orchid: 0xda70d6, - palegoldenrod: 0xeee8aa, - palegreen: 0x98fb98, - paleturquoise: 0xafeeee, - palevioletred: 0xdb7093, - papayawhip: 0xffefd5, - peachpuff: 0xffdab9, - peru: 0xcd853f, - pink: 0xffc0cb, - plum: 0xdda0dd, - powderblue: 0xb0e0e6, - purple: 0x800080, - rebeccapurple: 0x663399, - red: 0xff0000, - rosybrown: 0xbc8f8f, - royalblue: 0x4169e1, - saddlebrown: 0x8b4513, - salmon: 0xfa8072, - sandybrown: 0xf4a460, - seagreen: 0x2e8b57, - seashell: 0xfff5ee, - sienna: 0xa0522d, - silver: 0xc0c0c0, - skyblue: 0x87ceeb, - slateblue: 0x6a5acd, - slategray: 0x708090, - slategrey: 0x708090, - snow: 0xfffafa, - springgreen: 0x00ff7f, - steelblue: 0x4682b4, - tan: 0xd2b48c, - teal: 0x008080, - thistle: 0xd8bfd8, - tomato: 0xff6347, - turquoise: 0x40e0d0, - violet: 0xee82ee, - wheat: 0xf5deb3, - white: 0xffffff, - whitesmoke: 0xf5f5f5, - yellow: 0xffff00, - yellowgreen: 0x9acd32 -}; - -define(Color, color, { - copy: function(channels) { - return Object.assign(new this.constructor, this, channels); - }, - displayable: function() { - return this.rgb().displayable(); - }, - hex: color_formatHex, // Deprecated! Use color.formatHex. - formatHex: color_formatHex, - formatHsl: color_formatHsl, - formatRgb: color_formatRgb, - toString: color_formatRgb -}); - -function color_formatHex() { - return this.rgb().formatHex(); -} - -function color_formatHsl() { - return hslConvert(this).formatHsl(); -} - -function color_formatRgb() { - return this.rgb().formatRgb(); -} - -function color(format) { - var m, l; - format = (format + "").trim().toLowerCase(); - return (m = reHex.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) // #ff0000 - : l === 3 ? new Rgb((m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1) // #f00 - : l === 8 ? rgba(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000 - : l === 4 ? rgba((m >> 12 & 0xf) | (m >> 8 & 0xf0), (m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), (((m & 0xf) << 4) | (m & 0xf)) / 0xff) // #f000 - : null) // invalid hex - : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0) - : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%) - : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1) - : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1) - : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%) - : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1) - : named.hasOwnProperty(format) ? rgbn(named[format]) // eslint-disable-line no-prototype-builtins - : format === "transparent" ? new Rgb(NaN, NaN, NaN, 0) - : null; -} - -function rgbn(n) { - return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1); -} - -function rgba(r, g, b, a) { - if (a <= 0) r = g = b = NaN; - return new Rgb(r, g, b, a); -} - -function rgbConvert(o) { - if (!(o instanceof Color)) o = color(o); - if (!o) return new Rgb; - o = o.rgb(); - return new Rgb(o.r, o.g, o.b, o.opacity); -} - -function rgb(r, g, b, opacity) { - return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity); -} - -function Rgb(r, g, b, opacity) { - this.r = +r; - this.g = +g; - this.b = +b; - this.opacity = +opacity; -} - -define(Rgb, rgb, extend(Color, { - brighter: function(k) { - k = k == null ? brighter : Math.pow(brighter, k); - return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity); - }, - darker: function(k) { - k = k == null ? darker : Math.pow(darker, k); - return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity); - }, - rgb: function() { - return this; - }, - displayable: function() { - return (-0.5 <= this.r && this.r < 255.5) - && (-0.5 <= this.g && this.g < 255.5) - && (-0.5 <= this.b && this.b < 255.5) - && (0 <= this.opacity && this.opacity <= 1); - }, - hex: rgb_formatHex, // Deprecated! Use color.formatHex. - formatHex: rgb_formatHex, - formatRgb: rgb_formatRgb, - toString: rgb_formatRgb -})); - -function rgb_formatHex() { - return "#" + hex(this.r) + hex(this.g) + hex(this.b); -} - -function rgb_formatRgb() { - var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a)); - return (a === 1 ? "rgb(" : "rgba(") - + Math.max(0, Math.min(255, Math.round(this.r) || 0)) + ", " - + Math.max(0, Math.min(255, Math.round(this.g) || 0)) + ", " - + Math.max(0, Math.min(255, Math.round(this.b) || 0)) - + (a === 1 ? ")" : ", " + a + ")"); -} - -function hex(value) { - value = Math.max(0, Math.min(255, Math.round(value) || 0)); - return (value < 16 ? "0" : "") + value.toString(16); -} - -function hsla(h, s, l, a) { - if (a <= 0) h = s = l = NaN; - else if (l <= 0 || l >= 1) h = s = NaN; - else if (s <= 0) h = NaN; - return new Hsl(h, s, l, a); -} - -function hslConvert(o) { - if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity); - if (!(o instanceof Color)) o = color(o); - if (!o) return new Hsl; - if (o instanceof Hsl) return o; - o = o.rgb(); - var r = o.r / 255, - g = o.g / 255, - b = o.b / 255, - min = Math.min(r, g, b), - max = Math.max(r, g, b), - h = NaN, - s = max - min, - l = (max + min) / 2; - if (s) { - if (r === max) h = (g - b) / s + (g < b) * 6; - else if (g === max) h = (b - r) / s + 2; - else h = (r - g) / s + 4; - s /= l < 0.5 ? max + min : 2 - max - min; - h *= 60; - } else { - s = l > 0 && l < 1 ? 0 : h; - } - return new Hsl(h, s, l, o.opacity); -} - -function hsl(h, s, l, opacity) { - return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity); -} - -function Hsl(h, s, l, opacity) { - this.h = +h; - this.s = +s; - this.l = +l; - this.opacity = +opacity; -} - -define(Hsl, hsl, extend(Color, { - brighter: function(k) { - k = k == null ? brighter : Math.pow(brighter, k); - return new Hsl(this.h, this.s, this.l * k, this.opacity); - }, - darker: function(k) { - k = k == null ? darker : Math.pow(darker, k); - return new Hsl(this.h, this.s, this.l * k, this.opacity); - }, - rgb: function() { - var h = this.h % 360 + (this.h < 0) * 360, - s = isNaN(h) || isNaN(this.s) ? 0 : this.s, - l = this.l, - m2 = l + (l < 0.5 ? l : 1 - l) * s, - m1 = 2 * l - m2; - return new Rgb( - hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2), - hsl2rgb(h, m1, m2), - hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2), - this.opacity - ); - }, - displayable: function() { - return (0 <= this.s && this.s <= 1 || isNaN(this.s)) - && (0 <= this.l && this.l <= 1) - && (0 <= this.opacity && this.opacity <= 1); - }, - formatHsl: function() { - var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a)); - return (a === 1 ? "hsl(" : "hsla(") - + (this.h || 0) + ", " - + (this.s || 0) * 100 + "%, " - + (this.l || 0) * 100 + "%" - + (a === 1 ? ")" : ", " + a + ")"); - } -})); - -/* From FvD 13.37, CSS Color Module Level 3 */ -function hsl2rgb(h, m1, m2) { - return (h < 60 ? m1 + (m2 - m1) * h / 60 - : h < 180 ? m2 - : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60 - : m1) * 255; -} - -var interpolateRgb = (function rgbGamma(y) { - var color = gamma(y); - - function rgb$1(start, end) { - var r = color((start = rgb(start)).r, (end = rgb(end)).r), - g = color(start.g, end.g), - b = color(start.b, end.b), - opacity = nogamma(start.opacity, end.opacity); - return function(t) { - start.r = r(t); - start.g = g(t); - start.b = b(t); - start.opacity = opacity(t); - return start + ""; - }; - } - - rgb$1.gamma = rgbGamma; - - return rgb$1; -})(1); - -/** - * @param keyframesValue "255,255,0,50" 表示rgba - * @return rgba(255, 255, 0, 0.5) - */ -/** - * @param hex "#fbafff" 表示16进制 - * @return rgba(251,175,255,1) - */ -function transformHexToRgba(hex) { - hex = hex.replace('#', '0x'); - var colorNum = Number(hex); - var r = (colorNum >>> 24); - var g = (colorNum >>> 16) & 0x00ff; - var b = (colorNum >>> 8) & 0x0000ff; - var a = colorNum & 0x000000ff; - return "rgba(" + r + "," + g + "," + b + "," + a / 255.0 + ")"; -} -/** - * @param hex "#fbafff" 表示16进制 - * @return { r: 251, g: 175, b: 255, a: 100 } - */ -function transformHexToRgbaObj(hex) { - hex = hex.replace('#', '0x'); - var colorNum = Number(hex); - var r = (colorNum >>> 24); - var g = (colorNum >>> 16) & 0x00ff; - var b = (colorNum >>> 8) & 0x0000ff; - var a = (colorNum & 0x000000ff) / 255.0 * 100; - return { r: r, g: g, b: b, a: a }; -} -/** rgba(0, 233, 250, 0.9448125164992826) - * @param rgba rgba(251, 175, 255, 0.5) - * @return { r: 251, g: 175, b: 255, a: 100 } - */ -function transformRgbaToRgbaObj(rgba) { - var match = rgba.match(/rgba?\((\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*([\d\.]+))?\s*\)/); - if (!match) - return { r: 0, g: 0, b: 0, a: 0 }; - var _a = [Number(match[1]), Number(match[2]), Number(match[3]), Number(match[4])], r = _a[0], g = _a[1], b = _a[2], a = _a[3]; - return { r: r, g: g, b: b, a: isNaN(a) ? 100 : a * 100 }; -} - -var InterpolateColor = /** @class */ (function () { - function InterpolateColor(beginValue, endValue) { - this.startColor = transformHexToRgba(beginValue); - this.endColor = transformHexToRgba(endValue); - this.interpolator = new interpolateRgb(this.startColor, this.endColor); - } - InterpolateColor.prototype.value = function (time) { - var value = this.interpolator(time); - return transformRgbaToRgbaObj(value); - }; - return InterpolateColor; -}()); - -/** - * Bezier Curves formulas obtained from - * http://en.wikipedia.org/wiki/Bézier_curve - */ -function CubicBezierP0(t, p) { - var k = 1 - t; - return k * k * k * p; -} -function CubicBezierP1(t, p) { - var k = 1 - t; - return 3 * k * k * t * p; -} -function CubicBezierP2(t, p) { - return 3 * (1 - t) * t * t * p; -} -function CubicBezierP3(t, p) { - return t * t * t * p; -} -function CubicBezier(t, p0, p1, p2, p3) { - return (CubicBezierP0(t, p0) - + CubicBezierP1(t, p1) - + CubicBezierP2(t, p2) - + CubicBezierP3(t, p3)); -} -var Bezier = /** @class */ (function () { - function Bezier(c1, c2, c3, c4) { - this.c1 = 0.0; - this.c2 = 0.0; - this.c3 = 0.0; - this.c4 = 0.0; - this.c1 = c1; - this.c2 = c2; - this.c3 = c3; - this.c4 = c4; - } - Bezier.prototype.evaluate = function (t) { - return CubicBezier(t, this.c1, this.c2, this.c3, this.c4); - }; - return Bezier; -}()); - -var InterpolateBezier = /** @class */ (function () { - function InterpolateBezier(startValue, endValue) { - this.startValue = startValue; - this.endValue = endValue; - var inter = endValue - startValue; - var c1 = this.startValue; - var c2 = this.startValue + (inter) * 0.25; - var c3 = this.startValue + (inter) * 0.75; - var c4 = this.endValue; - this.interpolator = new Bezier(c1, c2, c3, c4); - } - InterpolateBezier.prototype.value = function (time) { - return this.interpolator.evaluate(time); - }; - return InterpolateBezier; -}()); - -/** - * Abstract base class of interpolants over parametric samples. - * - * The parameter domain is one dimensional, typically the time or a path - * along a curve defined by the data. - * - * The sample values can have any dimensionality and derived classes may - * apply special interpretations to the data. - * - * This class provides the interval seek in a Template Method, deferring - * the actual interpolation to derived classes. - * - * Time complexity is O(1) for linear access crossing at most two points - * and O(log N) for random access, where N is the number of positions. - * - * References: - * - * http://www.oodesign.com/template-method-pattern.html - * - * @author tschw - */ -function Interpolant(parameterPositions, sampleValues, sampleSize, resultBuffer) { - this.parameterPositions = parameterPositions; - this._cachedIndex = 0; - this.resultBuffer = resultBuffer !== undefined ? resultBuffer : new sampleValues.constructor(sampleSize); - this.sampleValues = sampleValues; - this.valueSize = sampleSize; -} - -Object.assign(Interpolant.prototype, { - evaluate: function evaluate(t) { - var pp = this.parameterPositions; - var i1 = this._cachedIndex; - var t1 = pp[i1]; - var t0 = pp[i1 - 1]; - - validate_interval: { - seek: { - var right; - - linear_scan: { - // - See http://jsperf.com/comparison-to-undefined/3 - // - slower code: - // - - // - if ( t >= t1 || t1 === undefined ) { - forward_scan: if (!(t < t1)) { - for (var giveUpAt = i1 + 2;;) { - if (t1 === undefined) { - if (t < t0) break forward_scan; // after end - - i1 = pp.length; - this._cachedIndex = i1; - return this.afterEnd_(i1 - 1, t, t0); - } - - if (i1 === giveUpAt) break; // this loop - - t0 = t1; - t1 = pp[++i1]; - - if (t < t1) { - // we have arrived at the sought interval - break seek; - } - } // prepare binary search on the right side of the index - - - right = pp.length; - break linear_scan; - } // - slower code: - // - if ( t < t0 || t0 === undefined ) { - - - if (!(t >= t0)) { - // looping? - var t1global = pp[1]; - - if (t < t1global) { - i1 = 2; // + 1, using the scan for the details - - t0 = t1global; - } // linear reverse scan - - - for (var _giveUpAt = i1 - 2;;) { - if (t0 === undefined) { - // before start - this._cachedIndex = 0; - return this.beforeStart_(0, t, t1); - } - - if (i1 === _giveUpAt) break; // this loop - - t1 = t0; - t0 = pp[--i1 - 1]; - - if (t >= t0) { - // we have arrived at the sought interval - break seek; - } - } // prepare binary search on the left side of the index - - - right = i1; - i1 = 0; - break linear_scan; - } // the interval is valid - - - break validate_interval; - } // linear scan - // binary search - - - while (i1 < right) { - var mid = i1 + right >>> 1; - - if (t < pp[mid]) { - right = mid; - } else { - i1 = mid + 1; - } - } - - t1 = pp[i1]; - t0 = pp[i1 - 1]; // check boundary cases, again - - if (t0 === undefined) { - this._cachedIndex = 0; - return this.beforeStart_(0, t, t1); - } - - if (t1 === undefined) { - i1 = pp.length; - this._cachedIndex = i1; - return this.afterEnd_(i1 - 1, t0, t); - } - } // seek - - - this._cachedIndex = i1; - this.intervalChanged_(i1, t0, t1); - } // validate_interval - - - return this.interpolate_(i1, t0, t, t1); - }, - settings: null, - // optional, subclass-specific settings structure - // Note: The indirection allows central control of many interpolants. - // --- Protected interface - DefaultSettings_: {}, - getSettings_: function getSettings_() { - return this.settings || this.DefaultSettings_; - }, - copySampleValue_: function copySampleValue_(index) { - // copies a sample value to the result buffer - var result = this.resultBuffer; - var values = this.sampleValues; - var stride = this.valueSize; - var offset = index * stride; - - for (var i = 0; i !== stride; ++i) { - result[i] = values[offset + i]; - } - - return result; - }, - // Template methods for derived classes: - interpolate_: function interpolate_() - /* i1, t0, t, t1 */ - { - throw new Error('call to abstract method'); // implementations shall return this.resultBuffer - }, - intervalChanged_: function intervalChanged_() - /* i1, t0, t1 */ - {// empty - } -}); // DECLARE ALIAS AFTER assign prototype - -Object.assign(Interpolant.prototype, { - // ( 0, t, t0 ), returns this.resultBuffer - beforeStart_: Interpolant.prototype.copySampleValue_, - // ( N-1, tN-1, t ), returns this.resultBuffer - afterEnd_: Interpolant.prototype.copySampleValue_ -}); - -/** - * @author tschw - */ - -function LinearInterpolant(parameterPositions, sampleValues, sampleSize, resultBuffer) { - Interpolant.call(this, parameterPositions, sampleValues, sampleSize, resultBuffer); -} - -LinearInterpolant.prototype = Object.assign(Object.create(Interpolant.prototype), { - constructor: LinearInterpolant, - interpolate_: function interpolate_(i1, t0, t, t1) { - var result = this.resultBuffer; - var values = this.sampleValues; - var stride = this.valueSize; - var offset1 = i1 * stride; - var offset0 = offset1 - stride; - var weight1 = (t - t0) / (t1 - t0); - var weight0 = 1 - weight1; - - for (var i = 0; i !== stride; ++i) { - result[i] = values[offset0 + i] * weight0 + values[offset1 + i] * weight1; - } - - return result; - } -}); - -var InterpolateLinear = /** @class */ (function () { - function InterpolateLinear(startValue, endValue) { - this.startValue = startValue; - this.endValue = endValue; - var times = [0, 1]; - var values = [startValue, endValue]; - var valueSize = values.length / times.length; - this.interpolator = new LinearInterpolant(times, values, valueSize); - } - InterpolateLinear.prototype.value = function (time) { - var value = this.interpolator.evaluate(time); - return value[0]; - }; - return InterpolateLinear; -}()); - -// 插值类型 -var InterpolationType; -(function (InterpolationType) { - InterpolationType[InterpolationType["Linear"] = 0] = "Linear"; - InterpolationType[InterpolationType["Bezier"] = 1] = "Bezier"; -})(InterpolationType || (InterpolationType = {})); -// 关键帧动画类型 -var KeyframeMode; -(function (KeyframeMode) { - KeyframeMode[KeyframeMode["Continuous"] = 0] = "Continuous"; - KeyframeMode[KeyframeMode["Discontinuous"] = 1] = "Discontinuous"; -})(KeyframeMode || (KeyframeMode = {})); -// 关键帧外插模式 (曲线在第一个关键帧之前和最后一个关键帧之后的延伸方式) -var ExtrapolationMode; -(function (ExtrapolationMode) { - ExtrapolationMode[ExtrapolationMode["Constant"] = 0] = "Constant"; - ExtrapolationMode[ExtrapolationMode["Linear"] = 1] = "Linear"; -})(ExtrapolationMode || (ExtrapolationMode = {})); -// 默认的插值类型 -var DEFAULT_EASING = InterpolationType.Linear; -// 默认的关键帧 -var DEFAULT_KEYFRAME = [0, 0, InterpolationType.Linear]; -// 默认的外插模式 -var DEFAULT_EXTRAPOLATION_MODE = ExtrapolationMode.Linear; -var AnimationClipState; -(function (AnimationClipState) { - AnimationClipState[AnimationClipState["Stopped"] = 0] = "Stopped"; - AnimationClipState[AnimationClipState["Playing"] = 1] = "Playing"; - AnimationClipState[AnimationClipState["Paused"] = 2] = "Paused"; -})(AnimationClipState || (AnimationClipState = {})); -var AnimationClipType; -(function (AnimationClipType) { - AnimationClipType[AnimationClipType["Component"] = 0] = "Component"; - AnimationClipType[AnimationClipType["GlTF"] = 1] = "GlTF"; -})(AnimationClipType || (AnimationClipType = {})); -var ValueType; -(function (ValueType) { - ValueType[ValueType["Num"] = 0] = "Num"; - ValueType[ValueType["Hex"] = 1] = "Hex"; - ValueType[ValueType["Mat3f"] = 2] = "Mat3f"; - ValueType[ValueType["Quaternion"] = 3] = "Quaternion"; -})(ValueType || (ValueType = {})); -var PropertyValueType; -(function (PropertyValueType) { - PropertyValueType[PropertyValueType["number"] = 0] = "number"; - PropertyValueType[PropertyValueType["string"] = 1] = "string"; - PropertyValueType[PropertyValueType["quaternion"] = 2] = "quaternion"; -})(PropertyValueType || (PropertyValueType = {})); - -var InterpolateMat3f = /** @class */ (function () { - function InterpolateMat3f(startValue, endValue, interpolationType) { - var _this = this; - this.startValues = startValue.split(',').map(parseFloat); - this.endValues = endValue.split(',').map(parseFloat); - this.interpolators = this.startValues.map(function (v1, index) { - if (interpolationType === InterpolationType.Bezier) { - return new InterpolateLinear(v1, _this.endValues[index]); - } - return new InterpolateBezier(v1, _this.endValues[index]); - }); - } - InterpolateMat3f.prototype.value = function (time) { - var values = this.interpolators.map(function (interpolator) { return interpolator.value(time); }); - return values.join(','); - }; - return InterpolateMat3f; -}()); - -var Keyframe = /** @class */ (function () { - function Keyframe(keyFrameArray) { - var _a = keyFrameArray || DEFAULT_KEYFRAME, time = _a[0], value = _a[1], interpolationType = _a[2]; - this.time = time; - this.value = value; - this.interpolationType = interpolationType; - } - Keyframe.prototype.getTime = function () { - return this.time; - }; - Keyframe.prototype.getValue = function () { - return this.value; - }; - Keyframe.prototype.getType = function () { - return this.interpolationType; - }; - return Keyframe; -}()); - -/** - * @author alteredq / http://alteredqualia.com/ - * @author mrdoob / http://mrdoob.com/ - * @author WestLangley / http://github.com/WestLangley - * @author thezwap - */ -var _lut = []; - -for (var i = 0; i < 256; i++) { - _lut[i] = (i < 16 ? '0' : '') + i.toString(16); -} - -var MathUtils = { - DEG2RAD: Math.PI / 180, - RAD2DEG: 180 / Math.PI, - generateUUID: function generateUUID() { - // http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/21963136#21963136 - var d0 = Math.random() * 0xffffffff | 0; - var d1 = Math.random() * 0xffffffff | 0; - var d2 = Math.random() * 0xffffffff | 0; - var d3 = Math.random() * 0xffffffff | 0; - var uuid = "".concat(_lut[d0 & 0xff] + _lut[d0 >> 8 & 0xff] + _lut[d0 >> 16 & 0xff] + _lut[d0 >> 24 & 0xff], "-").concat(_lut[d1 & 0xff]).concat(_lut[d1 >> 8 & 0xff], "-").concat(_lut[d1 >> 16 & 0x0f | 0x40]).concat(_lut[d1 >> 24 & 0xff], "-").concat(_lut[d2 & 0x3f | 0x80]).concat(_lut[d2 >> 8 & 0xff], "-").concat(_lut[d2 >> 16 & 0xff]).concat(_lut[d2 >> 24 & 0xff]).concat(_lut[d3 & 0xff]).concat(_lut[d3 >> 8 & 0xff]).concat(_lut[d3 >> 16 & 0xff]).concat(_lut[d3 >> 24 & 0xff]); // .toUpperCase() here flattens concatenated strings to save heap memory space. - - return uuid.toUpperCase(); - }, - clamp: function clamp(value, min, max) { - return Math.max(min, Math.min(max, value)); - }, - // compute euclidian modulo of m % n - // https://en.wikipedia.org/wiki/Modulo_operation - euclideanModulo: function euclideanModulo(n, m) { - return (n % m + m) % m; - }, - // Linear mapping from range to range - mapLinear: function mapLinear(x, a1, a2, b1, b2) { - return b1 + (x - a1) * (b2 - b1) / (a2 - a1); - }, - // https://en.wikipedia.org/wiki/Linear_interpolation - lerp: function lerp(x, y, t) { - return (1 - t) * x + t * y; - }, - // http://en.wikipedia.org/wiki/Smoothstep - smoothstep: function smoothstep(x, min, max) { - if (x <= min) return 0; - if (x >= max) return 1; - x = (x - min) / (max - min); - return x * x * (3 - 2 * x); - }, - smootherstep: function smootherstep(x, min, max) { - if (x <= min) return 0; - if (x >= max) return 1; - x = (x - min) / (max - min); - return x * x * x * (x * (x * 6 - 15) + 10); - }, - // Random integer from interval - randInt: function randInt(low, high) { - return low + Math.floor(Math.random() * (high - low + 1)); - }, - // Random float from interval - randFloat: function randFloat(low, high) { - return low + Math.random() * (high - low); - }, - // Random float from <-range/2, range/2> interval - randFloatSpread: function randFloatSpread(range) { - return range * (0.5 - Math.random()); - }, - degToRad: function degToRad(degrees) { - return degrees * MathUtils.DEG2RAD; - }, - radToDeg: function radToDeg(radians) { - return radians * MathUtils.RAD2DEG; - }, - isPowerOfTwo: function isPowerOfTwo(value) { - return (value & value - 1) === 0 && value !== 0; - }, - ceilPowerOfTwo: function ceilPowerOfTwo(value) { - return Math.pow(2, Math.ceil(Math.log(value) / Math.LN2)); - }, - floorPowerOfTwo: function floorPowerOfTwo(value) { - return Math.pow(2, Math.floor(Math.log(value) / Math.LN2)); - }, - setQuaternionFromProperEuler: function setQuaternionFromProperEuler(q, a, b, c, order) { - // Intrinsic Proper Euler Angles - see https://en.wikipedia.org/wiki/Euler_angles - // rotations are applied to the axes in the order specified by 'order' - // rotation by angle 'a' is applied first, then by angle 'b', then by angle 'c' - // angles are in radians - var cos = Math.cos; - var sin = Math.sin; - var c2 = cos(b / 2); - var s2 = sin(b / 2); - var c13 = cos((a + c) / 2); - var s13 = sin((a + c) / 2); - var c1_3 = cos((a - c) / 2); - var s1_3 = sin((a - c) / 2); - var c3_1 = cos((c - a) / 2); - var s3_1 = sin((c - a) / 2); - - switch (order) { - case 'XYX': - q.set(c2 * s13, s2 * c1_3, s2 * s1_3, c2 * c13); - break; - - case 'YZY': - q.set(s2 * s1_3, c2 * s13, s2 * c1_3, c2 * c13); - break; - - case 'ZXZ': - q.set(s2 * c1_3, s2 * s1_3, c2 * s13, c2 * c13); - break; - - case 'XZX': - q.set(c2 * s13, s2 * s3_1, s2 * c3_1, c2 * c13); - break; - - case 'YXY': - q.set(s2 * c3_1, c2 * s13, s2 * s3_1, c2 * c13); - break; - - case 'ZYZ': - q.set(s2 * s3_1, s2 * c3_1, c2 * s13, c2 * c13); - break; - - default: - console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: ".concat(order)); - } - } -}; - -/** - * @author mikael emtinger / http://gomo.se/ - * @author alteredq / http://alteredqualia.com/ - * @author WestLangley / http://github.com/WestLangley - * @author bhouston / http://clara.io - */ - -function Quaternion() { - var x = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; - var y = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; - var z = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0; - var w = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1; - this._x = x; - this._y = y; - this._z = z; - this._w = w; -} - -Object.assign(Quaternion, { - slerp: function slerp(qa, qb, qm, t) { - return qm.copy(qa).slerp(qb, t); - }, - slerpFlat: function slerpFlat(dst, dstOffset, src0, srcOffset0, src1, srcOffset1, t) { - // fuzz-free, array-based Quaternion SLERP operation - var x0 = src0[srcOffset0 + 0]; - var y0 = src0[srcOffset0 + 1]; - var z0 = src0[srcOffset0 + 2]; - var w0 = src0[srcOffset0 + 3]; - var x1 = src1[srcOffset1 + 0]; - var y1 = src1[srcOffset1 + 1]; - var z1 = src1[srcOffset1 + 2]; - var w1 = src1[srcOffset1 + 3]; - - if (w0 !== w1 || x0 !== x1 || y0 !== y1 || z0 !== z1) { - var s = 1 - t; - var cos = x0 * x1 + y0 * y1 + z0 * z1 + w0 * w1; - var dir = cos >= 0 ? 1 : -1; - var sqrSin = 1 - cos * cos; // Skip the Slerp for tiny steps to avoid numeric problems: - - if (sqrSin > Number.EPSILON) { - var sin = Math.sqrt(sqrSin); - var len = Math.atan2(sin, cos * dir); - s = Math.sin(s * len) / sin; - t = Math.sin(t * len) / sin; - } - - var tDir = t * dir; - x0 = x0 * s + x1 * tDir; - y0 = y0 * s + y1 * tDir; - z0 = z0 * s + z1 * tDir; - w0 = w0 * s + w1 * tDir; // Normalize in case we just did a lerp: - - if (s === 1 - t) { - var f = 1 / Math.sqrt(x0 * x0 + y0 * y0 + z0 * z0 + w0 * w0); - x0 *= f; - y0 *= f; - z0 *= f; - w0 *= f; - } - } - - dst[dstOffset] = x0; - dst[dstOffset + 1] = y0; - dst[dstOffset + 2] = z0; - dst[dstOffset + 3] = w0; - }, - multiplyQuaternionsFlat: function multiplyQuaternionsFlat(dst, dstOffset, src0, srcOffset0, src1, srcOffset1) { - var x0 = src0[srcOffset0]; - var y0 = src0[srcOffset0 + 1]; - var z0 = src0[srcOffset0 + 2]; - var w0 = src0[srcOffset0 + 3]; - var x1 = src1[srcOffset1]; - var y1 = src1[srcOffset1 + 1]; - var z1 = src1[srcOffset1 + 2]; - var w1 = src1[srcOffset1 + 3]; - dst[dstOffset] = x0 * w1 + w0 * x1 + y0 * z1 - z0 * y1; - dst[dstOffset + 1] = y0 * w1 + w0 * y1 + z0 * x1 - x0 * z1; - dst[dstOffset + 2] = z0 * w1 + w0 * z1 + x0 * y1 - y0 * x1; - dst[dstOffset + 3] = w0 * w1 - x0 * x1 - y0 * y1 - z0 * z1; - return dst; - } -}); -Object.defineProperties(Quaternion.prototype, { - x: { - get: function get() { - return this._x; - }, - set: function set(value) { - this._x = value; - - this._onChangeCallback(); - } - }, - y: { - get: function get() { - return this._y; - }, - set: function set(value) { - this._y = value; - - this._onChangeCallback(); - } - }, - z: { - get: function get() { - return this._z; - }, - set: function set(value) { - this._z = value; - - this._onChangeCallback(); - } - }, - w: { - get: function get() { - return this._w; - }, - set: function set(value) { - this._w = value; - - this._onChangeCallback(); - } - } -}); -Object.assign(Quaternion.prototype, { - isQuaternion: true, - set: function set(x, y, z, w) { - this._x = x; - this._y = y; - this._z = z; - this._w = w; - - this._onChangeCallback(); - - return this; - }, - clone: function clone() { - return new this.constructor(this._x, this._y, this._z, this._w); - }, - copy: function copy(quaternion) { - this._x = quaternion.x; - this._y = quaternion.y; - this._z = quaternion.z; - this._w = quaternion.w; - - this._onChangeCallback(); - - return this; - }, - setFromEuler: function setFromEuler(euler, update) { - if (!(euler && euler.isEuler)) { - throw new Error('THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.'); - } - - var x = euler._x; - var y = euler._y; - var z = euler._z; - var order = euler.order; // http://www.mathworks.com/matlabcentral/fileexchange/ - // 20696-function-to-convert-between-dcm-euler-angles-quaternions-and-euler-vectors/ - // content/SpinCalc.m - - var cos = Math.cos; - var sin = Math.sin; - var c1 = cos(x / 2); - var c2 = cos(y / 2); - var c3 = cos(z / 2); - var s1 = sin(x / 2); - var s2 = sin(y / 2); - var s3 = sin(z / 2); - - switch (order) { - case 'XYZ': - this._x = s1 * c2 * c3 + c1 * s2 * s3; - this._y = c1 * s2 * c3 - s1 * c2 * s3; - this._z = c1 * c2 * s3 + s1 * s2 * c3; - this._w = c1 * c2 * c3 - s1 * s2 * s3; - break; - - case 'YXZ': - this._x = s1 * c2 * c3 + c1 * s2 * s3; - this._y = c1 * s2 * c3 - s1 * c2 * s3; - this._z = c1 * c2 * s3 - s1 * s2 * c3; - this._w = c1 * c2 * c3 + s1 * s2 * s3; - break; - - case 'ZXY': - this._x = s1 * c2 * c3 - c1 * s2 * s3; - this._y = c1 * s2 * c3 + s1 * c2 * s3; - this._z = c1 * c2 * s3 + s1 * s2 * c3; - this._w = c1 * c2 * c3 - s1 * s2 * s3; - break; - - case 'ZYX': - this._x = s1 * c2 * c3 - c1 * s2 * s3; - this._y = c1 * s2 * c3 + s1 * c2 * s3; - this._z = c1 * c2 * s3 - s1 * s2 * c3; - this._w = c1 * c2 * c3 + s1 * s2 * s3; - break; - - case 'YZX': - this._x = s1 * c2 * c3 + c1 * s2 * s3; - this._y = c1 * s2 * c3 + s1 * c2 * s3; - this._z = c1 * c2 * s3 - s1 * s2 * c3; - this._w = c1 * c2 * c3 - s1 * s2 * s3; - break; - - case 'XZY': - this._x = s1 * c2 * c3 - c1 * s2 * s3; - this._y = c1 * s2 * c3 - s1 * c2 * s3; - this._z = c1 * c2 * s3 + s1 * s2 * c3; - this._w = c1 * c2 * c3 + s1 * s2 * s3; - break; - - default: - console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: ".concat(order)); - } - - if (update !== false) this._onChangeCallback(); - return this; - }, - setFromAxisAngle: function setFromAxisAngle(axis, angle) { - // http://www.euclideanspace.com/maths/geometry/rotations/conversions/angleToQuaternion/index.htm - // assumes axis is normalized - var halfAngle = angle / 2; - var s = Math.sin(halfAngle); - this._x = axis.x * s; - this._y = axis.y * s; - this._z = axis.z * s; - this._w = Math.cos(halfAngle); - - this._onChangeCallback(); - - return this; - }, - setFromRotationMatrix: function setFromRotationMatrix(m) { - // http://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToQuaternion/index.htm - // assumes the upper 3x3 of m is a pure rotation matrix (i.e, unscaled) - var te = m.elements; - var m11 = te[0]; - var m12 = te[4]; - var m13 = te[8]; - var m21 = te[1]; - var m22 = te[5]; - var m23 = te[9]; - var m31 = te[2]; - var m32 = te[6]; - var m33 = te[10]; - var trace = m11 + m22 + m33; - - if (trace > 0) { - var s = 0.5 / Math.sqrt(trace + 1.0); - this._w = 0.25 / s; - this._x = (m32 - m23) * s; - this._y = (m13 - m31) * s; - this._z = (m21 - m12) * s; - } else if (m11 > m22 && m11 > m33) { - var _s = 2.0 * Math.sqrt(1.0 + m11 - m22 - m33); - - this._w = (m32 - m23) / _s; - this._x = 0.25 * _s; - this._y = (m12 + m21) / _s; - this._z = (m13 + m31) / _s; - } else if (m22 > m33) { - var _s2 = 2.0 * Math.sqrt(1.0 + m22 - m11 - m33); - - this._w = (m13 - m31) / _s2; - this._x = (m12 + m21) / _s2; - this._y = 0.25 * _s2; - this._z = (m23 + m32) / _s2; - } else { - var _s3 = 2.0 * Math.sqrt(1.0 + m33 - m11 - m22); - - this._w = (m21 - m12) / _s3; - this._x = (m13 + m31) / _s3; - this._y = (m23 + m32) / _s3; - this._z = 0.25 * _s3; - } - - this._onChangeCallback(); - - return this; - }, - setFromUnitVectors: function setFromUnitVectors(vFrom, vTo) { - // assumes direction vectors vFrom and vTo are normalized - var EPS = 0.000001; - var r = vFrom.dot(vTo) + 1; - - if (r < EPS) { - r = 0; - - if (Math.abs(vFrom.x) > Math.abs(vFrom.z)) { - this._x = -vFrom.y; - this._y = vFrom.x; - this._z = 0; - this._w = r; - } else { - this._x = 0; - this._y = -vFrom.z; - this._z = vFrom.y; - this._w = r; - } - } else { - // crossVectors( vFrom, vTo ); // inlined to avoid cyclic dependency on Vector3 - this._x = vFrom.y * vTo.z - vFrom.z * vTo.y; - this._y = vFrom.z * vTo.x - vFrom.x * vTo.z; - this._z = vFrom.x * vTo.y - vFrom.y * vTo.x; - this._w = r; - } - - return this.normalize(); - }, - angleTo: function angleTo(q) { - return 2 * Math.acos(Math.abs(MathUtils.clamp(this.dot(q), -1, 1))); - }, - rotateTowards: function rotateTowards(q, step) { - var angle = this.angleTo(q); - if (angle === 0) return this; - var t = Math.min(1, step / angle); - this.slerp(q, t); - return this; - }, - inverse: function inverse() { - // quaternion is assumed to have unit length - return this.conjugate(); - }, - conjugate: function conjugate() { - this._x *= -1; - this._y *= -1; - this._z *= -1; - - this._onChangeCallback(); - - return this; - }, - dot: function dot(v) { - return this._x * v._x + this._y * v._y + this._z * v._z + this._w * v._w; - }, - lengthSq: function lengthSq() { - return this._x * this._x + this._y * this._y + this._z * this._z + this._w * this._w; - }, - length: function length() { - return Math.sqrt(this._x * this._x + this._y * this._y + this._z * this._z + this._w * this._w); - }, - normalize: function normalize() { - var l = this.length(); - - if (l === 0) { - this._x = 0; - this._y = 0; - this._z = 0; - this._w = 1; - } else { - l = 1 / l; - this._x = this._x * l; - this._y = this._y * l; - this._z = this._z * l; - this._w = this._w * l; - } - - this._onChangeCallback(); - - return this; - }, - multiply: function multiply(q, p) { - if (p !== undefined) { - console.warn('THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead.'); - return this.multiplyQuaternions(q, p); - } - - return this.multiplyQuaternions(this, q); - }, - premultiply: function premultiply(q) { - return this.multiplyQuaternions(q, this); - }, - multiplyQuaternions: function multiplyQuaternions(a, b) { - // from http://www.euclideanspace.com/maths/algebra/realNormedAlgebra/quaternions/code/index.htm - var qax = a._x; - var qay = a._y; - var qaz = a._z; - var qaw = a._w; - var qbx = b._x; - var qby = b._y; - var qbz = b._z; - var qbw = b._w; - this._x = qax * qbw + qaw * qbx + qay * qbz - qaz * qby; - this._y = qay * qbw + qaw * qby + qaz * qbx - qax * qbz; - this._z = qaz * qbw + qaw * qbz + qax * qby - qay * qbx; - this._w = qaw * qbw - qax * qbx - qay * qby - qaz * qbz; - - this._onChangeCallback(); - - return this; - }, - slerp: function slerp(qb, t) { - if (t === 0) return this; - if (t === 1) return this.copy(qb); - var x = this._x; - var y = this._y; - var z = this._z; - var w = this._w; // http://www.euclideanspace.com/maths/algebra/realNormedAlgebra/quaternions/slerp/ - - var cosHalfTheta = w * qb._w + x * qb._x + y * qb._y + z * qb._z; - - if (cosHalfTheta < 0) { - this._w = -qb._w; - this._x = -qb._x; - this._y = -qb._y; - this._z = -qb._z; - cosHalfTheta = -cosHalfTheta; - } else { - this.copy(qb); - } - - if (cosHalfTheta >= 1.0) { - this._w = w; - this._x = x; - this._y = y; - this._z = z; - return this; - } - - var sqrSinHalfTheta = 1.0 - cosHalfTheta * cosHalfTheta; - - if (sqrSinHalfTheta <= Number.EPSILON) { - var s = 1 - t; - this._w = s * w + t * this._w; - this._x = s * x + t * this._x; - this._y = s * y + t * this._y; - this._z = s * z + t * this._z; - this.normalize(); - - this._onChangeCallback(); - - return this; - } - - var sinHalfTheta = Math.sqrt(sqrSinHalfTheta); - var halfTheta = Math.atan2(sinHalfTheta, cosHalfTheta); - var ratioA = Math.sin((1 - t) * halfTheta) / sinHalfTheta; - var ratioB = Math.sin(t * halfTheta) / sinHalfTheta; - this._w = w * ratioA + this._w * ratioB; - this._x = x * ratioA + this._x * ratioB; - this._y = y * ratioA + this._y * ratioB; - this._z = z * ratioA + this._z * ratioB; - - this._onChangeCallback(); - - return this; - }, - equals: function equals(quaternion) { - return quaternion._x === this._x && quaternion._y === this._y && quaternion._z === this._z && quaternion._w === this._w; - }, - fromArray: function fromArray(array, offset) { - if (offset === undefined) offset = 0; - this._x = array[offset]; - this._y = array[offset + 1]; - this._z = array[offset + 2]; - this._w = array[offset + 3]; - - this._onChangeCallback(); - - return this; - }, - toArray: function toArray(array, offset) { - if (array === undefined) array = []; - if (offset === undefined) offset = 0; - array[offset] = this._x; - array[offset + 1] = this._y; - array[offset + 2] = this._z; - array[offset + 3] = this._w; - return array; - }, - fromBufferAttribute: function fromBufferAttribute(attribute, index) { - this._x = attribute.getX(index); - this._y = attribute.getY(index); - this._z = attribute.getZ(index); - this._w = attribute.getW(index); - return this; - }, - _onChange: function _onChange(callback) { - this._onChangeCallback = callback; - return this; - }, - _onChangeCallback: function _onChangeCallback() {} -}); - -/** - * @author mrdoob / http://mrdoob.com/ - * @author kile / http://kile.stravaganza.org/ - * @author philogb / http://blog.thejit.org/ - * @author mikael emtinger / http://gomo.se/ - * @author egraether / http://egraether.com/ - * @author WestLangley / http://github.com/WestLangley - */ - -var _vector = new Vector3(); - -var _quaternion = new Quaternion(); - -function Vector3() { - var x = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; - var y = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; - var z = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0; - this.x = x; - this.y = y; - this.z = z; -} - -Object.assign(Vector3.prototype, { - isVector3: true, - set: function set(x, y, z) { - this.x = x; - this.y = y; - this.z = z; - return this; - }, - setScalar: function setScalar(scalar) { - this.x = scalar; - this.y = scalar; - this.z = scalar; - return this; - }, - setX: function setX(x) { - this.x = x; - return this; - }, - setY: function setY(y) { - this.y = y; - return this; - }, - setZ: function setZ(z) { - this.z = z; - return this; - }, - setComponent: function setComponent(index, value) { - switch (index) { - case 0: - this.x = value; - break; - - case 1: - this.y = value; - break; - - case 2: - this.z = value; - break; - - default: - throw new Error("index is out of range: ".concat(index)); - } - - return this; - }, - getComponent: function getComponent(index) { - switch (index) { - case 0: - return this.x; - - case 1: - return this.y; - - case 2: - return this.z; - - default: - throw new Error("index is out of range: ".concat(index)); - } - }, - clone: function clone() { - return new this.constructor(this.x, this.y, this.z); - }, - copy: function copy(v) { - this.x = v.x; - this.y = v.y; - this.z = v.z; - return this; - }, - add: function add(v, w) { - if (w !== undefined) { - console.warn('THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead.'); - return this.addVectors(v, w); - } - - this.x += v.x; - this.y += v.y; - this.z += v.z; - return this; - }, - addScalar: function addScalar(s) { - this.x += s; - this.y += s; - this.z += s; - return this; - }, - addVectors: function addVectors(a, b) { - this.x = a.x + b.x; - this.y = a.y + b.y; - this.z = a.z + b.z; - return this; - }, - addScaledVector: function addScaledVector(v, s) { - this.x += v.x * s; - this.y += v.y * s; - this.z += v.z * s; - return this; - }, - sub: function sub(v, w) { - if (w !== undefined) { - console.warn('THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead.'); - return this.subVectors(v, w); - } - - this.x -= v.x; - this.y -= v.y; - this.z -= v.z; - return this; - }, - subScalar: function subScalar(s) { - this.x -= s; - this.y -= s; - this.z -= s; - return this; - }, - subVectors: function subVectors(a, b) { - this.x = a.x - b.x; - this.y = a.y - b.y; - this.z = a.z - b.z; - return this; - }, - multiply: function multiply(v, w) { - if (w !== undefined) { - console.warn('THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead.'); - return this.multiplyVectors(v, w); - } - - this.x *= v.x; - this.y *= v.y; - this.z *= v.z; - return this; - }, - multiplyScalar: function multiplyScalar(scalar) { - this.x *= scalar; - this.y *= scalar; - this.z *= scalar; - return this; - }, - multiplyVectors: function multiplyVectors(a, b) { - this.x = a.x * b.x; - this.y = a.y * b.y; - this.z = a.z * b.z; - return this; - }, - applyEuler: function applyEuler(euler) { - if (!(euler && euler.isEuler)) { - console.error('THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order.'); - } - - return this.applyQuaternion(_quaternion.setFromEuler(euler)); - }, - applyAxisAngle: function applyAxisAngle(axis, angle) { - return this.applyQuaternion(_quaternion.setFromAxisAngle(axis, angle)); - }, - applyMatrix3: function applyMatrix3(m) { - var x = this.x; - var y = this.y; - var z = this.z; - var e = m.elements; - this.x = e[0] * x + e[3] * y + e[6] * z; - this.y = e[1] * x + e[4] * y + e[7] * z; - this.z = e[2] * x + e[5] * y + e[8] * z; - return this; - }, - applyNormalMatrix: function applyNormalMatrix(m) { - return this.applyMatrix3(m).normalize(); - }, - applyMatrix4: function applyMatrix4(m) { - var x = this.x; - var y = this.y; - var z = this.z; - var e = m.elements; - var w = 1 / (e[3] * x + e[7] * y + e[11] * z + e[15]); - this.x = (e[0] * x + e[4] * y + e[8] * z + e[12]) * w; - this.y = (e[1] * x + e[5] * y + e[9] * z + e[13]) * w; - this.z = (e[2] * x + e[6] * y + e[10] * z + e[14]) * w; - return this; - }, - applyQuaternion: function applyQuaternion(q) { - var x = this.x; - var y = this.y; - var z = this.z; - var qx = q.x; - var qy = q.y; - var qz = q.z; - var qw = q.w; // calculate quat * vector - - var ix = qw * x + qy * z - qz * y; - var iy = qw * y + qz * x - qx * z; - var iz = qw * z + qx * y - qy * x; - var iw = -qx * x - qy * y - qz * z; // calculate result * inverse quat - - this.x = ix * qw + iw * -qx + iy * -qz - iz * -qy; - this.y = iy * qw + iw * -qy + iz * -qx - ix * -qz; - this.z = iz * qw + iw * -qz + ix * -qy - iy * -qx; - return this; - }, - project: function project(camera) { - return this.applyMatrix4(camera.matrixWorldInverse).applyMatrix4(camera.projectionMatrix); - }, - unproject: function unproject(camera) { - return this.applyMatrix4(camera.projectionMatrixInverse).applyMatrix4(camera.matrixWorld); - }, - transformDirection: function transformDirection(m) { - // input: THREE.Matrix4 affine matrix - // vector interpreted as a direction - var x = this.x; - var y = this.y; - var z = this.z; - var e = m.elements; - this.x = e[0] * x + e[4] * y + e[8] * z; - this.y = e[1] * x + e[5] * y + e[9] * z; - this.z = e[2] * x + e[6] * y + e[10] * z; - return this.normalize(); - }, - divide: function divide(v) { - this.x /= v.x; - this.y /= v.y; - this.z /= v.z; - return this; - }, - divideScalar: function divideScalar(scalar) { - return this.multiplyScalar(1 / scalar); - }, - min: function min(v) { - this.x = Math.min(this.x, v.x); - this.y = Math.min(this.y, v.y); - this.z = Math.min(this.z, v.z); - return this; - }, - max: function max(v) { - this.x = Math.max(this.x, v.x); - this.y = Math.max(this.y, v.y); - this.z = Math.max(this.z, v.z); - return this; - }, - clamp: function clamp(min, max) { - // assumes min < max, componentwise - this.x = Math.max(min.x, Math.min(max.x, this.x)); - this.y = Math.max(min.y, Math.min(max.y, this.y)); - this.z = Math.max(min.z, Math.min(max.z, this.z)); - return this; - }, - clampScalar: function clampScalar(minVal, maxVal) { - this.x = Math.max(minVal, Math.min(maxVal, this.x)); - this.y = Math.max(minVal, Math.min(maxVal, this.y)); - this.z = Math.max(minVal, Math.min(maxVal, this.z)); - return this; - }, - clampLength: function clampLength(min, max) { - var length = this.length(); - return this.divideScalar(length || 1).multiplyScalar(Math.max(min, Math.min(max, length))); - }, - floor: function floor() { - this.x = Math.floor(this.x); - this.y = Math.floor(this.y); - this.z = Math.floor(this.z); - return this; - }, - ceil: function ceil() { - this.x = Math.ceil(this.x); - this.y = Math.ceil(this.y); - this.z = Math.ceil(this.z); - return this; - }, - round: function round() { - this.x = Math.round(this.x); - this.y = Math.round(this.y); - this.z = Math.round(this.z); - return this; - }, - roundToZero: function roundToZero() { - this.x = this.x < 0 ? Math.ceil(this.x) : Math.floor(this.x); - this.y = this.y < 0 ? Math.ceil(this.y) : Math.floor(this.y); - this.z = this.z < 0 ? Math.ceil(this.z) : Math.floor(this.z); - return this; - }, - negate: function negate() { - this.x = -this.x; - this.y = -this.y; - this.z = -this.z; - return this; - }, - dot: function dot(v) { - return this.x * v.x + this.y * v.y + this.z * v.z; - }, - // TODO lengthSquared? - lengthSq: function lengthSq() { - return this.x * this.x + this.y * this.y + this.z * this.z; - }, - length: function length() { - return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z); - }, - manhattanLength: function manhattanLength() { - return Math.abs(this.x) + Math.abs(this.y) + Math.abs(this.z); - }, - normalize: function normalize() { - return this.divideScalar(this.length() || 1); - }, - setLength: function setLength(length) { - return this.normalize().multiplyScalar(length); - }, - lerp: function lerp(v, alpha) { - this.x += (v.x - this.x) * alpha; - this.y += (v.y - this.y) * alpha; - this.z += (v.z - this.z) * alpha; - return this; - }, - lerpVectors: function lerpVectors(v1, v2, alpha) { - this.x = v1.x + (v2.x - v1.x) * alpha; - this.y = v1.y + (v2.y - v1.y) * alpha; - this.z = v1.z + (v2.z - v1.z) * alpha; - return this; - }, - cross: function cross(v, w) { - if (w !== undefined) { - console.warn('THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead.'); - return this.crossVectors(v, w); - } - - return this.crossVectors(this, v); - }, - crossVectors: function crossVectors(a, b) { - var ax = a.x; - var ay = a.y; - var az = a.z; - var bx = b.x; - var by = b.y; - var bz = b.z; - this.x = ay * bz - az * by; - this.y = az * bx - ax * bz; - this.z = ax * by - ay * bx; - return this; - }, - projectOnVector: function projectOnVector(v) { - var denominator = v.lengthSq(); - if (denominator === 0) return this.set(0, 0, 0); - var scalar = v.dot(this) / denominator; - return this.copy(v).multiplyScalar(scalar); - }, - projectOnPlane: function projectOnPlane(planeNormal) { - _vector.copy(this).projectOnVector(planeNormal); - - return this.sub(_vector); - }, - reflect: function reflect(normal) { - // reflect incident vector off plane orthogonal to normal - // normal is assumed to have unit length - return this.sub(_vector.copy(normal).multiplyScalar(2 * this.dot(normal))); - }, - angleTo: function angleTo(v) { - var denominator = Math.sqrt(this.lengthSq() * v.lengthSq()); - if (denominator === 0) return Math.PI / 2; - var theta = this.dot(v) / denominator; // clamp, to handle numerical problems - - return Math.acos(MathUtils.clamp(theta, -1, 1)); - }, - distanceTo: function distanceTo(v) { - return Math.sqrt(this.distanceToSquared(v)); - }, - distanceToSquared: function distanceToSquared(v) { - var dx = this.x - v.x; - var dy = this.y - v.y; - var dz = this.z - v.z; - return dx * dx + dy * dy + dz * dz; - }, - manhattanDistanceTo: function manhattanDistanceTo(v) { - return Math.abs(this.x - v.x) + Math.abs(this.y - v.y) + Math.abs(this.z - v.z); - }, - setFromSpherical: function setFromSpherical(s) { - return this.setFromSphericalCoords(s.radius, s.phi, s.theta); - }, - setFromSphericalCoords: function setFromSphericalCoords(radius, phi, theta) { - var sinPhiRadius = Math.sin(phi) * radius; - this.x = sinPhiRadius * Math.sin(theta); - this.y = Math.cos(phi) * radius; - this.z = sinPhiRadius * Math.cos(theta); - return this; - }, - setFromCylindrical: function setFromCylindrical(c) { - return this.setFromCylindricalCoords(c.radius, c.theta, c.y); - }, - setFromCylindricalCoords: function setFromCylindricalCoords(radius, theta, y) { - this.x = radius * Math.sin(theta); - this.y = y; - this.z = radius * Math.cos(theta); - return this; - }, - setFromMatrixPosition: function setFromMatrixPosition(m) { - var e = m.elements; - this.x = e[12]; - this.y = e[13]; - this.z = e[14]; - return this; - }, - setFromMatrixScale: function setFromMatrixScale(m) { - var sx = this.setFromMatrixColumn(m, 0).length(); - var sy = this.setFromMatrixColumn(m, 1).length(); - var sz = this.setFromMatrixColumn(m, 2).length(); - this.x = sx; - this.y = sy; - this.z = sz; - return this; - }, - setFromMatrixColumn: function setFromMatrixColumn(m, index) { - return this.fromArray(m.elements, index * 4); - }, - setFromMatrix3Column: function setFromMatrix3Column(m, index) { - return this.fromArray(m.elements, index * 3); - }, - equals: function equals(v) { - return v.x === this.x && v.y === this.y && v.z === this.z; - }, - fromArray: function fromArray(array, offset) { - if (offset === undefined) offset = 0; - this.x = array[offset]; - this.y = array[offset + 1]; - this.z = array[offset + 2]; - return this; - }, - toArray: function toArray(array, offset) { - if (array === undefined) array = []; - if (offset === undefined) offset = 0; - array[offset] = this.x; - array[offset + 1] = this.y; - array[offset + 2] = this.z; - return array; - }, - fromBufferAttribute: function fromBufferAttribute(attribute, index, offset) { - if (offset !== undefined) { - console.warn('THREE.Vector3: offset has been removed from .fromBufferAttribute().'); - } - - this.x = attribute.getX(index); - this.y = attribute.getY(index); - this.z = attribute.getZ(index); - return this; - }, - random: function random() { - this.x = Math.random(); - this.y = Math.random(); - this.z = Math.random(); - return this; - } -}); - -var _v1 = new Vector3(); - -var _m1 = new Matrix4(); - -var _zero = new Vector3(0, 0, 0); - -var _one = new Vector3(1, 1, 1); - -var _x = new Vector3(); - -var _y = new Vector3(); - -var _z = new Vector3(); -/** - * @author mrdoob / http://mrdoob.com/ - * @author supereggbert / http://www.paulbrunt.co.uk/ - * @author philogb / http://blog.thejit.org/ - * @author jordi_ros / http://plattsoft.com - * @author D1plo1d / http://github.com/D1plo1d - * @author alteredq / http://alteredqualia.com/ - * @author mikael emtinger / http://gomo.se/ - * @author timknip / http://www.floorplanner.com/ - * @author bhouston / http://clara.io - * @author WestLangley / http://github.com/WestLangley - */ - - -function Matrix4() { - this.elements = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]; - - if (arguments.length > 0) { - console.error('THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.'); - } -} - -Object.assign(Matrix4.prototype, { - isMatrix4: true, - set: function set(n11, n12, n13, n14, n21, n22, n23, n24, n31, n32, n33, n34, n41, n42, n43, n44) { - var te = this.elements; - te[0] = n11; - te[4] = n12; - te[8] = n13; - te[12] = n14; - te[1] = n21; - te[5] = n22; - te[9] = n23; - te[13] = n24; - te[2] = n31; - te[6] = n32; - te[10] = n33; - te[14] = n34; - te[3] = n41; - te[7] = n42; - te[11] = n43; - te[15] = n44; - return this; - }, - identity: function identity() { - this.set(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); - return this; - }, - clone: function clone() { - return new Matrix4().fromArray(this.elements); - }, - copy: function copy(m) { - var te = this.elements; - var me = m.elements; - te[0] = me[0]; - te[1] = me[1]; - te[2] = me[2]; - te[3] = me[3]; - te[4] = me[4]; - te[5] = me[5]; - te[6] = me[6]; - te[7] = me[7]; - te[8] = me[8]; - te[9] = me[9]; - te[10] = me[10]; - te[11] = me[11]; - te[12] = me[12]; - te[13] = me[13]; - te[14] = me[14]; - te[15] = me[15]; - return this; - }, - copyPosition: function copyPosition(m) { - var te = this.elements; - var me = m.elements; - te[12] = me[12]; - te[13] = me[13]; - te[14] = me[14]; - return this; - }, - extractBasis: function extractBasis(xAxis, yAxis, zAxis) { - xAxis.setFromMatrixColumn(this, 0); - yAxis.setFromMatrixColumn(this, 1); - zAxis.setFromMatrixColumn(this, 2); - return this; - }, - makeBasis: function makeBasis(xAxis, yAxis, zAxis) { - this.set(xAxis.x, yAxis.x, zAxis.x, 0, xAxis.y, yAxis.y, zAxis.y, 0, xAxis.z, yAxis.z, zAxis.z, 0, 0, 0, 0, 1); - return this; - }, - extractRotation: function extractRotation(m) { - // this method does not support reflection matrices - var te = this.elements; - var me = m.elements; - - var scaleX = 1 / _v1.setFromMatrixColumn(m, 0).length(); - - var scaleY = 1 / _v1.setFromMatrixColumn(m, 1).length(); - - var scaleZ = 1 / _v1.setFromMatrixColumn(m, 2).length(); - - te[0] = me[0] * scaleX; - te[1] = me[1] * scaleX; - te[2] = me[2] * scaleX; - te[3] = 0; - te[4] = me[4] * scaleY; - te[5] = me[5] * scaleY; - te[6] = me[6] * scaleY; - te[7] = 0; - te[8] = me[8] * scaleZ; - te[9] = me[9] * scaleZ; - te[10] = me[10] * scaleZ; - te[11] = 0; - te[12] = 0; - te[13] = 0; - te[14] = 0; - te[15] = 1; - return this; - }, - makeRotationFromEuler: function makeRotationFromEuler(euler) { - if (!(euler && euler.isEuler)) { - console.error('THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.'); - } - - var te = this.elements; - var x = euler.x; - var y = euler.y; - var z = euler.z; - var a = Math.cos(x); - var b = Math.sin(x); - var c = Math.cos(y); - var d = Math.sin(y); - var e = Math.cos(z); - var f = Math.sin(z); - - if (euler.order === 'XYZ') { - var ae = a * e; - var af = a * f; - var be = b * e; - var bf = b * f; - te[0] = c * e; - te[4] = -c * f; - te[8] = d; - te[1] = af + be * d; - te[5] = ae - bf * d; - te[9] = -b * c; - te[2] = bf - ae * d; - te[6] = be + af * d; - te[10] = a * c; - } else if (euler.order === 'YXZ') { - var ce = c * e; - var cf = c * f; - var de = d * e; - var df = d * f; - te[0] = ce + df * b; - te[4] = de * b - cf; - te[8] = a * d; - te[1] = a * f; - te[5] = a * e; - te[9] = -b; - te[2] = cf * b - de; - te[6] = df + ce * b; - te[10] = a * c; - } else if (euler.order === 'ZXY') { - var _ce = c * e; - - var _cf = c * f; - - var _de = d * e; - - var _df = d * f; - - te[0] = _ce - _df * b; - te[4] = -a * f; - te[8] = _de + _cf * b; - te[1] = _cf + _de * b; - te[5] = a * e; - te[9] = _df - _ce * b; - te[2] = -a * d; - te[6] = b; - te[10] = a * c; - } else if (euler.order === 'ZYX') { - var _ae = a * e; - - var _af = a * f; - - var _be = b * e; - - var _bf = b * f; - - te[0] = c * e; - te[4] = _be * d - _af; - te[8] = _ae * d + _bf; - te[1] = c * f; - te[5] = _bf * d + _ae; - te[9] = _af * d - _be; - te[2] = -d; - te[6] = b * c; - te[10] = a * c; - } else if (euler.order === 'YZX') { - var ac = a * c; - var ad = a * d; - var bc = b * c; - var bd = b * d; - te[0] = c * e; - te[4] = bd - ac * f; - te[8] = bc * f + ad; - te[1] = f; - te[5] = a * e; - te[9] = -b * e; - te[2] = -d * e; - te[6] = ad * f + bc; - te[10] = ac - bd * f; - } else if (euler.order === 'XZY') { - var _ac = a * c; - - var _ad = a * d; - - var _bc = b * c; - - var _bd = b * d; - - te[0] = c * e; - te[4] = -f; - te[8] = d * e; - te[1] = _ac * f + _bd; - te[5] = a * e; - te[9] = _ad * f - _bc; - te[2] = _bc * f - _ad; - te[6] = b * e; - te[10] = _bd * f + _ac; - } // bottom row - - - te[3] = 0; - te[7] = 0; - te[11] = 0; // last column - - te[12] = 0; - te[13] = 0; - te[14] = 0; - te[15] = 1; - return this; - }, - makeRotationFromQuaternion: function makeRotationFromQuaternion(q) { - return this.compose(_zero, q, _one); - }, - lookAt: function lookAt(eye, target, up) { - var te = this.elements; - - _z.subVectors(eye, target); - - if (_z.lengthSq() === 0) { - // eye and target are in the same position - _z.z = 1; - } - - _z.normalize(); - - _x.crossVectors(up, _z); - - if (_x.lengthSq() === 0) { - // up and z are parallel - if (Math.abs(up.z) === 1) { - _z.x += 0.0001; - } else { - _z.z += 0.0001; - } - - _z.normalize(); - - _x.crossVectors(up, _z); - } - - _x.normalize(); - - _y.crossVectors(_z, _x); - - te[0] = _x.x; - te[4] = _y.x; - te[8] = _z.x; - te[1] = _x.y; - te[5] = _y.y; - te[9] = _z.y; - te[2] = _x.z; - te[6] = _y.z; - te[10] = _z.z; - return this; - }, - multiply: function multiply(m, n) { - if (n !== undefined) { - console.warn('THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead.'); - return this.multiplyMatrices(m, n); - } - - return this.multiplyMatrices(this, m); - }, - premultiply: function premultiply(m) { - return this.multiplyMatrices(m, this); - }, - multiplyMatrices: function multiplyMatrices(a, b) { - var ae = a.elements; - var be = b.elements; - var te = this.elements; - var a11 = ae[0]; - var a12 = ae[4]; - var a13 = ae[8]; - var a14 = ae[12]; - var a21 = ae[1]; - var a22 = ae[5]; - var a23 = ae[9]; - var a24 = ae[13]; - var a31 = ae[2]; - var a32 = ae[6]; - var a33 = ae[10]; - var a34 = ae[14]; - var a41 = ae[3]; - var a42 = ae[7]; - var a43 = ae[11]; - var a44 = ae[15]; - var b11 = be[0]; - var b12 = be[4]; - var b13 = be[8]; - var b14 = be[12]; - var b21 = be[1]; - var b22 = be[5]; - var b23 = be[9]; - var b24 = be[13]; - var b31 = be[2]; - var b32 = be[6]; - var b33 = be[10]; - var b34 = be[14]; - var b41 = be[3]; - var b42 = be[7]; - var b43 = be[11]; - var b44 = be[15]; - te[0] = a11 * b11 + a12 * b21 + a13 * b31 + a14 * b41; - te[4] = a11 * b12 + a12 * b22 + a13 * b32 + a14 * b42; - te[8] = a11 * b13 + a12 * b23 + a13 * b33 + a14 * b43; - te[12] = a11 * b14 + a12 * b24 + a13 * b34 + a14 * b44; - te[1] = a21 * b11 + a22 * b21 + a23 * b31 + a24 * b41; - te[5] = a21 * b12 + a22 * b22 + a23 * b32 + a24 * b42; - te[9] = a21 * b13 + a22 * b23 + a23 * b33 + a24 * b43; - te[13] = a21 * b14 + a22 * b24 + a23 * b34 + a24 * b44; - te[2] = a31 * b11 + a32 * b21 + a33 * b31 + a34 * b41; - te[6] = a31 * b12 + a32 * b22 + a33 * b32 + a34 * b42; - te[10] = a31 * b13 + a32 * b23 + a33 * b33 + a34 * b43; - te[14] = a31 * b14 + a32 * b24 + a33 * b34 + a34 * b44; - te[3] = a41 * b11 + a42 * b21 + a43 * b31 + a44 * b41; - te[7] = a41 * b12 + a42 * b22 + a43 * b32 + a44 * b42; - te[11] = a41 * b13 + a42 * b23 + a43 * b33 + a44 * b43; - te[15] = a41 * b14 + a42 * b24 + a43 * b34 + a44 * b44; - return this; - }, - multiplyScalar: function multiplyScalar(s) { - var te = this.elements; - te[0] *= s; - te[4] *= s; - te[8] *= s; - te[12] *= s; - te[1] *= s; - te[5] *= s; - te[9] *= s; - te[13] *= s; - te[2] *= s; - te[6] *= s; - te[10] *= s; - te[14] *= s; - te[3] *= s; - te[7] *= s; - te[11] *= s; - te[15] *= s; - return this; - }, - determinant: function determinant() { - var te = this.elements; - var n11 = te[0]; - var n12 = te[4]; - var n13 = te[8]; - var n14 = te[12]; - var n21 = te[1]; - var n22 = te[5]; - var n23 = te[9]; - var n24 = te[13]; - var n31 = te[2]; - var n32 = te[6]; - var n33 = te[10]; - var n34 = te[14]; - var n41 = te[3]; - var n42 = te[7]; - var n43 = te[11]; - var n44 = te[15]; // TODO: make this more efficient - // ( based on http://www.euclideanspace.com/maths/algebra/matrix/functions/inverse/fourD/index.htm ) - - return n41 * (+n14 * n23 * n32 - n13 * n24 * n32 - n14 * n22 * n33 + n12 * n24 * n33 + n13 * n22 * n34 - n12 * n23 * n34) + n42 * (+n11 * n23 * n34 - n11 * n24 * n33 + n14 * n21 * n33 - n13 * n21 * n34 + n13 * n24 * n31 - n14 * n23 * n31) + n43 * (+n11 * n24 * n32 - n11 * n22 * n34 - n14 * n21 * n32 + n12 * n21 * n34 + n14 * n22 * n31 - n12 * n24 * n31) + n44 * (-n13 * n22 * n31 - n11 * n23 * n32 + n11 * n22 * n33 + n13 * n21 * n32 - n12 * n21 * n33 + n12 * n23 * n31); - }, - transpose: function transpose() { - var te = this.elements; - var tmp; - tmp = te[1]; - te[1] = te[4]; - te[4] = tmp; - tmp = te[2]; - te[2] = te[8]; - te[8] = tmp; - tmp = te[6]; - te[6] = te[9]; - te[9] = tmp; - tmp = te[3]; - te[3] = te[12]; - te[12] = tmp; - tmp = te[7]; - te[7] = te[13]; - te[13] = tmp; - tmp = te[11]; - te[11] = te[14]; - te[14] = tmp; - return this; - }, - setPosition: function setPosition(x, y, z) { - var te = this.elements; - - if (x.isVector3) { - te[12] = x.x; - te[13] = x.y; - te[14] = x.z; - } else { - te[12] = x; - te[13] = y; - te[14] = z; - } - - return this; - }, - getInverse: function getInverse(m, throwOnDegenerate) { - if (throwOnDegenerate !== undefined) { - console.warn('THREE.Matrix4: .getInverse() can no longer be configured to throw on degenerate.'); - } // based on http://www.euclideanspace.com/maths/algebra/matrix/functions/inverse/fourD/index.htm - - - var te = this.elements; - var me = m.elements; - var n11 = me[0]; - var n21 = me[1]; - var n31 = me[2]; - var n41 = me[3]; - var n12 = me[4]; - var n22 = me[5]; - var n32 = me[6]; - var n42 = me[7]; - var n13 = me[8]; - var n23 = me[9]; - var n33 = me[10]; - var n43 = me[11]; - var n14 = me[12]; - var n24 = me[13]; - var n34 = me[14]; - var n44 = me[15]; - var t11 = n23 * n34 * n42 - n24 * n33 * n42 + n24 * n32 * n43 - n22 * n34 * n43 - n23 * n32 * n44 + n22 * n33 * n44; - var t12 = n14 * n33 * n42 - n13 * n34 * n42 - n14 * n32 * n43 + n12 * n34 * n43 + n13 * n32 * n44 - n12 * n33 * n44; - var t13 = n13 * n24 * n42 - n14 * n23 * n42 + n14 * n22 * n43 - n12 * n24 * n43 - n13 * n22 * n44 + n12 * n23 * n44; - var t14 = n14 * n23 * n32 - n13 * n24 * n32 - n14 * n22 * n33 + n12 * n24 * n33 + n13 * n22 * n34 - n12 * n23 * n34; - var det = n11 * t11 + n21 * t12 + n31 * t13 + n41 * t14; - if (det === 0) return this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - var detInv = 1 / det; - te[0] = t11 * detInv; - te[1] = (n24 * n33 * n41 - n23 * n34 * n41 - n24 * n31 * n43 + n21 * n34 * n43 + n23 * n31 * n44 - n21 * n33 * n44) * detInv; - te[2] = (n22 * n34 * n41 - n24 * n32 * n41 + n24 * n31 * n42 - n21 * n34 * n42 - n22 * n31 * n44 + n21 * n32 * n44) * detInv; - te[3] = (n23 * n32 * n41 - n22 * n33 * n41 - n23 * n31 * n42 + n21 * n33 * n42 + n22 * n31 * n43 - n21 * n32 * n43) * detInv; - te[4] = t12 * detInv; - te[5] = (n13 * n34 * n41 - n14 * n33 * n41 + n14 * n31 * n43 - n11 * n34 * n43 - n13 * n31 * n44 + n11 * n33 * n44) * detInv; - te[6] = (n14 * n32 * n41 - n12 * n34 * n41 - n14 * n31 * n42 + n11 * n34 * n42 + n12 * n31 * n44 - n11 * n32 * n44) * detInv; - te[7] = (n12 * n33 * n41 - n13 * n32 * n41 + n13 * n31 * n42 - n11 * n33 * n42 - n12 * n31 * n43 + n11 * n32 * n43) * detInv; - te[8] = t13 * detInv; - te[9] = (n14 * n23 * n41 - n13 * n24 * n41 - n14 * n21 * n43 + n11 * n24 * n43 + n13 * n21 * n44 - n11 * n23 * n44) * detInv; - te[10] = (n12 * n24 * n41 - n14 * n22 * n41 + n14 * n21 * n42 - n11 * n24 * n42 - n12 * n21 * n44 + n11 * n22 * n44) * detInv; - te[11] = (n13 * n22 * n41 - n12 * n23 * n41 - n13 * n21 * n42 + n11 * n23 * n42 + n12 * n21 * n43 - n11 * n22 * n43) * detInv; - te[12] = t14 * detInv; - te[13] = (n13 * n24 * n31 - n14 * n23 * n31 + n14 * n21 * n33 - n11 * n24 * n33 - n13 * n21 * n34 + n11 * n23 * n34) * detInv; - te[14] = (n14 * n22 * n31 - n12 * n24 * n31 - n14 * n21 * n32 + n11 * n24 * n32 + n12 * n21 * n34 - n11 * n22 * n34) * detInv; - te[15] = (n12 * n23 * n31 - n13 * n22 * n31 + n13 * n21 * n32 - n11 * n23 * n32 - n12 * n21 * n33 + n11 * n22 * n33) * detInv; - return this; - }, - scale: function scale(v) { - var te = this.elements; - var x = v.x; - var y = v.y; - var z = v.z; - te[0] *= x; - te[4] *= y; - te[8] *= z; - te[1] *= x; - te[5] *= y; - te[9] *= z; - te[2] *= x; - te[6] *= y; - te[10] *= z; - te[3] *= x; - te[7] *= y; - te[11] *= z; - return this; - }, - getMaxScaleOnAxis: function getMaxScaleOnAxis() { - var te = this.elements; - var scaleXSq = te[0] * te[0] + te[1] * te[1] + te[2] * te[2]; - var scaleYSq = te[4] * te[4] + te[5] * te[5] + te[6] * te[6]; - var scaleZSq = te[8] * te[8] + te[9] * te[9] + te[10] * te[10]; - return Math.sqrt(Math.max(scaleXSq, scaleYSq, scaleZSq)); - }, - makeTranslation: function makeTranslation(x, y, z) { - this.set(1, 0, 0, x, 0, 1, 0, y, 0, 0, 1, z, 0, 0, 0, 1); - return this; - }, - makeRotationX: function makeRotationX(theta) { - var c = Math.cos(theta); - var s = Math.sin(theta); - this.set(1, 0, 0, 0, 0, c, -s, 0, 0, s, c, 0, 0, 0, 0, 1); - return this; - }, - makeRotationY: function makeRotationY(theta) { - var c = Math.cos(theta); - var s = Math.sin(theta); - this.set(c, 0, s, 0, 0, 1, 0, 0, -s, 0, c, 0, 0, 0, 0, 1); - return this; - }, - makeRotationZ: function makeRotationZ(theta) { - var c = Math.cos(theta); - var s = Math.sin(theta); - this.set(c, -s, 0, 0, s, c, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); - return this; - }, - makeRotationAxis: function makeRotationAxis(axis, angle) { - // Based on http://www.gamedev.net/reference/articles/article1199.asp - var c = Math.cos(angle); - var s = Math.sin(angle); - var t = 1 - c; - var x = axis.x; - var y = axis.y; - var z = axis.z; - var tx = t * x; - var ty = t * y; - this.set(tx * x + c, tx * y - s * z, tx * z + s * y, 0, tx * y + s * z, ty * y + c, ty * z - s * x, 0, tx * z - s * y, ty * z + s * x, t * z * z + c, 0, 0, 0, 0, 1); - return this; - }, - makeScale: function makeScale(x, y, z) { - this.set(x, 0, 0, 0, 0, y, 0, 0, 0, 0, z, 0, 0, 0, 0, 1); - return this; - }, - makeShear: function makeShear(x, y, z) { - this.set(1, y, z, 0, x, 1, z, 0, x, y, 1, 0, 0, 0, 0, 1); - return this; - }, - compose: function compose(position, quaternion, scale) { - var te = this.elements; - var x = quaternion._x; - var y = quaternion._y; - var z = quaternion._z; - var w = quaternion._w; - var x2 = x + x; - var y2 = y + y; - var z2 = z + z; - var xx = x * x2; - var xy = x * y2; - var xz = x * z2; - var yy = y * y2; - var yz = y * z2; - var zz = z * z2; - var wx = w * x2; - var wy = w * y2; - var wz = w * z2; - var sx = scale.x; - var sy = scale.y; - var sz = scale.z; - te[0] = (1 - (yy + zz)) * sx; - te[1] = (xy + wz) * sx; - te[2] = (xz - wy) * sx; - te[3] = 0; - te[4] = (xy - wz) * sy; - te[5] = (1 - (xx + zz)) * sy; - te[6] = (yz + wx) * sy; - te[7] = 0; - te[8] = (xz + wy) * sz; - te[9] = (yz - wx) * sz; - te[10] = (1 - (xx + yy)) * sz; - te[11] = 0; - te[12] = position.x; - te[13] = position.y; - te[14] = position.z; - te[15] = 1; - return this; - }, - decompose: function decompose(position, quaternion, scale) { - var te = this.elements; - - var sx = _v1.set(te[0], te[1], te[2]).length(); - - var sy = _v1.set(te[4], te[5], te[6]).length(); - - var sz = _v1.set(te[8], te[9], te[10]).length(); // if determine is negative, we need to invert one scale - - - var det = this.determinant(); - if (det < 0) sx = -sx; - position.x = te[12]; - position.y = te[13]; - position.z = te[14]; // scale the rotation part - - _m1.copy(this); - - var invSX = 1 / sx; - var invSY = 1 / sy; - var invSZ = 1 / sz; - _m1.elements[0] *= invSX; - _m1.elements[1] *= invSX; - _m1.elements[2] *= invSX; - _m1.elements[4] *= invSY; - _m1.elements[5] *= invSY; - _m1.elements[6] *= invSY; - _m1.elements[8] *= invSZ; - _m1.elements[9] *= invSZ; - _m1.elements[10] *= invSZ; - quaternion.setFromRotationMatrix(_m1); - scale.x = sx; - scale.y = sy; - scale.z = sz; - return this; - }, - makePerspective: function makePerspective(left, right, top, bottom, near, far) { - if (far === undefined) { - console.warn('THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.'); - } - - var te = this.elements; - var x = 2 * near / (right - left); - var y = 2 * near / (top - bottom); - var a = (right + left) / (right - left); - var b = (top + bottom) / (top - bottom); - var c = -(far + near) / (far - near); - var d = -2 * far * near / (far - near); - te[0] = x; - te[4] = 0; - te[8] = a; - te[12] = 0; - te[1] = 0; - te[5] = y; - te[9] = b; - te[13] = 0; - te[2] = 0; - te[6] = 0; - te[10] = c; - te[14] = d; - te[3] = 0; - te[7] = 0; - te[11] = -1; - te[15] = 0; - return this; - }, - makeOrthographic: function makeOrthographic(left, right, top, bottom, near, far) { - var te = this.elements; - var w = 1.0 / (right - left); - var h = 1.0 / (top - bottom); - var p = 1.0 / (far - near); - var x = (right + left) * w; - var y = (top + bottom) * h; - var z = (far + near) * p; - te[0] = 2 * w; - te[4] = 0; - te[8] = 0; - te[12] = -x; - te[1] = 0; - te[5] = 2 * h; - te[9] = 0; - te[13] = -y; - te[2] = 0; - te[6] = 0; - te[10] = -2 * p; - te[14] = -z; - te[3] = 0; - te[7] = 0; - te[11] = 0; - te[15] = 1; - return this; - }, - equals: function equals(matrix) { - var te = this.elements; - var me = matrix.elements; - - for (var i = 0; i < 16; i++) { - if (te[i] !== me[i]) return false; - } - - return true; - }, - fromArray: function fromArray(array, offset) { - if (offset === undefined) offset = 0; - - for (var i = 0; i < 16; i++) { - this.elements[i] = array[i + offset]; - } - - return this; - }, - toArray: function toArray(array, offset) { - if (array === undefined) array = []; - if (offset === undefined) offset = 0; - var te = this.elements; - array[offset] = te[0]; - array[offset + 1] = te[1]; - array[offset + 2] = te[2]; - array[offset + 3] = te[3]; - array[offset + 4] = te[4]; - array[offset + 5] = te[5]; - array[offset + 6] = te[6]; - array[offset + 7] = te[7]; - array[offset + 8] = te[8]; - array[offset + 9] = te[9]; - array[offset + 10] = te[10]; - array[offset + 11] = te[11]; - array[offset + 12] = te[12]; - array[offset + 13] = te[13]; - array[offset + 14] = te[14]; - array[offset + 15] = te[15]; - return array; - } -}); - -/** - * @author mrdoob / http://mrdoob.com/ - * @author WestLangley / http://github.com/WestLangley - * @author bhouston / http://clara.io - */ - -var _matrix = new Matrix4(); - -var _quaternion$1 = new Quaternion(); - -function Euler() { - var x = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; - var y = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; - var z = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0; - var order = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : Euler.DefaultOrder; - this._x = x; - this._y = y; - this._z = z; - this._order = order; -} - -Euler.RotationOrders = ['XYZ', 'YZX', 'ZXY', 'XZY', 'YXZ', 'ZYX']; -Euler.DefaultOrder = 'XYZ'; -Object.defineProperties(Euler.prototype, { - x: { - get: function get() { - return this._x; - }, - set: function set(value) { - this._x = value; - - this._onChangeCallback(); - } - }, - y: { - get: function get() { - return this._y; - }, - set: function set(value) { - this._y = value; - - this._onChangeCallback(); - } - }, - z: { - get: function get() { - return this._z; - }, - set: function set(value) { - this._z = value; - - this._onChangeCallback(); - } - }, - order: { - get: function get() { - return this._order; - }, - set: function set(value) { - this._order = value; - - this._onChangeCallback(); - } - } -}); -Object.assign(Euler.prototype, { - isEuler: true, - set: function set(x, y, z, order) { - this._x = x; - this._y = y; - this._z = z; - this._order = order || this._order; - - this._onChangeCallback(); - - return this; - }, - clone: function clone() { - return new this.constructor(this._x, this._y, this._z, this._order); - }, - copy: function copy(euler) { - this._x = euler._x; - this._y = euler._y; - this._z = euler._z; - this._order = euler._order; - - this._onChangeCallback(); - - return this; - }, - setFromRotationMatrix: function setFromRotationMatrix(m, order, update) { - var clamp = MathUtils.clamp; // assumes the upper 3x3 of m is a pure rotation matrix (i.e, unscaled) - - var te = m.elements; - var m11 = te[0]; - var m12 = te[4]; - var m13 = te[8]; - var m21 = te[1]; - var m22 = te[5]; - var m23 = te[9]; - var m31 = te[2]; - var m32 = te[6]; - var m33 = te[10]; - order = order || this._order; - - switch (order) { - case 'XYZ': - this._y = Math.asin(clamp(m13, -1, 1)); - - if (Math.abs(m13) < 0.9999999) { - this._x = Math.atan2(-m23, m33); - this._z = Math.atan2(-m12, m11); - } else { - this._x = Math.atan2(m32, m22); - this._z = 0; - } - - break; - - case 'YXZ': - this._x = Math.asin(-clamp(m23, -1, 1)); - - if (Math.abs(m23) < 0.9999999) { - this._y = Math.atan2(m13, m33); - this._z = Math.atan2(m21, m22); - } else { - this._y = Math.atan2(-m31, m11); - this._z = 0; - } - - break; - - case 'ZXY': - this._x = Math.asin(clamp(m32, -1, 1)); - - if (Math.abs(m32) < 0.9999999) { - this._y = Math.atan2(-m31, m33); - this._z = Math.atan2(-m12, m22); - } else { - this._y = 0; - this._z = Math.atan2(m21, m11); - } - - break; - - case 'ZYX': - this._y = Math.asin(-clamp(m31, -1, 1)); - - if (Math.abs(m31) < 0.9999999) { - this._x = Math.atan2(m32, m33); - this._z = Math.atan2(m21, m11); - } else { - this._x = 0; - this._z = Math.atan2(-m12, m22); - } - - break; - - case 'YZX': - this._z = Math.asin(clamp(m21, -1, 1)); - - if (Math.abs(m21) < 0.9999999) { - this._x = Math.atan2(-m23, m22); - this._y = Math.atan2(-m31, m11); - } else { - this._x = 0; - this._y = Math.atan2(m13, m33); - } - - break; - - case 'XZY': - this._z = Math.asin(-clamp(m12, -1, 1)); - - if (Math.abs(m12) < 0.9999999) { - this._x = Math.atan2(m32, m22); - this._y = Math.atan2(m13, m11); - } else { - this._x = Math.atan2(-m23, m33); - this._y = 0; - } - - break; - - default: - console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: ".concat(order)); - } - - this._order = order; - if (update !== false) this._onChangeCallback(); - return this; - }, - setFromQuaternion: function setFromQuaternion(q, order, update) { - _matrix.makeRotationFromQuaternion(q); - - return this.setFromRotationMatrix(_matrix, order, update); - }, - setFromVector3: function setFromVector3(v, order) { - return this.set(v.x, v.y, v.z, order || this._order); - }, - reorder: function reorder(newOrder) { - // WARNING: this discards revolution information -bhouston - _quaternion$1.setFromEuler(this); - - return this.setFromQuaternion(_quaternion$1, newOrder); - }, - equals: function equals(euler) { - return euler._x === this._x && euler._y === this._y && euler._z === this._z && euler._order === this._order; - }, - fromArray: function fromArray(array) { - this._x = array[0]; - this._y = array[1]; - this._z = array[2]; - if (array[3] !== undefined) this._order = array[3]; - - this._onChangeCallback(); - - return this; - }, - toArray: function toArray(array, offset) { - if (array === undefined) array = []; - if (offset === undefined) offset = 0; - array[offset] = this._x; - array[offset + 1] = this._y; - array[offset + 2] = this._z; - array[offset + 3] = this._order; - return array; - }, - toVector3: function toVector3(optionalResult) { - if (optionalResult) { - return optionalResult.set(this._x, this._y, this._z); - } - - return new Vector3(this._x, this._y, this._z); - }, - _onChange: function _onChange(callback) { - this._onChangeCallback = callback; - return this; - }, - _onChangeCallback: function _onChangeCallback() {} -}); - -/** - * 欧拉角旋转 转 四元数 - * @param x - * @param y - * @param z - */ -function eulerToQuaternion(x, y, z) { - var degToAngle = Math.PI / 180; - var v3 = new Euler(x * degToAngle, y * degToAngle, z * degToAngle); - var quat = new Quaternion(); - quat.setFromEuler(v3); - var rotation = { - x: quat.x, - y: quat.y, - z: quat.z, - w: quat.w, - }; - return rotation; -} - -var KeyframeTrack = /** @class */ (function () { - function KeyframeTrack(propertyTrack, duration) { - var propertyPath = propertyTrack.propertyPath, keyframes = propertyTrack.keyframes, _a = propertyTrack.valueType, valueType = _a === void 0 ? ValueType.Num : _a; - this.initPropertyPath(propertyPath); - this.initKeyframes(keyframes); - this.valueType = valueType; - this.duration = duration; - this.extrapolationMode = DEFAULT_EXTRAPOLATION_MODE; - this.cacheValueMap = {}; - this.cacheInterpolatorMap = {}; - } - // "1/BasicTransform/position/x" => name, entityId, componentType, attributePath - KeyframeTrack.prototype.initPropertyPath = function (propertyPath) { - var _a = propertyPath.split('/'), entityId = _a[0], componentType = _a[1], attributePath = _a.slice(2); - this.name = propertyPath; - this.entityId = entityId; - this.componentType = componentType; - this.attributePath = attributePath.join('.'); - }; - KeyframeTrack.prototype.initKeyframes = function (keyframes) { - this.keyframes = keyframes.sort(function (a, b) { - var _a = [a[0], b[0]], time1 = _a[0], time2 = _a[1]; - return time1 - time2; - }).map(function (keyframe) { return new Keyframe(keyframe); }); // 根据时间对关键帧排序 - this.firstKeyframe = this.keyframes[0]; // 第一个关键帧 - this.finallyKeyframe = this.keyframes[this.keyframes.length - 1]; // 最后一个关键帧 - }; - KeyframeTrack.prototype.getValueAt = function (deltaTime) { - // 1. 边界条件判断 - if (isNaN(deltaTime)) - return; - if (deltaTime <= 0) - return this.transformValueByType(this.firstKeyframe.getValue()); - if (deltaTime >= this.duration) - return this.finallyKeyframe.getValue(); // 边界条件 -> 时间大于总时长 (可能吗?) - // 2. 从cache里面找找看 - if (this.cacheValueMap[deltaTime]) - return this.cacheValueMap[deltaTime]; - // 3. 找到此时的时间在关键帧中所处的位置, 并计算参数 - var _a = this.calcParams(deltaTime), currentTime = _a[0], beginValue = _a[1], endValue = _a[2], duration = _a[3], interpolationType = _a[4]; - // 4. 计算插值 - var value = this.getInterpolationValue(currentTime, beginValue, endValue, duration, interpolationType); - // 5. 缓存 - this.cacheValueMap[deltaTime] = value; - return value; - }; - KeyframeTrack.prototype.getName = function () { - return this.name; - }; - KeyframeTrack.prototype.getComponentType = function () { - return this.componentType; - }; - KeyframeTrack.prototype.getAttributePath = function () { - return this.attributePath; - }; - KeyframeTrack.prototype.getValueType = function () { - return this.valueType; - }; - KeyframeTrack.prototype.transformValueByType = function (value) { - switch (this.valueType) { - case ValueType.Hex: - return transformHexToRgbaObj(value); - case ValueType.Quaternion: - return eulerToQuaternion(value.x, value.y, value.z); - default: - return value; - } - }; - KeyframeTrack.prototype.calcParams = function (deltaTime) { - switch (this.extrapolationMode) { - case ExtrapolationMode.Constant: - return this.calcParamsConstant(deltaTime); - case ExtrapolationMode.Linear: - return this.calcParamsLinear(deltaTime); - default: - return this.calcParamsLinear(deltaTime); - } - }; - // 计算 常量 关键帧外插模式时候的参数 (第一帧之前的帧跟第一帧一样, 最后一帧之后的帧和最后一帧一样, 如果前一个关键帧已经是最后一个关键帧,那么后一个关键帧也使用该帧) - KeyframeTrack.prototype.calcParamsConstant = function (deltaTime) { - var currentTime; - var beginValue; - var endValue; - var duration; - var interpolationType; - if (deltaTime <= this.firstKeyframe.getTime()) { // 2.1 处于第一个关键帧之前 - currentTime = deltaTime; - beginValue = this.firstKeyframe.getValue(); - endValue = this.firstKeyframe.getValue(); - duration = this.firstKeyframe.getTime(); - interpolationType = this.firstKeyframe.getType(); - } - else if (deltaTime >= this.finallyKeyframe.getTime()) { // 2.1 处于最后一个关键帧之后 - currentTime = deltaTime - this.finallyKeyframe.getTime(); - beginValue = this.finallyKeyframe.getValue(); - endValue = this.finallyKeyframe.getValue(); - duration = this.duration - this.finallyKeyframe.getTime(); - interpolationType = this.finallyKeyframe.getType(); - } - else { // 2.3 处于中间关键帧之间, 进行二分查找 - var _a = this.binarySearchKeyframe(deltaTime), beforeKeyframe = _a[0], afterKeyframe = _a[1]; - currentTime = deltaTime - beforeKeyframe.getTime(); - beginValue = beforeKeyframe.getValue(); - endValue = afterKeyframe.getValue(); - duration = afterKeyframe.getTime() - beforeKeyframe.getTime(); - interpolationType = afterKeyframe.getType(); - } - return [currentTime, beginValue, endValue, duration, interpolationType]; - }; - // 计算 线性 关键帧外插模式时候的参数 (第一帧之前的帧使用最后一帧, 最后一帧之后的帧使用第一帧) - KeyframeTrack.prototype.calcParamsLinear = function (deltaTime) { - var currentTime; - var beginValue; - var endValue; - var duration; - var interpolationType; - if (deltaTime <= this.firstKeyframe.getTime()) { // 2.1 处于第一个关键帧之前 - currentTime = deltaTime; - beginValue = this.firstKeyframe.getValue(); - endValue = this.firstKeyframe.getValue(); - duration = this.firstKeyframe.getTime(); - interpolationType = this.firstKeyframe.getType(); - } - else if (deltaTime >= this.finallyKeyframe.getTime()) { // 2.1 处于最后一个关键帧之后 - currentTime = deltaTime - this.finallyKeyframe.getTime(); - beginValue = this.finallyKeyframe.getValue(); - endValue = this.finallyKeyframe.getValue(); - duration = this.duration - this.finallyKeyframe.getTime(); - interpolationType = this.finallyKeyframe.getType(); - } - else { // 2.3 处于中间关键帧之间 - var _a = this.binarySearchKeyframe(deltaTime), beforeKeyframe = _a[0], afterKeyframe = _a[1]; - currentTime = deltaTime - beforeKeyframe.getTime(); - beginValue = beforeKeyframe.getValue(); - endValue = afterKeyframe.getValue(); - duration = afterKeyframe.getTime() - beforeKeyframe.getTime(); - interpolationType = afterKeyframe.getType(); - } - return [currentTime, beginValue, endValue, duration, interpolationType]; - }; - // 二分法查找前后帧 - KeyframeTrack.prototype.binarySearchKeyframe = function (deltaTime) { - var keyframes = this.keyframes; - var left = 0; - var right = keyframes.length - 1; - while (left <= right) { - var mid = left + Math.floor((right - left) / 2); - var currentFrame = keyframes[mid]; - if (deltaTime < currentFrame.getTime()) { // 如果 deltaTime < 当前的时间, 则查找前半部分 - right = mid; - } - else if (deltaTime > currentFrame.getTime()) { // 如果 deltaTime > 当前的时间, 则查找后半部分 - left = mid; - } - else { // 正好时间是相等的 - return [keyframes[mid], keyframes[mid]]; - } - if (right - left === 1) { // 找到前后帧 - return [keyframes[left], keyframes[right]]; - } - } - return [keyframes[left], keyframes[right]]; - }; - KeyframeTrack.prototype.getInterpolationType = function (beforeKeyframe, afterKeyframe) { - if (!afterKeyframe) - return beforeKeyframe.getType(); - return afterKeyframe.getType(); - }; - KeyframeTrack.prototype.getInterpolationValue = function (deltaTime, beginValue, endValue, duration, interpolationType) { - var interpolator = this.getInterpolator(beginValue, endValue, duration, interpolationType); - var time = isNaN(deltaTime / duration) ? 0 : deltaTime / duration; - var value = interpolator.value(time); - return value; - }; - KeyframeTrack.prototype.getInterpolator = function (beginValue, endValue, duration, interpolationType) { - var key = "key-" + beginValue + "-" + endValue + "-" + duration; - if (this.cacheInterpolatorMap[key]) { - return this.cacheInterpolatorMap[key]; - } - var interpolator; - switch (this.valueType) { - case ValueType.Hex: - interpolator = new InterpolateColor(beginValue, endValue); - break; - case ValueType.Mat3f: - interpolator = new InterpolateMat3f(beginValue, endValue, interpolationType); - break; - default: - switch (interpolationType) { - case InterpolationType.Bezier: - interpolator = new InterpolateBezier(beginValue, endValue); - break; - case InterpolationType.Linear: - default: - interpolator = new InterpolateLinear(beginValue, endValue); - break; - } - } - this.cacheInterpolatorMap[key] = interpolator; - return interpolator; - }; - return KeyframeTrack; -}()); - -var Animation = /** @class */ (function () { - function Animation(config) { - this.propertyTracks = []; - this.init(config); - } - Animation.prototype.init = function (config) { - var _this = this; - this.duration = config.duration; - this.propertyTracks = config.propertyTracks; - // 1. 根据 propertyTracks 数组生成对应的 KeyframeTrack数组 - this.keyframeTracks = this.propertyTracks.map(function (propertyTrack) { return new KeyframeTrack(propertyTrack, _this.duration); }); - }; - // 根据current time(µs microsecond 微秒)获取插值 - Animation.prototype.getValueAtTime = function (time) { - var deltaTime = time % this.duration; - return this.getValueAtDeltaTime(deltaTime); - }; - // 根据delta time(µs microsecond 微秒)获取插值 - Animation.prototype.getValueAtDeltaTime = function (deltaTime) { - var values = this.keyframeTracks.map(function (keyframeTrack) { return ({ - componentType: keyframeTrack.getComponentType(), - propertyPath: keyframeTrack.getAttributePath(), - valueType: keyframeTrack.getValueType(), - value: keyframeTrack.getValueAt(deltaTime), - }); }); - return values; - }; - // 根据progress(百分比)获取插值 - Animation.prototype.getValueAtProgress = function (progress) { - var deltaTime = this.duration * progress; - return this.getValueAtDeltaTime(deltaTime); - }; - return Animation; -}()); - -// eslint-disable-next-line @typescript-eslint/no-unused-vars -function patchComponent(component, _propertyPath, _valueType) { - Object.defineProperties(component, { - getComponentInstance: { - value: function (componentType, propertyPath) { - switch (componentType) { - case light.MeshRenderer3DComponent.componentType: { - var index = propertyPath.split('.')[0]; - return component.getPrimitiveMaterial(Number(index)).asPbrMaterial(); - } - default: - return component; - } - }, - }, - setProperty: { - value: function (c, _, propertyPath, value, valueType) { - switch (valueType) { - case ValueType.Hex: { - var r = value.r, g = value.g, b = value.b, a = value.a; - c.base_color_factor_.set(0, parseFloat(r) / 255); - c.base_color_factor_.set(1, parseFloat(g) / 255); - c.base_color_factor_.set(2, parseFloat(b) / 255); - c.base_color_factor_.set(3, parseFloat(a) / 100); - break; - } - case ValueType.Mat3f: { - var _a = value.split(',').map(parseFloat), v1 = _a[0], v2 = _a[1], v3 = _a[2], v4 = _a[3], v5 = _a[4], v6 = _a[5], v7 = _a[6], v8 = _a[7], v9 = _a[8]; - var m1 = light.float3.create(v1, v2, v3); - var m2 = light.float3.create(v4, v5, v6); - var m3 = light.float3.create(v7, v8, v9); - c.base_color_uv_matrix_.set(0, m1); - c.base_color_uv_matrix_.set(1, m2); - c.base_color_uv_matrix_.set(2, m3); - break; - } - default: { - var component_1 = c; - var keyPath = propertyPath.split('.'); - var lastKeyIndex = keyPath.length - 1; - for (var i = 0; i < lastKeyIndex; i++) { - var key = keyPath[i]; - if (!(key in component_1)) { - component_1[key] = parseInt(key) !== parseInt(key) ? {} : []; - } - component_1 = component_1[key]; - } - component_1[keyPath[lastKeyIndex]] = value; - } - } - }, - }, - }); -} -var AnimationController = /** @class */ (function (_super) { - __extends(AnimationController, _super); - function AnimationController(entityId, entityManager, eventManager, scriptSystem) { - var _this = _super.call(this, entityId, entityManager, eventManager, scriptSystem) || this; - _this.cacheClipsProgress = []; - _this.resourceVersions = []; - _this.configure(); - return _this; - } - AnimationController.prototype.configure = function () { - console.log('AnimationBehavior ----> configure'); - // 0. 没有组件动画提前return - var animationClips = this.getAnimationControllerClips(); - var hasComponentAnimation = this.hasComponentAnimation(animationClips); - if (!hasComponentAnimation) - return; - // 1. 读取文件 - var resourceKey = this.getResourceKey(); - if (!resourceKey) - return; - var fileData = light.FileSystem.readTextFromResource(this.entityManager, resourceKey); - // 2. 获取关键帧信息 - var animationData = JSON.parse(fileData); - var clips = animationData.clips; - // 3. 初始化动画数组 - this.animationClips = clips.map(function (clip) { return new Animation(clip); }); - // 4. 缓存此时的动画组件播放状态 - this.backupResourceVersion(); - }; - AnimationController.prototype.backupResourceVersion = function () { - var animationClips = this.getAnimationControllerClips(); - var resourceVersions = []; - for (var i = 0; i < animationClips.size(); i++) { - resourceVersions[i] = animationClips.get(i).resourceVersion; - } - this.resourceVersions = resourceVersions; - }; - AnimationController.prototype.backupClipsProgress = function () { - var animationClips = this.getAnimationControllerClips(); - var cacheClipsProgress = []; - for (var i = 0; i < animationClips.size(); i++) { - cacheClipsProgress[i] = animationClips.get(i).progress; - } - this.cacheClipsProgress = cacheClipsProgress; - }; - AnimationController.prototype.getResourceKey = function () { - var animationClips = this.getAnimationControllerClips(); - if (animationClips.size() === 0) - return ''; - for (var i = 0; i < animationClips.size(); i++) { - if (animationClips.get(i).type === 0 /* Component */) { - return animationClips.get(i).resourceKey; - } - } - }; - AnimationController.prototype.getAnimationControllerClips = function () { - var animationControllerComp = this.getComponent(light.AnimationController); - var clips = animationControllerComp.clips; - return clips; - }; - AnimationController.prototype.getComponent = function (componentType, propertyPath, valueType) { - var component = this.entity.getComponent(componentType); - patchComponent(component); - return component; - }; - AnimationController.prototype.checkResourceVersion = function (animationClips) { - // 1. 还没有初始化 - if (!this.animationClips) { - this.configure(); - return; - } - // 2. 比较动画文件的版本号 - for (var i = 0; i < animationClips.size(); i++) { - var clip = animationClips.get(i); - var resourceVersion = clip.resourceVersion; - var prevResourceVersion = this.resourceVersions[i]; - if (prevResourceVersion !== resourceVersion) { - this.configure(); - return; - } - } - }; - AnimationController.prototype.hasComponentAnimation = function (animationClips) { - var hasAnim = false; - animationClips.forEach(function (clip) { - if (clip.type === 0 /* Component */) { - hasAnim = true; - } - }); - return hasAnim; - }; - // 每一帧会调用此方法, 单位为微秒microsecond - AnimationController.prototype.update = function () { - var _this = this; - var animationClips = this.getAnimationControllerClips(); - // 0. 没有组件动画提前return - var hasComponentAnimation = this.hasComponentAnimation(animationClips); - if (!hasComponentAnimation) - return; - // 1. 检查动画文件版本 是否需要重新读取动画文件 - this.checkResourceVersion(animationClips); - // 2. 点击动画组件时候播放 找到动画组件, 找到其中progress与上回不一致的, 注: progress其实是time, 并非百分比, 单位为微秒 - for (var i = 0; i < animationClips.size(); i++) { - var clip = animationClips.get(i); - var progress = clip.progress, clipIndex = clip.clipIndex, type = clip.type; - if (type === 1 /* GlTF */) - continue; - if (this.cacheClipsProgress[i] === progress) - continue; - if (!this.animationClips[clipIndex]) - continue; - // 2.1 根据progress更新组件 - var clipValues = this.animationClips[clipIndex].getValueAtTime(progress); - clipValues.forEach(function (clipValue) { - var componentType = clipValue.componentType, propertyPath = clipValue.propertyPath, value = clipValue.value, valueType = clipValue.valueType; - _this.updateComponent(componentType, propertyPath, value, valueType); - }); - } - // 3. 缓存此时的progress - this.backupClipsProgress(); - }; - AnimationController.prototype.updateComponent = function (componentType, propertyPath, value, valueType) { - var component = this.getComponent(componentType, propertyPath, valueType); - if (!component) - return; - var componentInstance = component.getComponentInstance(componentType, propertyPath); - switch (componentType) { - case light.BasicTransform.componentType: - case light.ScreenTransform.componentType: - this.updateTransformComponent(componentInstance, componentType, propertyPath, value, valueType, component); - break; - default: - component.setProperty(componentInstance, componentType, propertyPath, value, valueType); - break; - } - }; - AnimationController.prototype.updateTransformComponent = function (componentInstance, componentType, propertyPath, value, valueType, component) { - var pathArray = propertyPath.split('.'); - var lastPath = pathArray[pathArray.length - 1]; - if (propertyPath.indexOf('position') === 0) { - var componentPosition = componentInstance.position; - componentPosition[lastPath] = value; - componentInstance.SetPosition(componentPosition); - } - else if (propertyPath.indexOf('eEuler') === 0) { - if (!this.cacheEuler) { - this.cacheEuler = {}; - } - this.cacheEuler[propertyPath.split('.')[1]] = value; - if (this.cacheEuler.x !== undefined && this.cacheEuler.y !== undefined && this.cacheEuler.z !== undefined) { - var _a = this.cacheEuler, x = _a.x, y = _a.y, z = _a.z; - var rotation = eulerToQuaternion(x, y, z); - var componentRotation = componentInstance.rotation; - componentRotation.x = rotation.x; - componentRotation.y = rotation.y; - componentRotation.z = rotation.z; - componentRotation.w = rotation.w; - componentInstance.SetRotation(componentRotation); - this.cacheEuler = null; - } - } - else if (propertyPath.indexOf('scale') === 0) { - var componentScale = componentInstance.scale; - componentScale[lastPath] = value; - componentInstance.SetScale(componentScale); - } - else { - component.setProperty(componentInstance, componentType, propertyPath, value, valueType); - } - }; - AnimationController.prototype.destroy = function () { - this.animationClips = null; - this.cacheClipsProgress = null; - this.resourceVersions = null; - this.cacheEuler = null; - _super.prototype.destroy.call(this); - }; - return AnimationController; -}(BaseBehavior)); -light.on('start', function (entityManager, eventManager, scriptSystem) { - // 1. 从entity里面找到所有包含动画组件的entity - var entitiesWithAnimation = entityManager.entitiesWithComponents(light.AnimationController.componentType); - // 2. 对每个entity都注册一个 AnimationController - entitiesWithAnimation.forEach(function (entity) { - var idComponent = entity.getComponent(light.EntityIdentifier); - if (!idComponent) - return; - var AnimationBehavior = new AnimationController(idComponent.id, entityManager, eventManager, scriptSystem); - light.runtime.addBehavior(AnimationBehavior); - }); -}); - -var Node = /** @class */ (function () { - function Node() { - } - return Node; -}()); -var EventNode = /** @class */ (function (_super) { - __extends(EventNode, _super); - function EventNode() { - return _super !== null && _super.apply(this, arguments) || this; - } - return EventNode; -}(Node)); - -var StartNode = /** @class */ (function (_super) { - __extends(StartNode, _super); - function StartNode() { - return _super !== null && _super.apply(this, arguments) || this; - } - StartNode.prototype.Run = function () { }; - StartNode.nodeType = 'code/Start'; - return StartNode; -}(EventNode)); -light.NodeContext.registerNode(StartNode); - -var LoopType; -(function (LoopType) { - LoopType["FIXED"] = "\u56FA\u5B9A\u6570\u5B57"; - LoopType["INFINITE"] = "\u65E0\u9650\u5FAA\u73AF"; -})(LoopType || (LoopType = {})); -var TimerNode = /** @class */ (function (_super) { - __extends(TimerNode, _super); - function TimerNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.duration = 1000000; - _this.repeatTimes = 1; - _this.times = 1; - _this._times = 1; - _this.startupTrigger = false; // 刚开始就触发一次 - _this.lastTime = 0; - _this.currentTimes = 0; - return _this; - } - TimerNode.prototype.Update = function () { }; - TimerNode.prototype.Run = function () { - if (this.startupTrigger && this.repeatTimes !== 0) { - this.currentTimes = this.currentTimes + 1; - this.Update(); - } - light.on('update', this.onLightUpdate.bind(this)); - }; - TimerNode.prototype.onLightUpdate = function (time) { - if ((time - this.lastTime) > this.duration - && (this.repeatTimes > this.currentTimes || this.loopType === LoopType.INFINITE)) { - this.Update(); - this.lastTime = time; - this.currentTimes = this.currentTimes + 1; - this.times = this.times + 1; - } - }; - TimerNode.nodeType = 'code/Timer'; - return TimerNode; -}(EventNode)); -light.NodeContext.registerNode(TimerNode); - -var MAX_FACE_NUMBER = 5; -var Queue = [ - light.Image, - light.PAGAsset, - light.HairColor, - light.PinchFace, - light.Liquefaction, - light.LiquefactionV6, - light.MakeupFaceV6, - light.MakeupLipsV6, - light.MakeupIrisV6, - light.Stretch, - light.LUTFilter, - light.GAN, - light.PostEffect, - light.MakeupFace, - light.MakeupLips, - light.MakeupIris, - light.MakeupEyeV6, - light.MakeupEyebrowV6, - light.Smooth, - light.Beauty, - light.BeautyBody, - light.CustomShader, - light.CustomGraph, - light.Tips, - light.CrazyFace, - light.Sticker3D, - light.Snapshot, - light.Particle, , - light.ExpressionTransfer, -]; -var getRelateEntities = function (entityId, entityManager) { - var entities = []; - var entity = entityManager.getEntityById(entityId); - if (entity) { - var faceTrack = entity.getComponent(light.FaceTracking); - entities.push(entity); - if (faceTrack) { - if (faceTrack.duplicate_entity_id_) { // 新版 - for (var i = 0; i < faceTrack.duplicate_entity_id_.size(); i += 1) { - var id = faceTrack.duplicate_entity_id_.get(i); - var relateEntity = entityManager.getEntityById(id); - if (relateEntity === null || relateEntity === void 0 ? void 0 : relateEntity.transform) { - entities.push(relateEntity); - } - } - } - else { - var faceIds = new Array(MAX_FACE_NUMBER - 1).fill(0) // 兼容旧版 - .map(function (value, i) { return entityId + ((i + 1) * 10000); }); - faceIds.forEach(function (id) { - var relateEntity = entityManager.getEntityById(id); - if (relateEntity === null || relateEntity === void 0 ? void 0 : relateEntity.transform) { - entities.push(relateEntity); - } - }); - } - } - } - return entities; -}; -var showEntities = function (ids, entityManager) { - if (ids === void 0) { ids = []; } - ids.forEach(function (entityId) { - var entities = getRelateEntities(entityId, entityManager); // 获取人脸跟随的对象集 - entities.forEach(function (entity) { - var timeOffset = entity.getComponent(light.TimeOffset); - var timeContrl = entity.getComponent(light.TimeControl); - if (timeOffset) { - timeOffset.startOffset = light.getCurrentTime(); - } - if (timeContrl) { - timeContrl.reset(); - timeContrl.currentTime = 0; - } - var setTransform = true; - Queue.forEach(function (queueItem) { - var cmp = entity.getComponent(queueItem); - if (cmp) { - cmp.enabled = true; - setTransform = false; - } - }); - if (setTransform) { - [ - light.BasicTransform, - light.ScreenTransform, - ].forEach(function (item) { - var cmp = entity.getComponent(item); - if (cmp) { - cmp.objectEnabled = true; - } - }); - } - }); - }); -}; -var hideEntities = function (ids, entityManager) { - if (ids === void 0) { ids = []; } - ids.forEach(function (entityId) { - getRelateEntities(entityId, entityManager).forEach(function (entity) { - var setTransform = true; - Queue.forEach(function (queueItem) { - var cmp = entity.getComponent(queueItem); - if (cmp) { - cmp.enabled = false; - setTransform = false; - } - }); - if (setTransform) { - [ - light.BasicTransform, - light.ScreenTransform, - ].forEach(function (item) { - var cmp = entity.getComponent(item); - if (cmp) { - cmp.objectEnabled = false; - } - }); - } - }); - }); -}; -// 判断entity的component是否enable 如果为跟脸贴纸 还需要判断transform是否visible -var isEntityHide = function (id, entityManager) { - var cmpEnable = false; - var entity = entityManager.getEntityById(id); - if (entity) { - Queue.forEach(function (queueItem) { - var cmp = entity.getComponent(queueItem); - if (cmp) { - if (!cmp.enabled) { - return true; - } - cmpEnable = cmp.enabled; - } - }); - [light.BasicTransform, light.ScreenTransform].forEach(function (item) { - var cmp = entity.getComponent(item); - if (cmp) { - cmpEnable = cmp.objectEnabled && cmp.visible && cmpEnable; - } - }); - } - return !cmpEnable; -}; -var setGlobalValue = function (name, v) { - if (!light.globalValueMap) { - light.globalValueMap = {}; - } - if (v !== undefined && v !== null) { - light.globalValueMap[name] = v; - } - console.error('set light.globalValueMap', JSON.stringify(light.globalValueMap)); -}; -var getGlobalValue = function (name) { - if (!light.globalValueMap) { - return null; - } - return light.globalValueMap[name]; -}; - -var ObjectQueueNode = /** @class */ (function (_super) { - __extends(ObjectQueueNode, _super); - function ObjectQueueNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.toShow = []; - _this.toHide = []; - _this.init = false; - _this.random = false; - _this.indexToDisplay = 0; - return _this; - } - ObjectQueueNode.prototype.Run = function () { - var _this = this; - var _a; - this.toShow = []; - this.toHide = []; - if (this.random) { - this.indexToDisplay = Math.floor(Math.random() * this.entityToDisplay.length); - } - (_a = this.entityToDisplay) === null || _a === void 0 ? void 0 : _a.forEach(function (entityId, i) { - var entity = _this.entityManager.getEntityById(entityId); - if (entity) { - if (i === _this.indexToDisplay % _this.entityToDisplay.length) { - _this.toShow.push(entityId); - } - else { - _this.toHide.push(entityId); - } - } - }); - this.indexToDisplay = this.indexToDisplay + 1; - showEntities(this.toShow, this.entityManager); - hideEntities(this.toHide, this.entityManager); - this.Next(); - }; - ObjectQueueNode.prototype.Next = function () { }; - ObjectQueueNode.nodeType = 'code/ObjectQueue'; - return ObjectQueueNode; -}(Node)); -light.NodeContext.registerNode(ObjectQueueNode); - -var SwitchObjectNode = /** @class */ (function (_super) { - __extends(SwitchObjectNode, _super); - function SwitchObjectNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.entityToDisplay = []; - _this.entityToHide = []; - _this.init = false; - return _this; - } - SwitchObjectNode.prototype.Run = function () { - showEntities(this.entityToDisplay, this.entityManager); - hideEntities(this.entityToHide, this.entityManager); - this.Next(); - }; - SwitchObjectNode.prototype.Next = function () { }; - SwitchObjectNode.nodeType = 'code/SwitchObject'; - return SwitchObjectNode; -}(Node)); -light.NodeContext.registerNode(SwitchObjectNode); - -var FaceAction$1; -(function (FaceAction) { - FaceAction[FaceAction["FaceDetected"] = 0] = "FaceDetected"; - FaceAction[FaceAction["OpenMouth"] = 1] = "OpenMouth"; - FaceAction[FaceAction["BlinkEyebrow"] = 2] = "BlinkEyebrow"; - FaceAction[FaceAction["BlinkEye"] = 3] = "BlinkEye"; - FaceAction[FaceAction["ShakeHead"] = 4] = "ShakeHead"; - FaceAction[FaceAction["Kiss"] = 5] = "Kiss"; - FaceAction[FaceAction["BlinkLeftEye"] = 6] = "BlinkLeftEye"; - FaceAction[FaceAction["BlinkRightEye"] = 7] = "BlinkRightEye"; - FaceAction[FaceAction["Nod"] = 8] = "Nod"; - FaceAction[FaceAction["Smile"] = 9] = "Smile"; - FaceAction[FaceAction["MouthOccluded"] = 10] = "MouthOccluded"; - FaceAction[FaceAction["LeftEyeOccluded"] = 11] = "LeftEyeOccluded"; - FaceAction[FaceAction["RightEyeOccluded"] = 12] = "RightEyeOccluded"; - FaceAction[FaceAction["DoubleEyeOccluded"] = 13] = "DoubleEyeOccluded"; -})(FaceAction$1 || (FaceAction$1 = {})); -var GestureAction$1; -(function (GestureAction) { - GestureAction[GestureAction["HEART"] = 0] = "HEART"; - GestureAction[GestureAction["PAPER"] = 1] = "PAPER"; - GestureAction[GestureAction["SCISSOR"] = 2] = "SCISSOR"; - GestureAction[GestureAction["FIST"] = 3] = "FIST"; - GestureAction[GestureAction["ONE"] = 4] = "ONE"; - GestureAction[GestureAction["LOVE"] = 5] = "LOVE"; - GestureAction[GestureAction["LIKE"] = 6] = "LIKE"; - GestureAction[GestureAction["OK"] = 7] = "OK"; - GestureAction[GestureAction["ROCK"] = 8] = "ROCK"; - GestureAction[GestureAction["SIX"] = 9] = "SIX"; - GestureAction[GestureAction["EIGHT"] = 10] = "EIGHT"; - GestureAction[GestureAction["LIFT"] = 11] = "LIFT"; - GestureAction[GestureAction["CONGRATULATE"] = 12] = "CONGRATULATE"; -})(GestureAction$1 || (GestureAction$1 = {})); -// 记录一次流程生命周期已开启的AI能力 -var enabledAI = []; -function openAIFeature(features, entityManager, eventManager) { - var aiRequire = new light.VectorString(); - features === null || features === void 0 ? void 0 : features.forEach(function (feature) { - if (enabledAI.indexOf(feature) === -1) { - aiRequire.add(feature); - enabledAI.push(feature); - } - }); - if (aiRequire.size() > 0) { - var event = new light.ScriptOpenAIEvent(entityManager, aiRequire); - eventManager.emit(event); - } -} -function getAIClassData(features, entityManager) { - var aiClassData = {}; - features === null || features === void 0 ? void 0 : features.forEach(function (feature) { - var datas = light.AIDataUtils.GetJsEventListFromAIDataCenter(entityManager, feature); - var keys = datas.getKeys(); - for (var i = 0; i < keys.size(); i++) { - var key = keys.get(i); - var value = JSON.parse(datas.get(key)); - aiClassData[key] = value; - } - }); - return aiClassData; -} -function getAIPointData(feature, entityManager) { - var datas = light.AIDataUtils.GetAIPointDataFromAIDataCenter(entityManager, feature); - var res = []; - for (var i = 0; i < datas.size(); i++) { - var data = JSON.parse(JSON.stringify(datas.get(i))); - var points = []; - var pointsData = datas.get(i)['point_array_']; - if (pointsData === null || pointsData === void 0 ? void 0 : pointsData.size()) { - for (var j = 0; j < pointsData.size(); j++) { - points.push(pointsData.get(j)); - } - data.point_array_ = points; - } - res.push(data); - } - return res; -} -function actionNameToEvent(name) { - var str = name.toLowerCase(); - str = str.replace(/^\S/, function (s) { return s.toUpperCase(); }); - return "on" + str; -} - -var GestureNode = /** @class */ (function (_super) { - __extends(GestureNode, _super); - function GestureNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.times = 1; - _this.currentGesture = GestureAction$1.HEART; - return _this; - } - GestureNode.prototype.Run = function () { - this.actionEventName = actionNameToEvent(light.GestureAction[this.currentGesture]); - openAIFeature(["Hand_Gesture" /* HAND_GESTURE */], this.entityManager, this.eventManager); - light.on('update', this.onUpdate.bind(this)); - }; - GestureNode.prototype.onUpdate = function () { - var aiData = getAIClassData(["Hand_Gesture" /* HAND_GESTURE */], this.entityManager); - var expressions = aiData === null || aiData === void 0 ? void 0 : aiData[this.actionEventName]; - var hasGesture = expressions && expressions.length > 0; - if (this.lastState !== hasGesture) { - this.lastState = hasGesture; - if (hasGesture) { - this.Detected(); - this.times = this.times + 1; - } - else { - this.Lost(); - } - } - }; - GestureNode.prototype.Detected = function () { }; - GestureNode.prototype.Lost = function () { }; - GestureNode.nodeType = 'code/Gesture'; - return GestureNode; -}(EventNode)); -light.NodeContext.registerNode(GestureNode); - -var AIFeature; -(function (AIFeature) { - AIFeature["onSmile"] = "Smile"; - AIFeature["onKiss"] = "Pout"; -})(AIFeature || (AIFeature = {})); -var DefaultAIFeature = "Expression" /* EXPRESSION */; -var FaceEventNode = /** @class */ (function (_super) { - __extends(FaceEventNode, _super); - function FaceEventNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.faceAction = light.FaceAction.OpenMouth; - _this.times = 1; - return _this; - } - FaceEventNode.prototype.Run = function () { - this.actionEventName = actionNameToEvent(light.FaceAction[this.faceAction]); - var aifeature = AIFeature[this.actionEventName] ? AIFeature[this.actionEventName] : DefaultAIFeature; - openAIFeature([aifeature], this.entityManager, this.eventManager); - light.on('update', this.onUpdate.bind(this)); - }; - FaceEventNode.prototype.onUpdate = function () { - var aifeature = AIFeature[this.actionEventName] ? AIFeature[this.actionEventName] : DefaultAIFeature; - var data = getAIClassData([aifeature], this.entityManager); - var expressions = data === null || data === void 0 ? void 0 : data[this.actionEventName]; - var detected = expressions && expressions.length > 0; - if (detected) { - var trackId = expressions[0]; - var faceInfo = { - trackID: trackId, - expression: [this.faceAction], - }; - this.faceOutput = faceInfo; - if (trackId !== this.lastTrackId || detected !== this.lastState) { - console.log("FaceEventNode: onDetected: " + trackId); - this.onDetected(); - this.times = this.times + 1; - } - this.lastTrackId = trackId; - } - else if (this.lastState) { - this.lastTrackId = -1; - console.log('FaceEventNode: Lost'); - this.Lost(); - } - this.lastState = detected; - }; - FaceEventNode.prototype.onDetected = function () { }; - FaceEventNode.prototype.Lost = function () { }; - FaceEventNode.nodeType = 'code/FaceEvent'; - return FaceEventNode; -}(EventNode)); -light.NodeContext.registerNode(FaceEventNode); - -var MusicNode = /** @class */ (function (_super) { - __extends(MusicNode, _super); - function MusicNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.highlightOffset = 0; - _this.slowRhythmOffset = 0; - _this.drumOffset = 0; - _this.startValueOffset = 0; - _this.endValueOffset = 0; - _this.curMusicTime = -1; - return _this; - } - MusicNode.prototype.Run = function () { - light.on('RhythmEvent', this.onMusicData.bind(this)); - }; - MusicNode.prototype.onMusicData = function (params) { - if (params.rhythmInfos.HighlightValueTrail) { - for (var i = 0, size = params.rhythmInfos.HighlightValueTrail.length; i < size; i++) { - if (Math.abs(params.rhythmInfos.HighlightValueTrail[i].time + this.highlightOffset - params.elapseTime) - <= params.elapseTime - this.curMusicTime) { - this.onHighlightValueTrail(); - } - } - } - if (params.rhythmInfos.SlowRhythmTrail) { - for (var i = 0, size = params.rhythmInfos.SlowRhythmTrail.length; i < size; i++) { - if (Math.abs(params.rhythmInfos.SlowRhythmTrail[i].time + this.slowRhythmOffset - params.elapseTime) - <= params.elapseTime - this.curMusicTime) { - this.onSlowRhythmTrail(); - } - } - } - if (params.rhythmInfos.DrumTrail) { - for (var i = 0, size = params.rhythmInfos.DrumTrail.length; i < size; i++) { - if (Math.abs(params.rhythmInfos.DrumTrail[i].time + this.drumOffset - params.elapseTime) - <= params.elapseTime - this.curMusicTime) { - this.onDrumTrail(); - } - } - } - if (params.rhythmInfos.StartValueTrail) { - for (var i = 0, size = params.rhythmInfos.StartValueTrail.length; i < size; i++) { - if (params.rhythmInfos.StartValueTrail[i].index === 0) { - if (Math.abs(params.rhythmInfos.StartValueTrail[i].time + this.startValueOffset - params.elapseTime) - <= params.elapseTime - this.curMusicTime) { - this.onStartValueTrail(); - } - } - else { - if (Math.abs(params.rhythmInfos.StartValueTrail[i].time + this.endValueOffset - params.elapseTime) - <= params.elapseTime - this.curMusicTime) { - this.onEndValueTrail(); - } - } - } - } - this.curMusicTime = params.elapseTime; - }; - MusicNode.prototype.onStartValueTrail = function () { }; - MusicNode.prototype.onEndValueTrail = function () { }; - MusicNode.prototype.onHighlightValueTrail = function () { }; - MusicNode.prototype.onSlowRhythmTrail = function () { }; - MusicNode.prototype.onDrumTrail = function () { }; - MusicNode.nodeType = 'code/music'; - return MusicNode; -}(EventNode)); -light.NodeContext.registerNode(MusicNode); - -var AnimationNode = /** @class */ (function (_super) { - __extends(AnimationNode, _super); - function AnimationNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.loopCount = 0; - _this.progress = 0; - _this.isPlayTogether = false; - _this.onUpdate = function () { - if (_this.loopCount < 0) { - return; - } - var entity = _this.entityManager.getEntityById(_this.entityId); - var controller = entity.getComponent(light.AnimationController); - var timeCtrls = entity.getComponent(light.TimeControlList); - if (timeCtrls) { - controller.clips.forEach(function (clip, index) { - if (_this.clipIndex === index && clip.state === 1 /* Playing */) { - if (timeCtrls.timeControlArray.get(index).currentTime >= (_this.loopCount + 1) * clip.duration) { - clip.state = 2 /* Paused */; - clip.progress = clip.duration; - _this.detachEvent(); - _this.Finish(); - } - } - }); - } - else { - controller.clips.forEach(function (clip, index) { - if (_this.clipIndex === index && clip.state === 1 /* Playing */) { - if ((light.getCurrentTime() - clip.startTime) >= (_this.loopCount + 1) * clip.duration) { - clip.state = 2 /* Paused */; - clip.progress = clip.duration; - _this.detachEvent(); - _this.Finish(); - } - } - }); - } - }; - return _this; - } - AnimationNode.prototype.Play = function () { - var _this = this; - var entity = this.entityManager.getEntityById(this.entityId); - var controller = entity.getComponent(light.AnimationController); - var timeCtrls = entity.getComponent(light.TimeControlList); - if (timeCtrls) { - controller.clips.forEach(function (clip, index) { - if (_this.clipIndex === index) { - clip.state = 1 /* Playing */; - timeCtrls.timeControlArray.get(index).pause = false; - timeCtrls.timeControlArray.get(index).loopCount = _this.loopCount; - timeCtrls.timeControlArray.get(index).currentTime = _this.progress; - clip.progress = 1; - } - else if (!_this.isPlayTogether) { - clip.state = 0 /* Stopped */; - timeCtrls.timeControlArray.get(index).pause = true; - } - }); - } - else { - controller.clips.forEach(function (clip, index) { - if (_this.clipIndex === index) { - clip.state = 1 /* Playing */; - clip.progress = _this.progress; - clip.startTime = light.getCurrentTime() - clip.progress; - } - else if (!_this.isPlayTogether) { - clip.state = 0 /* Stopped */; - } - }); - } - this.detachEvent(); - light.on('update', this.onUpdate); - this.Next(); - }; - AnimationNode.prototype.Pause = function () { - var _this = this; - var entity = this.entityManager.getEntityById(this.entityId); - var controller = entity.getComponent(light.AnimationController); - var timeCtrls = entity.getComponent(light.TimeControlList); - controller.clips.forEach(function (clip, index) { - if (_this.clipIndex === index) { - clip.state = 2 /* Paused */; - if (timeCtrls) { - timeCtrls.timeControlArray.get(index).pause = true; - } - } - }); - this.detachEvent(); - this.Next(); - }; - AnimationNode.prototype.Stop = function () { - var _this = this; - var entity = this.entityManager.getEntityById(this.entityId); - var controller = entity.getComponent(light.AnimationController); - var timeCtrls = entity.getComponent(light.TimeControlList); - controller.clips.forEach(function (clip, index) { - if (_this.clipIndex === index) { - clip.state = 0 /* Stopped */; - if (timeCtrls) { - timeCtrls.timeControlArray.get(index).pause = true; - timeCtrls.timeControlArray.get(index).currentTime = 0; - // clip.progress != timeCtrl.currentTime 触发刷新 - clip.progress = 1; - } - } - }); - this.detachEvent(); - this.Next(); - }; - AnimationNode.prototype.Next = function () { }; - AnimationNode.prototype.Finish = function () { }; - AnimationNode.prototype.detachEvent = function () { - light.removeListener('update', this.onUpdate); - }; - AnimationNode.nodeType = 'code/AnimationNode'; - return AnimationNode; -}(Node)); -light.NodeContext.registerNode(AnimationNode); - -var PreloadNode = /** @class */ (function (_super) { - __extends(PreloadNode, _super); - function PreloadNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.preloadEntity = []; - return _this; - } - PreloadNode.prototype.setup = function () { - var _this = this; - if (this.preloadEntity && this.preloadEntity.length > 0) { - this.preloadEntity.forEach(function (entityId) { - entityId !== 0 && light.PreloadUtils.SetPreloadPolicy(_this.entityManager, entityId); - }); - } - }; - PreloadNode.prototype.Run = function () { - var _this = this; - if (this.preloadEntity && this.preloadEntity.length > 0) { - this.preloadEntity.forEach(function (entityId) { - entityId !== 0 && light.PreloadUtils.PreloadEntity(_this.entityManager, entityId); - }); - } - this.Next(); - }; - PreloadNode.prototype.Next = function () { }; - PreloadNode.nodeType = 'code/Preload'; - return PreloadNode; -}(Node)); -light.NodeContext.registerNode(PreloadNode); - -var FreeMemoryNode = /** @class */ (function (_super) { - __extends(FreeMemoryNode, _super); - function FreeMemoryNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.freeMemoryEntity = []; - return _this; - } - FreeMemoryNode.prototype.Run = function () { - var _this = this; - this.freeMemoryEntity.forEach(function (entityId) { - light.PreloadUtils.FreeEntityMemory(_this.entityManager, entityId); - }); - this.Next(); - }; - FreeMemoryNode.prototype.Next = function () { }; - FreeMemoryNode.nodeType = 'code/FreeMemory'; - return FreeMemoryNode; -}(Node)); -light.NodeContext.registerNode(FreeMemoryNode); - -var LoopType$1; -(function (LoopType) { - LoopType["FIXED"] = "\u56FA\u5B9A\u6570\u5B57"; - LoopType["INFINITE"] = "\u65E0\u9650\u5FAA\u73AF"; -})(LoopType$1 || (LoopType$1 = {})); -var QueueNode = /** @class */ (function (_super) { - __extends(QueueNode, _super); - function QueueNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.indexToDisplay = 0; - _this.indexToHide = 0; - _this.repeatTimes = 1; - _this.init = false; - _this.toShow = []; - _this.toHide = []; - return _this; - } - QueueNode.prototype.Run = function () { - this.toShow = []; - this.toHide = []; - var _a = this, entityToDisplay = _a.entityToDisplay, entityToHide = _a.entityToHide, repeatTimes = _a.repeatTimes; - if (entityToDisplay.length) { - if (this.indexToDisplay < entityToDisplay.length * repeatTimes || this.loopType === LoopType$1.INFINITE) { - var entityId = entityToDisplay[this.indexToDisplay % entityToDisplay.length]; - var entity = this.entityManager.getEntityById(entityId); - if (entity) { - this.toShow.push(entityId); - this.indexToDisplay += 1; - } - } - } - if (entityToHide.length) { - if (this.indexToHide < entityToHide.length * repeatTimes || this.loopType === LoopType$1.INFINITE) { - var entityId = entityToHide[this.indexToHide % entityToHide.length]; - var entity = this.entityManager.getEntityById(entityId); - if (entity) { - this.toHide.push(entityId); - this.indexToHide += 1; - } - } - } - showEntities(this.toShow, this.entityManager); - hideEntities(this.toHide, this.entityManager); - this.Next(); - }; - QueueNode.prototype.Next = function () { }; - QueueNode.nodeType = 'code/Queue'; - return QueueNode; -}(Node)); -light.NodeContext.registerNode(QueueNode); - -var AccumulationNumberNode = /** @class */ (function (_super) { - __extends(AccumulationNumberNode, _super); - function AccumulationNumberNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.Value = 0; - return _this; - } - AccumulationNumberNode.prototype.Run = function () { - if (this.current === undefined) { - this.current = this.from; - this.Value = this.current; - this.Next(); - } - else { - if (this.current + this.step > this.to) { - return; - } - this.current += this.step; - this.Value = this.current; - this.Next(); - } - }; - AccumulationNumberNode.prototype.Next = function () { }; - AccumulationNumberNode.nodeType = 'code/accumulationNumber'; - return AccumulationNumberNode; -}(Node)); -light.NodeContext.registerNode(AccumulationNumberNode); - -var MAX_AGE = 66; -// 年龄判断 -var AgeNode = /** @class */ (function (_super) { - __extends(AgeNode, _super); - function AgeNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.ageRange = []; - _this.MAX_AGE = 66; - _this.lastAgeInfo = {}; - return _this; - } - AgeNode.prototype.Run = function () { - var faceInput = this.faceInput; - if (!(faceInput === null || faceInput === void 0 ? void 0 : faceInput.age)) { - return; - } - // 上次的人脸而且年龄相同,不重复触发 - if (this.lastAgeInfo[faceInput.trackID] === faceInput.age) { - return; - } - this.ageOutput = faceInput; - if (this.ageRange.length === 0) { - this.Next(); - } - else { - var funName = ''; - var age = faceInput.age; - this.ageRange.sort(function (a, b) { return a - b; }); - var start = 0; - for (var i = 0, size = this.ageRange.length; i < size; i++) { - if (this.ageRange[i] === start) { - continue; - } - if (age < this.ageRange[i]) { - funName = start + "_" + this.ageRange[i]; - if (!this[funName]) { - this[funName] = function () { }; - } - this[funName](); - return; - } - start = this.ageRange[i]; - } - if (start < MAX_AGE && start <= age && age < MAX_AGE) { - funName = start + "_" + MAX_AGE; - if (!this[funName]) { - this[funName] = function () { }; - } - this[funName](); - } - } - }; - AgeNode.prototype.Next = function () { }; - AgeNode.nodeType = 'code/Age'; - return AgeNode; -}(Node)); -light.NodeContext.registerNode(AgeNode); - -var AgeEventNode = /** @class */ (function (_super) { - __extends(AgeEventNode, _super); - function AgeEventNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.lastAgeInfo = {}; - _this.customEvents = []; - _this.MAX_AGE = 66; - _this.AI_FETURE = [ - "Age" /* AGE */, - ]; - return _this; - } - AgeEventNode.prototype.Run = function () { - openAIFeature(this.AI_FETURE, this.entityManager, this.eventManager); - light.on('update', this.onUpdate.bind(this)); - }; - AgeEventNode.prototype.onUpdate = function () { - var _this = this; - var data = getAIClassData(this.AI_FETURE, this.entityManager); - var expressions = data === null || data === void 0 ? void 0 : data.onAge; - var detected = expressions && expressions.length > 0; - if (detected) { - var minFaceIndex_1 = Infinity; - expressions.forEach(function (ageRange) { - var trackID = ageRange[0]; - if (trackID < minFaceIndex_1) { - minFaceIndex_1 = trackID; - } - }); - expressions.forEach(function (ageRange) { - // AI会缓存人脸点位 输出的index会递增 比如[3,4,5] 实质上应该为[0,1,2] - var trackID = ageRange[0] - minFaceIndex_1; - var age = ageRange[1]; - if (!_this.lastAgeInfo[trackID] || _this.lastAgeInfo[trackID] !== age) { - _this.ageOutput = { - trackID: trackID, - age: age, - }; - _this.ageNumberOutput = age; - _this.trackIndexOutput = trackID; - var start_1 = 0; - var invoke_1 = false; - if (_this.ageRange.length > 0) { - _this.ageRange.forEach(function (_age) { - if (invoke_1) { - return; - } - if (age < _age) { - if (!_this[start_1 + "_" + _age]) { - _this[start_1 + "_" + _age] = function () { }; - } - _this[start_1 + "_" + _age](); - invoke_1 = true; - } - start_1 = _age; - }); - if (!invoke_1 && age <= _this.MAX_AGE) { - if (!_this[start_1 + "_" + _this.MAX_AGE]) { - _this[start_1 + "_" + _this.MAX_AGE] = function () { }; - } - _this[start_1 + "_" + _this.MAX_AGE](); - } - } - else { - if (!_this['Next']) { - _this['Next'] = function () { }; - } - _this['Next'](); - } - } - _this.lastAgeInfo[trackID] = age; - }); - } - }; - AgeEventNode.nodeType = 'code/AgeEvent'; - return AgeEventNode; -}(EventNode)); -light.NodeContext.registerNode(AgeEventNode); - -var AndNode = /** @class */ (function (_super) { - __extends(AndNode, _super); - function AndNode() { - return _super !== null && _super.apply(this, arguments) || this; - } - AndNode.prototype.Run = function () { - if (this.A && this.B) { - this.True(); - } - else { - this.False(); - } - }; - AndNode.prototype.True = function () { }; - AndNode.prototype.False = function () { }; - AndNode.nodeType = 'code/And'; - return AndNode; -}(Node)); -light.NodeContext.registerNode(AndNode); - -var CompareNode = /** @class */ (function (_super) { - __extends(CompareNode, _super); - function CompareNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.A = 0; - _this.B = 0; - return _this; - } - CompareNode.prototype.Run = function () { - if (this.A == this.B) { - this.Equal(); - } - else if (this.A > this.B) { - this.Bigger(); - } - else { - this.Smaller(); - } - }; - CompareNode.prototype.Equal = function () { }; - CompareNode.prototype.Bigger = function () { }; - CompareNode.prototype.Smaller = function () { }; - CompareNode.nodeType = 'code/compare'; - return CompareNode; -}(Node)); -light.NodeContext.registerNode(CompareNode); - -var ConstNumberNode = /** @class */ (function (_super) { - __extends(ConstNumberNode, _super); - function ConstNumberNode() { - return _super !== null && _super.apply(this, arguments) || this; - } - Object.defineProperty(ConstNumberNode.prototype, "Value", { - get: function () { - return this._value; - }, - set: function (v) { - this._value = v; - }, - enumerable: false, - configurable: true - }); - ConstNumberNode.nodeType = 'code/constNumber'; - return ConstNumberNode; -}(Node)); -light.NodeContext.registerNode(ConstNumberNode); - -var CorrelationNode = /** @class */ (function (_super) { - __extends(CorrelationNode, _super); - function CorrelationNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.faceIndex = -1; - return _this; - } - CorrelationNode.prototype.Run = function () { - var _this = this; - this.entityToDisplay.forEach(function (entityId) { - getRelateEntities(entityId, _this.entityManager).forEach(function (entity) { - if (entity) { - var component = entity.getComponent(light.FaceTracking); - if (component) { - var index = new light.VectorInt(); - index.add(_this.faceIndex); - component.faceIndex = index; - } - } - }); - }); - this.Next(); - }; - CorrelationNode.prototype.Next = function () { }; - CorrelationNode.nodeType = 'code/Correlation'; - return CorrelationNode; -}(Node)); -light.NodeContext.registerNode(CorrelationNode); - -var DelayNode = /** @class */ (function (_super) { - __extends(DelayNode, _super); - function DelayNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.duration = 1000000; - return _this; - } - DelayNode.prototype.Run = function () { - var _this = this; - var currentTime = light.getCurrentTime(); - var invoked = false; - light.on('update', function (time) { - if (time - currentTime >= _this.duration && !invoked) { - invoked = true; - _this.Next(); - } - }); - }; - DelayNode.prototype.Next = function () { }; - DelayNode.nodeType = 'code/Delay'; - return DelayNode; -}(Node)); -light.NodeContext.registerNode(DelayNode); - -var FaceNode = /** @class */ (function (_super) { - __extends(FaceNode, _super); - function FaceNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.times = 1; - _this.AI_FEATURE = [ - "Expression" /* EXPRESSION */, - "Age" /* AGE */, - "Gender" /* GENDER */, - "Smile" /* SMILE */, - ]; - return _this; - } - FaceNode.prototype.Run = function () { - this.actionEventName = actionNameToEvent(light.FaceAction[light.FaceAction.FaceDetected]); - openAIFeature(this.AI_FEATURE, this.entityManager, this.eventManager); - light.on('update', this.onUpdate.bind(this)); - }; - FaceNode.prototype.onUpdate = function () { - var _this = this; - var data = getAIClassData(this.AI_FEATURE, this.entityManager); - var expressions = data === null || data === void 0 ? void 0 : data[this.actionEventName]; - var detected = expressions && expressions.length > 0; - if (detected) { - var faces = this.getAllFaceInfo(data); - faces.forEach(function (face) { - _this.faceOutput = face; - _this.onNext(); - }); - this.times += 1; - var trackId = expressions[0]; - if (detected !== this.lastState) { - console.log("FaceNode: onDetected: " + trackId); - this.onDetected(); - } - } - else { - this.onNoFace(); - if (this.lastState) { - console.log('FaceNode: Lost'); - this.Lost(); - } - } - this.lastState = detected; - }; - FaceNode.prototype.onNext = function () { }; - FaceNode.prototype.onNoFace = function () { }; - FaceNode.prototype.Lost = function () { }; - FaceNode.prototype.onDetected = function () { }; - FaceNode.prototype.getAllFaceInfo = function (params) { - if (params === void 0) { params = {}; } - var keys = Object.keys(params); - var allFaceInfo = []; // 人脸数据总集 - var _loop_1 = function (i, size) { - console.log("expression_Key:::" + keys[i]); - switch (keys[i]) { - case 'onAge': { - var ageInfo_1 = params.onAge; // [[1, 29], [2, 24]] - if (ageInfo_1) { - var _loop_2 = function (j, ageCount) { - // 先找trackID,找得到就更新age,找不到就新增一个 - var exist = allFaceInfo.find(function (info) { return info.trackID === ageInfo_1[j][0]; }); - if (exist) { - exist.age = ageInfo_1[j][1]; - } - else { - var faceInfo = { - trackID: ageInfo_1[j][0], - age: ageInfo_1[j][1], - }; - allFaceInfo.push(faceInfo); - } - }; - for (var j = 0, ageCount = ageInfo_1.length; j < ageCount; j++) { - _loop_2(j, ageCount); - } - } - break; - } - case 'onMale': { - var maleInfo_1 = params.onMale; // [1,2,3] - if (maleInfo_1) { - var _loop_3 = function (j, maleCount) { - var exist = allFaceInfo.find(function (info) { return info.trackID === maleInfo_1[j]; }); - if (exist) { - exist.gender = 0; - } - else { - var faceInfo = { - trackID: maleInfo_1[j], - gender: 0, - faceIndex: allFaceInfo.length, - }; - allFaceInfo.push(faceInfo); - } - }; - for (var j = 0, maleCount = maleInfo_1.length; j < maleCount; j++) { - _loop_3(j, maleCount); - } - } - break; - } - case 'onFemale': { - var femaleInfo_1 = params.onFemale; // [4,5,6] - if (femaleInfo_1) { - var _loop_4 = function (j, femaleCount) { - var exist = allFaceInfo.find(function (info) { return info.trackID === femaleInfo_1[j]; }); - if (exist) { - exist.gender = 1; - } - else { - var faceInfo = { - trackID: femaleInfo_1[j], - gender: 1, - faceIndex: allFaceInfo.length, - }; - allFaceInfo.push(faceInfo); - } - }; - for (var j = 0, femaleCount = femaleInfo_1.length; j < femaleCount; j++) { - _loop_4(j, femaleCount); - } - } - break; - } - case 'onFacedetected': - case 'onOpenmouth': - case 'onBlinkeyebrow': - case 'onBlinkeye': - case 'onShakehead': - case 'onKiss': - case 'onBlinklefteye': - case 'onBlinkrighteye': - case 'onNod': - case 'onSmile': - case 'onMouthoccluded': - case 'onLefteyeoccluded': - case 'onRighteyeoccluded': - case 'onDoubleeyeoccluded': { - var expressionInfo_1 = params[keys[i]]; - if (expressionInfo_1) { - var _loop_5 = function (j, count) { - var exist = allFaceInfo.find(function (info) { return info.trackID === expressionInfo_1[j]; }); - if (exist) { - if (!exist.expression) { - exist.expression = []; - } - exist.expression.push(keys[i]); - } - else { - var faceInfo = { - trackID: expressionInfo_1[j], - faceIndex: allFaceInfo.length, - expression: [keys[i]], - }; - allFaceInfo.push(faceInfo); - } - }; - for (var j = 0, count = expressionInfo_1.length; j < count; j++) { - _loop_5(j, count); - } - } - break; - } - } - }; - for (var i = 0, size = keys.length; i < size; i++) { - _loop_1(i); - } - return allFaceInfo; - }; - FaceNode.nodeType = 'code/Face'; - return FaceNode; -}(EventNode)); -light.NodeContext.registerNode(FaceNode); - -var AIFeature$1; -(function (AIFeature) { - AIFeature["onSmile"] = "Smile"; - AIFeature["onKiss"] = "Pout"; -})(AIFeature$1 || (AIFeature$1 = {})); -var DefaultAIFeature$1 = "Expression" /* EXPRESSION */; -var FaceActionNode = /** @class */ (function (_super) { - __extends(FaceActionNode, _super); - function FaceActionNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.lastExpressionInfo = {}; - return _this; - } - FaceActionNode.prototype.onDetected = function () { }; - FaceActionNode.prototype.Lost = function () { }; - FaceActionNode.prototype.Run = function () { - var _a, _b; - this.actionEventName = actionNameToEvent(light.FaceAction[this.faceAction]); - if (((_a = this.faceInput) === null || _a === void 0 ? void 0 : _a.expression) && ((_b = this.faceInput) === null || _b === void 0 ? void 0 : _b.expression.indexOf(this.actionEventName)) > -1) { - this.faceOutput = this.faceInput; - this.onDetected(); - } - light.on('update', this.onUpdate.bind(this)); - }; - FaceActionNode.prototype.onUpdate = function () { - var aifeature = AIFeature$1[this.actionEventName] ? AIFeature$1[this.actionEventName] : DefaultAIFeature$1; - var data = getAIClassData([aifeature], this.entityManager); - var expressions = data === null || data === void 0 ? void 0 : data[this.actionEventName]; - var detected = expressions && expressions.length > 0; - if (!detected && this.lastState) { - this.Lost(); - } - this.lastState = detected; - }; - FaceActionNode.nodeType = 'code/FaceAction'; - return FaceActionNode; -}(Node)); -light.NodeContext.registerNode(FaceActionNode); - -var GenderNode = /** @class */ (function (_super) { - __extends(GenderNode, _super); - function GenderNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.lastGenderInfo = {}; - return _this; - } - GenderNode.prototype.Run = function () { - if (!this.faceInput) { - return; - } - this.faceOutput = this.faceInput; - if (this.faceInput.gender === 0) { - console.log('this.faceInput.gender:male'); - if (!this.lastGenderInfo[this.faceInput.trackID]) { - this.onMale(); - } - } - else if (this.faceInput.gender === 1) { - console.log('this.faceInput.gender:Female'); - if (!this.lastGenderInfo[this.faceInput.trackID]) { - this.onFemale(); - } - } - this.lastGenderInfo[this.faceInput.trackID] = this.faceInput.gender; - }; - GenderNode.prototype.onMale = function () { }; - GenderNode.prototype.onFemale = function () { }; - GenderNode.nodeType = 'code/Gender'; - return GenderNode; -}(Node)); -light.NodeContext.registerNode(GenderNode); - -var GenderEventNode = /** @class */ (function (_super) { - __extends(GenderEventNode, _super); - function GenderEventNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.lastMaleInfo = {}; - _this.lastFemaleInfo = {}; - _this.times = 1; - return _this; - } - GenderEventNode.prototype.Run = function () { - openAIFeature(["Gender" /* GENDER */], this.entityManager, this.eventManager); - light.on('update', this.onUpdate.bind(this)); - }; - GenderEventNode.prototype.onUpdate = function () { - var _this = this; - var data = getAIClassData(["Gender" /* GENDER */], this.entityManager); - if (data['onMale']) { - if (!this.lastMaleInfo[data['onMale'].join(',')]) { - data['onMale'].forEach(function (id) { - _this.genderOutput = { - trackID: id, - gender: 0, - }; - _this.onMale(); - _this.times += 1; - }); - this.lastMaleInfo[data['onMale'].join(',')] = true; - } - } - if (data['onFemale']) { - if (!this.lastFemaleInfo[['onFemale'].join(',')]) { - data['onFemale'].forEach(function (id) { - _this.genderOutput = { - trackID: id, - gender: 1, - }; - _this.onFemale(); - _this.times += 1; - }); - this.lastFemaleInfo[data['onFemale'].join(',')] = true; - } - } - }; - GenderEventNode.prototype.onMale = function () { }; - GenderEventNode.prototype.onFemale = function () { }; - GenderEventNode.nodeType = 'code/GenderEvent'; - return GenderEventNode; -}(EventNode)); -light.NodeContext.registerNode(GenderEventNode); - -var GradientType; -(function (GradientType) { - GradientType[GradientType["LINEAR"] = 1] = "LINEAR"; - GradientType[GradientType["EASE_IN"] = 2] = "EASE_IN"; - GradientType[GradientType["EASE_OUT"] = 3] = "EASE_OUT"; - GradientType[GradientType["EASE_IN_OUT"] = 4] = "EASE_IN_OUT"; - GradientType[GradientType["SIN"] = 5] = "SIN"; - GradientType[GradientType["COS"] = 6] = "COS"; -})(GradientType || (GradientType = {})); -var GradientNode = /** @class */ (function (_super) { - __extends(GradientNode, _super); - function GradientNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.currentTime = 0; - _this.timeStart = -1; - _this.listened = false; - return _this; - } - GradientNode.prototype.onUpdate = function (time) { - // currentTime为初始值0时,更新timeStart - if (this.currentTime === 0) { - this.timeStart = time; - } - this.currentTime = time; - if (this.timeStart === -1) { - return; - } - if (time / 1000 - this.timeStart / 1000 <= this.duration / 1000) { - var current = (this.currentTime - this.timeStart) / 1000; - var start = this.from; - var range = this.to - this.from; - var duration = this.duration / 1000; - var handler = {}; - handler[GradientType.LINEAR] = this.linear; - handler[GradientType.EASE_IN] = this.easeInQuad; - handler[GradientType.EASE_OUT] = this.easeOutQuad; - handler[GradientType.EASE_IN_OUT] = this.easeInOutQuad; - handler[GradientType.SIN] = this.sin; - handler[GradientType.COS] = this.cos; - this.CurrentValue = handler[this.gradientType](current, start, range, duration); - this.Next(); - } - else { - this.Finish(); - this.timeStart = -1; - } - }; - GradientNode.prototype.Run = function () { - if (this.to === this.from || this.duration === 0) { // 校验输入值 - return; - } - if (this.currentTime === undefined) { - this.currentTime = this.from; - } - // 首次调用Run时,currentTime为初始值0,导致timeStart非准确start时间 - this.timeStart = this.currentTime; - if (this.listened) { - return; - } - this.listened = true; - light.on('update', this.onUpdate.bind(this)); - }; - GradientNode.prototype.Next = function () { }; - GradientNode.prototype.easeInOutQuad = function (currentTime, startValue, rangeValue, duration) { - currentTime /= duration / 2; - if (currentTime < 1) - return rangeValue / 2 * currentTime * currentTime + startValue; - currentTime -= 1; - return -rangeValue / 2 * (currentTime * (currentTime - 2) - 1) + startValue; - }; - GradientNode.prototype.easeOutQuad = function (currentTime, startValue, rangeValue, duration) { - currentTime /= duration; - return -rangeValue * currentTime * (currentTime - 2) + startValue; - }; - GradientNode.prototype.easeInQuad = function (currentTime, startValue, rangeValue, duration) { - currentTime /= duration; - return rangeValue * currentTime * currentTime + startValue; - }; - GradientNode.prototype.linear = function (currentTime, startValue, rangeValue, duration) { - return rangeValue * currentTime / duration + startValue; - }; - GradientNode.prototype.sin = function (currentTime, startValue, rangeValue, duration) { - return Math.sin(2 * Math.PI * currentTime / duration) * rangeValue + startValue; - }; - GradientNode.prototype.cos = function (currentTime, startValue, rangeValue, duration) { - return Math.cos(2 * Math.PI * currentTime / duration) * rangeValue + startValue; - }; - GradientNode.prototype.Finish = function () { }; - GradientNode.nodeType = 'code/Gradient'; - return GradientNode; -}(Node)); -light.NodeContext.registerNode(GradientNode); - -var IfNode = /** @class */ (function (_super) { - __extends(IfNode, _super); - function IfNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this._dep = false; - return _this; - } - Object.defineProperty(IfNode.prototype, "dep", { - get: function () { - return this._dep; - }, - set: function (v) { - this._dep = v; - }, - enumerable: false, - configurable: true - }); - IfNode.prototype.Run = function () { - if (this.dep) { - this.True(); - } - else { - this.False(); - } - }; - IfNode.prototype.True = function () { }; - IfNode.prototype.False = function () { }; - IfNode.nodeType = 'code/if'; - return IfNode; -}(Node)); -light.NodeContext.registerNode(IfNode); - -var InvertNode = /** @class */ (function (_super) { - __extends(InvertNode, _super); - function InvertNode() { - return _super !== null && _super.apply(this, arguments) || this; - } - InvertNode.prototype.Run = function () { - if (!this.A) { - this.True(); - } - else { - this.False(); - } - }; - InvertNode.prototype.True = function () { }; - InvertNode.prototype.False = function () { }; - InvertNode.nodeType = 'code/Invert'; - return InvertNode; -}(Node)); -light.NodeContext.registerNode(InvertNode); - -var LutNode = /** @class */ (function (_super) { - __extends(LutNode, _super); - function LutNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.strengthInput = -1; - return _this; - } - LutNode.prototype.Run = function () { - showEntities([this.lutEntityId], this.entityManager); - var entity = this.entityManager.getEntityById(this.lutEntityId); - var lut = entity.getComponent(light.LUTFilter); - if (lut) { - lut.intensity = this.strengthInput >= 0 ? this.strengthInput : this.strength; - } - this.Next(); - }; - LutNode.prototype.Next = function () { }; - LutNode.nodeType = 'code/Lut'; - return LutNode; -}(Node)); -light.NodeContext.registerNode(LutNode); - -var OrNode = /** @class */ (function (_super) { - __extends(OrNode, _super); - function OrNode() { - return _super !== null && _super.apply(this, arguments) || this; - } - OrNode.prototype.Run = function () { - if (this.A || this.B) { - this.True(); - } - else { - this.False(); - } - }; - OrNode.prototype.True = function () { }; - OrNode.prototype.False = function () { }; - OrNode.nodeType = 'code/Or'; - return OrNode; -}(Node)); -light.NodeContext.registerNode(OrNode); - -var BranchMode; -(function (BranchMode) { - BranchMode[BranchMode["Queue"] = 1] = "Queue"; - BranchMode[BranchMode["Random"] = 2] = "Random"; -})(BranchMode || (BranchMode = {})); -var QueueBranchNode = /** @class */ (function (_super) { - __extends(QueueBranchNode, _super); - function QueueBranchNode() { - var _this = _super.call(this) || this; - _this.currentIndex = 0; - _this.branchMode = BranchMode.Queue; - _this.randomStart = false; - if (_this.randomStart && _this.branchMode === BranchMode.Queue) { - _this.currentIndex = Math.floor(Math.random() * 10); - } - return _this; - } - QueueBranchNode.prototype.Run = function () { - var Limit = 5; - var max = 0; - for (var i = 0; i < Limit; i++) { - if (this["Next" + i]) { - max = max + 1; - } - else { - break; - } - } - if (this.branchMode === BranchMode.Queue) { - this["Next" + this.currentIndex % max](); - this.currentIndex = this.currentIndex + 1; - } - else { - this["Next" + Math.floor(Math.random() * max)](); - } - }; - QueueBranchNode.nodeType = 'code/queueBranch'; - return QueueBranchNode; -}(Node)); -light.NodeContext.registerNode(QueueBranchNode); - -var RandomNode = /** @class */ (function (_super) { - __extends(RandomNode, _super); - function RandomNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.toShow = []; - _this.toHide = []; - _this.init = false; - return _this; - } - RandomNode.prototype.Run = function () { - this.toShow = []; - this.toHide = []; - if (this.entityToDisplay.length) { - var entityId = this.entityToDisplay[Math.floor(Math.random() * this.entityToDisplay.length)]; - var entity = this.entityManager.getEntityById(entityId); - if (entity) { - this.toShow.push(entityId); - } - } - if (this.entityToHide.length) { - var entityId = this.entityToHide[Math.floor(Math.random() * this.entityToHide.length)]; - this.toHide.push(entityId); - } - showEntities(this.toShow, this.entityManager); - hideEntities(this.toHide, this.entityManager); - this.Next(); - }; - RandomNode.prototype.Next = function () { }; - RandomNode.nodeType = 'code/Random'; - return RandomNode; -}(Node)); -light.NodeContext.registerNode(RandomNode); - -var RandomNumberNode = /** @class */ (function (_super) { - __extends(RandomNumberNode, _super); - function RandomNumberNode() { - var _this = _super.call(this) || this; - _this.isInteger = false; - _this.setValue(); - return _this; - } - RandomNumberNode.prototype.setValue = function () { - if (this.isInteger) { - return Math.round(Math.round(this.from) + (Math.random() * (this.to - this.from))); - } - return this.from + (Math.random() * (this.to - this.from)); - }; - RandomNumberNode.prototype.Run = function () { - this.Value = this.setValue(); - this.Next(); - }; - RandomNumberNode.prototype.Next = function () { }; - RandomNumberNode.nodeType = 'code/randomNumber'; - return RandomNumberNode; -}(Node)); -light.NodeContext.registerNode(RandomNumberNode); - -var SumNode = /** @class */ (function (_super) { - __extends(SumNode, _super); - function SumNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.A = 0; - _this.B = 0; - return _this; - } - SumNode.prototype.Run = function () { - this.Sum = this.A + this.B; - this.Diff = this.A - this.B; - this.Multiply = this.A * this.B; - this.Divide = this.B === 0 ? 0 : this.A / this.B; - this.Complement = this.A % this.B; - this.Next(); - }; - SumNode.prototype.Next = function () { - }; - SumNode.nodeType = 'code/Sum'; - return SumNode; -}(Node)); -light.NodeContext.registerNode(SumNode); - -var TransformNode = /** @class */ (function (_super) { - __extends(TransformNode, _super); - function TransformNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.xInput = 0; - _this.yInput = 0; - _this.wInput = 0; - _this.hInput = 0; - _this.rotationInput = 0; - _this.scalexInput = 1; - _this.scaleyInput = 1; - _this.accumulation = true; - return _this; - } - TransformNode.prototype.Run = function () { - if (!this.entityId) { - this.Next(); - return; - } - var entity = this.entityManager.getEntityById(this.entityId); - var cmp = entity.getComponent(light.ScreenTransform); - cmp.offset.bottom = this.accumulation ? (cmp.offset.bottom - this.hInput / 2) - : (this.hInput || cmp.offset.bottom); - cmp.offset.top = this.accumulation ? (cmp.offset.top + this.hInput / 2) - : (this.hInput || cmp.offset.top); - cmp.offset.left = this.accumulation ? (cmp.offset.left - this.wInput / 2) - : (this.wInput || cmp.offset.left); - cmp.offset.right = this.accumulation ? (cmp.offset.right + this.wInput / 2) - : (this.wInput || cmp.offset.right); - cmp.anchor.left = this.accumulation ? (cmp.anchor.left + this.xInput) - : (this.xInput || cmp.anchor.left); - cmp.anchor.right = this.accumulation ? (cmp.anchor.right + this.xInput) - : (this.xInput || cmp.anchor.right); - cmp.anchor.top = this.accumulation ? (cmp.anchor.top + this.yInput) - : (this.yInput || cmp.anchor.top); - cmp.anchor.bottom = this.accumulation ? (cmp.anchor.bottom + this.yInput) - : (this.yInput || cmp.anchor.bottom); - var _a = cmp.rotation, x = _a.x, y = _a.y, z = _a.z, w = _a.w; - var euler = new Euler(x, y, z); - var quater = new Quaternion(x, y, z, w); - euler.setFromQuaternion(quater); - euler.z = this.accumulation ? euler.z + this.rotationInput / 180 * Math.PI - : (this.rotationInput / 180 * Math.PI || euler.z); - quater.setFromEuler(euler); - cmp.rotation.x = quater.x; - cmp.rotation.y = quater.y; - cmp.rotation.z = quater.z; - cmp.rotation.w = quater.w; - var xSymbol = cmp.scale.x / Math.abs(cmp.scale.x); - var ySymbol = cmp.scale.y / Math.abs(cmp.scale.y); - cmp.scale.x = xSymbol * this.scalexInput + (this.accumulation ? cmp.scale.x : 0); - cmp.scale.y = ySymbol * this.scaleyInput + (this.accumulation ? cmp.scale.y : 0); - this.Next(); - }; - TransformNode.prototype.Next = function () { - }; - TransformNode.nodeType = 'code/Transform'; - return TransformNode; -}(Node)); -light.NodeContext.registerNode(TransformNode); - -var TransformNode$1 = /** @class */ (function (_super) { - __extends(TransformNode, _super); - function TransformNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.X = 0; - _this.Y = 0; - _this.Z = 0; - _this.xInput = 0; - _this.yInput = 0; - _this.zInput = 0; - _this.rotateX = 0; - _this.rotateY = 0; - _this.rotateZ = 0; - _this.rotateXInput = 0; - _this.rotateYInput = 0; - _this.rotateZInput = 0; - _this.scaleX = 0; - _this.scaleY = 0; - _this.scaleZ = 0; - _this.scaleXInput = 0; - _this.scaleYInput = 0; - _this.scaleZInput = 0; - return _this; - } - TransformNode.prototype.Run = function () { - var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z; - if (!this.entityId) { - this.Next(); - return; - } - var entity = this.entityManager.getEntityById(this.entityId); - var cmp = entity.getComponent(light.BasicTransform); - if (cmp) { - var vec3 = new light.Vec3((_c = (_b = (_a = this.xInput) !== null && _a !== void 0 ? _a : this.X) !== null && _b !== void 0 ? _b : cmp.position.x) !== null && _c !== void 0 ? _c : 0, (_f = (_e = (_d = this.yInput) !== null && _d !== void 0 ? _d : this.Y) !== null && _e !== void 0 ? _e : cmp.position.y) !== null && _f !== void 0 ? _f : 0, (_j = (_h = (_g = this.zInput) !== null && _g !== void 0 ? _g : this.Z) !== null && _h !== void 0 ? _h : cmp.position.z) !== null && _j !== void 0 ? _j : 0); - var svec3 = new light.Vec3((_m = (_l = (_k = this.scaleXInput) !== null && _k !== void 0 ? _k : this.scaleX) !== null && _l !== void 0 ? _l : cmp.scale.x) !== null && _m !== void 0 ? _m : 0, (_q = (_p = (_o = this.scaleYInput) !== null && _o !== void 0 ? _o : this.scaleY) !== null && _p !== void 0 ? _p : cmp.scale.y) !== null && _q !== void 0 ? _q : 0, (_t = (_s = (_r = this.scaleZInput) !== null && _r !== void 0 ? _r : this.scaleZ) !== null && _s !== void 0 ? _s : cmp.scale.z) !== null && _t !== void 0 ? _t : 0); - var _0 = cmp.rotation, x = _0.x, y = _0.y, z = _0.z, w = _0.w; - var valueX = (_v = (_u = this.rotateXInput) !== null && _u !== void 0 ? _u : this.rotateX) !== null && _v !== void 0 ? _v : x; - var valueY = (_x = (_w = this.rotateYInput) !== null && _w !== void 0 ? _w : this.rotateY) !== null && _x !== void 0 ? _x : y; - var valueZ = (_z = (_y = this.rotateZInput) !== null && _y !== void 0 ? _y : this.rotateZ) !== null && _z !== void 0 ? _z : z; - valueX = valueX / 180 * Math.PI; - valueY = valueY / 180 * Math.PI; - valueZ = valueZ / 180 * Math.PI; - var euler = new Euler(x, y, z); - var quater = new Quaternion(x, y, z, w); - euler.setFromQuaternion(quater); - euler.x = valueX; - euler.y = valueY; - euler.z = valueZ; - quater.setFromEuler(euler); - cmp.SetRotation(new light.Quat(quater.w, quater.x, quater.y, quater.z)); - cmp.SetScale(svec3); - cmp.SetPosition(vec3); - this.Next(); - } - }; - TransformNode.prototype.Next = function () { - }; - TransformNode.nodeType = 'code/Transform3D'; - return TransformNode; -}(Node)); -light.NodeContext.registerNode(TransformNode$1); - -var LoopType$2; -(function (LoopType) { - LoopType["FIXED"] = "\u56FA\u5B9A\u6570\u5B57"; - LoopType["INFINITE"] = "\u65E0\u9650\u5FAA\u73AF"; -})(LoopType$2 || (LoopType$2 = {})); -var UpdateNode = /** @class */ (function (_super) { - __extends(UpdateNode, _super); - function UpdateNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.repeatTimes = 1; - _this.frame = 1; - _this.currentFrame = 0; - _this.startupTrigger = false; // 刚开始就触发一次 - _this.currentTimes = 0; - return _this; - } - UpdateNode.prototype.Run = function () { - if (this.startupTrigger && this.repeatTimes !== 0) { - this.Update(); - this.currentTimes = this.currentTimes + 1; - } - light.on('update', this.onFrameUpdate.bind(this)); - }; - UpdateNode.prototype.onFrameUpdate = function () { - if (this.currentFrame !== 0) { - var trigger = (this.currentFrame % this.frame) === 0; - var infinite = this.loopType === LoopType$2.INFINITE; - var eligible = this.repeatTimes > this.currentTimes; - if (infinite || eligible) { - if (trigger) { - this.Update(); - this.currentTimes = this.currentTimes + 1; - } - } - } - this.currentFrame += 1; - }; - UpdateNode.prototype.Update = function () { }; - UpdateNode.nodeType = 'code/Update'; - return UpdateNode; -}(EventNode)); -light.NodeContext.registerNode(UpdateNode); - -var LoopType$3; -(function (LoopType) { - LoopType["FIXED"] = "\u56FA\u5B9A\u6570\u5B57"; - LoopType["INFINITE"] = "\u65E0\u9650\u5FAA\u73AF"; -})(LoopType$3 || (LoopType$3 = {})); -var TimesNode = /** @class */ (function (_super) { - __extends(TimesNode, _super); - function TimesNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.total = 2; - _this.times = 1; - _this.repeat = 1; - return _this; - } - TimesNode.prototype.Run = function () { - var repeat = this.loopType === LoopType$3.INFINITE ? Infinity : this.repeat; - if (this.times > this.total * repeat) { - return; - } - var index = (this.times - 1) % this.total; - if (!this["Next" + (index + 1)]) { - this["Next" + (index + 1)] = function () { }; - } - this["Next" + (index + 1)](); - this.times = this.times + 1; - }; - TimesNode.nodeType = 'code/times'; - return TimesNode; -}(Node)); -light.NodeContext.registerNode(TimesNode); - -var LoopType$4; -(function (LoopType) { - LoopType["FIXED"] = "\u56FA\u5B9A\u6570\u5B57"; - LoopType["INFINITE"] = "\u65E0\u9650\u5FAA\u73AF"; -})(LoopType$4 || (LoopType$4 = {})); -var play = /** @class */ (function (_super) { - __extends(play, _super); - function play() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.init = false; - _this.keepLastFrame = false; - _this.playtimes = 1; - return _this; - } - play.prototype.Run = function () { - var _this = this; - var entity = this.entityManager.getEntityById(this.entityId); - if (entity) { - showEntities([this.entityId], this.entityManager); - if (this.loopType === LoopType$4.INFINITE) { - return; - } - var timeOffset = entity.getComponent(light.TimeOffset); - var timeContrl = entity.getComponent(light.TimeControl); - var timeContrlList = entity.getComponent(light.TimeControlList); - if (timeOffset) { - if (timeContrlList === null || timeContrlList === void 0 ? void 0 : timeContrlList.timeControlArray) { - for (var i = 0; i < timeContrlList.timeControlArray.size(); i++) { - timeContrlList.timeControlArray.get(i).reset(); - timeContrlList.timeControlArray.get(i).currentTime = 0; - } - } - else if (timeContrl) { - timeContrl.reset(); - timeContrl.currentTime = 0; - } - else { - timeOffset.startOffset = light.getCurrentTime(); - } - timeOffset.loopCount = this.playtimes - 1; - timeOffset.visibleWhileOverTime = this.keepLastFrame; - var currentTime = light.getCurrentTime(); - var endTime_1 = currentTime + (timeOffset.duration - * (this.loopType === LoopType$4.INFINITE ? Infinity : this.playtimes)); - var invoked_1 = false; - light.on('update', function (time) { - if (time > endTime_1 && !invoked_1) { - invoked_1 = true; - _this.Finish(); - } - }); - } - } - this.Next(); - }; - play.prototype.Pause = function () { - var entity = this.entityManager.getEntityById(this.entityId); - if (entity) { - var timeOffset = entity.getComponent(light.TimeOffset); - var timeContrl = entity.getComponent(light.TimeControl); - if (timeContrl) { - timeContrl.pause = true; - timeContrl.loopCount = 0; - timeContrl.visibleWhileOverTime = true; - } - if (timeOffset) { - timeOffset.loopCount = 0; - timeOffset.visibleWhileOverTime = true; - } - } - }; - play.prototype.Next = function () { }; - play.prototype.Finish = function () { }; - play.nodeType = 'code/play'; - return play; -}(Node)); -light.NodeContext.registerNode(play); - -var SnapshotNode = /** @class */ (function (_super) { - __extends(SnapshotNode, _super); - function SnapshotNode() { - return _super !== null && _super.apply(this, arguments) || this; - } - SnapshotNode.prototype.Run = function () { - var _this = this; - showEntities([this.entityId], this.entityManager); - light.once('update', function () { - hideEntities([_this.entityId], _this.entityManager); - }); - this.Next(); - }; - SnapshotNode.prototype.Next = function () { }; - SnapshotNode.nodeType = 'code/Snapshot'; - return SnapshotNode; -}(Node)); -light.NodeContext.registerNode(SnapshotNode); - -var TransformNode$2 = /** @class */ (function (_super) { - __extends(TransformNode, _super); - function TransformNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.entities = []; - _this.duration = 1000000; - return _this; - } - TransformNode.prototype.Run = function () { - var _this = this; - if (this.entities.length < 2) { - return; - } - var originCoor = {}; - this.entities.forEach(function (entityId) { - var entity = _this.entityManager.getEntityById(entityId); - if (entity) { - var cmp = entity.getComponent(light.ScreenTransform); - if (cmp) { - originCoor[entityId] = { - left: cmp.anchor.left, - right: cmp.anchor.right, - top: cmp.anchor.top, - bottom: cmp.anchor.bottom, - }; - } - } - }); - if (Object.keys(originCoor).length < 2) { - return; - } - this.entities.forEach(function (entityId, i) { - var from = _this.entityManager.getEntityById(entityId); - var targetId = _this.entities[i + 1] || _this.entities[0]; - var pos = ['left', 'right', 'top', 'bottom']; - var invoke = (new Array(pos.length)).fill(false); - var timeStart = (new Array(pos.length)).fill(light.getCurrentTime()); - light.on('update', function (time) { - if (invoke.every(function (i) { return i == true; })) { - return; - } - pos.forEach(function (pos, idx) { - var currentTime = light.getCurrentTime(); - var transform = from.getComponent(light.ScreenTransform); - if (timeStart[idx] === -1 || invoke[idx]) { - return; - } - if (time - timeStart[idx] <= _this.duration) { - if (transform) { - var value = _this.linear((currentTime - timeStart[idx]) / 1000, originCoor[entityId][pos], originCoor[targetId][pos] - originCoor[entityId][pos], _this.duration / 1000); - transform.anchor[pos] = value; - } - currentTime = time; - } - else { - if (transform) { - transform.anchor[pos] = originCoor[targetId][pos]; - } - timeStart[idx] = -1; - invoke[idx] = true; - } - }); - }); - }); - this.Next(); - }; - TransformNode.prototype.linear = function (currentTime, startValue, changeValue, duration) { - return changeValue * currentTime / duration + startValue; - }; - TransformNode.prototype.Next = function () { - }; - TransformNode.nodeType = 'code/Translate'; - return TransformNode; -}(Node)); -light.NodeContext.registerNode(TransformNode$2); - -var LotteryNode = /** @class */ (function (_super) { - __extends(LotteryNode, _super); - function LotteryNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.from = 0; - _this.to = 1; - _this.repeat = false; - _this.n = 2; - _this.isInteger = false; - return _this; - } - LotteryNode.prototype.Run = function () { - var _a = this, n = _a.n, repeat = _a.repeat, from = _a.from, to = _a.to; - var result = []; - if (to - from + 1 >= n) { // 判断区间内是否可以产生n个不重复的值 - if (repeat) { - while (result.length !== n) { - result.push(this.generateRandom(from, to)); - } - } - else { - while ((new Set(result)).size !== n) { - result.push(this.generateRandom(from, to)); - } - result = Array.from((new Set(result))); - } - } - else { - while (result.length !== n) { - result.push(this.generateRandom(from, to)); - } - } - for (var i = 0; i < n; i++) { - this["number" + (i + 1)] = result[i]; - } - this.Next(); - }; - LotteryNode.prototype.generateRandom = function (from, to) { - if (this.isInteger) { - return Math.round(Math.round(from) + (Math.random() * (to - from))); - } - return from + (Math.random() * (to - from)); - }; - LotteryNode.prototype.Next = function () { }; - LotteryNode.nodeType = 'code/Lottery'; - return LotteryNode; -}(Node)); -light.NodeContext.registerNode(LotteryNode); - -var IfNode$1 = /** @class */ (function (_super) { - __extends(IfNode, _super); - function IfNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.time1 = -1; - _this.time2 = -1; - _this.gap = 1000000; - return _this; - } - IfNode.prototype.Event1 = function () { - this.time1 = light.getCurrentTime(); - if (this.time2 !== -1 && Math.abs(this.time1 - this.time2) <= this.gap) { - this.Next(); - } - }; - IfNode.prototype.Event2 = function () { - this.time2 = light.getCurrentTime(); - if (this.time1 !== -1 && Math.abs(this.time1 - this.time2) <= this.gap) { - this.Next(); - } - }; - IfNode.prototype.Next = function () { }; - IfNode.nodeType = 'code/Merge'; - return IfNode; -}(Node)); -light.NodeContext.registerNode(IfNode$1); - -var LotteryNode$1 = /** @class */ (function (_super) { - __extends(LotteryNode, _super); - function LotteryNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.from = 0; - _this.to = 1; - _this.duration = 1000000; // 编辑器里以微秒处理 - _this.progress = -1; - return _this; - } - LotteryNode.prototype.Run = function () { - var _this = this; - var entity = this.entityManager.getEntityById(this.entityId); - if (!entity) - return; - var face = entity.getComponent(light.CrazyFace); - if (!face) - return; - if (this.progress !== -1) { - face.progress = this.progress; - showEntities([this.entityId], this.entityManager); - this.Next(); - } - else { - var timeStart_1 = light.getCurrentTime(); - var invoked_1 = false; - var resetInitialValue_1 = false; - light.on('update', function (time) { - var currentTime = light.getCurrentTime(); - if (timeStart_1 === -1 || invoked_1) { - return; - } - if (!resetInitialValue_1) { - resetInitialValue_1 = true; - face.progress = _this.from; - showEntities([_this.entityId], _this.entityManager); - } - if (time - timeStart_1 <= _this.duration) { - face.progress = _this.linear((currentTime - timeStart_1) / 1000, _this.from, _this.to - _this.from, _this.duration / 1000); - } - else { - _this.Next(); - invoked_1 = true; - timeStart_1 = -1; - } - }); - } - }; - LotteryNode.prototype.linear = function (currentTime, startValue, changeValue, duration) { - return changeValue * currentTime / duration + startValue; - }; - LotteryNode.prototype.Next = function () { }; - LotteryNode.nodeType = 'code/Fusion'; - return LotteryNode; -}(Node)); -light.NodeContext.registerNode(LotteryNode$1); - -var Status; -(function (Status) { - Status[Status["Detected"] = 1] = "Detected"; - Status[Status["Lost"] = 2] = "Lost"; - Status[Status["UNINITIALIZED"] = 3] = "UNINITIALIZED"; -})(Status || (Status = {})); -var PointNode = /** @class */ (function (_super) { - __extends(PointNode, _super); - function PointNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.pitchMin = 0; - _this.pitchMax = 1; - _this.yawMin = 0; - _this.yawMax = 1; - _this.rollMin = 0; - _this.rollMax = 1; - _this.x1 = 0; - _this.x2 = 1; - _this.y1 = 0; - _this.y2 = 1; - _this.ratio = 1.2; // 丢失的比例 - _this.status = {}; - _this.init = false; - _this.minWidth = 0.8; - _this.minHeight = 0.8; - return _this; - } - PointNode.prototype.Run = function () { - if (this.init) { - for (var id in this.status) { - this.status[id] = Status.UNINITIALIZED; - } - return; - } - this.init = true; - openAIFeature([ - "Face_Point" /* FACE_POINT */, - ], this.entityManager, this.eventManager); - light.on('update', this.update.bind(this)); - }; - PointNode.prototype.getMinValue = function (value) { - if (value > 0) { - return value / this.ratio; - } - return value * this.ratio; - }; - PointNode.prototype.getMaxValue = function (value) { - if (value > 0) { - return value * this.ratio; - } - return value / this.ratio; - }; - PointNode.prototype.update = function () { - var _this = this; - var datas = getAIPointData("Face_Point" /* FACE_POINT */, this.entityManager); - var _loop_1 = function (i) { - var data = datas[i]; - var id_ = data.id_, roll_ = data.roll_, pitch_ = data.pitch_, canvas_width_ = data.canvas_width_, canvas_height_ = data.canvas_height_, yaw_ = data.yaw_, point_array_ = data.point_array_; - var minX; - var maxX; - var minY; - var maxY; - if (point_array_ === null || point_array_ === void 0 ? void 0 : point_array_.length) { - var xs = []; - var ys = []; - for (var i_1 = 0; i_1 < point_array_.length; i_1++) { - if (i_1 % 2 === 0) { - xs.push(point_array_[i_1]); - } - else { - ys.push((point_array_[i_1])); - } - } - minX = Math.min.apply(Math, xs); - maxX = Math.max.apply(Math, xs); - minY = Math.min.apply(Math, ys); - maxY = Math.max.apply(Math, ys); - } - if (this_1.status[id_] === undefined) { - this_1.status[id_] = Status.UNINITIALIZED; - } - var isDetect = function () { return _this.isBetween(roll_, _this.rollMin, _this.rollMax) - && _this.isBetween(yaw_, _this.yawMin, _this.yawMax) - && _this.isBetween(pitch_, _this.pitchMin, _this.pitchMax) - && _this.isBetween(minX, _this.x1 * canvas_width_, _this.x2 * canvas_width_) - && _this.isBetween(maxX, _this.x1 * canvas_width_, _this.x2 * canvas_width_) - && _this.isBetween(minY, _this.y1 * canvas_height_, _this.y2 * canvas_height_) - && _this.isBetween(maxY, _this.y1 * canvas_height_, _this.y2 * canvas_height_) - && isVaildFace(); }; - var isLost = function () { return !_this.isBetween(roll_, _this.getMinValue(_this.rollMin), _this.getMaxValue(_this.rollMax)) - || !_this.isBetween(yaw_, _this.getMinValue(_this.yawMin), _this.getMaxValue(_this.yawMax)) - || !_this.isBetween(pitch_, _this.getMinValue(_this.pitchMin), _this.getMaxValue(_this.pitchMax)) - || !_this.isBetween(minX, _this.getMinValue(_this.x1 * canvas_width_), _this.getMaxValue(_this.x2 * canvas_width_)) - || !_this.isBetween(maxX, _this.getMinValue(_this.x1 * canvas_width_), _this.getMaxValue(_this.x2 * canvas_width_)) - || !_this.isBetween(minY, _this.getMinValue(_this.y1 * canvas_height_), _this.getMaxValue(_this.y2 * canvas_height_)) - || !_this.isBetween(maxY, _this.getMinValue(_this.y1 * canvas_height_), _this.getMaxValue(_this.y2 * canvas_height_)) - || !isVaildFace(); }; - var isVaildFace = function () { return (maxX - minX) > (_this.minWidth * canvas_width_) - && (maxY - minY) > (_this.minHeight * canvas_height_); }; - if (this_1.status[id_] === Status.UNINITIALIZED) { - if (isDetect()) { - this_1.faceId = id_; - this_1.faceIndex = i; - this_1.status[id_] = Status.Detected; - this_1.Detected(); - } - else if (isLost()) { - this_1.faceId = id_; - this_1.faceIndex = i; - this_1.status[id_] = Status.Lost; - this_1.Lost(); - } - } - else if (this_1.status[id_] === Status.Lost) { // 初始化或丢失之后处理 - if (isDetect()) { - this_1.faceId = id_; - this_1.faceIndex = i; - this_1.status[id_] = Status.Detected; - this_1.Detected(); - } - } - else if (this_1.status[id_] === Status.Detected) { // 检测到时处理 - if (isLost()) { - this_1.faceId = id_; - this_1.faceIndex = i; - this_1.status[id_] = Status.Lost; - this_1.Lost(); - } - } - }; - var this_1 = this; - for (var i = 0; i < datas.length; i++) { - _loop_1(i); - } - }; - PointNode.prototype.isBetween = function (v, min, max) { - if (min <= v && v <= max) { - return true; - } - return false; - }; - PointNode.prototype.Detected = function () { }; - PointNode.prototype.Lost = function () { }; - PointNode.nodeType = 'code/Point'; - return PointNode; -}(Node)); -light.NodeContext.registerNode(PointNode); - -var PostEffectNode = /** @class */ (function (_super) { - __extends(PostEffectNode, _super); - function PostEffectNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.strengthInput = 0; - _this.starMaxScaleInput = 0; - _this.starMinScaleInput = 0; - _this.starScalePeriodInput = 0; - _this.maxCornersInput = 0; - _this.minDistanceInput = 0; - _this.highLightThresholdInput = 0; - _this.fastNumPercentageInput = 0; - _this.seedNumInput = 0; - _this.clusterDistanceInput = 0; - _this.clusterMaxSizeInput = 0; - _this.shakeDisPlacementInput = 0; - _this.sleepTimeInput = 0; - _this.switchEnvironmentInput = 0; - _this.filePathsInput = []; - _this.brightnessInput = 0; - _this.contrastInput = 0; - _this.hueInput = 0; - _this.highlightsInput = 0; - _this.sharpnessInput = 0; - _this.shadowsInput = 0; - _this.saturationInput = 0; - _this.temperatureInput = 0; - return _this; - } - PostEffectNode.prototype.Run = function () { - showEntities([this.entityId], this.entityManager); - var entity = this.entityManager.getEntityById(this.entityId); - var postEffect = entity.getComponent(light.PostEffect); - if (postEffect) { - if (postEffect.getEffectJson()) { - var json = JSON.parse(postEffect.getEffectJson()); - json.effectStrength = this.strengthInput > 0 ? this.strengthInput : json.effectStrength; - json.starMaxScale = this.starMaxScaleInput > 0 ? this.starMaxScaleInput : json.starMaxScale; - json.starMinScale = this.starMinScaleInput > 0 ? this.starMinScaleInput : json.starMinScale; - json.starScalePeriod = this.starScalePeriodInput > 0 ? this.starScalePeriodInput : json.starScalePeriod; - // eslint-disable-next-line max-len - json.highLightThreshold = this.highLightThresholdInput > 0 ? this.highLightThresholdInput : json.highLightThreshold; - json.fastNumPercentage = this.fastNumPercentageInput > 0 ? this.fastNumPercentageInput : json.fastNumPercentage; - json.seedNum = this.seedNumInput > 0 ? this.seedNumInput : json.seedNum; - json.clusterDistance = this.clusterDistanceInput > 0 ? this.clusterDistanceInput : json.clusterDistance; - json.clusterMaxSize = this.clusterMaxSizeInput > 0 ? this.clusterMaxSizeInput : json.clusterMaxSize; - json.shakeDisPlacement = this.shakeDisPlacementInput > 0 ? this.shakeDisPlacementInput : json.shakeDisPlacement; - json.sleepTime = this.sleepTimeInput > 0 ? this.sleepTimeInput : json.sleepTime; - json.switchEnvironment = false; - json.maxCorners = this.maxCornersInput > 0 ? this.maxCornersInput : json.maxCorners; - json.minDistance = this.minDistanceInput > 0 ? this.minDistanceInput : json.minDistance; - json.brightness = this.brightnessInput > 0 ? this.brightnessInput : json.brightness; - json.contrast = this.contrastInput > 0 ? this.contrastInput : json.contrast; - json.hue = this.hueInput > 0 ? this.hueInput : json.hue; - json.highlights = this.highlightsInput > 0 ? this.highlightsInput : json.highlights; - json.sharpness = this.sharpnessInput > 0 ? this.sharpnessInput : json.sharpness; - json.shadows = this.shadowsInput > 0 ? this.shadowsInput : json.shadows; - json.saturation = this.saturationInput > 0 ? this.saturationInput : json.saturation; - json.temperature = this.temperatureInput > 0 ? this.temperatureInput : json.temperature; - json.filePaths = this.filePathsInput.length > 0 ? this.filePathsInput : json.filePaths; - postEffect.setEffectJson(JSON.stringify(json)); - } - } - this.Next(); - }; - PostEffectNode.prototype.Next = function () { }; - PostEffectNode.nodeType = 'code/PostEffect'; - return PostEffectNode; -}(Node)); -light.NodeContext.registerNode(PostEffectNode); - -var ParticleNode = /** @class */ (function (_super) { - __extends(ParticleNode, _super); - function ParticleNode() { - return _super !== null && _super.apply(this, arguments) || this; - } - ParticleNode.prototype.Run = function () { - var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z; - if (!this.entityId) - return; - var entity = this.entityManager.getEntityById(this.entityId); - showEntities([this.entityId], this.entityManager); - if (entity) { - var particle = entity.getComponent(light.ParticleEffect); - if (particle) { - var vec3 = new light.Vec3((_c = (_b = (_a = this.xInput) !== null && _a !== void 0 ? _a : this.x) !== null && _b !== void 0 ? _b : particle.emitterLength.x) !== null && _c !== void 0 ? _c : 0, (_f = (_e = (_d = this.yInput) !== null && _d !== void 0 ? _d : this.y) !== null && _e !== void 0 ? _e : particle.emitterLength.y) !== null && _f !== void 0 ? _f : 0, (_j = (_h = (_g = this.zInput) !== null && _g !== void 0 ? _g : this.z) !== null && _h !== void 0 ? _h : particle.emitterLength.z) !== null && _j !== void 0 ? _j : 0); - var dvec3 = new light.Vec3((_m = (_l = (_k = this.directionXInput) !== null && _k !== void 0 ? _k : this.directionX) !== null && _l !== void 0 ? _l : particle.emissionVector.x) !== null && _m !== void 0 ? _m : 0, (_q = (_p = (_o = this.directionYInput) !== null && _o !== void 0 ? _o : this.directionY) !== null && _p !== void 0 ? _p : particle.emissionVector.y) !== null && _q !== void 0 ? _q : 0, (_t = (_s = (_r = this.directionZInput) !== null && _r !== void 0 ? _r : this.directionZ) !== null && _s !== void 0 ? _s : particle.emissionVector.z) !== null && _t !== void 0 ? _t : 0); - particle.emitterLength = vec3; - particle.emissionVector = dvec3; - particle.speed = (_w = (_v = (_u = this.speedInput) !== null && _u !== void 0 ? _u : this.speed) !== null && _v !== void 0 ? _v : particle.speed) !== null && _w !== void 0 ? _w : 0.1; - particle.maxParticles = (_z = (_y = (_x = this.maxInput) !== null && _x !== void 0 ? _x : this.max) !== null && _y !== void 0 ? _y : particle.maxParticles) !== null && _z !== void 0 ? _z : 0; - particle.speedRandom = false; - particle.emissionVectorRandom = false; - particle.updateComponentData = true; - } - } - this.Next(); - }; - ParticleNode.prototype.Next = function () { }; - ParticleNode.nodeType = 'code/Particle'; - return ParticleNode; -}(Node)); -light.NodeContext.registerNode(ParticleNode); - -var ThrottleNode = /** @class */ (function (_super) { - __extends(ThrottleNode, _super); - function ThrottleNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.value = 1000000; - _this.triggerTime = -1; // 上一次触发时间 - return _this; - } - ThrottleNode.prototype.Next = function () { }; - ThrottleNode.prototype.Run = function () { - if (this.triggerTime < 0 // 首次触发及间隔超过 - || (this.triggerTime >= 0 && (this.triggerTime + this.value < light.getCurrentTime()))) { - this.triggerTime = light.getCurrentTime(); - this.Next(); - } - }; - ThrottleNode.nodeType = 'code/throttle'; - return ThrottleNode; -}(Node)); -light.NodeContext.registerNode(ThrottleNode); - -var UserMaterialNode = /** @class */ (function (_super) { - __extends(UserMaterialNode, _super); - function UserMaterialNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.lastpaths = []; - return _this; - } - UserMaterialNode.prototype.Run = function () { - var _this = this; - light.on('update', function () { - var entity = _this.entityManager.getEntityById(_this.entityId); - if (entity) { - var cmp = entity.getComponent(light.UserMaterial); - if (cmp) { - var clipData = cmp.getClipDataPaths(); - if ((clipData === null || clipData === void 0 ? void 0 : clipData.size) && clipData.size()) { - var paths = []; - for (var i = 0; i < clipData.size(); i++) { - paths.push(clipData.get(i)); - } - if (paths.length !== _this.lastpaths.length || !paths.every(function (path, i) { return path === _this.lastpaths[i]; })) { - if (_this.lastpaths.length === 0) { - _this.Next(); - } - else { - _this.Change(); - } - _this.lastpaths = paths; - } - } - } - } - }); - }; - UserMaterialNode.prototype.Next = function () { }; - UserMaterialNode.prototype.Change = function () { }; - UserMaterialNode.nodeType = 'code/userMaterial'; - return UserMaterialNode; -}(EventNode)); -light.NodeContext.registerNode(UserMaterialNode); - -var TouchEventNode = /** @class */ (function (_super) { - __extends(TouchEventNode, _super); - function TouchEventNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.init = false; - return _this; - } - TouchEventNode.prototype.Run = function () { - var _this = this; - if (!this.init) { - this.init = true; - light.on('TouchEvent', function () { - _this.Next(); - }); - } - }; - TouchEventNode.prototype.Next = function () { }; - TouchEventNode.nodeType = 'code/touchEvent'; - return TouchEventNode; -}(EventNode)); -light.NodeContext.registerNode(TouchEventNode); - -var PointNode$1 = /** @class */ (function (_super) { - __extends(PointNode, _super); - function PointNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.detected = false; - return _this; - } - PointNode.prototype.transform = function (value, max) { - var rangeMin = -1; - var rangeMax = 1; - var range = rangeMax - rangeMin; - return ((range * value / max) + rangeMin); - }; - PointNode.prototype.Run = function () { - var _this = this; - openAIFeature(["Hand_Gesture" /* HAND_GESTURE */], this.entityManager, this.eventManager); - light.on('update', function () { - var handPointdatas = getAIPointData("Hand_Point" /* HAND_POINT */, _this.entityManager); - var firstHand = handPointdatas === null || handPointdatas === void 0 ? void 0 : handPointdatas[0]; - if (firstHand) { - _this.detected = true; - var canvas_width_ = firstHand.canvas_width_; - var canvas_height_ = firstHand.canvas_height_; - var points = firstHand.point_array_; - var xs = points.filter(function (point, index) { return (index % 2 === 0); }); - var ys = points.filter(function (point, index) { return (index % 2 === 1); }); - var minX = Math.min.apply(Math, xs); - var maxX = Math.max.apply(Math, xs); - var minY = Math.min.apply(Math, ys); - var maxY = Math.max.apply(Math, ys); - _this.horizonX1 = _this.transform(minX, canvas_width_); - _this.horizonX2 = _this.transform(maxX, canvas_width_); - _this.horizonMiddle = _this.transform((minX + maxX) / 2, canvas_width_); - _this.verticalY1 = _this.transform(minY, canvas_height_); - _this.verticalY2 = _this.transform(maxY, canvas_height_); - _this.verticalMiddle = _this.transform((minY + maxY) / 2, canvas_height_); - _this.screenWidth = canvas_width_; - _this.screenHeight = canvas_height_; - _this.Detect(); - } - else { - _this.detected = false; - _this.Lost(); - } - }); - }; - PointNode.prototype.Detect = function () { }; - PointNode.prototype.Lost = function () { }; - PointNode.nodeType = 'code/handpoint'; - return PointNode; -}(Node)); -light.NodeContext.registerNode(PointNode$1); - -var OpenMouthRatioNode = /** @class */ (function (_super) { - __extends(OpenMouthRatioNode, _super); - function OpenMouthRatioNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.Value = 1.0; - _this.init = false; - _this.ratio = 1.0; - _this.nose_x = -1; - _this.nose_y = -1; - _this.mouse_up_x = -1; - _this.mouse_up_y = -1; - _this.mouse_down_x = -1; - _this.mouse_down_y = -1; - _this.originDis = -1; - _this.currentDis = -1; - return _this; - } - OpenMouthRatioNode.prototype.Run = function () { - if (!this.init) { - this.init = true; - light.on('update', this.update.bind(this)); - } - }; - OpenMouthRatioNode.prototype.update = function () { - var datas = getAIPointData("Face_Point" /* FACE_POINT */, this.entityManager); - if (datas.length > 0) { - var person = datas[0]; - this.nose_x = person.point_array_[128] / person.canvas_width_ * 2 - 1; - this.nose_y = -(person.point_array_[129] / person.canvas_height_ * 2 - 1); - this.mouse_up_x = person.point_array_[170] / person.canvas_width_ * 2 - 1; - this.mouse_up_y = -(person.point_array_[171] / person.canvas_height_ * 2 - 1); - this.mouse_down_x = person.point_array_[138] / person.canvas_width_ * 2 - 1; - this.mouse_down_y = -(person.point_array_[139] / person.canvas_height_ * 2 - 1); - this.currentDis = this.calcDis(this.mouse_up_x, this.mouse_up_y, this.mouse_down_x, this.mouse_down_y); - if (this.originDis === -1) { - this.originDis = this.currentDis; - } - this.ratio = this.currentDis / this.originDis; - this.ratio = Math.max(this.ratio, 1) * this.inputRatio; - } - else { - this.ratio = 1.0; - } - this.Value = this.ratio; - this.Next(); - }; - OpenMouthRatioNode.prototype.calcDis = function (sx, sy, fx, fy) { - return Math.sqrt((sx - fx) * (sx - fx) + (sy - fy) * (sy - fy)); - }; - OpenMouthRatioNode.prototype.Next = function () { - }; - OpenMouthRatioNode.nodeType = 'code/OpenMouthRatio'; - return OpenMouthRatioNode; -}(Node)); -light.NodeContext.registerNode(OpenMouthRatioNode); - -var StateEventNode = /** @class */ (function (_super) { - __extends(StateEventNode, _super); - function StateEventNode() { - var _this = _super.call(this) || this; - _this.total = 3; - _this.repeat = 1; - _this.currentIndex = 0; - return _this; - } - StateEventNode.prototype.Run1 = function () { - this.triggerEvent(0); - }; - StateEventNode.prototype.Run2 = function () { - this.triggerEvent(1); - }; - StateEventNode.prototype.Run3 = function () { - this.triggerEvent(2); - }; - StateEventNode.prototype.Run4 = function () { - this.triggerEvent(3); - }; - StateEventNode.prototype.Run5 = function () { - this.triggerEvent(4); - }; - StateEventNode.prototype.Run6 = function () { - this.triggerEvent(5); - }; - StateEventNode.prototype.Run7 = function () { - this.triggerEvent(6); - }; - StateEventNode.prototype.Run8 = function () { - this.triggerEvent(7); - }; - StateEventNode.prototype.Run9 = function () { - this.triggerEvent(8); - }; - StateEventNode.prototype.Run10 = function () { - this.triggerEvent(9); - }; - StateEventNode.prototype.triggerEvent = function (index) { - var currentIndex = 0; - if (this.repeat < 0) { - currentIndex = this.currentIndex % this.total; - } - else if (this.repeat > 0) { - if (this.currentIndex < this.total * this.repeat) { - currentIndex = this.currentIndex % this.total; - } - else { - currentIndex = this.currentIndex; - } - } - else { - currentIndex = -1; - } - if (currentIndex === index) { - if (this["Next" + (currentIndex + 1)]) { - this["Next" + (currentIndex + 1)](); - } - this.currentIndex = this.currentIndex + 1; - } - }; - StateEventNode.nodeType = 'code/stateEvent'; - return StateEventNode; -}(Node)); -light.NodeContext.registerNode(StateEventNode); - -var ParallelNode = /** @class */ (function (_super) { - __extends(ParallelNode, _super); - function ParallelNode() { - return _super !== null && _super.apply(this, arguments) || this; - } - ParallelNode.prototype.Event1 = function () { - this.Next(); - }; - ParallelNode.prototype.Event2 = function () { - this.Next(); - }; - ParallelNode.prototype.Event3 = function () { - this.Next(); - }; - ParallelNode.prototype.Event4 = function () { - this.Next(); - }; - ParallelNode.prototype.Event5 = function () { - this.Next(); - }; - ParallelNode.prototype.Next = function () { }; - ParallelNode.nodeType = 'code/Parallel'; - return ParallelNode; -}(Node)); -light.NodeContext.registerNode(ParallelNode); - -var Interaction; -(function (Interaction) { - Interaction["CLICK"] = "\u70B9\u51FB"; - Interaction["DCLICK"] = "\u53CC\u51FB"; - Interaction["LCLICK"] = "\u957F\u6309"; - Interaction["HAND"] = "\u624B\u51FA\u73B0"; - Interaction["FINGER"] = "\u98DF\u6307\u6307\u5C16\u51FA\u73B0"; - Interaction["FACE"] = "\u5168\u8138\u51FA\u73B0"; - Interaction["NOSE"] = "\u9F3B\u5B50\u51FA\u73B0"; - Interaction["MOUSE"] = "\u5634\u5DF4\u51FA\u73B0"; - Interaction["LEFTEYE"] = "\u5DE6\u773C\u51FA\u73B0"; - Interaction["RIGHTEYE"] = "\u53F3\u773C\u51FA\u73B0"; -})(Interaction || (Interaction = {})); -var LongClickTime = 500; // 长按阈值时间 -var DoubleClickTime = 300; // 双击阈值时间 -var HEIGHT = 1280; // 画布标准高 -var sampleNumber = 20; // 采样数量 -var ScreenEventNode = /** @class */ (function (_super) { - __extends(ScreenEventNode, _super); - function ScreenEventNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.isDetected = false; - _this.count = 0; - _this.times = 0; - _this.longPressedState = { - longPressedDownTime: undefined, - longPressedTriggered: false, - }; - _this.lastTwoTimePressedTime = []; // 记录最近两次按下的时间 用来判读是否为双击 - // AI点位 - _this.facePoint = Array.from({ length: 90 }, function (v, k) { return k; }); - _this.nosePoint = [56, 57, 58, 59, 60, 61, 62, 64]; - _this.mousePoint = [65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82]; - _this.leftEyePoint = [35, 36, 37, 38, 39, 40, 41, 42, 43, 44]; - _this.rightEyePoint = [45, 46, 47, 48, 49, 50, 51, 52, 53, 54]; - _this.handPoint = Array.from({ length: 32 }, function (v, k) { return k; }); - _this.onePoint = [15, 16, 17]; - return _this; - } - ScreenEventNode.prototype.onDetected = function () { }; - ScreenEventNode.prototype.Lost = function () { }; - ScreenEventNode.prototype.Run = function () { - var _this = this; - switch (this.interactionType) { - case Interaction.CLICK: - case Interaction.DCLICK: - case Interaction.LCLICK: - light.on('TouchEvent', function (event) { - _this.onReceive(event); - }); - break; - case Interaction.FACE: - case Interaction.MOUSE: - case Interaction.NOSE: - case Interaction.LEFTEYE: - case Interaction.RIGHTEYE: - openAIFeature(["Face_Point" /* FACE_POINT */], this.entityManager, this.eventManager); - break; - case Interaction.HAND: - case Interaction.FINGER: - openAIFeature(["Hand_Point" /* HAND_POINT */], this.entityManager, this.eventManager); - break; - } - light.on('RenderWillStartEvent', function (event) { - _this.onReceive(event); - }); - light.on('update', this.onUpdate.bind(this)); - }; - ScreenEventNode.prototype.onUpdate = function (currentTime) { - // 在onUpdate中 处理长按事件 - if (this.interactionType === Interaction.LCLICK) { - this.processLongClickEvent(currentTime); - return; - } - var aiData = []; - switch (this.interactionType) { - case Interaction.HAND: - case Interaction.FINGER: - aiData = getAIPointData("Hand_Point" /* HAND_POINT */, this.entityManager); - break; - case Interaction.FACE: - case Interaction.MOUSE: - case Interaction.NOSE: - case Interaction.LEFTEYE: - case Interaction.RIGHTEYE: - aiData = getAIPointData("Face_Point" /* FACE_POINT */, this.entityManager); - break; - } - var rects = []; - if (!aiData && aiData.length === 0) { - this.onLost(); - return; - } - for (var _i = 0, aiData_1 = aiData; _i < aiData_1.length; _i++) { - var data = aiData_1[_i]; - var AIDataRect = this.getAIDataRect(this.interactionType, data); - rects.push(AIDataRect); - } - if (rects.length > 0) { - var triggered = this.isInConstrainRects(rects, this.entityRect); - this.onTriggered(triggered); - } - }; - ScreenEventNode.prototype.getAIDataRect = function (actionEventName, data) { - var canvas_width_ = data.canvas_width_, canvas_height_ = data.canvas_height_, point_array_ = data.point_array_; - var minX; - var maxX; - var minY; - var maxY; - if (point_array_ === null || point_array_ === void 0 ? void 0 : point_array_.length) { - var xs = []; - var ys = []; - var points = []; - switch (actionEventName) { - case Interaction.FACE: - points = this.facePoint; - break; - case Interaction.MOUSE: - points = this.mousePoint; - break; - case Interaction.NOSE: - points = this.nosePoint; - break; - case Interaction.LEFTEYE: - points = this.leftEyePoint; - break; - case Interaction.RIGHTEYE: - points = this.rightEyePoint; - break; - case Interaction.HAND: - points = this.handPoint; - break; - case Interaction.FINGER: - points = this.onePoint; - break; - } - var beganIndex = points[0] * 2; - var length = (points[0] + points.length) * 2; - for (var i = beganIndex; i < length; i++) { - if (i % 2 === 0) { - xs.push(point_array_[i]); - } - else { - ys.push((point_array_[i])); - } - } - minX = Math.min.apply(Math, xs) / canvas_width_; - maxX = Math.max.apply(Math, xs) / canvas_width_; - minY = Math.min.apply(Math, ys) / canvas_height_; - maxY = Math.max.apply(Math, ys) / canvas_height_; - // 对于一个点 看做面积为1的矩形 - if (minX === maxX) { - maxX = minX + 1; - } - if (minY === maxY) { - maxY = minY + 1; - } - } - return { left: minX, top: minY, right: maxX, bottom: maxY }; - }; - ScreenEventNode.prototype.onReceive = function (event) { - switch (event.type()) { - case 'RenderWillStartEvent': - this.entityRect = this.getEntityRect(this.entity); - break; - case 'TouchEvent': { - var clickState = this.getClickEventType(event); - this.touchEventInfo = { - point: { - x: event.getX(), - y: event.getY(), - }, - downTime: event.getDownTime(), - eventTime: event.getEventTime(), - }; - this.onTouchEventProcess(clickState, this.touchEventInfo); - break; - } - } - }; - ScreenEventNode.prototype.onTriggered = function (isTriggered, time) { - if (isTriggered) { - if (!this.isDetected) { - this.times = 0; - } - this.times = time || 0; - this.isDetected = true; - this.count += 1; - this.onDetected(); - } - else { - this.onLost(); - } - }; - ScreenEventNode.prototype.onLost = function () { - if (this.isDetected) { - this.Lost(); - } - this.isDetected = false; - }; - ScreenEventNode.prototype.onTouchEventProcess = function (clickState, event) { - if ((clickState === null || clickState === void 0 ? void 0 : clickState.clickType) && clickState.clickType === this.interactionType - && clickState.triggered === true && event) { - var ratio = this.getRatio(); - if (this.isInConstrainRotationRect({ x: event.point.x / ratio / HEIGHT, y: event.point.y / HEIGHT }, this.entityRect)) { - this.onTriggered(true, event.eventTime - event.downTime); - } - else { - this.onLost(); - } - } - else { - this.times = 0; - this.onLost(); - } - }; - ScreenEventNode.prototype.getClickEventType = function (event) { - var clickState = { - clickType: undefined, - triggered: false, - }; - if (event && event.type() === 'TouchEvent') { - var downTime = event.getDownTime(); - var eventTime = event.getEventTime(); - if (event.getAction() === 0) { // press - this.currentPressedTime = downTime; - this.pushPressedTimeStack(this.currentPressedTime); - if (this.lastTwoTimePressedTime.length === 2 - && downTime - this.lastTwoTimePressedTime[0] < DoubleClickTime) { - clickState.clickType = Interaction.DCLICK; - } - else { - clickState.clickType = Interaction.CLICK; - } - clickState.triggered = true; - } - else if (event.getAction() === 1) { // release - if (this.currentPressedTime && eventTime - downTime > LongClickTime) { - this.times = eventTime - downTime; - } - this.currentPressedTime = undefined; - this.longPressedState = { - longPressedDownTime: undefined, - longPressedTriggered: false, - }; - clickState.triggered = false; - } - } - return clickState; - }; - // 根据 update 的 currentTime 判断是否为长按 - ScreenEventNode.prototype.processLongClickEvent = function (currentTime) { - if (this.interactionType === Interaction.LCLICK && this.currentPressedTime - && !this.longPressedState.longPressedTriggered) { - if (!this.longPressedState.longPressedDownTime) { - this.longPressedState.longPressedDownTime = currentTime; - } - if ((currentTime - this.longPressedState.longPressedDownTime) / 1000 >= LongClickTime) { - this.longPressedState.longPressedTriggered = true; - var clickState = { - clickType: Interaction.LCLICK, - triggered: true, - }; - this.onTouchEventProcess(clickState, this.touchEventInfo); - } - } - }; - ScreenEventNode.prototype.pushPressedTimeStack = function (time) { - if (this.lastTwoTimePressedTime.length === 2) { - this.lastTwoTimePressedTime.splice(0, 1); - } - this.lastTwoTimePressedTime.push(time); - }; - ScreenEventNode.prototype.getRatio = function () { - var devWidth = light.DeviceUtils.GetSurfaceWidth(this.entityManager); - var devHeight = light.DeviceUtils.GetSurfaceHeight(this.entityManager); - return devWidth / devHeight; - }; - ScreenEventNode.prototype.getEntityRect = function (entityId) { - var entity = this.entityManager.getEntityById(entityId); - var transform = entity.getComponent(light.ScreenTransform); - if (isEntityHide(entityId, this.entityManager)) { - return undefined; - } - var transformArray = this.getParentTransforms(transform); - transformArray.splice(0, 1); // 删除自己 - var pSize; - if (transformArray.length > 0) { - pSize = this.getParentSize(transform, transformArray); - } - if (!pSize) { - return undefined; - } - var size = this.getSizeFromTransform(transform, pSize); - var position = this.getPositionFromTransform(transform, pSize); - var angle = this.get2DRotationFromTransform(transform); - var local = { x: position.x + pSize.width / 2, y: -position.y + pSize.height / 2 }; - var originPoint = { x: local.x - size.width / 2, y: local.y - size.height / 2 }; - var transformOrigin = { - x: ((transform.pivot.x * size.width) / 2 + local.x) / pSize.width, - y: ((-transform.pivot.y * size.height) / 2 + local.y) / pSize.height, - }; - var rect = { - left: originPoint.x / pSize.width, - top: originPoint.y / pSize.height, - right: (originPoint.x + size.width) / pSize.width, - bottom: (originPoint.y + size.height) / pSize.height, - }; - return { rect: rect, transformOrigin: transformOrigin, angle: angle }; - }; - ScreenEventNode.prototype.getParentSize = function (transform, transformArray) { - var ratio = this.getRatio(); - var parentSize = { width: ratio * HEIGHT, height: HEIGHT }; - for (var i = transformArray.length - 1; i >= 0; i--) { - parentSize = this.getSizeFromTransform(transformArray[i], parentSize); - } - return parentSize; - }; - ScreenEventNode.prototype.getParentTransforms = function (transform) { - var result = [transform]; - if (!this.entityManager.valid(transform.parent)) { - return [transform]; - } - var parent = this.entityManager.get(transform.parent); - var parentTransform = parent.getComponent(light.ScreenTransform); - if (parentTransform !== null) { - result = result.concat(this.getParentTransforms(parentTransform)); - } - else { - return [transform]; - } - return result; - }; - ScreenEventNode.prototype.getSizeFromTransform = function (transform, parentSize) { - var width = (transform.anchor.right - transform.anchor.left) / 2 * parentSize.width - + (transform.offset.right - transform.offset.left); - var height = (transform.anchor.top - transform.anchor.bottom) / 2 * parentSize.height - + (transform.offset.top - transform.offset.bottom); - return { width: width, height: height }; - }; - ScreenEventNode.prototype.getPositionFromTransform = function (transform, pSize) { - var left = transform.anchor.left * pSize.width / 2 + transform.offset.left; - var right = transform.anchor.right * pSize.width / 2 + transform.offset.right; - var top = transform.anchor.top * pSize.height / 2 + transform.offset.top; - var bottom = transform.anchor.bottom * pSize.height / 2 + transform.offset.bottom; - var position = { x: (right + left) / 2, y: (top + bottom) / 2 }; - position.x += (right - left) / 2 * transform.pivot.x; - position.y += (top - bottom) / 2 * transform.pivot.y; - return position; - }; - ScreenEventNode.prototype.get2DRotationFromTransform = function (transform) { - var _a = transform.rotation, x = _a.x, y = _a.y, z = _a.z, w = _a.w; - var euler = new Euler(); - var quat = new Quaternion(x, y, z, w); - euler.setFromQuaternion(quat); - return euler.z; - }; - ScreenEventNode.prototype.isInConstrainRect = function (point, rect) { - if (!rect) { - return false; - } - var x = point.x; - var y = point.y; - return x > rect.left && x < rect.right - && y > rect.top && y < rect.bottom; - }; - // 点击触发判定 - ScreenEventNode.prototype.isInConstrainRotationRect = function (point, rRect) { - if (!rRect) { - return false; - } - var transformOrigin = rRect.transformOrigin, angle = rRect.angle, rect = rRect.rect; - var revertPoint = this.rotateByPoint(point, transformOrigin, angle); - var x = revertPoint.x; - var y = revertPoint.y; - return x > rect.left && x < rect.right - && y > rect.top && y < rect.bottom; - }; - // AI触发判定 - ScreenEventNode.prototype.isInConstrainRects = function (originRect, rRect) { - var _this = this; - if (!rRect) { - return false; - } - var transformOrigin = rRect.transformOrigin, angle = rRect.angle, rect = rRect.rect; - // 性能提升(1):旋转角度小于10度 按照没有旋转处理 - var isSmallAngle = Math.abs(angle) < Math.PI / 18; - return originRect.some(function (oRect) { - var overlapRatio = 0; - if (isSmallAngle) { - if (_this.isRectIntersecting(oRect, rect)) { - overlapRatio = _this.getIntersectingAreaMaxPercent(oRect, rect); - } - } - else { - overlapRatio = _this.getRectArea(oRect) < _this.getRectArea(rect) - ? _this.getSampleOfRect(oRect, rect, transformOrigin, angle) - : _this.getSampleOfRect(rect, oRect, transformOrigin, -angle); - } - if (overlapRatio >= 0.2) { - return true; - } - }); - }; - // 性能提升(2):使用采样算法模拟碰撞面积 准确度降低 效率提高 - ScreenEventNode.prototype.getSampleOfRect = function (smallerRect, biggerRect, transformOrigin, angle) { - var _this = this; - var rectPoint = this.calculateAreaBySampleAlgorithm(smallerRect); - var rotateRectPoint = rectPoint.map(function (point) { return _this.rotateByPoint(point, transformOrigin, angle); }); - var number = 0; - rotateRectPoint.forEach(function (point) { - if (_this.isInConstrainRect(point, biggerRect)) { - number += 1; - } - }); - return number / rotateRectPoint.length; - }; - ScreenEventNode.prototype.calculateAreaBySampleAlgorithm = function (rect) { - var index = sampleNumber; - var points = []; - var widthStep = (rect.right - rect.left) / index; - var heightStep = (rect.bottom - rect.top) / index; - var startX = rect.left; - var startY = rect.top; - for (var i = 0; i < index; i++) { - for (var j = 0; j < index; j++) { - points.push({ x: startX + widthStep * i, y: startY + heightStep * j }); - } - } - return points; - }; - // 逆时针旋转角度为正 - ScreenEventNode.prototype.rotateByPoint = function (originPoint, pivot, rotation) { - var ratio = this.getRatio(); - var newOriginPointX = (originPoint.x - pivot.x) * Math.cos(rotation) - - (originPoint.y - pivot.y) / ratio * Math.sin(rotation) + pivot.x; - var newOriginPointY = (originPoint.x - pivot.x) * ratio * Math.sin(rotation) - + (originPoint.y - pivot.y) * Math.cos(rotation) + pivot.y; - return { x: newOriginPointX, y: newOriginPointY }; - }; - ScreenEventNode.prototype.isRectIntersecting = function (originRect, targetRect) { - return (Math.abs(targetRect.right + targetRect.left - originRect.right - originRect.left) - <= originRect.right - originRect.left + targetRect.right - targetRect.left) - && (Math.abs(targetRect.bottom + targetRect.top - originRect.bottom - originRect.top) - <= originRect.bottom - originRect.top + targetRect.bottom - targetRect.top); - }; - ScreenEventNode.prototype.getIntersectingAreaMaxPercent = function (originRect, targetRect) { - var IntersectingArea = this.getIntersectingArea(originRect, targetRect); - var originRectPercent = IntersectingArea / this.getRectArea(originRect); - var targetRectPercent = IntersectingArea / this.getRectArea(targetRect); - return Math.max(originRectPercent, targetRectPercent); - }; - ScreenEventNode.prototype.getIntersectingArea = function (originRect, targetRect) { - var left = Math.max(originRect.left, targetRect.left); - var top = Math.max(originRect.top, targetRect.top); - var right = Math.min(originRect.right, targetRect.right); - var bottom = Math.min(originRect.bottom, targetRect.bottom); - return this.getRectArea({ left: left, right: right, top: top, bottom: bottom }); - }; - ScreenEventNode.prototype.getRectArea = function (rect) { - return (rect.right - rect.left) * (rect.bottom - rect.top); - }; - ScreenEventNode.nodeType = 'code/ScreenEvent'; - return ScreenEventNode; -}(Node)); -light.NodeContext.registerNode(ScreenEventNode); - -var ViewPointEventNode = /** @class */ (function (_super) { - __extends(ViewPointEventNode, _super); - function ViewPointEventNode() { - return _super !== null && _super.apply(this, arguments) || this; - } - ViewPointEventNode.prototype.Run = function () { - openAIFeature(["View_Point" /* VIEW_POINT */], this.entityManager, this.eventManager); - light.on('update', this.onUpdate.bind(this)); - }; - ViewPointEventNode.prototype.onUpdate = function () { - // 获取视动点位 - var points = light.AIDataUtils.GetViewPoint(this.entityManager); - var screenX = points.get(0); - var screenY = points.get(1); - var screenWidth = light.DeviceUtils.GetSurfaceWidth(this.entityManager); - var screenHeight = light.DeviceUtils.GetSurfaceHeight(this.entityManager); - this.viewPointX = screenX / screenWidth; - this.viewPointY = screenY / screenHeight; - this.Next(); - }; - ViewPointEventNode.prototype.Next = function () { - }; - ViewPointEventNode.nodeType = 'code/ViewPointEvent'; - return ViewPointEventNode; -}(Node)); -light.NodeContext.registerNode(ViewPointEventNode); - -var _a; -var RegionType; -(function (RegionType) { - RegionType["RECT"] = "\u77E9\u5F62"; - RegionType["CIRCLE"] = "\u5706\u5F62"; -})(RegionType || (RegionType = {})); -function square(x) { - return x * x; -} -var checkInRegionFunctions = (_a = {}, - _a[RegionType.RECT] = function (x, y, x1, y1, x2, y2) { return x >= x1 && y >= y1 && x <= x2 && y <= y2; }, - _a[RegionType.CIRCLE] = function (x, y, x1, y1, x2, y2) { - var xRadius = Math.abs(x1 - x2) / 2; - var yRadius = Math.abs(y1 - y2) / 2; - var xCenter = (x1 + x2) / 2; - var yCenter = (y1 + y2) / 2; - return square(x - xCenter) / square(xRadius) + square(y - yCenter) / square(yRadius) <= 1; - }, - _a); -var RegionNode = /** @class */ (function (_super) { - __extends(RegionNode, _super); - function RegionNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.X = 0; - _this.Y = 0; - _this.x1 = 0; - _this.y1 = 0; - _this.x2 = 0; - _this.y2 = 0; - _this.regionType = RegionType.RECT; - return _this; - } - RegionNode.prototype.Run = function () { - var checkInRegion = checkInRegionFunctions[this.regionType]; - if (checkInRegion(this.X, this.Y, this.x1, this.y1, this.x2, this.y2)) { - this.InSide(); - } - else { - this.OutSide(); - } - }; - RegionNode.prototype.InSide = function () { - }; - RegionNode.prototype.OutSide = function () { - }; - RegionNode.nodeType = 'code/region'; - return RegionNode; -}(Node)); -light.NodeContext.registerNode(RegionNode); - -var ValueNode = /** @class */ (function (_super) { - __extends(ValueNode, _super); - function ValueNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.valueType = 'number'; - _this._numberValue = 2; - _this._stringValue = ''; - _this._colorValue = '#00000000'; - _this._boolValue = true; - _this._fileValue = ''; - _this._vector2Value = { x: 0, y: 0 }; - _this._vector3Value = { x: 1, y: 1, z: 0 }; - _this._vector4Value = { top: 0, right: 0, bottom: 0, left: 0 }; - return _this; - } - Object.defineProperty(ValueNode.prototype, "numberValue", { - get: function () { - return this._numberValue; - }, - set: function (v) { - this._numberValue = v; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(ValueNode.prototype, "stringValue", { - get: function () { - return this._stringValue; - }, - set: function (v) { - this._stringValue = v; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(ValueNode.prototype, "fileValue", { - get: function () { - return this._fileValue; - }, - set: function (v) { - this._fileValue = v; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(ValueNode.prototype, "colorValue", { - get: function () { - return this._colorValue; - }, - set: function (v) { - this._colorValue = v; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(ValueNode.prototype, "boolValue", { - get: function () { - return this._boolValue; - }, - set: function (v) { - this._boolValue = v; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(ValueNode.prototype, "vector2Value", { - get: function () { - return this._vector2Value; - }, - set: function (v) { - this._vector2Value = v; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(ValueNode.prototype, "vector3Value", { - get: function () { - return this._vector3Value; - }, - set: function (v) { - this._vector3Value = v; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(ValueNode.prototype, "vector4Value", { - get: function () { - return this._vector4Value; - }, - set: function (v) { - this._vector4Value = v; - }, - enumerable: false, - configurable: true - }); - ValueNode.nodeType = 'code/value'; - return ValueNode; -}(Node)); -light.NodeContext.registerNode(ValueNode); - -var CommonComponent = /** @class */ (function (_super) { - __extends(CommonComponent, _super); - function CommonComponent() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.entityId = null; - _this.componentProps = []; // 当前对象的组件的全量属性 - _this.componentType = null; - return _this; - } - CommonComponent.prototype.Run = function () { - var _this = this; - var _a; - if (this.entityId) { - var entity = this.entityManager.getEntityById(this.entityId); - var comp_1 = entity.getComponent(light[this.componentType]); - if (comp_1) { - if ((_a = this.componentProps) === null || _a === void 0 ? void 0 : _a.length) { - this.componentProps.forEach(function (prop) { - if (_this[prop] !== null && _this[prop] !== undefined) { - _this.assignProp(comp_1, prop); - } - }); - } - } - this.Next(); - } - }; - CommonComponent.prototype.Next = function () { }; - CommonComponent.prototype.assignProp = function (target, prop) { - if (!target[prop]) { - // todo studio上的属性与SDK不是完全一一对应的 有些属性会进行转化 比如ScreenTransform在ls上是eEuler position 但SDK是rotation和anchor/offset - return; - } - var isRectProps = function (props) { return typeof props.top !== 'undefined' - && typeof props.left !== 'undefined' - && typeof props.right !== 'undefined' - && typeof props.bottom !== 'undefined'; }; - var isV3Props = function (props) { return typeof props.x !== 'undefined' - && typeof props.y !== 'undefined' - && typeof props.z !== 'undefined'; }; - var isV2Props = function (props) { return typeof props.x !== 'undefined' - && typeof props.y !== 'undefined'; }; - if (isV3Props(this[prop])) { - target[prop].x = this[prop].x; - target[prop].y = this[prop].y; - target[prop].z = this[prop].z; - } - else if (isV2Props(this[prop])) { - target[prop].x = this[prop].x; - target[prop].y = this[prop].y; - } - else if (isRectProps(this[prop])) { - target[prop].right = this[prop].right; - target[prop].left = this[prop].left; - target[prop].top = this[prop].top; - target[prop].bottom = this[prop].bottom; - } - else { - target[prop] = this[prop]; - } - }; - CommonComponent.nodeType = 'code/commonComponent'; - return CommonComponent; -}(Node)); -light.NodeContext.registerNode(CommonComponent); - -var Rotation3DAnimation = /** @class */ (function (_super) { - __extends(Rotation3DAnimation, _super); - function Rotation3DAnimation() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this._entityId = null; - _this._stopRotation = false; - // 记录时间信息 - _this.lastTime = -1; - _this.startTime = -1; - _this.currentTimes = 0; - _this.isInit = false; - _this.isContinue = false; - _this.isFinish = false; - _this.onLightUpdate = function (time) { - if (_this.isFinish) { - return; - } - var _time = time / 1000000; - var onceSpinTime = _this.onceSpinTime ? _this.onceSpinTime : _this._onceSpinTime; - if (_this.isContinue) { - _this.startTime = _time - (_this.lastTime + _this.currentTimes * onceSpinTime); - _this.isContinue = false; - return; - } - if (_this.lastTime < 0) { - _this.lastTime = 0; - _this.startTime = _time; - _this.isInit = true; - return; - } - var durationTime = _time - _this.startTime; - if (durationTime <= 0) { - return; - } - _this.currentTimes = Math.floor(durationTime / onceSpinTime); - var spinTimes = _this.spinTimes ? _this.spinTimes : _this._spinTimes; - if (_this.currentTimes >= spinTimes) { - _this.detachEvent(); - _this.Stop(); - _this.isFinish = true; - return; - } - var currentTime = durationTime % onceSpinTime; - var standardOneStepTime = currentTime - _this.lastTime; - if (standardOneStepTime <= 0) { - _this.reset(); - } - else { - var oneStepTime = _this.getOneStepTime(currentTime / onceSpinTime, _this.lastTime / onceSpinTime); - var spinAngle = _this.spinAngle ? _this.spinAngle : _this._spinAngle; - var oneStepRadian = spinAngle / 180 * Math.PI; - _this.UpdateObject(oneStepTime * oneStepRadian); - } - _this.lastTime = currentTime; - }; - return _this; - } - Rotation3DAnimation.prototype.Start = function () { - light.on('update', this.onLightUpdate); - }; - Rotation3DAnimation.prototype.Stop = function () { - this.detachEvent(); - }; - Rotation3DAnimation.prototype.Continue = function () { - this.isContinue = true; - light.on('update', this.onLightUpdate); - }; - Rotation3DAnimation.prototype.Cancel = function () { - this.detachEvent(); - this.lastTime = -1; - this.startTime = -1; - this.currentTimes = 0; - this.isInit = false; - this.isContinue = false; - this.isFinish = false; - this.reset(); - }; - Rotation3DAnimation.prototype.UpdateObject = function (radian) { - if (this._entityId) { - var entity = this.entityManager.getEntityById(this._entityId); - var comp = entity.getComponent(light.BasicTransform); - if (comp) { - var transform = new Vector3(comp.position.x, comp.position.y, comp.position.z); - var scale = new Vector3(comp.scale.x, comp.scale.y, comp.scale.z); - var rotation = new Quaternion(comp.rotation.x, comp.rotation.y, comp.rotation.z, comp.rotation.w); - var matrix = new Matrix4(); - matrix.compose(transform, rotation, scale); - if (this.isInit) { - this.initMatrix = new Matrix4().copy(matrix); - this.isInit = false; - } - var spinPoint = this.spinPoint ? this.spinPoint : this._spinPoint; - var spinPointTransform = new Matrix4().setPosition(new Vector3(spinPoint.x, spinPoint.y, spinPoint.z)); - matrix.premultiply(new Matrix4().getInverse(spinPointTransform)); - var spinAxis = this.spinAxis ? this.spinAxis : this._spinAxis; - matrix.premultiply(new Matrix4().makeRotationAxis(new Vector3(spinAxis.x, spinAxis.y, spinAxis.z).normalize(), radian)); - matrix.premultiply(spinPointTransform); - matrix.decompose(transform, rotation, scale); - comp.SetPosition(new light.Vec3(transform.x, transform.y, transform.z)); - if (!this._stopRotation) { - comp.SetRotation(new light.Quat(rotation.w, rotation.x, rotation.y, rotation.z)); - } - comp.SetScale(new light.Vec3(scale.x, scale.y, scale.z)); - } - } - }; - Rotation3DAnimation.prototype.detachEvent = function () { - light.removeListener('update', this.onLightUpdate); - }; - Rotation3DAnimation.prototype.reset = function () { - if (this._entityId) { - var entity = this.entityManager.getEntityById(this._entityId); - var comp = entity.getComponent(light.BasicTransform); - if (comp && this.initMatrix) { - var transform = new Vector3(); - var scale = new Vector3(); - var rotation = new Quaternion(); - this.initMatrix.decompose(transform, rotation, scale); - comp.SetPosition(new light.Vec3(transform.x, transform.y, transform.z)); - comp.SetRotation(new light.Quat(rotation.w, rotation.x, rotation.y, rotation.z)); - comp.SetScale(new light.Vec3(scale.x, scale.y, scale.z)); - } - } - }; - Rotation3DAnimation.prototype.getOneStepTime = function (currentTimePercent, lastTimePercent) { - var oneStepTime = currentTimePercent - lastTimePercent; - if (this._smoothType === 1) { - oneStepTime = currentTimePercent * (2 - currentTimePercent) - lastTimePercent * (2 - lastTimePercent); - } - else if (this._smoothType === 2) { - oneStepTime = currentTimePercent * currentTimePercent - lastTimePercent * lastTimePercent; - } - else if (this._smoothType === 3) { - if (currentTimePercent < 0.5) { - oneStepTime = 2 * currentTimePercent * currentTimePercent - 2 * lastTimePercent * lastTimePercent; - } - else { - oneStepTime = 2 * currentTimePercent * (2 - currentTimePercent) - 2 * lastTimePercent * (2 - lastTimePercent); - } - } - return oneStepTime; - }; - Rotation3DAnimation.nodeType = 'code/rotation3D'; - return Rotation3DAnimation; -}(Node)); -light.NodeContext.registerNode(Rotation3DAnimation); - -var GlobalValue = /** @class */ (function (_super) { - __extends(GlobalValue, _super); - function GlobalValue() { - return _super !== null && _super.apply(this, arguments) || this; - } - GlobalValue.prototype.Run = function () { - if (GlobalValue.isNotNull(this.inValue)) { - setGlobalValue(this._propName, this.inValue); - } - this.Next(); - }; - GlobalValue.prototype.Next = function () { }; - Object.defineProperty(GlobalValue.prototype, "outValue", { - get: function () { - return getGlobalValue(this._propName); - }, - enumerable: false, - configurable: true - }); - GlobalValue.isNotNull = function (v) { - return v !== null && v !== undefined; - }; - GlobalValue.nodeType = 'code/globalValue'; - return GlobalValue; -}(Node)); -light.NodeContext.registerNode(GlobalValue); - -if (typeof (globalThis) === 'undefined') { - this['globalThis'] = this; -} -globalThis.configure = light.configure; -globalThis.update = light.update; - -})(light); \ No newline at end of file diff --git a/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/template.json b/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/template.json deleted file mode 100644 index b5daaf67..00000000 --- a/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/template.json +++ /dev/null @@ -1,3281 +0,0 @@ -{ - "componentLevel": 4, - "madeIn": "LightStudio", - "root": { - "id": 16, - "name": "拍摄模板", - "children": [ - { - "id": 17, - "name": "2D画板", - "children": [ - { - "id": 20, - "name": "滤镜", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 20, - "componentID": 20001, - "level": 1 - }, - { - "componentID": 20002, - "enabled": true, - "entityId": 20, - "intensity": 0.7000000000000001, - "src": "9e681a9c-f709-4422-a12e-a902b4ea5d86", - "type": "LUTFilter", - "version": 140, - "level": 1 - }, - { - "startOffset": 0, - "duration": -2147483648, - "endOffset": 0, - "loopCount": -2147483648, - "type": "TimeOffset", - "enabled": true, - "entityId": 20, - "componentID": 20003, - "version": null, - "level": 1 - }, - { - "type": "EntityIdentifier", - "name": "滤镜", - "id": 20, - "enabled": true - } - ] - }, - { - "id": 38, - "name": "脸妆V7", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 38, - "componentID": 38001, - "level": 1 - }, - { - "componentID": 38002, - "enabled": true, - "entityId": 38, - "faceImage": "4e1dd035-e55b-469a-8efd-84919d1a4f47", - "type": "MakeupFaceV7", - "visMethod": 0, - "version": 2, - "level": 2, - "makeupFaceVersion": "v7" - }, - { - "alpha": 1, - "componentID": 38003, - "enabled": true, - "entityId": 38, - "mode": "softlight", - "type": "BlendMode", - "version": 16, - "level": 2 - }, - { - "alignPoints": [ - 64 - ], - "componentID": 38004, - "enabled": true, - "entityId": 38, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "genderBinding": "", - "isAllFrameFaceDetect": false, - "isRefine": true, - "isWaitFirstFrameDetect": false, - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "type": "FaceTracking", - "xAxisRotateTrack": true, - "xAxisScale": true, - "xAxisTrack": true, - "yAxisRotateTrack": true, - "yAxisScale": true, - "yAxisTrack": true, - "zAxisRotateTrack": true, - "version": 2, - "level": 2 - }, - { - "type": "EntityIdentifier", - "name": "脸妆V7", - "id": 38, - "enabled": true - } - ] - }, - { - "id": 34, - "name": "眼妆", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 34, - "componentID": 34001, - "level": 1 - }, - { - "componentID": 34002, - "cropRect": { - "bottom": 1050, - "left": 397, - "right": 1135, - "top": 790 - }, - "enabled": true, - "entityId": 34, - "eyeCropImageName": "cropImage/eye_mult_crop.png", - "eyeImageName": "86abd5a0-b037-4ae3-8e43-625ffc57ee43", - "minVisibility": 0, - "type": "MakeupEyeV6", - "version": 14, - "visMethod": 0, - "level": 2 - }, - { - "alpha": 0.68, - "componentID": 34003, - "enabled": true, - "entityId": 34, - "mode": "multiply", - "type": "BlendMode", - "version": 117, - "level": 2 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "female", - "type": "FaceTracking", - "enabled": true, - "entityId": 34, - "componentID": 34004, - "level": 2 - }, - { - "type": "EntityIdentifier", - "name": "眼妆", - "id": 34, - "enabled": true - } - ] - }, - { - "id": 173, - "name": "眼妆", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 173, - "componentID": 173001, - "level": 1 - }, - { - "componentID": 173002, - "cropRect": { - "bottom": 1049, - "left": 381, - "right": 1158, - "top": 803 - }, - "enabled": true, - "entityId": 173, - "eyeCropImageName": "cropImage/yj_crop.png", - "eyeImageName": "2f904822-be62-405c-ad1b-91e51d3ee0ca", - "minVisibility": 0, - "type": "MakeupEyeV6", - "version": 17, - "visMethod": 0, - "level": 2 - }, - { - "alpha": 0.58, - "componentID": 173003, - "enabled": true, - "entityId": 173, - "mode": "multiply", - "type": "BlendMode", - "version": 59, - "level": 2 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "female", - "type": "FaceTracking", - "enabled": true, - "entityId": 173, - "componentID": 173004, - "level": 2 - }, - { - "type": "EntityIdentifier", - "name": "眼妆", - "id": 173, - "enabled": true - } - ] - }, - { - "id": 130, - "name": "脸妆", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 130, - "componentID": 130001, - "level": 1 - }, - { - "componentID": 130002, - "enabled": true, - "entityId": 130, - "faceExchangeImageDisableFaceCrop": true, - "faceExchangeImageEnableOpacity": true, - "faceImage": "e40218d9-1eb9-4e76-b71c-dbf1084a73d3", - "faceMask": "none", - "facePointsFile": "", - "facePointsOption": false, - "level": 2, - "makeupFaceVersion": "v6", - "maskImage": "", - "type": "MakeupFaceV6", - "version": 60, - "visMethod": 2, - "extraFlag": 1 - }, - { - "alpha": 1, - "mode": "normal", - "type": "BlendMode", - "enabled": true, - "entityId": 130, - "componentID": 130003, - "level": 2 - }, - { - "alignPoints": [ - 64 - ], - "componentID": 130004, - "enabled": true, - "entityId": 130, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "genderBinding": "", - "isAllFrameFaceDetect": false, - "isRefine": true, - "isWaitFirstFrameDetect": false, - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "type": "FaceTracking", - "xAxisRotateTrack": true, - "xAxisScale": true, - "xAxisTrack": true, - "yAxisRotateTrack": true, - "yAxisScale": true, - "yAxisTrack": true, - "zAxisRotateTrack": true, - "version": 2, - "level": 2 - }, - { - "type": "EntityIdentifier", - "name": "脸妆", - "id": 130, - "enabled": true - } - ] - }, - { - "id": 82, - "name": "唇彩", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 82, - "componentID": 82001, - "level": 1 - }, - { - "closeMouseMask": "", - "componentID": 82002, - "enabled": true, - "entityId": 82, - "level": 2, - "lipsColor": "", - "lipsImage": "a2520e66-3e8b-49bf-bd16-a26b9e5ae654", - "lipsImageCrop": "cropImage/zc_crop.png", - "lipsImageCropRect": { - "bottom": 1411, - "left": 622, - "right": 918, - "top": 1260 - }, - "lipsLut": "", - "lipsMask": "Basic", - "lipsMaskCrop": "cropImage/qqBasic_mask_crop.png", - "lipsMaskCropRect": { - "bottom": 1430, - "left": 604, - "right": 954, - "top": 1269 - }, - "lipsMaskEnum": 6, - "lipsType": "Image", - "minVisibility": 0, - "openMouseMask": "", - "type": "MakeupLipsV6", - "version": 24, - "visMethod": 2 - }, - { - "alpha": 1, - "componentID": 82003, - "enabled": true, - "entityId": 82, - "mode": "multiply", - "type": "BlendMode", - "version": 120, - "level": 2 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "female", - "type": "FaceTracking", - "enabled": true, - "entityId": 82, - "componentID": 82004, - "level": 2 - }, - { - "type": "EntityIdentifier", - "name": "唇彩", - "id": 82, - "enabled": true - } - ] - }, - { - "id": 79, - "name": "人脸跟随贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "left": -0.00292872824517423, - "right": -0.00292872824517423, - "top": 0.0078117461364996255, - "bottom": 0.0078117461364996255 - }, - "offset": { - "left": -427.2503419972641, - "right": 434.5827633378934, - "top": 648.4199726402188, - "bottom": -499.9110807113543 - }, - "pivot": { - "x": -0.008507936507936508, - "y": -0.12932585206628308 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "eKeepRatio": true, - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "objectEnabled": true, - "entityId": 79, - "componentID": 79001, - "type": "ScreenTransform", - "enabled": true, - "version": 520, - "level": 1 - }, - { - "componentID": 79002, - "enabled": true, - "entityId": 79, - "scaleMode": 2, - "src": "b1983b43-cbe1-46ba-be68-1539092b0faf", - "type": "Image", - "version": 4, - "level": 1 - }, - { - "alpha": 1, - "mode": "normal", - "type": "BlendMode", - "enabled": true, - "entityId": 79, - "componentID": 79003, - "level": 2 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "", - "type": "FaceTracking", - "enabled": true, - "entityId": 79, - "componentID": 79004, - "level": 2 - }, - { - "componentID": 79005, - "duration": 1080000, - "enabled": true, - "endOffset": -2147483648, - "entityId": 79, - "loopCount": -1, - "startOffset": 0, - "type": "TimeOffset", - "version": 5, - "level": 1 - }, - { - "type": "EntityIdentifier", - "name": "人脸跟随贴纸", - "id": 79, - "enabled": true - } - ] - }, - { - "id": 195, - "name": "人脸跟随贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "left": 0.34766871790922094, - "right": 0.34766871790922094, - "top": 0.21519250610125923, - "bottom": 0.21519250610125923 - }, - "offset": { - "left": -242.28280961182992, - "right": 82.80036968576711, - "top": 83.13000616142945, - "bottom": -239.27295132470732 - }, - "pivot": { - "x": 0.4905896400750554, - "y": 0.4843099032985514 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": -1, - "y": 1, - "z": 1 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "objectEnabled": true, - "entityId": 195, - "componentID": 195001, - "type": "ScreenTransform", - "enabled": true, - "version": 2033, - "level": 1 - }, - { - "componentID": 195002, - "enabled": true, - "entityId": 195, - "scaleMode": 2, - "src": "62b436c8-148a-4d42-be46-a1ed7471aae2", - "type": "Image", - "version": 8, - "level": 1 - }, - { - "alpha": 1, - "mode": "normal", - "type": "BlendMode", - "enabled": true, - "entityId": 195, - "componentID": 195003, - "level": 2 - }, - { - "alignPoints": [ - 89 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "", - "type": "FaceTracking", - "enabled": true, - "entityId": 195, - "componentID": 195004, - "version": 6, - "level": 2 - }, - { - "startOffset": 0, - "duration": 1000000, - "endOffset": -2147483648, - "loopCount": -1, - "type": "TimeOffset", - "enabled": true, - "entityId": 195, - "componentID": 195005, - "version": 3, - "level": 1 - }, - { - "type": "EntityIdentifier", - "name": "人脸跟随贴纸", - "id": 195, - "enabled": true - } - ] - }, - { - "id": 41, - "name": "人脸跟随贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "left": -0.35916704576572916, - "right": -0.35916704576572916, - "top": 0.21177483820230664, - "bottom": 0.21177483820230664 - }, - "offset": { - "left": -242.28280961182998, - "right": 82.80036968576712, - "top": 83.13000616142945, - "bottom": -239.27295132470732 - }, - "pivot": { - "x": 0.4905896400750554, - "y": 0.4843099032985514 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "objectEnabled": true, - "entityId": 41, - "componentID": 41001, - "type": "ScreenTransform", - "enabled": true, - "version": 1897, - "level": 1 - }, - { - "componentID": 41002, - "enabled": true, - "entityId": 41, - "scaleMode": 2, - "src": "62b436c8-148a-4d42-be46-a1ed7471aae2", - "type": "Image", - "version": 8, - "level": 1 - }, - { - "alpha": 1, - "mode": "normal", - "type": "BlendMode", - "enabled": true, - "entityId": 41, - "componentID": 41003, - "level": 2 - }, - { - "alignPoints": [ - 89 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "", - "type": "FaceTracking", - "enabled": true, - "entityId": 41, - "componentID": 41004, - "version": 6, - "level": 2 - }, - { - "startOffset": 0, - "duration": 1000000, - "endOffset": -2147483648, - "loopCount": -1, - "type": "TimeOffset", - "enabled": true, - "entityId": 41, - "componentID": 41005, - "version": 3, - "level": 1 - }, - { - "type": "EntityIdentifier", - "name": "人脸跟随贴纸", - "id": 41, - "enabled": true - } - ] - }, - { - "id": 234, - "name": "音乐", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 234, - "componentID": 234001, - "level": 1 - }, - { - "audioSourceType": 0, - "componentID": 234002, - "enabled": true, - "entityId": 234, - "speed": 1, - "type": "AudioSource", - "version": 11, - "volume": 1, - "volumeEffects": [], - "level": 4, - "src": "f9d28601-d9b8-4504-937b-615edaf809c8" - }, - { - "componentID": 234003, - "duration": 10530000, - "enabled": true, - "endOffset": -2147483648, - "entityId": 234, - "loopCount": -1, - "startOffset": 0, - "type": "TimeOffset", - "version": 4, - "level": 1 - }, - { - "type": "EntityIdentifier", - "name": "音乐", - "id": 234, - "enabled": true - } - ] - }, - { - "id": 55, - "name": "脸妆", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 55, - "componentID": 55001, - "level": 1 - }, - { - "componentID": 55002, - "enabled": true, - "entityId": 55, - "faceExchangeImageDisableFaceCrop": true, - "faceExchangeImageEnableOpacity": false, - "faceImage": "800dcd22-e78f-4d20-9d25-a8c639e0c107", - "faceMask": "none", - "facePointsFile": "", - "facePointsOption": false, - "level": 2, - "makeupFaceVersion": "v6", - "maskImage": "", - "type": "MakeupFaceV6", - "version": 4, - "visMethod": 0, - "extraFlag": 1 - }, - { - "alpha": 1, - "componentID": 55003, - "enabled": true, - "entityId": 55, - "mode": "multiply", - "type": "BlendMode", - "version": 8, - "level": 2 - }, - { - "alignPoints": [ - 64 - ], - "componentID": 55004, - "enabled": true, - "entityId": 55, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "genderBinding": "", - "isAllFrameFaceDetect": false, - "isRefine": true, - "isWaitFirstFrameDetect": false, - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "type": "FaceTracking", - "xAxisRotateTrack": true, - "xAxisScale": true, - "xAxisTrack": true, - "yAxisRotateTrack": true, - "yAxisScale": true, - "yAxisTrack": true, - "zAxisRotateTrack": true, - "version": 2, - "level": 2 - }, - { - "type": "EntityIdentifier", - "name": "脸妆", - "id": 55, - "enabled": true - } - ] - }, - { - "id": 26, - "name": "人脸跟随贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0.4781930555555556, - "right": 0.4781930555555556, - "top": 0.33562431640625007, - "bottom": 0.33562431640625007 - }, - "offset": { - "left": -370.8550000000001, - "right": 370.8550000000001, - "top": 306.255, - "bottom": -306.255 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "entityId": 26, - "componentID": 26001, - "version": 350, - "enabled": true, - "level": 1 - }, - { - "componentID": 26002, - "enabled": true, - "entityId": 26, - "scaleMode": 2, - "src": "099c357d-fa0a-44b7-852e-c725bd6bac70", - "type": "Image", - "version": 3, - "level": 1 - }, - { - "alpha": 1, - "mode": "normal", - "type": "BlendMode", - "enabled": true, - "entityId": 26, - "componentID": 26003, - "level": 2 - }, - { - "alignPoints": [ - 89 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "", - "type": "FaceTracking", - "enabled": true, - "entityId": 26, - "componentID": 26004, - "version": 1, - "level": 2 - }, - { - "startOffset": 0, - "duration": 1260000, - "endOffset": -2147483648, - "loopCount": -1, - "type": "TimeOffset", - "enabled": true, - "entityId": 26, - "componentID": 26005, - "version": null, - "level": 1 - }, - { - "type": "EntityIdentifier", - "name": "人脸跟随贴纸", - "id": 26, - "enabled": true - } - ] - }, - { - "id": 72, - "name": "人脸跟随贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0.46283195652442966, - "w": 0.8864460389779901 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": -0.6824180555555558, - "right": -0.6824180555555558, - "top": 0.12317119140624991, - "bottom": 0.12317119140624991 - }, - "offset": { - "left": -492.92, - "right": 462.06, - "top": 409.1049999999999, - "bottom": -379.5249999999999 - }, - "pivot": { - "x": 0.03231481287566232, - "y": -0.03750808363871524 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "entityId": 72, - "componentID": 72001, - "version": 774, - "enabled": true, - "level": 1 - }, - { - "componentID": 72002, - "enabled": true, - "entityId": 72, - "scaleMode": 2, - "src": "099c357d-fa0a-44b7-852e-c725bd6bac70", - "type": "Image", - "version": 3, - "level": 1 - }, - { - "alpha": 1, - "mode": "normal", - "type": "BlendMode", - "enabled": true, - "entityId": 72, - "componentID": 72003, - "level": 2 - }, - { - "alignPoints": [ - 89 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "", - "type": "FaceTracking", - "enabled": true, - "entityId": 72, - "componentID": 72004, - "version": 1, - "level": 2 - }, - { - "componentID": 72005, - "duration": 1360000, - "enabled": true, - "endOffset": -2147483648, - "entityId": 72, - "loopCount": -1, - "startOffset": 400000, - "type": "TimeOffset", - "version": 10, - "level": 1 - }, - { - "type": "EntityIdentifier", - "name": "人脸跟随贴纸", - "id": 72, - "enabled": true - } - ] - }, - { - "id": 116, - "name": "人脸跟随贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0.243784282674591, - "w": 0.9698294816723376 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0.8475263888888886, - "right": 0.8475263888888886, - "top": -0.21211005859374993, - "bottom": -0.21211005859374993 - }, - "offset": { - "left": -370.8550000000001, - "right": 370.8550000000001, - "top": 306.255, - "bottom": -306.255 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "entityId": 116, - "componentID": 116001, - "version": 481, - "enabled": true, - "level": 1 - }, - { - "componentID": 116002, - "enabled": true, - "entityId": 116, - "scaleMode": 2, - "src": "099c357d-fa0a-44b7-852e-c725bd6bac70", - "type": "Image", - "version": 3, - "level": 1 - }, - { - "alpha": 1, - "componentID": 116003, - "enabled": true, - "entityId": 116, - "mode": "hardlight", - "type": "BlendMode", - "version": 5, - "level": 2 - }, - { - "alignPoints": [ - 89 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "", - "type": "FaceTracking", - "enabled": true, - "entityId": 116, - "componentID": 116004, - "version": 1, - "level": 2 - }, - { - "componentID": 116005, - "duration": 1360000, - "enabled": true, - "endOffset": -2147483648, - "entityId": 116, - "loopCount": -1, - "startOffset": 300000, - "type": "TimeOffset", - "version": 7, - "level": 1 - }, - { - "type": "EntityIdentifier", - "name": "人脸跟随贴纸", - "id": 116, - "enabled": true - } - ] - }, - { - "id": 156, - "name": "人脸跟随贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": -0.8310471199880313, - "right": -0.8310471199880313, - "top": -0.170067082830734, - "bottom": -0.170067082830734 - }, - "offset": { - "left": -307.3698384201077, - "right": 305.6283662477558, - "top": 246.38689407540397, - "bottom": -259.51077199281866 - }, - "pivot": { - "x": 0.002840909090909091, - "y": 0.025941764110935638 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "entityId": 156, - "componentID": 156001, - "version": 682, - "enabled": true, - "level": 1 - }, - { - "componentID": 156002, - "enabled": true, - "entityId": 156, - "scaleMode": 2, - "src": "099c357d-fa0a-44b7-852e-c725bd6bac70", - "type": "Image", - "version": 3, - "level": 1 - }, - { - "alpha": 1, - "componentID": 156003, - "enabled": true, - "entityId": 156, - "mode": "hardlight", - "type": "BlendMode", - "version": 12, - "level": 2 - }, - { - "alignPoints": [ - 89 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "", - "type": "FaceTracking", - "enabled": true, - "entityId": 156, - "componentID": 156004, - "version": 1, - "level": 2 - }, - { - "startOffset": 0, - "duration": 1260000, - "endOffset": -2147483648, - "loopCount": -1, - "type": "TimeOffset", - "enabled": true, - "entityId": 156, - "componentID": 156005, - "version": null, - "level": 1 - }, - { - "type": "EntityIdentifier", - "name": "人脸跟随贴纸", - "id": 156, - "enabled": true - } - ] - }, - { - "id": 199, - "name": "人脸跟随贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": -0.2540847222222225, - "right": -0.2540847222222225, - "top": 0.18682744140624996, - "bottom": 0.18682744140624996 - }, - "offset": { - "left": -319.685, - "right": 319.685, - "top": 260, - "bottom": -260 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "entityId": 199, - "componentID": 199001, - "version": 1283, - "enabled": true, - "level": 1 - }, - { - "componentID": 199002, - "enabled": true, - "entityId": 199, - "scaleMode": 2, - "src": "099c357d-fa0a-44b7-852e-c725bd6bac70", - "type": "Image", - "version": 3, - "level": 1 - }, - { - "alpha": 0.49, - "componentID": 199003, - "enabled": true, - "entityId": 199, - "mode": "normal", - "type": "BlendMode", - "version": 2, - "level": 2 - }, - { - "alignPoints": [ - 89 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "", - "type": "FaceTracking", - "enabled": true, - "entityId": 199, - "componentID": 199004, - "version": 1, - "level": 2 - }, - { - "startOffset": 0, - "duration": 1260000, - "endOffset": -2147483648, - "loopCount": -1, - "type": "TimeOffset", - "enabled": true, - "entityId": 199, - "componentID": 199005, - "version": null, - "level": 1 - }, - { - "type": "EntityIdentifier", - "name": "人脸跟随贴纸", - "id": 199, - "enabled": true - } - ] - }, - { - "id": 85, - "name": "美容型捏脸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 85, - "componentID": 85001, - "level": 1 - }, - { - "cheekboneThin": 0, - "chin": 0.20000000000000018, - "componentID": 85002, - "editMode": false, - "enabled": true, - "enlargeEye": 0.6000000000000001, - "entityId": 85, - "eyeAngle": 0, - "eyeDistance": 0, - "foreHead": 0, - "height": 2048, - "lastPoints": [], - "mouthHeight": 0, - "mouthPosition": 0.30000000000000004, - "mouthSize": 0, - "mouthWidth": 0, - "noseHeight": 0, - "noseSize": 0, - "noseWing": 0, - "overallFactor": 0.8, - "pinchFaceEnabled": true, - "points": [ - { - "fixed": true, - "positionX": 381.2483215332031, - "positionY": 968.1102905273438 - }, - { - "fixed": true, - "positionX": 416.1995849609375, - "positionY": 1162.833984375 - }, - { - "fixed": true, - "positionX": 469.4100341796875, - "positionY": 1306.3858642578125 - }, - { - "fixed": true, - "positionX": 571.165283203125, - "positionY": 1417.846923828125 - }, - { - "fixed": true, - "positionX": 635.0916748046875, - "positionY": 1472.1412353515625 - }, - { - "fixed": true, - "positionX": 769.0972900390625, - "positionY": 1532.72021484375 - }, - { - "fixed": true, - "positionX": 901.3433837890625, - "positionY": 1472.0382080078125 - }, - { - "fixed": true, - "positionX": 965.1058349609375, - "positionY": 1417.74853515625 - }, - { - "fixed": true, - "positionX": 1066.718994140625, - "positionY": 1306.30029296875 - }, - { - "fixed": true, - "positionX": 1119.87109375, - "positionY": 1162.749267578125 - }, - { - "fixed": true, - "positionX": 1154.7723388671875, - "positionY": 968.04931640625 - }, - { - "fixed": true, - "positionX": 420, - "positionY": 855 - }, - { - "fixed": true, - "positionX": 508.3151550292969, - "positionY": 855.9776000976562 - }, - { - "fixed": false, - "positionX": 699.8558349609375, - "positionY": 866.9613647460938 - }, - { - "fixed": true, - "positionX": 499.62255859375, - "positionY": 812.0860595703125 - }, - { - "fixed": true, - "positionX": 1116, - "positionY": 855 - }, - { - "fixed": true, - "positionX": 1027.6904296875, - "positionY": 855.966796875 - }, - { - "fixed": false, - "positionX": 836.1618041992188, - "positionY": 866.9578857421875 - }, - { - "fixed": true, - "positionX": 1036.3780517578125, - "positionY": 812.0860595703125 - }, - { - "fixed": true, - "positionX": 500.9525146484375, - "positionY": 945.6005859375 - }, - { - "fixed": true, - "positionX": 544.707275390625, - "positionY": 968.685546875 - }, - { - "fixed": true, - "positionX": 580.7925415039062, - "positionY": 981.59814453125 - }, - { - "fixed": true, - "positionX": 618.0525512695312, - "positionY": 976.9537353515625 - }, - { - "fixed": false, - "positionX": 665.0792236328125, - "positionY": 968.9744873046875 - }, - { - "fixed": false, - "positionX": 632.9474487304688, - "positionY": 930.57080078125 - }, - { - "fixed": false, - "positionX": 594.3089599609375, - "positionY": 912.2919921875 - }, - { - "fixed": false, - "positionX": 549.611083984375, - "positionY": 918.4812622070312 - }, - { - "fixed": true, - "positionX": 1035.0491943359375, - "positionY": 945.6005859375 - }, - { - "fixed": true, - "positionX": 991.3195190429688, - "positionY": 968.6734619140625 - }, - { - "fixed": true, - "positionX": 955.240478515625, - "positionY": 981.5890502929688 - }, - { - "fixed": true, - "positionX": 917.983642578125, - "positionY": 976.9483032226562 - }, - { - "fixed": false, - "positionX": 870.9589233398438, - "positionY": 968.971435546875 - }, - { - "fixed": false, - "positionX": 903.0806884765625, - "positionY": 930.5664672851562 - }, - { - "fixed": false, - "positionX": 941.713134765625, - "positionY": 912.2855834960938 - }, - { - "fixed": false, - "positionX": 986.407958984375, - "positionY": 918.4703979492188 - }, - { - "fixed": false, - "positionX": 718.6995239257812, - "positionY": 967.3453979492188 - }, - { - "fixed": false, - "positionX": 710.6118774414062, - "positionY": 1086.4404296875 - }, - { - "fixed": true, - "positionX": 689.3953247070312, - "positionY": 1156.743896484375 - }, - { - "fixed": false, - "positionX": 710.5078735351562, - "positionY": 1196.9625244140625 - }, - { - "fixed": false, - "positionX": 768.0589599609375, - "positionY": 1206.55859375 - }, - { - "fixed": false, - "positionX": 825.6014404296875, - "positionY": 1196.9537353515625 - }, - { - "fixed": true, - "positionX": 846.701416015625, - "positionY": 1156.7293701171875 - }, - { - "fixed": false, - "positionX": 825.462158203125, - "positionY": 1086.434814453125 - }, - { - "fixed": false, - "positionX": 817.3405151367188, - "positionY": 967.3443603515625 - }, - { - "fixed": false, - "positionX": 768.0462646484375, - "positionY": 1138.8211669921875 - }, - { - "fixed": true, - "positionX": 612.4192504882812, - "positionY": 1287.485595703125 - }, - { - "fixed": true, - "positionX": 923.5807495117188, - "positionY": 1287.485595703125 - }, - { - "fixed": false, - "positionX": 768.1617431640625, - "positionY": 1392.7696533203125 - }, - { - "fixed": false, - "positionX": 844.4039916992188, - "positionY": 1321.534912109375 - }, - { - "fixed": false, - "positionX": 768.1033325195312, - "positionY": 1337.728515625 - }, - { - "fixed": false, - "positionX": 691.7477416992188, - "positionY": 1321.5511474609375 - }, - { - "fixed": false, - "positionX": 670.4691162109375, - "positionY": 1275.3924560546875 - }, - { - "fixed": false, - "positionX": 725.6043701171875, - "positionY": 1267.037109375 - }, - { - "fixed": false, - "positionX": 810.5358276367188, - "positionY": 1267.029541015625 - }, - { - "fixed": false, - "positionX": 865.6524658203125, - "positionY": 1275.3746337890625 - }, - { - "fixed": false, - "positionX": 842.0701904296875, - "positionY": 1300.002197265625 - }, - { - "fixed": false, - "positionX": 768.0865478515625, - "positionY": 1305.5965576171875 - }, - { - "fixed": false, - "positionX": 694.072265625, - "positionY": 1300.016845703125 - }, - { - "fixed": false, - "positionX": 768.0203247070312, - "positionY": 966.8074340820312 - }, - { - "fixed": true, - "positionX": 768, - "positionY": 864 - }, - { - "fixed": false, - "positionX": 581.6300048828125, - "positionY": 556.4579467773438 - }, - { - "fixed": false, - "positionX": 954.3408203125, - "positionY": 556.4439697265625 - }, - { - "fixed": false, - "positionX": 767.9866333007812, - "positionY": 543.6483154296875 - }, - { - "fixed": false, - "positionX": 422.3842468261719, - "positionY": 662.1156005859375 - }, - { - "fixed": false, - "positionX": 1113.590087890625, - "positionY": 662.0865478515625 - }, - { - "fixed": true, - "positionX": 529, - "positionY": 1148 - }, - { - "fixed": true, - "positionX": 1007, - "positionY": 1148 - }, - { - "fixed": false, - "positionX": 597.8045654296875, - "positionY": 1337.8426513671875 - }, - { - "fixed": false, - "positionX": 938.3582763671875, - "positionY": 1337.788818359375 - }, - { - "fixed": false, - "positionX": 768.0322875976562, - "positionY": 1052.8072509765625 - }, - { - "fixed": true, - "positionX": 670, - "positionY": 683 - }, - { - "fixed": true, - "positionX": 866, - "positionY": 683 - }, - { - "fixed": false, - "positionX": 560.044677734375, - "positionY": 726.7130737304688 - }, - { - "fixed": false, - "positionX": 975.9483642578125, - "positionY": 726.7044067382812 - }, - { - "fixed": true, - "positionX": 674, - "positionY": 1372 - }, - { - "fixed": true, - "positionX": 862, - "positionY": 1372 - }, - { - "fixed": false, - "positionX": 768.0735473632812, - "positionY": 1267.0753173828125 - }, - { - "fixed": false, - "positionX": 661.2979736328125, - "positionY": 1400.0338134765625 - }, - { - "fixed": false, - "positionX": 874.9606323242188, - "positionY": 1399.9873046875 - }, - { - "fixed": false, - "positionX": 768.25146484375, - "positionY": 1436.438720703125 - }, - { - "fixed": true, - "positionX": 396.8787841796875, - "positionY": 1083.9658203125 - }, - { - "fixed": true, - "positionX": 434.0381774902344, - "positionY": 1240.051025390625 - }, - { - "fixed": true, - "positionX": 516.288818359375, - "positionY": 1368.573974609375 - }, - { - "fixed": false, - "positionX": 442.4998779296875, - "positionY": 957.6348876953125 - }, - { - "fixed": false, - "positionX": 462.2112731933594, - "positionY": 1052.2294921875 - }, - { - "fixed": true, - "positionX": 1139.1689453125, - "positionY": 1083.88671875 - }, - { - "fixed": true, - "positionX": 1102.0531005859375, - "positionY": 1239.9708251953125 - }, - { - "fixed": true, - "positionX": 1019.8887329101562, - "positionY": 1368.482177734375 - }, - { - "fixed": false, - "positionX": 1093.521484375, - "positionY": 957.5970458984375 - }, - { - "fixed": false, - "positionX": 1073.833251953125, - "positionY": 1052.1805419921875 - }, - { - "fixed": true, - "positionX": 373.27703857421875, - "positionY": 887.7207641601562 - }, - { - "fixed": true, - "positionX": 1162.72509765625, - "positionY": 887.6768798828125 - }, - { - "fixed": false, - "positionX": 424.0460205078125, - "positionY": 792.3617553710938 - }, - { - "fixed": false, - "positionX": 1111.9447021484375, - "positionY": 792.3394165039062 - } - ], - "reformFacialType": 0, - "strength": 100, - "stretchEnabled": false, - "symmetry": true, - "thinFace": 0, - "type": "FacialReform", - "vFace": 0, - "version": 1955, - "width": 1536, - "level": 4 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "", - "type": "FaceTracking", - "enabled": true, - "entityId": 85, - "componentID": 85003, - "level": 2 - }, - { - "type": "EntityIdentifier", - "name": "美容型捏脸", - "id": 85, - "enabled": true - } - ] - } - ], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "entityId": 17, - "componentID": 17001, - "type": "ScreenTransform", - "enabled": true, - "version": 2, - "objectEnabled": true, - "level": 1 - }, - { - "componentID": 17002, - "enabled": true, - "entityId": 17, - "renderTargetKey": "RenderTarget", - "type": "Camera", - "version": 2, - "level": 2 - }, - { - "type": "EntityIdentifier", - "name": "2D画板", - "id": 17, - "enabled": true - } - ] - }, - { - "id": 18, - "name": "流程管理", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 18, - "componentID": 18001, - "level": 1 - }, - { - "type": "EntityIdentifier", - "name": "流程管理", - "id": 18 - }, - { - "type": "Script", - "entityId": 18, - "scriptPath": "3129fb72-d4c9-4cb6-9fba-8c881c1d1674", - "enabled": true, - "componentID": 99999 - } - ] - }, - { - "id": 48, - "name": "light.js", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "EntityIdentifier", - "name": "light.js", - "id": 48 - }, - { - "type": "Script", - "entityId": 48, - "scriptPath": "d0d309d7-6863-4938-9ab3-d0031567b744", - "enabled": true, - "componentID": 99999 - }, - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 48 - } - ] - } - ], - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 16, - "componentID": 16001, - "type": "ScreenTransform", - "enabled": true, - "version": 156, - "level": 1 - }, - { - "enableRotation": true, - "resetWhenStartRecord": true, - "type": "ExtraSetting", - "enabled": true, - "version": 1, - "entityId": 16, - "componentID": 16002, - "level": 4, - "requireAbility": [] - }, - { - "componentID": 16003, - "enabled": true, - "entityId": 16, - "image": "", - "tips": "", - "type": "Tips", - "version": 9, - "level": 2 - }, - { - "type": "EntityIdentifier", - "name": "拍摄模板", - "id": 16, - "enabled": true - } - ], - "enabled": true, - "version": 0 - }, - "inputSources": { - "f9d28601-d9b8-4504-937b-615edaf809c8": { - "type": "AudioClipData", - "commandMap": {}, - "loopCount": 0, - "path": "Ring.mp3", - "timeRange": { - "startTime": 0, - "duration": 10529000 - }, - "rhythmPath": "", - "key": "f9d28601-d9b8-4504-937b-615edaf809c8" - }, - "d0d309d7-6863-4938-9ab3-d0031567b744": { - "type": "js", - "commandMap": {}, - "key": "d0d309d7-6863-4938-9ab3-d0031567b744", - "label": "light.js", - "path": "scripts/light.js", - "level": 2, - "requireAbilities": [] - }, - "3129fb72-d4c9-4cb6-9fba-8c881c1d1674": { - "type": "js", - "commandMap": {}, - "key": "3129fb72-d4c9-4cb6-9fba-8c881c1d1674", - "label": "18.flow.js", - "path": "scripts/18.flow.js", - "level": 2, - "requireAbilities": [] - }, - "RenderTarget": { - "type": "RenderTarget", - "commandMap": {}, - "inputColor": "#ffffffff", - "sizeType": 0, - "compatibilityMode": true, - "depthType": "DEPTH24", - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "NEAREST", - "minFilter": "NEAREST", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "width": 0, - "height": 0, - "key": "RenderTarget", - "path": "RenderTarget.rdt", - "label": "RenderTarget.rdt", - "inputKey": "DeviceCameraTexture", - "input": "DeviceCameraTexture", - "level": 2 - }, - "DeviceCameraTexture": { - "type": "TextureData", - "commandMap": {}, - "key": "DeviceCameraTexture", - "path": "DeviceCameraTexture.tex", - "label": "DeviceCameraTexture.tex", - "level": 2 - }, - "9e681a9c-f709-4422-a12e-a902b4ea5d86": { - "type": "ImageData", - "commandMap": {}, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "9e681a9c-f709-4422-a12e-a902b4ea5d86", - "label": "mianmo.png", - "path": "mianmo.png", - "actualSize": 293804, - "resolution": { - "height": 512, - "width": 512 - }, - "compression": 0, - "level": 2 - }, - "4e1dd035-e55b-469a-8efd-84919d1a4f47": { - "type": "ImageData", - "commandMap": {}, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "4e1dd035-e55b-469a-8efd-84919d1a4f47", - "label": "liti_qingxin.png", - "path": "liti_qingxin.png", - "actualSize": 292441, - "resolution": { - "height": 2048, - "width": 1536 - }, - "compression": 0, - "level": 2 - }, - "86abd5a0-b037-4ae3-8e43-625ffc57ee43": { - "type": "ImageData", - "commandMap": {}, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "86abd5a0-b037-4ae3-8e43-625ffc57ee43", - "label": "eye_mult.png", - "path": "eye_mult.png", - "actualSize": 270010, - "resolution": { - "height": 2048, - "width": 1536 - }, - "compression": 0, - "level": 2 - }, - "2f904822-be62-405c-ad1b-91e51d3ee0ca": { - "type": "ImageData", - "commandMap": {}, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "2f904822-be62-405c-ad1b-91e51d3ee0ca", - "label": "yj.png", - "path": "yj.png", - "actualSize": 52614, - "resolution": { - "height": 2048, - "width": 1536 - }, - "level": 2 - }, - "e40218d9-1eb9-4e76-b71c-dbf1084a73d3": { - "type": "ImageData", - "commandMap": {}, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "e40218d9-1eb9-4e76-b71c-dbf1084a73d3", - "label": "mask_1.png", - "path": "mask_1.png", - "actualSize": 705527, - "resolution": { - "height": 2048, - "width": 1536 - }, - "compression": 0, - "level": 2 - }, - "a2520e66-3e8b-49bf-bd16-a26b9e5ae654": { - "type": "ImageData", - "commandMap": {}, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "a2520e66-3e8b-49bf-bd16-a26b9e5ae654", - "label": "zc.png", - "path": "zc.png", - "actualSize": 30981, - "resolution": { - "height": 2048, - "width": 1536 - }, - "compression": 0, - "level": 2 - }, - "b1983b43-cbe1-46ba-be68-1539092b0faf": { - "type": "PAGFileData", - "commandMap": {}, - "loopCount": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "NEAREST", - "minFilter": "NEAREST", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "b1983b43-cbe1-46ba-be68-1539092b0faf", - "label": "gougoubizi.pag", - "path": "gougoubizi.pag", - "duration": 1080000, - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "resolution": { - "width": 1536, - "height": 2048 - }, - "frameRate": 11.111114501953125, - "hasAudio": false, - "level": 2 - }, - "62b436c8-148a-4d42-be46-a1ed7471aae2": { - "type": "PAGFileData", - "commandMap": {}, - "loopCount": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "NEAREST", - "minFilter": "NEAREST", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "62b436c8-148a-4d42-be46-a1ed7471aae2", - "label": "gogo_bmp_1.pag", - "path": "gogo_bmp_1.pag", - "duration": 1000000, - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "resolution": { - "width": 720, - "height": 720 - }, - "frameRate": 24, - "hasAudio": false, - "level": 2 - }, - "800dcd22-e78f-4d20-9d25-a8c639e0c107": { - "type": "ImageData", - "commandMap": {}, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "800dcd22-e78f-4d20-9d25-a8c639e0c107", - "label": "gougousaihong.png", - "path": "gougousaihong.png", - "actualSize": 266517, - "resolution": { - "height": 2048, - "width": 1536 - }, - "compression": 0, - "level": 2 - }, - "099c357d-fa0a-44b7-852e-c725bd6bac70": { - "type": "PAGFileData", - "commandMap": {}, - "loopCount": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "NEAREST", - "minFilter": "NEAREST", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "099c357d-fa0a-44b7-852e-c725bd6bac70", - "label": "blbl.pag", - "path": "blbl.pag", - "duration": 1260000, - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "resolution": { - "width": 1085, - "height": 896 - }, - "frameRate": 11.111114501953125, - "hasAudio": false, - "level": 2 - }, - "a5cbc90b-28dc-40a6-9f08-f0ffa233a06c": { - "type": "folder", - "commandMap": {}, - "key": "a5cbc90b-28dc-40a6-9f08-f0ffa233a06c", - "label": "root", - "path": "./", - "level": 2 - }, - "ce01cc56-63c4-46bb-bf8f-b7985194143b": { - "type": "ImageData", - "commandMap": {}, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "ce01cc56-63c4-46bb-bf8f-b7985194143b", - "label": "eye.png", - "path": "eye.png", - "actualSize": 316638, - "resolution": { - "height": 2048, - "width": 1536 - }, - "compression": 0, - "level": 2 - }, - "76367a50-d377-4e2e-853f-fe9dd2162813": { - "type": "PAGFileData", - "commandMap": {}, - "loopCount": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "NEAREST", - "minFilter": "NEAREST", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "76367a50-d377-4e2e-853f-fe9dd2162813", - "label": "gougouerduo.pag", - "path": "gougouerduo.pag", - "duration": 1080000, - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "resolution": { - "width": 1536, - "height": 2048 - }, - "frameRate": 11.111114501953125, - "hasAudio": false, - "level": 2 - }, - "5145fe7d-8d32-47fe-a90d-2af27540bbf0": { - "type": "ImageData", - "commandMap": {}, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "5145fe7d-8d32-47fe-a90d-2af27540bbf0", - "label": "mouth.png", - "path": "mouth.png", - "actualSize": 104143, - "resolution": { - "height": 2048, - "width": 1536 - }, - "compression": 0, - "level": 2 - }, - "9047772b-d713-41f6-9c03-e803318db62d": { - "type": "default", - "commandMap": {}, - "key": "9047772b-d713-41f6-9c03-e803318db62d", - "label": "peachmask.2021-08-20-06-26-19-675Z.bak", - "path": "peachmask.2021-08-20-06-26-19-675Z.bak", - "level": 2 - }, - "20d79961-4f5a-4a39-be9d-f41ac8076d25": { - "type": "default", - "commandMap": {}, - "key": "20d79961-4f5a-4a39-be9d-f41ac8076d25", - "label": "peachmask.2021-08-31-07-21-00-494Z.bak", - "path": "peachmask.2021-08-31-07-21-00-494Z.bak", - "level": 2 - }, - "91ebcbf1-1c2d-4212-856f-a4723421a00b": { - "type": "js", - "commandMap": {}, - "key": "91ebcbf1-1c2d-4212-856f-a4723421a00b", - "label": "script.js", - "path": "script.js", - "level": 2, - "requireAbilities": [] - }, - "3d06b23d-d604-4f75-8962-83395bc49846": { - "type": "folder", - "commandMap": {}, - "key": "3d06b23d-d604-4f75-8962-83395bc49846", - "label": "scripts", - "path": "scripts", - "level": 2 - }, - "ef0f767a-8f23-4f56-9a22-81bd64853b6f": { - "type": "ImageData", - "commandMap": {}, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "ef0f767a-8f23-4f56-9a22-81bd64853b6f", - "label": "zc_crop.png", - "path": "zc_crop.png", - "actualSize": 10127, - "resolution": { - "height": 151, - "width": 296 - }, - "compression": 0, - "level": 2 - } - }, - "preset": {}, - "properties": { - "layout": { - "width": 720, - "height": 1280 - }, - "boundsTrackerPlaceHolders": [], - "musicIDs": [], - "fonts": [], - "movieConfig": { - "sourceType": 2, - "minClipAssetCount": 1, - "maxClipAssetCount": 999, - "minImageDuration": 1000000, - "maxImageDuration": 10000000, - "minVideoDuration": 2000000, - "preferredCoverTime": 1000000, - "originVolume": 1, - "cropEvents": [ - "SlowRhythmTrail" - ], - "imageCropSpace": 0, - "videoCropSpace": -1, - "disableEventsWhileTransition": true - }, - "materialConfigs": [], - "resourceIDs": [] - }, - "needStudioLibScript": true -} \ No newline at end of file diff --git a/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/template.png b/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/template.png deleted file mode 100755 index aee89f64..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/template.png and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/yj.png b/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/yj.png deleted file mode 100755 index 5afdddff..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/yj.png and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/zc.png b/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/zc.png deleted file mode 100755 index dc7eec18..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/zc.png and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/zc_crop.png b/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/zc_crop.png deleted file mode 100755 index 08529af9..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_diejia_dogmask/zc_crop.png and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_guifeiface/DeviceCameraTexture.tex b/application/App-UIKit/2dMotionRes.bundle/video_guifeiface/DeviceCameraTexture.tex deleted file mode 100644 index 119ca577..00000000 --- a/application/App-UIKit/2dMotionRes.bundle/video_guifeiface/DeviceCameraTexture.tex +++ /dev/null @@ -1,4 +0,0 @@ -{ - "type": "TextureData", - "key": "DeviceCameraTexture" -} \ No newline at end of file diff --git a/application/App-UIKit/2dMotionRes.bundle/video_guifeiface/RenderTarget.rdt b/application/App-UIKit/2dMotionRes.bundle/video_guifeiface/RenderTarget.rdt deleted file mode 100644 index a98616e9..00000000 --- a/application/App-UIKit/2dMotionRes.bundle/video_guifeiface/RenderTarget.rdt +++ /dev/null @@ -1 +0,0 @@ -{"type":"RenderTarget","path":"RenderTarget.rdt","key":"RenderTarget","input":"DeviceCameraTexture"} \ No newline at end of file diff --git a/application/App-UIKit/2dMotionRes.bundle/video_guifeiface/bgm.mp3 b/application/App-UIKit/2dMotionRes.bundle/video_guifeiface/bgm.mp3 deleted file mode 100644 index bec8c03f..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_guifeiface/bgm.mp3 and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_guifeiface/close_basic_beauty.js b/application/App-UIKit/2dMotionRes.bundle/video_guifeiface/close_basic_beauty.js deleted file mode 100644 index 1d254ef6..00000000 --- a/application/App-UIKit/2dMotionRes.bundle/video_guifeiface/close_basic_beauty.js +++ /dev/null @@ -1,13 +0,0 @@ -light.execute("light://js/AEJSBridge.js"); -(function () { - // 获取global对象 - var global = global || (function () { - return this; - }()); - var template = {}; - global.template = template; - - template.onTemplateInit = function () { - light._disableDefaultBeauty([BASIC_STRETCH, BASIC_LIQUIFY]); - } -}()) diff --git a/application/App-UIKit/2dMotionRes.bundle/video_guifeiface/params.json b/application/App-UIKit/2dMotionRes.bundle/video_guifeiface/params.json deleted file mode 100644 index a2ab68a8..00000000 --- a/application/App-UIKit/2dMotionRes.bundle/video_guifeiface/params.json +++ /dev/null @@ -1,207 +0,0 @@ -{ - "distortionList" : [ - { - "direction" : 2, - "distortion" : 3, - "strength" : 0.5, - "position" : 69, - "radius" : 300 - }, - { - "direction" : 0, - "distortion" : 2, - "strength" : 0.3, - "position" : 64, - "radius" : 200 - }, - { - "direction" : 3, - "distortion" : 3, - "strength" : 1, - "position" : 67, - "radius" : 60 - }, - { - "direction" : 1, - "distortion" : 3, - "strength" : 0.9, - "position" : 71, - "radius" : 80 - }, - { - "direction" : 0, - "distortion" : 2, - "strength" : 0.3, - "position" : 43, - "radius" : 125 - }, - { - "direction" : 0, - "distortion" : 2, - "strength" : 0.35, - "position" : 53, - "radius" : 125 - }, - { - "direction" : 4, - "distortion" : 3, - "strength" : 0.4, - "position" : 6, - "radius" : 150 - }, - { - "direction" : 4, - "distortion" : 3, - "strength" : 0.4, - "position" : 12, - "radius" : 150 - }, - { - "direction" : 4, - "distortion" : 3, - "strength" : 0.4, - "position" : 9, - "radius" : 300 - }, - { - "direction" : 0, - "distortion" : 2, - "strength" : 0.2, - "position" : 81, - "radius" : 200 - }, - { - "direction" : 3, - "distortion" : 3, - "strength" : 0.2, - "position" : 43, - "radius" : 250 - }, - { - "direction" : 1, - "distortion" : 3, - "strength" : 0.2, - "position" : 53, - "radius" : 250 - }, - { - "direction" : 2, - "distortion" : 3, - "strength" : 0.4, - "position" : 21, - "radius" : 80 - }, - { - "direction" : 2, - "distortion" : 3, - "strength" : 0.4, - "position" : 29, - "radius" : 80 - }, - { - "direction" : 4, - "distortion" : 3, - "strength" : 0.3, - "position" : 26, - "radius" : 100 - }, - { - "direction" : 4, - "distortion" : 3, - "strength" : 0.3, - "position" : 34, - "radius" : 100 - }, - { - "direction" : 3, - "distortion" : 3, - "strength" : 1, - "position" : 75, - "radius" : 60 - }, - { - "direction" : 1, - "distortion" : 3, - "strength" : 0.8, - "position" : 79, - "radius" : 60 - }, - { - "direction" : 2, - "distortion" : 3, - "strength" : 0.4, - "position" : 39, - "radius" : 60 - }, - { - "direction" : 2, - "distortion" : 3, - "strength" : 0.4, - "position" : 49, - "radius" : 60 - }, - { - "direction" : 1, - "distortion" : 3, - "strength" : 0.4, - "position" : 35, - "radius" : 80 - }, - { - "direction" : 3, - "distortion" : 3, - "strength" : 0.4, - "position" : 45, - "radius" : 80 - }, - { - "direction" : 2, - "distortion" : 3, - "strength" : 0.5, - "position" : 64, - "radius" : 100 - }, - { - "direction" : 1, - "distortion" : 3, - "strength" : 0.2, - "position" : 2, - "radius" : 200 - }, - { - "direction" : 3, - "distortion" : 3, - "strength" : 0.2, - "position" : 16, - "radius" : 200 - }, - { - "direction" : 7, - "distortion" : 3, - "strength" : 0.2, - "position" : 5, - "radius" : 200 - }, - { - "direction" : 8, - "distortion" : 3, - "strength" : 0.2, - "position" : 13, - "radius" : 200 - }, - { - "direction" : 3, - "distortion" : 3, - "strength" : 0.4, - "position" : 65, - "radius" : 60 - }, - { - "direction" : 1, - "distortion" : 3, - "strength" : 0.4, - "position" : 66, - "radius" : 60 - } - ] -} diff --git a/application/App-UIKit/2dMotionRes.bundle/video_guifeiface/template.json b/application/App-UIKit/2dMotionRes.bundle/video_guifeiface/template.json deleted file mode 100644 index 5cfd3099..00000000 --- a/application/App-UIKit/2dMotionRes.bundle/video_guifeiface/template.json +++ /dev/null @@ -1,429 +0,0 @@ -{ - "componentLevel": 3, - "madeIn": "LightStudio", - "root": { - "id": 16, - "name": "video_guifeiface", - "children": [ - { - "id": 17, - "name": "2D画板", - "children": [ - { - "id": 18, - "name": "人脸形变", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": false, - "enabled": true, - "entityId": 18, - "componentID": 4, - "objectEnabled": true - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "type": "FaceTracking", - "enabled": true, - "entityId": 18, - "componentID": 7, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "" - }, - { - "componentID": 5, - "enabled": true, - "entityId": 18, - "resourcePath": "a8c9b443-5df5-4d88-af26-36e5cb9fe5e3", - "strength": 1, - "type": "Liquefaction", - "version": 9 - }, - { - "type": "EntityIdentifier", - "name": "人脸形变", - "id": 18 - } - ] - }, - { - "id": 20, - "name": "音乐", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": false, - "enabled": true, - "entityId": 20, - "componentID": 9, - "objectEnabled": true - }, - { - "componentID": 10, - "enabled": true, - "entityId": 20, - "speed": 1, - "type": "AudioSource", - "version": 14, - "volume": 1, - "volumeEffects": [], - "audioSourceType": 1, - "src": "1c2ecb4f-e21d-4a8f-814e-d81d43d25685" - }, - { - "type": "EntityIdentifier", - "name": "音乐", - "id": 20 - } - ] - }, - { - "id": 21, - "name": "脚本", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 21, - "componentID": 0 - }, - { - "componentID": 6, - "enabled": true, - "entityId": 21, - "scriptPath": "edc0f68c-db96-48d4-abe0-bb9c006bc2d6", - "type": "Script", - "version": 2 - }, - { - "type": "EntityIdentifier", - "name": "脚本", - "id": 21 - } - ] - } - ], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "entityId": 17, - "componentID": 2, - "type": "ScreenTransform", - "enabled": true, - "version": 2, - "objectEnabled": true - }, - { - "componentID": 3, - "enabled": true, - "entityId": 17, - "renderTargetKey": "RenderTarget", - "type": "Camera", - "version": 2 - }, - { - "type": "EntityIdentifier", - "name": "2D画板", - "id": 17 - } - ] - } - ], - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "entityId": 16, - "componentID": 1, - "type": "ScreenTransform", - "enabled": true, - "version": 2, - "objectEnabled": true - }, - { - "type": "EntityIdentifier", - "name": "video_guifeiface", - "id": 16 - } - ], - "enabled": true, - "version": 0 - }, - "inputSources": { - "1c2ecb4f-e21d-4a8f-814e-d81d43d25685": { - "key": "1c2ecb4f-e21d-4a8f-814e-d81d43d25685", - "type": "AudioClipData", - "path": "bgm.mp3", - "rhythmPath": "", - "timeRange": { - "startTime": 0, - "duration": 95860000 - }, - "loopCount": -1 - }, - "RenderTarget": { - "key": "RenderTarget", - "type": "RenderTarget", - "path": "RenderTarget.rdt", - "label": "RenderTarget.rdt", - "inputKey": "DeviceCameraTexture" - }, - "DeviceCameraTexture": { - "key": "DeviceCameraTexture", - "type": "TextureData", - "path": "DeviceCameraTexture.tex", - "label": "DeviceCameraTexture.tex" - }, - "a8c9b443-5df5-4d88-af26-36e5cb9fe5e3": { - "key": "a8c9b443-5df5-4d88-af26-36e5cb9fe5e3", - "type": "JsonData", - "path": "params.json", - "label": "params.json" - }, - "edc0f68c-db96-48d4-abe0-bb9c006bc2d6": { - "key": "edc0f68c-db96-48d4-abe0-bb9c006bc2d6", - "type": "js", - "path": "close_basic_beauty.js", - "label": "close_basic_beauty.js" - }, - "46d4b6bb-a7f9-4f12-8ec4-af60f4976d43": { - "key": "46d4b6bb-a7f9-4f12-8ec4-af60f4976d43", - "type": "default", - "path": "template.studio.周一 12月 28 2020.bak", - "label": "template.studio.周一 12月 28 2020.bak" - } - }, - "preset": {}, - "properties": { - "layout": { - "width": 720, - "height": 1280 - }, - "boundsTrackerPlaceHolders": [], - "musicIDs": [], - "fonts": [], - "movieConfig": { - "sourceType": 2, - "minClipAssetCount": 1, - "maxClipAssetCount": 999, - "minImageDuration": 1000000, - "maxImageDuration": 10000000, - "minVideoDuration": 2000000, - "preferredCoverTime": 1000000, - "originVolume": 1 - }, - "resourceIDs": [] - } -} \ No newline at end of file diff --git a/application/App-UIKit/2dMotionRes.bundle/video_guifeiface/template.png b/application/App-UIKit/2dMotionRes.bundle/video_guifeiface/template.png deleted file mode 100644 index 3121d07b..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_guifeiface/template.png and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_guifeiface/template.studio b/application/App-UIKit/2dMotionRes.bundle/video_guifeiface/template.studio deleted file mode 100644 index 9b307946..00000000 --- a/application/App-UIKit/2dMotionRes.bundle/video_guifeiface/template.studio +++ /dev/null @@ -1,408 +0,0 @@ -{ - "name": "video_guifeiface", - "type": "empty", - "author": "", - "category": 1, - "scene": { - "id": 16, - "name": "video_guifeiface", - "children": [ - { - "id": 17, - "name": "2D画板", - "children": [ - { - "id": 18, - "name": "人脸形变", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": false, - "enabled": true, - "entityId": 18, - "componentID": 4, - "objectEnabled": true - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "type": "FaceTracking", - "enabled": true, - "entityId": 18, - "componentID": 7, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true - }, - { - "componentID": 5, - "enabled": true, - "entityId": 18, - "resourcePath": "a8c9b443-5df5-4d88-af26-36e5cb9fe5e3", - "strength": 1, - "type": "Liquefaction", - "version": 9 - } - ] - }, - { - "id": 20, - "name": "音乐", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": false, - "enabled": true, - "entityId": 20, - "componentID": 9, - "objectEnabled": true - }, - { - "componentID": 10, - "eAudioMeta": { - "rhythmPath": "", - "startTime": 0, - "duration": 95860000, - "enableRhythm": true - }, - "eAudioType": 1, - "eHasVolumeEffects": false, - "eKey": "audioSource", - "enabled": true, - "entityId": 20, - "speed": 1, - "type": "AudioSource", - "version": 13, - "volume": 1, - "volumeEffects": [ - { - "duration": 2000000, - "eAlignMode": 2, - "end": 1, - "endOffset": 0, - "interpolationType": 1, - "start": 1, - "startOffset": 0 - } - ], - "ePath": "1c2ecb4f-e21d-4a8f-814e-d81d43d25685", - "audioSourceType": 1 - } - ] - }, - { - "id": 21, - "name": "脚本", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 21, - "componentID": 0 - }, - { - "componentID": 6, - "enabled": true, - "entityId": 21, - "scriptPath": "edc0f68c-db96-48d4-abe0-bb9c006bc2d6", - "type": "Script", - "version": 2 - } - ] - } - ], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "entityId": 17, - "componentID": 2, - "type": "ScreenTransform", - "enabled": true, - "version": 2, - "objectEnabled": true - }, - { - "componentID": 3, - "enabled": true, - "entityId": 17, - "renderTargetKey": "RenderTarget", - "type": "Camera", - "version": 2 - } - ] - } - ], - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 0, - "x": 0, - "y": 0, - "z": 0 - }, - "entityId": 16, - "componentID": 1, - "type": "ScreenTransform", - "enabled": true, - "version": 2, - "objectEnabled": true - } - ], - "enabled": true, - "version": 0 - }, - "path": "/Users/kesenhu/Desktop/aekit_materials/repo/wesee/video_guifeiface/", - "resources": { - "items": [ - { - "key": "1c2ecb4f-e21d-4a8f-814e-d81d43d25685", - "type": "AudioClipData", - "path": "bgm.mp3", - "label": "bgm.mp3", - "timeRange": { - "startTime": 0, - "duration": 95869388 - }, - "loopCount": 0 - }, - { - "key": "DeviceCameraTexture", - "type": "TextureData", - "path": "DeviceCameraTexture.tex", - "label": "DeviceCameraTexture.tex" - }, - { - "key": "a8c9b443-5df5-4d88-af26-36e5cb9fe5e3", - "type": "JsonData", - "path": "params.json", - "label": "params.json" - }, - { - "key": "RenderTarget", - "type": "RenderTarget", - "path": "RenderTarget.rdt", - "label": "RenderTarget.rdt", - "inputKey": "DeviceCameraTexture" - }, - { - "key": "46d4b6bb-a7f9-4f12-8ec4-af60f4976d43", - "type": "default", - "path": "template.studio.周一 12月 28 2020.bak", - "label": "template.studio.周一 12月 28 2020.bak" - }, - { - "key": "edc0f68c-db96-48d4-abe0-bb9c006bc2d6", - "type": "js", - "path": "close_basic_beauty.js", - "label": "close_basic_beauty.js" - } - ] - }, - "componentLevel": 3, - "cloudResourceData": [] -} \ No newline at end of file diff --git a/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/DeviceCameraTexture.tex b/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/DeviceCameraTexture.tex deleted file mode 100644 index 119ca577..00000000 --- a/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/DeviceCameraTexture.tex +++ /dev/null @@ -1,4 +0,0 @@ -{ - "type": "TextureData", - "key": "DeviceCameraTexture" -} \ No newline at end of file diff --git a/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/RenderTarget.rdt b/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/RenderTarget.rdt deleted file mode 100644 index a98616e9..00000000 --- a/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/RenderTarget.rdt +++ /dev/null @@ -1 +0,0 @@ -{"type":"RenderTarget","path":"RenderTarget.rdt","key":"RenderTarget","input":"DeviceCameraTexture"} \ No newline at end of file diff --git a/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/bgm.mp3 b/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/bgm.mp3 deleted file mode 100644 index 75617052..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/bgm.mp3 and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/biaoqingbao1.pag b/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/biaoqingbao1.pag deleted file mode 100644 index 5b227e1c..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/biaoqingbao1.pag and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/biaoqingbao2.pag b/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/biaoqingbao2.pag deleted file mode 100644 index 6027d918..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/biaoqingbao2.pag and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/dengguang.pag b/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/dengguang.pag deleted file mode 100644 index 8cca6ee2..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/dengguang.pag and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/filterEffect.lut.png b/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/filterEffect.lut.png deleted file mode 100644 index c19d4685..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/filterEffect.lut.png and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/guang.pag b/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/guang.pag deleted file mode 100644 index e24d8691..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/guang.pag and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/kuang_0.png b/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/kuang_0.png deleted file mode 100644 index f37302c7..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/kuang_0.png and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/lvse.png b/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/lvse.png deleted file mode 100644 index e5f3f27b..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/lvse.png and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/multiply.png b/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/multiply.png deleted file mode 100644 index d323e1b4..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/multiply.png and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/mv.json b/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/mv.json deleted file mode 100644 index 337fda6d..00000000 --- a/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/mv.json +++ /dev/null @@ -1,141 +0,0 @@ -{ - "parts": [ - { - "duration": 4.7, - "background": { - "type": 2, - "videoFile": "", - "videoAlphaType": 0, - "imageName": "", - "imageCount": 0, - "imageDuration": 0.0, - "aspectMode": 0, - "blendMode": 0 - }, - "cameraFrame": { - "scale": { - "0.0": 1.0, - "1.0": 1.0 - }, - "rotate": { - "0.0": 0, - "1.0": 0 - }, - "gridSettingFile": { - "0.0": "", - "1.0": "" - }, - "gridType": { - "0.0": 0, - "1.0": 0 - }, - "gridMode": { - "0.0": 1, - "1.0": 1 - }, - "easeCurve": 0 - }, - "cover": { - "imageFile": "", - "aspectMode": 0, - "blendMode": 0 - }, - "foreground": { - "videoFile": "", - "videoAlphaType": 1, - "imageName": "", - "imageCount": 0, - "imageDuration": 0, - "aspectMode": 0, - "blendMode": 1 - }, - "filterEffect": { - "type": 0, - "fid": "", - "lutFile": "" - }, - "finishTransition": { - "triggerType": 0, - "duration": 0.0, - "easeCurve": 2, - "transitionFunction": 0, - "maskVideoFile": "", - "maskVideoAlphaType": 0, - "maskImageName": "", - "maskImageCount": 0, - "maskImageDuration": 0.0, - "maskType": 1, - "blurRadius": 0.0 - } - }, - { - "duration": 18.3, - "background": { - "type": 2, - "videoFile": "", - "videoAlphaType": 0, - "imageName": "", - "imageCount": 0, - "imageDuration": 0.0, - "aspectMode": 0, - "blendMode": 0 - }, - "cameraFrame": { - "scale": { - "0.0": 1.0, - "1.0": 1.0 - }, - "rotate": { - "0.0": 0, - "1.0": 0 - }, - "gridSettingFile": { - "0.0": "", - "1.0": "" - }, - "gridType": { - "0.0": 0, - "1.0": 0 - }, - "gridMode": { - "0.0": 1, - "1.0": 1 - }, - "easeCurve": 0 - }, - "cover": { - "imageFile": "", - "aspectMode": 0, - "blendMode": 0 - }, - "foreground": { - "videoFile": "", - "videoAlphaType": 1, - "imageName": "", - "imageCount": 0, - "imageDuration": 0, - "aspectMode": 0, - "blendMode": 1 - }, - "filterEffect": { - "type": 0, - "fid": "", - "lutFile": "" - }, - "finishTransition": { - "triggerType": 0, - "duration": 0.0, - "easeCurve": 2, - "transitionFunction": 0, - "maskVideoFile": "", - "maskVideoAlphaType": 0, - "maskImageName": "", - "maskImageCount": 0, - "maskImageDuration": 0.0, - "maskType": 1, - "blurRadius": 0.0 - } - } - ], - "bgmAudio": "" -} \ No newline at end of file diff --git a/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/script.js b/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/script.js deleted file mode 100644 index 6a1df060..00000000 --- a/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/script.js +++ /dev/null @@ -1,126 +0,0 @@ -(function(){ - //定义素材对象 - //并挂在global对象下 - var global = global || (function () { return this; }()); - var template = {}; - global.template=template; - - var resourcePool = { - "bgm": new Resource("bgm.mp3"), - "biaoqingbao1": new Resource("biaoqingbao1.pag"), - "biaoqingbao2": new Resource("biaoqingbao2.pag"), - "dengguang": new Resource("dengguang.pag"), - "DeviceCameraTexture": new Resource("DeviceCameraTexture.tex"), - "filterEffect": new Resource("filterEffect.lut.png"), - "guang": new Resource("guang.pag"), - "kuang_0": new Resource("kuang_0.png"), - "lvse": new Resource("lvse.png"), - "multiply": new Resource("multiply.png"), - "mv": new Resource("mv.json"), - "RenderTarget": new Resource("RenderTarget.rdt"), - "shu": new Resource("shu.pag"), - "shuzhuo_0": new Resource("shuzhuo_0.png"), - "yanjing": new Resource("yanjing.pag"), - "yanjing1_0": new Resource("yanjing1_0.png"), - "zc1": new Resource("zc1.pag"), - "zc2": new Resource("zc2.pag"), - "zhuangshi": new Resource("zhuangshi.pag") -}; - global.resourcePool=resourcePool; - - template.actionList = []; - template.oneLoopTime = 23000;//999s - template.lastTime = 0; - template.needAction = function(action) { - var needAction = template.actionList.indexOf(action) == -1; - if (needAction) { - template.actionList.push(action); - } - return needAction; - } - template.resetAction = function() { - template.actionList = []; - } - template.onTemplateInit = function(entityManager, eventManager) { - template.zc1_Image = light.getComponent(entityManager.getEntity(24), "Image"); - template.dengguang_Image = light.getComponent(entityManager.getEntity(23), "Image"); - template.zhuangshi_Image = light.getComponent(entityManager.getEntity(22), "Image"); - template.yanjing_Image = light.getComponent(entityManager.getEntity(21), "Image"); - template.biaoqingbao1_Image = light.getComponent(entityManager.getEntity(20), "Image"); - template.kuang_0_Image = light.getComponent(entityManager.getEntity(19), "Image"); - //开启性别检测 - - template.script_component_1 = light.getComponent(entityManager.getEntity(28), "Script"); - - // 初始化Component的值 - let aiRequire = new light.VectorString(); - aiRequire.add("Gender"); - template.script_component_1.aiRequire = aiRequire; - - eventManager.emit(new light.ScriptOpenAIEvent(entityManager, aiRequire)); - - template.multiply_MakeupFace = light.getComponent(entityManager.getEntity(25), "MakeupFace"); - template.multiply_MakeupFace.enabled = false ; - template.lvse_MakeupFace = light.getComponent(entityManager.getEntity(26), "MakeupFace"); - template.lvse_MakeupFace.enabled = false ; - template.shuzhuo_0_Image = light.getComponent(entityManager.getEntity(54), "Image"); - template.shuzhuo_0_Image.enabled = false; - template.guang_Image = light.getComponent(entityManager.getEntity(51), "Image"); - template.guang_Image.enabled = false; - } - //订阅感兴趣的人脸分类 - template.onFacedetected=function(){ - } - template.setSrcAndReset = function(component, resource, currentTime, entityManager, eventManager) { - component.enabled = true; - component.src = resource.key; - eventManager.emit(new light.ResetPagEvent(resource.key, currentTime * 1000, entityManager)); - } - //每帧调用 传入参数为开始加载素材至调用该函数经过的时间 - template.onFrameUpdate = function(currentTime, entityManager, eventManager) { - //此处处理MV循环逻辑,修改template.oneLoopTime设置一次MV的总时长 - var time = currentTime % template.oneLoopTime; - if(time < template.lastTime){ - template.resetAction(); - } - template.lastTime = time; - //action0:初始化片段 - if(time > 0){ - if (template.needAction("action0")) { - template.kuang_0_Image.enabled = true; - template.setSrcAndReset(template.biaoqingbao1_Image, resourcePool.biaoqingbao1, currentTime, entityManager, eventManager); - template.setSrcAndReset(template.yanjing_Image, resourcePool.yanjing, currentTime, entityManager, eventManager); - template.zhuangshi_Image.enabled = true; - template.shuzhuo_0_Image.enabled = false; - template.setSrcAndReset(template.dengguang_Image, resourcePool.dengguang, currentTime, entityManager, eventManager); - template.guang_Image.enabled = false; - template.setSrcAndReset(template.zc1_Image, resourcePool.zc1, currentTime, entityManager, eventManager); - return; - } - } - //action1:1.9秒后,触发以下片段 - if (time > 4731){ - if (template.needAction("action1")) { - template.kuang_0_Image.enabled = false; - template.setSrcAndReset(template.biaoqingbao1_Image, resourcePool.biaoqingbao2, currentTime, entityManager, eventManager); - template.setSrcAndReset(template.yanjing_Image, resourcePool.yanjing1_0, currentTime, entityManager, eventManager); - template.zhuangshi_Image.enabled = false; - template.shuzhuo_0_Image.enabled = true; - template.setSrcAndReset(template.dengguang_Image, resourcePool.shu, currentTime, entityManager, eventManager); - template.setSrcAndReset(template.guang_Image, resourcePool.guang, currentTime, entityManager, eventManager); - //template.setSrcAndReset(template.zc1_Image, resourcePool.zc2, currentTime, entityManager, eventManager); - template.zc1_Image.enabled = false; - return; - } - } - } - //检测性别函数 常用于屏蔽掉男性脸上的妆容 - template.onFemale = function() { - template.multiply_MakeupFace.enabled = true ; - template.lvse_MakeupFace.enabled = true ; - } - template.onMale = function() { - template.multiply_MakeupFace.enabled = false ; - template.lvse_MakeupFace.enabled = false ; - } -} ()); diff --git a/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/shu.pag b/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/shu.pag deleted file mode 100644 index ac5dcd25..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/shu.pag and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/shuzhuo_0.png b/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/shuzhuo_0.png deleted file mode 100644 index 4956d55c..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/shuzhuo_0.png and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/template.json b/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/template.json deleted file mode 100644 index 49b7d3ec..00000000 --- a/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/template.json +++ /dev/null @@ -1,1406 +0,0 @@ -{ - "componentLevel": 2, - "madeIn": "LightStudio", - "root": { - "id": 16, - "name": "拍摄模板", - "children": [ - { - "id": 17, - "name": "2D图层", - "children": [ - { - "id": 27, - "name": "滤镜", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 27, - "componentID": 33 - }, - { - "componentID": 34, - "enabled": true, - "entityId": 27, - "intensity": 1, - "src": "5ee72435-e70c-4892-9f4c-008323a9ec26", - "type": "LUTFilter", - "version": 2 - }, - { - "type": "EntityIdentifier", - "name": "滤镜", - "id": 27 - } - ] - }, - { - "id": 18, - "name": "bgm", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 18, - "componentID": 0 - }, - { - "speed": 1, - "volume": 1, - "volumeEffects": [], - "type": "AudioSource", - "enabled": true, - "entityId": 18, - "componentID": 4, - "src": "278e23b7-0f23-4d65-8337-eb479197fb63", - "version": null, - "audioSourceType": 1 - }, - { - "type": "EntityIdentifier", - "name": "bgm", - "id": 18 - } - ] - }, - { - "id": 25, - "name": "脸妆", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 25, - "componentID": 25 - }, - { - "componentID": 26, - "enabled": true, - "entityId": 25, - "faceImage": "6e5c00c6-12a5-4a49-b11e-aca00cefbed9", - "faceMask": "default", - "maskImage": "", - "type": "MakeupFace", - "version": 2 - }, - { - "alpha": 1, - "componentID": 27, - "enabled": true, - "entityId": 25, - "mode": "multiply", - "type": "BlendMode", - "version": 2 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "type": "FaceTracking", - "enabled": true, - "entityId": 25, - "componentID": 28, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "female" - }, - { - "type": "EntityIdentifier", - "name": "脸妆", - "id": 25 - } - ] - }, - { - "id": 26, - "name": "脸妆", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 26, - "componentID": 29 - }, - { - "componentID": 30, - "enabled": true, - "entityId": 26, - "faceImage": "ffadd129-58e9-4976-856d-37818820d6c1", - "faceMask": "default", - "maskImage": "", - "type": "MakeupFace", - "version": 2 - }, - { - "alpha": 1, - "componentID": 31, - "enabled": true, - "entityId": 26, - "mode": "screen", - "type": "BlendMode", - "version": 2 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "type": "FaceTracking", - "enabled": true, - "entityId": 26, - "componentID": 32, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "female" - }, - { - "type": "EntityIdentifier", - "name": "脸妆", - "id": 26 - } - ] - }, - { - "id": 19, - "name": "前景贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 19, - "type": "ScreenTransform", - "version": 3, - "enabled": true, - "componentID": 5 - }, - { - "componentID": 6, - "enabled": true, - "entityId": 19, - "scaleMode": 1, - "src": "2e99fbae-cd6c-4194-87fe-3c5ca95c0ea6", - "type": "Image", - "version": 2 - }, - { - "alpha": 1, - "mode": "normal", - "type": "BlendMode", - "enabled": true, - "entityId": 19, - "componentID": 7 - }, - { - "type": "EntityIdentifier", - "name": "前景贴纸", - "id": 19 - } - ] - }, - { - "id": 20, - "name": "人脸跟随贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "offset": { - "bottom": 111.40996337890627, - "left": -148.19998413085938, - "right": 121.80001586914062, - "top": 381.4099633789061 - }, - "pivot": { - "x": 0.09777766022858798, - "y": -1.8252589879918986 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 20, - "type": "ScreenTransform", - "enabled": true, - "version": 824, - "componentID": 8 - }, - { - "componentID": 9, - "enabled": true, - "entityId": 20, - "scaleMode": 1, - "src": "17f6867f-e9b1-495c-b4b1-ffdba9fd86e0", - "type": "Image", - "version": 2 - }, - { - "alpha": 1, - "mode": "normal", - "type": "BlendMode", - "enabled": true, - "entityId": 20, - "componentID": 10 - }, - { - "alignPoints": [ - 89 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "type": "FaceTracking", - "enabled": true, - "entityId": 20, - "componentID": 11, - "version": 2, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true - }, - { - "type": "EntityIdentifier", - "name": "人脸跟随贴纸", - "id": 20 - } - ] - }, - { - "id": 21, - "name": "人脸跟随贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "offset": { - "bottom": -512, - "left": -326.4, - "right": 313.6, - "top": 128 - }, - "pivot": { - "x": 0.019999999999999928, - "y": 0.6 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 21, - "componentID": 12, - "type": "ScreenTransform", - "enabled": true, - "version": 522 - }, - { - "componentID": 13, - "enabled": true, - "entityId": 21, - "scaleMode": 1, - "src": "b9340685-a23e-401b-a018-2f597c495038", - "type": "Image", - "version": 2 - }, - { - "alpha": 1, - "mode": "normal", - "type": "BlendMode", - "enabled": true, - "entityId": 21, - "componentID": 14 - }, - { - "alignPoints": [ - 83 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "type": "FaceTracking", - "enabled": true, - "entityId": 21, - "componentID": 15, - "version": 1, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true - }, - { - "type": "EntityIdentifier", - "name": "人脸跟随贴纸", - "id": 21 - } - ] - }, - { - "id": 22, - "name": "前景贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 22, - "type": "ScreenTransform", - "version": 3, - "enabled": true, - "componentID": 16 - }, - { - "componentID": 17, - "enabled": true, - "entityId": 22, - "scaleMode": 1, - "src": "01f71ce3-3670-4c60-9583-e932f932db49", - "type": "Image", - "version": 2 - }, - { - "alpha": 1, - "componentID": 18, - "enabled": true, - "entityId": 22, - "mode": "add", - "type": "BlendMode", - "version": 2 - }, - { - "type": "EntityIdentifier", - "name": "前景贴纸", - "id": 22 - } - ] - }, - { - "id": 54, - "name": "前景贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 54, - "componentID": 40, - "type": "ScreenTransform", - "enabled": true, - "version": 2 - }, - { - "componentID": 41, - "enabled": true, - "entityId": 54, - "scaleMode": 1, - "src": "9b1f8fbd-5183-4c1b-b6a8-c41686ad3cdd", - "type": "Image", - "version": 6 - }, - { - "alpha": 1, - "mode": "normal", - "type": "BlendMode", - "enabled": true, - "entityId": 54, - "componentID": 42 - }, - { - "type": "EntityIdentifier", - "name": "前景贴纸", - "id": 54 - } - ] - }, - { - "id": 23, - "name": "前景贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 23, - "type": "ScreenTransform", - "version": 3, - "enabled": true, - "componentID": 19 - }, - { - "componentID": 20, - "enabled": true, - "entityId": 23, - "scaleMode": 1, - "src": "269c2e42-cf0b-4cd0-90f0-181b51b6f6a6", - "type": "Image", - "version": 2 - }, - { - "alpha": 1, - "componentID": 21, - "enabled": true, - "entityId": 23, - "mode": "add", - "type": "BlendMode", - "version": 2 - }, - { - "type": "EntityIdentifier", - "name": "前景贴纸", - "id": 23 - } - ] - }, - { - "id": 51, - "name": "前景贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 51, - "componentID": 37, - "type": "ScreenTransform", - "enabled": true, - "version": 2 - }, - { - "componentID": 38, - "enabled": true, - "entityId": 51, - "scaleMode": 1, - "src": "c068e5d5-7207-49fb-820c-f531f432e9a2", - "type": "Image", - "version": 4 - }, - { - "alpha": 1, - "mode": "normal", - "type": "BlendMode", - "enabled": true, - "entityId": 51, - "componentID": 39 - }, - { - "type": "EntityIdentifier", - "name": "前景贴纸", - "id": 51 - } - ] - }, - { - "id": 24, - "name": "前景贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 24, - "type": "ScreenTransform", - "version": 3, - "enabled": true, - "componentID": 22 - }, - { - "componentID": 23, - "enabled": true, - "entityId": 24, - "scaleMode": 1, - "src": "707313d4-44c3-41f8-945d-4069a4b9b5aa", - "type": "Image", - "version": 2 - }, - { - "alpha": 1, - "mode": "normal", - "type": "BlendMode", - "enabled": true, - "entityId": 24, - "componentID": 24 - }, - { - "type": "EntityIdentifier", - "name": "前景贴纸", - "id": 24 - } - ] - }, - { - "id": 28, - "name": "脚本", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 28, - "componentID": 35 - }, - { - "componentID": 36, - "enabled": true, - "entityId": 28, - "scriptPath": "9a3e71ae-9208-4cdc-b9af-82ebdc951061", - "type": "Script", - "version": 2 - }, - { - "type": "EntityIdentifier", - "name": "脚本", - "id": 28 - } - ] - } - ], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 17, - "componentID": 2, - "type": "ScreenTransform", - "enabled": true, - "version": 4 - }, - { - "componentID": 3, - "enabled": true, - "entityId": 17, - "renderTargetKey": "RenderTarget", - "type": "Camera", - "version": 2 - }, - { - "type": "EntityIdentifier", - "name": "2D图层", - "id": 17 - } - ] - } - ], - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 16, - "componentID": 1, - "type": "ScreenTransform", - "enabled": true, - "version": 4 - }, - { - "type": "EntityIdentifier", - "name": "拍摄模板", - "id": 16 - } - ], - "enabled": true, - "version": 0 - }, - "inputSources": { - "278e23b7-0f23-4d65-8337-eb479197fb63": { - "key": "278e23b7-0f23-4d65-8337-eb479197fb63", - "type": "AudioClipData", - "path": "bgm.mp3", - "label": "bgm.mp3", - "timeRange": { - "startTime": 0, - "duration": 23072000 - }, - "loopCount": -1 - }, - "RenderTarget": { - "key": "RenderTarget", - "type": "RenderTarget", - "path": "RenderTarget.rdt", - "label": "RenderTarget.rdt", - "inputKey": "DeviceCameraTexture" - }, - "DeviceCameraTexture": { - "key": "DeviceCameraTexture", - "type": "TextureData", - "path": "DeviceCameraTexture.tex", - "label": "DeviceCameraTexture.tex" - }, - "5ee72435-e70c-4892-9f4c-008323a9ec26": { - "key": "5ee72435-e70c-4892-9f4c-008323a9ec26", - "type": "ImageData", - "path": "filterEffect.lut.png", - "label": "filterEffect.lut.png" - }, - "6e5c00c6-12a5-4a49-b11e-aca00cefbed9": { - "key": "6e5c00c6-12a5-4a49-b11e-aca00cefbed9", - "type": "ImageData", - "path": "multiply.png", - "label": "multiply.png" - }, - "ffadd129-58e9-4976-856d-37818820d6c1": { - "key": "ffadd129-58e9-4976-856d-37818820d6c1", - "type": "ImageData", - "path": "lvse.png", - "label": "lvse.png" - }, - "2e99fbae-cd6c-4194-87fe-3c5ca95c0ea6": { - "key": "2e99fbae-cd6c-4194-87fe-3c5ca95c0ea6", - "type": "ImageData", - "path": "kuang_0.png", - "label": "kuang_0.png" - }, - "17f6867f-e9b1-495c-b4b1-ffdba9fd86e0": { - "key": "17f6867f-e9b1-495c-b4b1-ffdba9fd86e0", - "type": "PAGFileData", - "path": "biaoqingbao1.pag", - "label": "biaoqingbao1.pag", - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "loopCount": -1 - }, - "b9340685-a23e-401b-a018-2f597c495038": { - "key": "b9340685-a23e-401b-a018-2f597c495038", - "type": "PAGFileData", - "path": "yanjing.pag", - "label": "yanjing.pag", - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "loopCount": 1 - }, - "01f71ce3-3670-4c60-9583-e932f932db49": { - "key": "01f71ce3-3670-4c60-9583-e932f932db49", - "type": "PAGFileData", - "path": "zhuangshi.pag", - "label": "zhuangshi.pag", - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "loopCount": -1 - }, - "9b1f8fbd-5183-4c1b-b6a8-c41686ad3cdd": { - "key": "9b1f8fbd-5183-4c1b-b6a8-c41686ad3cdd", - "type": "ImageData", - "path": "shuzhuo_0.png", - "label": "shuzhuo_0.png" - }, - "269c2e42-cf0b-4cd0-90f0-181b51b6f6a6": { - "key": "269c2e42-cf0b-4cd0-90f0-181b51b6f6a6", - "type": "PAGFileData", - "path": "dengguang.pag", - "label": "dengguang.pag", - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "loopCount": 1 - }, - "c068e5d5-7207-49fb-820c-f531f432e9a2": { - "key": "c068e5d5-7207-49fb-820c-f531f432e9a2", - "type": "PAGFileData", - "path": "guang.pag", - "label": "guang.pag", - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "loopCount": -1 - }, - "707313d4-44c3-41f8-945d-4069a4b9b5aa": { - "key": "707313d4-44c3-41f8-945d-4069a4b9b5aa", - "type": "PAGFileData", - "path": "zc1.pag", - "label": "zc1.pag", - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "loopCount": 1 - }, - "9a3e71ae-9208-4cdc-b9af-82ebdc951061": { - "key": "9a3e71ae-9208-4cdc-b9af-82ebdc951061", - "type": "js", - "path": "script.js", - "label": "script.js" - }, - "04313fcd-91c6-4130-8384-87bcd9c7dde0": { - "key": "04313fcd-91c6-4130-8384-87bcd9c7dde0", - "type": "PAGFileData", - "path": "biaoqingbao2.pag", - "label": "biaoqingbao2.pag", - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "loopCount": -1 - }, - "d4ac3707-a56c-479b-9809-91159c98e2f1": { - "key": "d4ac3707-a56c-479b-9809-91159c98e2f1", - "type": "JsonData", - "path": "mv.json", - "label": "mv.json" - }, - "2b672568-6cbe-4a15-8ba4-b4b3f144d8bc": { - "key": "2b672568-6cbe-4a15-8ba4-b4b3f144d8bc", - "type": "PAGFileData", - "path": "shu.pag", - "label": "shu.pag", - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "loopCount": -1 - }, - "1ed36222-a578-46c6-907c-3a1e10dd882f": { - "key": "1ed36222-a578-46c6-907c-3a1e10dd882f", - "type": "ImageData", - "path": "yanjing1_0.png", - "label": "yanjing1_0.png" - }, - "e4d1adb1-113f-449e-aa75-b63aae1a8729": { - "key": "e4d1adb1-113f-449e-aa75-b63aae1a8729", - "type": "PAGFileData", - "path": "zc2.pag", - "label": "zc2.pag", - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "loopCount": 1 - }, - "463fe47d-2859-4b6c-b4e9-e4298c41a00a": { - "key": "463fe47d-2859-4b6c-b4e9-e4298c41a00a", - "type": "ImageData", - "path": "thumbImage.png", - "label": "thumbImage.png" - }, - "43b317ad-2190-4618-9d95-9da4e96067cc": { - "key": "43b317ad-2190-4618-9d95-9da4e96067cc", - "type": "ImageData", - "path": "transparent.png", - "label": "transparent.png" - } - }, - "preset": {}, - "properties": { - "layout": { - "width": 720, - "height": 1280 - }, - "boundsTrackerPlaceHolders": [], - "musicIDs": [], - "fonts": [], - "movieConfig": { - "sourceType": 2, - "minClipAssetCount": 1, - "maxClipAssetCount": 999, - "minImageDuration": 1000000, - "maxImageDuration": 10000000, - "minVideoDuration": 2000000, - "preferredCoverTime": 1000000, - "originVolume": 1 - }, - "resourceIDs": [] - } -} \ No newline at end of file diff --git a/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/template.png b/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/template.png deleted file mode 100644 index 1e1e030a..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/template.png and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/template.studio b/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/template.studio deleted file mode 100644 index af564e67..00000000 --- a/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/template.studio +++ /dev/null @@ -1,1334 +0,0 @@ -{ - "name": "拍摄模板", - "type": "empty", - "author": "", - "category": 1, - "scene": { - "id": 16, - "name": "拍摄模板", - "children": [ - { - "id": 17, - "name": "2D图层", - "children": [ - { - "id": 27, - "name": "滤镜", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 27, - "componentID": 33 - }, - { - "componentID": 34, - "enabled": true, - "entityId": 27, - "intensity": 1, - "src": "5ee72435-e70c-4892-9f4c-008323a9ec26", - "type": "LUTFilter", - "version": 2 - } - ] - }, - { - "id": 18, - "name": "bgm", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 18, - "componentID": 0 - }, - { - "eAudioType": 1, - "eKey": "audioSource", - "speed": 1, - "volume": 1, - "eHasVolumeEffects": false, - "eAudioMeta": { - "startTime": null, - "duration": null, - "rhythmPath": "", - "enableRhythm": true - }, - "volumeEffects": [ - { - "eAlignMode": 2, - "startOffset": 0, - "duration": 2000000, - "endOffset": 0, - "start": 1, - "end": 1, - "interpolationType": 1 - } - ], - "type": "AudioSource", - "enabled": true, - "ePath": "278e23b7-0f23-4d65-8337-eb479197fb63", - "entityId": 18, - "componentID": 4, - "audioSourceType": 1 - } - ] - }, - { - "id": 25, - "name": "脸妆", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 25, - "componentID": 25 - }, - { - "componentID": 26, - "enabled": true, - "entityId": 25, - "faceImage": "6e5c00c6-12a5-4a49-b11e-aca00cefbed9", - "faceMask": "default", - "maskImage": "", - "type": "MakeupFace", - "version": 2 - }, - { - "alpha": 1, - "componentID": 27, - "enabled": true, - "entityId": 25, - "mode": "multiply", - "type": "BlendMode", - "version": 2 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "type": "FaceTracking", - "enabled": true, - "entityId": 25, - "componentID": 28, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "female" - } - ] - }, - { - "id": 26, - "name": "脸妆", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 26, - "componentID": 29 - }, - { - "componentID": 30, - "enabled": true, - "entityId": 26, - "faceImage": "ffadd129-58e9-4976-856d-37818820d6c1", - "faceMask": "default", - "maskImage": "", - "type": "MakeupFace", - "version": 2 - }, - { - "alpha": 1, - "componentID": 31, - "enabled": true, - "entityId": 26, - "mode": "screen", - "type": "BlendMode", - "version": 2 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "type": "FaceTracking", - "enabled": true, - "entityId": 26, - "componentID": 32, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "female" - } - ] - }, - { - "id": 19, - "name": "前景贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 19, - "type": "ScreenTransform", - "version": 3, - "enabled": true, - "componentID": 5 - }, - { - "componentID": 6, - "enabled": true, - "entityId": 19, - "scaleMode": 1, - "src": "2e99fbae-cd6c-4194-87fe-3c5ca95c0ea6", - "type": "Image", - "version": 2 - }, - { - "alpha": 1, - "mode": "normal", - "type": "BlendMode", - "enabled": true, - "entityId": 19, - "componentID": 7 - } - ] - }, - { - "id": 20, - "name": "人脸跟随贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "offset": { - "bottom": 111.40996337890627, - "left": -148.19998413085938, - "right": 121.80001586914062, - "top": 381.4099633789061 - }, - "pivot": { - "x": 0.09777766022858798, - "y": -1.8252589879918986 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 20, - "type": "ScreenTransform", - "enabled": true, - "version": 824, - "componentID": 8 - }, - { - "componentID": 9, - "enabled": true, - "entityId": 20, - "scaleMode": 1, - "src": "17f6867f-e9b1-495c-b4b1-ffdba9fd86e0", - "type": "Image", - "version": 2 - }, - { - "alpha": 1, - "mode": "normal", - "type": "BlendMode", - "enabled": true, - "entityId": 20, - "componentID": 10 - }, - { - "alignPoints": [ - 89 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "type": "FaceTracking", - "enabled": true, - "entityId": 20, - "componentID": 11, - "version": 2, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true - } - ] - }, - { - "id": 21, - "name": "人脸跟随贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "offset": { - "bottom": -512, - "left": -326.4, - "right": 313.6, - "top": 128 - }, - "pivot": { - "x": 0.019999999999999928, - "y": 0.6 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 21, - "componentID": 12, - "type": "ScreenTransform", - "enabled": true, - "version": 522 - }, - { - "componentID": 13, - "enabled": true, - "entityId": 21, - "scaleMode": 1, - "src": "b9340685-a23e-401b-a018-2f597c495038", - "type": "Image", - "version": 2 - }, - { - "alpha": 1, - "mode": "normal", - "type": "BlendMode", - "enabled": true, - "entityId": 21, - "componentID": 14 - }, - { - "alignPoints": [ - 83 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "type": "FaceTracking", - "enabled": true, - "entityId": 21, - "componentID": 15, - "version": 1, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true - } - ] - }, - { - "id": 22, - "name": "前景贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 22, - "type": "ScreenTransform", - "version": 3, - "enabled": true, - "componentID": 16 - }, - { - "componentID": 17, - "enabled": true, - "entityId": 22, - "scaleMode": 1, - "src": "01f71ce3-3670-4c60-9583-e932f932db49", - "type": "Image", - "version": 2 - }, - { - "alpha": 1, - "componentID": 18, - "enabled": true, - "entityId": 22, - "mode": "add", - "type": "BlendMode", - "version": 2 - } - ] - }, - { - "id": 54, - "name": "前景贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 54, - "componentID": 40, - "type": "ScreenTransform", - "enabled": true, - "version": 2 - }, - { - "componentID": 41, - "enabled": true, - "entityId": 54, - "scaleMode": 1, - "src": "9b1f8fbd-5183-4c1b-b6a8-c41686ad3cdd", - "type": "Image", - "version": 6 - }, - { - "alpha": 1, - "mode": "normal", - "type": "BlendMode", - "enabled": true, - "entityId": 54, - "componentID": 42 - } - ] - }, - { - "id": 23, - "name": "前景贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 23, - "type": "ScreenTransform", - "version": 3, - "enabled": true, - "componentID": 19 - }, - { - "componentID": 20, - "enabled": true, - "entityId": 23, - "scaleMode": 1, - "src": "269c2e42-cf0b-4cd0-90f0-181b51b6f6a6", - "type": "Image", - "version": 2 - }, - { - "alpha": 1, - "componentID": 21, - "enabled": true, - "entityId": 23, - "mode": "add", - "type": "BlendMode", - "version": 2 - } - ] - }, - { - "id": 51, - "name": "前景贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 51, - "componentID": 37, - "type": "ScreenTransform", - "enabled": true, - "version": 2 - }, - { - "componentID": 38, - "enabled": true, - "entityId": 51, - "scaleMode": 1, - "src": "c068e5d5-7207-49fb-820c-f531f432e9a2", - "type": "Image", - "version": 4 - }, - { - "alpha": 1, - "mode": "normal", - "type": "BlendMode", - "enabled": true, - "entityId": 51, - "componentID": 39 - } - ] - }, - { - "id": 24, - "name": "前景贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 24, - "type": "ScreenTransform", - "version": 3, - "enabled": true, - "componentID": 22 - }, - { - "componentID": 23, - "enabled": true, - "entityId": 24, - "scaleMode": 1, - "src": "707313d4-44c3-41f8-945d-4069a4b9b5aa", - "type": "Image", - "version": 2 - }, - { - "alpha": 1, - "mode": "normal", - "type": "BlendMode", - "enabled": true, - "entityId": 24, - "componentID": 24 - } - ] - }, - { - "id": 28, - "name": "脚本", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 28, - "componentID": 35 - }, - { - "componentID": 36, - "enabled": true, - "entityId": 28, - "scriptPath": "9a3e71ae-9208-4cdc-b9af-82ebdc951061", - "type": "Script", - "version": 2 - } - ] - } - ], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 17, - "componentID": 2, - "type": "ScreenTransform", - "enabled": true, - "version": 4 - }, - { - "componentID": 3, - "enabled": true, - "entityId": 17, - "renderTargetKey": "RenderTarget", - "type": "Camera", - "version": 2 - } - ] - } - ], - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 0, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 16, - "componentID": 1, - "type": "ScreenTransform", - "enabled": true, - "version": 4 - } - ], - "enabled": true, - "version": 0 - }, - "path": "/Users/shaojialun/workspace/aekit_materials/repo/wesee_new/video_kaixueqianhou/", - "resources": { - "items": [ - { - "key": "278e23b7-0f23-4d65-8337-eb479197fb63", - "type": "AudioClipData", - "path": "bgm.mp3", - "label": "bgm.mp3", - "timeRange": { - "startTime": 0, - "duration": 23072000 - }, - "loopCount": -1 - }, - { - "key": "17f6867f-e9b1-495c-b4b1-ffdba9fd86e0", - "type": "PAGFileData", - "path": "biaoqingbao1.pag", - "label": "biaoqingbao1.pag", - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "loopCount": -1 - }, - { - "key": "04313fcd-91c6-4130-8384-87bcd9c7dde0", - "type": "PAGFileData", - "path": "biaoqingbao2.pag", - "label": "biaoqingbao2.pag", - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "loopCount": -1 - }, - { - "key": "269c2e42-cf0b-4cd0-90f0-181b51b6f6a6", - "type": "PAGFileData", - "path": "dengguang.pag", - "label": "dengguang.pag", - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "loopCount": 1 - }, - { - "key": "DeviceCameraTexture", - "type": "TextureData", - "path": "DeviceCameraTexture.tex", - "label": "DeviceCameraTexture.tex" - }, - { - "key": "5ee72435-e70c-4892-9f4c-008323a9ec26", - "type": "ImageData", - "path": "filterEffect.lut.png", - "label": "filterEffect.lut.png" - }, - { - "key": "c068e5d5-7207-49fb-820c-f531f432e9a2", - "type": "PAGFileData", - "path": "guang.pag", - "label": "guang.pag", - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "loopCount": -1 - }, - { - "key": "2e99fbae-cd6c-4194-87fe-3c5ca95c0ea6", - "type": "ImageData", - "path": "kuang_0.png", - "label": "kuang_0.png" - }, - { - "key": "ffadd129-58e9-4976-856d-37818820d6c1", - "type": "ImageData", - "path": "lvse.png", - "label": "lvse.png" - }, - { - "key": "6e5c00c6-12a5-4a49-b11e-aca00cefbed9", - "type": "ImageData", - "path": "multiply.png", - "label": "multiply.png" - }, - { - "key": "d4ac3707-a56c-479b-9809-91159c98e2f1", - "type": "JsonData", - "path": "mv.json", - "label": "mv.json" - }, - { - "key": "RenderTarget", - "type": "RenderTarget", - "path": "RenderTarget.rdt", - "label": "RenderTarget.rdt", - "inputKey": "DeviceCameraTexture" - }, - { - "key": "9a3e71ae-9208-4cdc-b9af-82ebdc951061", - "type": "js", - "path": "script.js", - "label": "script.js" - }, - { - "key": "2b672568-6cbe-4a15-8ba4-b4b3f144d8bc", - "type": "PAGFileData", - "path": "shu.pag", - "label": "shu.pag", - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "loopCount": -1 - }, - { - "key": "9b1f8fbd-5183-4c1b-b6a8-c41686ad3cdd", - "type": "ImageData", - "path": "shuzhuo_0.png", - "label": "shuzhuo_0.png" - }, - { - "key": "463fe47d-2859-4b6c-b4e9-e4298c41a00a", - "type": "ImageData", - "path": "thumbImage.png", - "label": "thumbImage.png" - }, - { - "key": "43b317ad-2190-4618-9d95-9da4e96067cc", - "type": "ImageData", - "path": "transparent.png", - "label": "transparent.png" - }, - { - "key": "b9340685-a23e-401b-a018-2f597c495038", - "type": "PAGFileData", - "path": "yanjing.pag", - "label": "yanjing.pag", - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "loopCount": 1 - }, - { - "key": "1ed36222-a578-46c6-907c-3a1e10dd882f", - "type": "ImageData", - "path": "yanjing1_0.png", - "label": "yanjing1_0.png" - }, - { - "key": "707313d4-44c3-41f8-945d-4069a4b9b5aa", - "type": "PAGFileData", - "path": "zc1.pag", - "label": "zc1.pag", - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "loopCount": 1 - }, - { - "key": "e4d1adb1-113f-449e-aa75-b63aae1a8729", - "type": "PAGFileData", - "path": "zc2.pag", - "label": "zc2.pag", - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "loopCount": 1 - }, - { - "key": "01f71ce3-3670-4c60-9583-e932f932db49", - "type": "PAGFileData", - "path": "zhuangshi.pag", - "label": "zhuangshi.pag", - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "loopCount": -1 - } - ] - }, - "cloudResourceData": [] -} \ No newline at end of file diff --git a/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/thumbImage.png b/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/thumbImage.png deleted file mode 100644 index c7521f5d..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/thumbImage.png and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/transparent.png b/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/transparent.png deleted file mode 100644 index 25dfd398..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/transparent.png and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/yanjing.pag b/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/yanjing.pag deleted file mode 100644 index 94209583..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/yanjing.pag and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/yanjing1_0.png b/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/yanjing1_0.png deleted file mode 100644 index 96ad146d..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/yanjing1_0.png and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/zc1.pag b/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/zc1.pag deleted file mode 100644 index f5854343..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/zc1.pag and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/zc2.pag b/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/zc2.pag deleted file mode 100644 index 581367a2..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/zc2.pag and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/zhuangshi.pag b/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/zhuangshi.pag deleted file mode 100644 index 317cdc63..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_kaixueqianhou/zhuangshi.pag and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_keaituya/DeviceCameraTexture.tex b/application/App-UIKit/2dMotionRes.bundle/video_keaituya/DeviceCameraTexture.tex deleted file mode 100644 index 119ca577..00000000 --- a/application/App-UIKit/2dMotionRes.bundle/video_keaituya/DeviceCameraTexture.tex +++ /dev/null @@ -1,4 +0,0 @@ -{ - "type": "TextureData", - "key": "DeviceCameraTexture" -} \ No newline at end of file diff --git a/application/App-UIKit/2dMotionRes.bundle/video_keaituya/RenderTarget.rdt b/application/App-UIKit/2dMotionRes.bundle/video_keaituya/RenderTarget.rdt deleted file mode 100644 index a98616e9..00000000 --- a/application/App-UIKit/2dMotionRes.bundle/video_keaituya/RenderTarget.rdt +++ /dev/null @@ -1 +0,0 @@ -{"type":"RenderTarget","path":"RenderTarget.rdt","key":"RenderTarget","input":"DeviceCameraTexture"} \ No newline at end of file diff --git a/application/App-UIKit/2dMotionRes.bundle/video_keaituya/bgm.mp3 b/application/App-UIKit/2dMotionRes.bundle/video_keaituya/bgm.mp3 deleted file mode 100644 index 12b3a063..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_keaituya/bgm.mp3 and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_keaituya/cropImage/default_mask_crop.png b/application/App-UIKit/2dMotionRes.bundle/video_keaituya/cropImage/default_mask_crop.png deleted file mode 100644 index 19046b7c..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_keaituya/cropImage/default_mask_crop.png and /dev/null differ diff --git "a/application/App-UIKit/2dMotionRes.bundle/video_keaituya/cropImage/\345\217\243\347\272\242\346\255\243\347\211\207\345\217\240\345\272\225_Mask_crop.png" "b/application/App-UIKit/2dMotionRes.bundle/video_keaituya/cropImage/\345\217\243\347\272\242\346\255\243\347\211\207\345\217\240\345\272\225_Mask_crop.png" deleted file mode 100644 index 2c2ea49a..00000000 Binary files "a/application/App-UIKit/2dMotionRes.bundle/video_keaituya/cropImage/\345\217\243\347\272\242\346\255\243\347\211\207\345\217\240\345\272\225_Mask_crop.png" and /dev/null differ diff --git "a/application/App-UIKit/2dMotionRes.bundle/video_keaituya/cropImage/\345\217\243\347\272\242\346\255\243\347\211\207\345\217\240\345\272\225_crop.png" "b/application/App-UIKit/2dMotionRes.bundle/video_keaituya/cropImage/\345\217\243\347\272\242\346\255\243\347\211\207\345\217\240\345\272\225_crop.png" deleted file mode 100644 index 20aab8e5..00000000 Binary files "a/application/App-UIKit/2dMotionRes.bundle/video_keaituya/cropImage/\345\217\243\347\272\242\346\255\243\347\211\207\345\217\240\345\272\225_crop.png" and /dev/null differ diff --git "a/application/App-UIKit/2dMotionRes.bundle/video_keaituya/cropImage/\347\234\274\345\275\261zpdd_crop.png" "b/application/App-UIKit/2dMotionRes.bundle/video_keaituya/cropImage/\347\234\274\345\275\261zpdd_crop.png" deleted file mode 100644 index 245d412c..00000000 Binary files "a/application/App-UIKit/2dMotionRes.bundle/video_keaituya/cropImage/\347\234\274\345\275\261zpdd_crop.png" and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_keaituya/cx.pag b/application/App-UIKit/2dMotionRes.bundle/video_keaituya/cx.pag deleted file mode 100644 index 1ea80f2b..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_keaituya/cx.pag and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_keaituya/scripts/20.flow.js b/application/App-UIKit/2dMotionRes.bundle/video_keaituya/scripts/20.flow.js deleted file mode 100644 index eda242ed..00000000 --- a/application/App-UIKit/2dMotionRes.bundle/video_keaituya/scripts/20.flow.js +++ /dev/null @@ -1,23 +0,0 @@ -/* 该脚本流程面板生成 */ -//开始 Flow 生成代码 -light.on('start',function (entityManager, eventManager, scriptSystem) { - var context = new light.NodeContext(entityManager, eventManager, scriptSystem); - // 实例化 - let code_SwitchObject_2 = context.create("code/SwitchObject"); - let code_Start_1 = context.create("code/Start"); - let code_play_3 = context.create("code/play"); - let code_SwitchObject_5 = context.create("code/SwitchObject"); - // 属性赋值 - code_SwitchObject_2.entityToHide = [19]; - code_play_3.entityId = 18; - code_play_3.loopType = "固定数字"; - code_play_3.playtimes = 1; - code_play_3.keepLastFrame = false; - code_SwitchObject_5.entityToDisplay = [19]; - // 数据连接 - // 事件连接 - context.connectEvent(code_Start_1, "Run", code_SwitchObject_2, "Run") - context.connectEvent(code_Start_1, "Run", code_play_3, "Run") - context.connectEvent(code_play_3, "Next", code_SwitchObject_5, "Run") - code_Start_1.Run(); -}); \ No newline at end of file diff --git a/application/App-UIKit/2dMotionRes.bundle/video_keaituya/scripts/light.js b/application/App-UIKit/2dMotionRes.bundle/video_keaituya/scripts/light.js deleted file mode 100644 index b7ca08d9..00000000 --- a/application/App-UIKit/2dMotionRes.bundle/video_keaituya/scripts/light.js +++ /dev/null @@ -1,7043 +0,0 @@ - -(function (light) { - if(light.studioLibLoaded) { - return; - } - light.studioLibLoaded = true; -var SDKRuntime = /** @class */ (function () { - function SDKRuntime() { - this.currentTime = 0; - this.behaviors = []; - } - SDKRuntime.prototype.initialize = function (entityManager, eventManager, scriptSystem) { - var _this = this; - var entities = entityManager.entitiesWithComponents(light.ScriptBehaviors.componentType); - entities.forEach(function (entity, _i) { - var idComponent = entity.getComponent(light.EntityIdentifier); - var lightBehaviorComponent = entity.getComponent(light.ScriptBehaviors); - console.log("JS::lightBehaviorComponent: " + JSON.stringify(lightBehaviorComponent)); - if (!lightBehaviorComponent) { - return; - } - lightBehaviorComponent.behaviorProperties.forEach(function (behaviorPropertiesJson, _i) { - console.log("JS::behaviorPropertiesJson: " + behaviorPropertiesJson); - var behaviorProperties = JSON.parse(behaviorPropertiesJson); - var BehaviorClass = SDKRuntime.BehaviorClasses[behaviorProperties.type]; - var behavior = new BehaviorClass(idComponent.id, entityManager, eventManager, scriptSystem); - Object.assign(behavior, behaviorProperties); - _this.addBehavior(behavior); - }); - }); - this.behaviors.forEach(function (b) { - if (b.configure) { - b.configure(); - } - }); - var maps = light.NodeContext.getAllNodesMap(); - light.FlowNodeClasses.forEach(function (node) { - if (!maps[node.definition.meta.nodeType]) { - node.nodeType = node.definition.meta.nodeType; - light.NodeContext.unregisterNode(node.nodeType); - light.NodeContext.registerNode(node); - } - }); - }; - SDKRuntime.prototype.addBehavior = function (it) { - this.behaviors.push(it); - }; - SDKRuntime.prototype.removeBehavior = function (it) { - var index = this.behaviors.indexOf(it); - if (index >= 0) { - this.behaviors.splice(index, 1); - } - }; - SDKRuntime.prototype.update = function (time, entityManager, eventManager) { - this.currentTime = time; - this.behaviors.forEach(function (b) { - if (b.enabled === false || b.destroyed) { - return; - } - b.entityManager = entityManager; - b.eventManager = eventManager; - if (b.update) { - b.update(time); - } - }); - }; - SDKRuntime.prototype.destroy = function () { - this.behaviors.forEach(function (b) { var _a; return (_a = b.destroy) === null || _a === void 0 ? void 0 : _a.call(b); }); - }; - SDKRuntime.BehaviorClasses = {}; - return SDKRuntime; -}()); -light.SDKRuntime = SDKRuntime; -light.runtime = new SDKRuntime(); -var BaseBehavior = /** @class */ (function () { - function BaseBehavior(entityId, entityManager, eventManager, scriptSystem) { - this.enabled = true; - this.destroyed = false; - this._entity = undefined; - this.entityId = entityId; - this.eventManager = eventManager; - this.entityManager = entityManager; - this.scriptSystem = scriptSystem; - this._entity = this.entityManager.getEntityById(this.entityId); - light.runtime.addBehavior(this); - } - Object.defineProperty(BaseBehavior.prototype, "entity", { - get: function () { - return this.entityManager.getEntityById(this.entityId); - }, - enumerable: false, - configurable: true - }); - BaseBehavior.prototype.destroy = function () { - this.destroyed = true; - this.enabled = false; - light.runtime.removeBehavior(this); - }; - BaseBehavior.definition = null; - return BaseBehavior; -}()); -light.BaseBehavior = BaseBehavior; -light.Behavior = function (definition) { - return function _Behavior(constructor) { - var selfProps = (constructor.prototype._definition - || {}); - var superProps = JSON.parse(JSON.stringify(constructor.definition || {})); - if (!definition.properties) { - definition.properties = []; - } - constructor.definition = definition; - definition.properties = definition.properties - .concat(superProps.properties || []) - .concat(selfProps.properties || []); - delete constructor.prototype._definition; - Object.defineProperty(constructor.prototype, 'definition', { - get: function () { - return constructor.definition; - }, - }); - SDKRuntime.BehaviorClasses[definition.type] = constructor; - return constructor; - }; -}; -light.Property = function Property(type) { - return function (target, propertyKey) { - var proto = target; - if (!proto._definition) { - proto._definition = { - type: 'object', - properties: [], - }; - } - type.name = propertyKey; - if (type.editable !== false) { - type.editable = true; - } - proto._definition.properties.push(type); - }; -}; -var GestureAction; -(function (GestureAction) { - GestureAction[GestureAction["HEART"] = 0] = "HEART"; - GestureAction[GestureAction["PAPER"] = 1] = "PAPER"; - GestureAction[GestureAction["SCISSOR"] = 2] = "SCISSOR"; - GestureAction[GestureAction["FIST"] = 3] = "FIST"; - GestureAction[GestureAction["ONE"] = 4] = "ONE"; - GestureAction[GestureAction["LOVE"] = 5] = "LOVE"; - GestureAction[GestureAction["LIKE"] = 6] = "LIKE"; - GestureAction[GestureAction["OK"] = 7] = "OK"; - GestureAction[GestureAction["ROCK"] = 8] = "ROCK"; - GestureAction[GestureAction["SIX"] = 9] = "SIX"; - GestureAction[GestureAction["EIGHT"] = 10] = "EIGHT"; - GestureAction[GestureAction["LIFT"] = 11] = "LIFT"; - GestureAction[GestureAction["CONGRATULATE"] = 12] = "CONGRATULATE"; -})(GestureAction || (GestureAction = {})); -light.GestureAction = GestureAction; -var FaceAction; -(function (FaceAction) { - FaceAction[FaceAction["FaceDetected"] = 0] = "FaceDetected"; - FaceAction[FaceAction["OpenMouth"] = 1] = "OpenMouth"; - FaceAction[FaceAction["BlinkEyebrow"] = 2] = "BlinkEyebrow"; - FaceAction[FaceAction["BlinkEye"] = 3] = "BlinkEye"; - FaceAction[FaceAction["ShakeHead"] = 4] = "ShakeHead"; - FaceAction[FaceAction["Kiss"] = 5] = "Kiss"; - FaceAction[FaceAction["BlinkLeftEye"] = 6] = "BlinkLeftEye"; - FaceAction[FaceAction["BlinkRightEye"] = 7] = "BlinkRightEye"; - FaceAction[FaceAction["Nod"] = 8] = "Nod"; - FaceAction[FaceAction["Smile"] = 9] = "Smile"; - FaceAction[FaceAction["MouthOccluded"] = 10] = "MouthOccluded"; - FaceAction[FaceAction["LeftEyeOccluded"] = 11] = "LeftEyeOccluded"; - FaceAction[FaceAction["RightEyeOccluded"] = 12] = "RightEyeOccluded"; - FaceAction[FaceAction["DoubleEyeOccluded"] = 13] = "DoubleEyeOccluded"; -})(FaceAction || (FaceAction = {})); -light.FaceAction = FaceAction; -var NodeClasses = {}; -light.NodeContext = /** @class */ (function () { - function NodeContext(entityManager, eventManager, scriptSystem) { - this.entityManager = entityManager; - this.eventManager = eventManager; - this.scriptSystem = scriptSystem; - } - NodeContext.registerNode = function (clazz) { - NodeClasses[clazz.nodeType] = clazz; - }; - NodeContext.unregisterNode = function (nodeType) { - if (NodeClasses[nodeType]) { - delete NodeClasses[nodeType]; - } - }; - NodeContext.getAllNodesMap = function () { - return NodeClasses; - }; - NodeContext.prototype.create = function (type) { - var Clazz = NodeClasses[type]; - if (Clazz) { - var it = new Clazz(); - it.entityManager = this.entityManager; - it.eventManager = this.eventManager; - it.scriptSystem = this.scriptSystem; - return it; - } - console.log("Cannot find node: " + type); - }; - NodeContext.prototype.connectData = function (source, property, target, targetProperty) { - // 重写应该基于 instance - var descriptor = { - configurable: true, - enumerable: true, - get: function () { - return source[property]; - }, - }; - Object.defineProperty(target, targetProperty, descriptor); - }; - NodeContext.prototype.connectEvent = function (source, property, target, targetProperty) { - var propertyTasksName = property + "Tasks__"; - if (!source[propertyTasksName]) { - // 重写应该基于 instance - var descriptor = { - configurable: true, - enumerable: true, - value: function () { - var tasks = this[propertyTasksName]; - tasks.forEach(function (task) { return task(); }); - }, - }; - Object.defineProperty(source, property, descriptor); - source[propertyTasksName] = []; - } - var tasks = source[propertyTasksName]; - var task = target[targetProperty]; - tasks.push(task.bind(target)); - }; - return NodeContext; -}()); -light.FlowNodeClasses = light.FlowNodeClasses || []; -light['afterconfigure'] = function (entityManager, eventManager, scriptSystem) { - var _a; - (_a = light.BehaviorClasses) === null || _a === void 0 ? void 0 : _a.forEach(function (clazz) { - light.SDKRuntime.BehaviorClasses[clazz.definition.type] = clazz; - }); - light.runtime.initialize(entityManager, eventManager, scriptSystem); - light.emit('start', entityManager, eventManager, scriptSystem); -}; -function update(time, entityManager, eventManager) { - light.runtime.update(time, entityManager, eventManager); - light.emit('update', time, entityManager, eventManager); -} -light.getCurrentTime = function () { - return light.runtime.currentTime; -}; -light.update = update; -light.receive = function (event) { - console.log(event.type()); - if (event.type() === 'CustomDataEvent') { - var cEvent = event; - light.emit(cEvent.event_type, JSON.parse(cEvent.json_data)); - } - else { - light.emit(event.type(), event); - } -}; - -/*! ***************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */ -/* global Reflect, Promise */ - -var extendStatics = function(d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); -}; - -function __extends(d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -} - -var constant = function(x){ - return function(){ - return x; - } -}; - -function linear(a, d) { - return function(t) { - return a + t * d; - }; -} - -function exponential(a, b, y) { - return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function(t) { - return Math.pow(a + t * b, y); - }; -} - -function gamma(y) { - return (y = +y) === 1 ? nogamma : function(a, b) { - return b - a ? exponential(a, b, y) : constant(isNaN(a) ? b : a); - }; -} - -function nogamma(a, b) { - var d = b - a; - return d ? linear(a, d) : constant(isNaN(a) ? b : a); -} - -function define(constructor, factory, prototype) { - constructor.prototype = factory.prototype = prototype; - prototype.constructor = constructor; -} - -function extend(parent, definition) { - var prototype = Object.create(parent.prototype); - for (var key in definition) prototype[key] = definition[key]; - return prototype; -} - -function Color() {} - -var darker = 0.7; -var brighter = 1 / darker; - -var reI = "\\s*([+-]?\\d+)\\s*", - reN = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*", - reP = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*", - reHex = /^#([0-9a-f]{3,8})$/, - reRgbInteger = new RegExp("^rgb\\(" + [reI, reI, reI] + "\\)$"), - reRgbPercent = new RegExp("^rgb\\(" + [reP, reP, reP] + "\\)$"), - reRgbaInteger = new RegExp("^rgba\\(" + [reI, reI, reI, reN] + "\\)$"), - reRgbaPercent = new RegExp("^rgba\\(" + [reP, reP, reP, reN] + "\\)$"), - reHslPercent = new RegExp("^hsl\\(" + [reN, reP, reP] + "\\)$"), - reHslaPercent = new RegExp("^hsla\\(" + [reN, reP, reP, reN] + "\\)$"); - -var named = { - aliceblue: 0xf0f8ff, - antiquewhite: 0xfaebd7, - aqua: 0x00ffff, - aquamarine: 0x7fffd4, - azure: 0xf0ffff, - beige: 0xf5f5dc, - bisque: 0xffe4c4, - black: 0x000000, - blanchedalmond: 0xffebcd, - blue: 0x0000ff, - blueviolet: 0x8a2be2, - brown: 0xa52a2a, - burlywood: 0xdeb887, - cadetblue: 0x5f9ea0, - chartreuse: 0x7fff00, - chocolate: 0xd2691e, - coral: 0xff7f50, - cornflowerblue: 0x6495ed, - cornsilk: 0xfff8dc, - crimson: 0xdc143c, - cyan: 0x00ffff, - darkblue: 0x00008b, - darkcyan: 0x008b8b, - darkgoldenrod: 0xb8860b, - darkgray: 0xa9a9a9, - darkgreen: 0x006400, - darkgrey: 0xa9a9a9, - darkkhaki: 0xbdb76b, - darkmagenta: 0x8b008b, - darkolivegreen: 0x556b2f, - darkorange: 0xff8c00, - darkorchid: 0x9932cc, - darkred: 0x8b0000, - darksalmon: 0xe9967a, - darkseagreen: 0x8fbc8f, - darkslateblue: 0x483d8b, - darkslategray: 0x2f4f4f, - darkslategrey: 0x2f4f4f, - darkturquoise: 0x00ced1, - darkviolet: 0x9400d3, - deeppink: 0xff1493, - deepskyblue: 0x00bfff, - dimgray: 0x696969, - dimgrey: 0x696969, - dodgerblue: 0x1e90ff, - firebrick: 0xb22222, - floralwhite: 0xfffaf0, - forestgreen: 0x228b22, - fuchsia: 0xff00ff, - gainsboro: 0xdcdcdc, - ghostwhite: 0xf8f8ff, - gold: 0xffd700, - goldenrod: 0xdaa520, - gray: 0x808080, - green: 0x008000, - greenyellow: 0xadff2f, - grey: 0x808080, - honeydew: 0xf0fff0, - hotpink: 0xff69b4, - indianred: 0xcd5c5c, - indigo: 0x4b0082, - ivory: 0xfffff0, - khaki: 0xf0e68c, - lavender: 0xe6e6fa, - lavenderblush: 0xfff0f5, - lawngreen: 0x7cfc00, - lemonchiffon: 0xfffacd, - lightblue: 0xadd8e6, - lightcoral: 0xf08080, - lightcyan: 0xe0ffff, - lightgoldenrodyellow: 0xfafad2, - lightgray: 0xd3d3d3, - lightgreen: 0x90ee90, - lightgrey: 0xd3d3d3, - lightpink: 0xffb6c1, - lightsalmon: 0xffa07a, - lightseagreen: 0x20b2aa, - lightskyblue: 0x87cefa, - lightslategray: 0x778899, - lightslategrey: 0x778899, - lightsteelblue: 0xb0c4de, - lightyellow: 0xffffe0, - lime: 0x00ff00, - limegreen: 0x32cd32, - linen: 0xfaf0e6, - magenta: 0xff00ff, - maroon: 0x800000, - mediumaquamarine: 0x66cdaa, - mediumblue: 0x0000cd, - mediumorchid: 0xba55d3, - mediumpurple: 0x9370db, - mediumseagreen: 0x3cb371, - mediumslateblue: 0x7b68ee, - mediumspringgreen: 0x00fa9a, - mediumturquoise: 0x48d1cc, - mediumvioletred: 0xc71585, - midnightblue: 0x191970, - mintcream: 0xf5fffa, - mistyrose: 0xffe4e1, - moccasin: 0xffe4b5, - navajowhite: 0xffdead, - navy: 0x000080, - oldlace: 0xfdf5e6, - olive: 0x808000, - olivedrab: 0x6b8e23, - orange: 0xffa500, - orangered: 0xff4500, - orchid: 0xda70d6, - palegoldenrod: 0xeee8aa, - palegreen: 0x98fb98, - paleturquoise: 0xafeeee, - palevioletred: 0xdb7093, - papayawhip: 0xffefd5, - peachpuff: 0xffdab9, - peru: 0xcd853f, - pink: 0xffc0cb, - plum: 0xdda0dd, - powderblue: 0xb0e0e6, - purple: 0x800080, - rebeccapurple: 0x663399, - red: 0xff0000, - rosybrown: 0xbc8f8f, - royalblue: 0x4169e1, - saddlebrown: 0x8b4513, - salmon: 0xfa8072, - sandybrown: 0xf4a460, - seagreen: 0x2e8b57, - seashell: 0xfff5ee, - sienna: 0xa0522d, - silver: 0xc0c0c0, - skyblue: 0x87ceeb, - slateblue: 0x6a5acd, - slategray: 0x708090, - slategrey: 0x708090, - snow: 0xfffafa, - springgreen: 0x00ff7f, - steelblue: 0x4682b4, - tan: 0xd2b48c, - teal: 0x008080, - thistle: 0xd8bfd8, - tomato: 0xff6347, - turquoise: 0x40e0d0, - violet: 0xee82ee, - wheat: 0xf5deb3, - white: 0xffffff, - whitesmoke: 0xf5f5f5, - yellow: 0xffff00, - yellowgreen: 0x9acd32 -}; - -define(Color, color, { - copy: function(channels) { - return Object.assign(new this.constructor, this, channels); - }, - displayable: function() { - return this.rgb().displayable(); - }, - hex: color_formatHex, // Deprecated! Use color.formatHex. - formatHex: color_formatHex, - formatHsl: color_formatHsl, - formatRgb: color_formatRgb, - toString: color_formatRgb -}); - -function color_formatHex() { - return this.rgb().formatHex(); -} - -function color_formatHsl() { - return hslConvert(this).formatHsl(); -} - -function color_formatRgb() { - return this.rgb().formatRgb(); -} - -function color(format) { - var m, l; - format = (format + "").trim().toLowerCase(); - return (m = reHex.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) // #ff0000 - : l === 3 ? new Rgb((m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1) // #f00 - : l === 8 ? rgba(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000 - : l === 4 ? rgba((m >> 12 & 0xf) | (m >> 8 & 0xf0), (m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), (((m & 0xf) << 4) | (m & 0xf)) / 0xff) // #f000 - : null) // invalid hex - : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0) - : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%) - : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1) - : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1) - : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%) - : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1) - : named.hasOwnProperty(format) ? rgbn(named[format]) // eslint-disable-line no-prototype-builtins - : format === "transparent" ? new Rgb(NaN, NaN, NaN, 0) - : null; -} - -function rgbn(n) { - return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1); -} - -function rgba(r, g, b, a) { - if (a <= 0) r = g = b = NaN; - return new Rgb(r, g, b, a); -} - -function rgbConvert(o) { - if (!(o instanceof Color)) o = color(o); - if (!o) return new Rgb; - o = o.rgb(); - return new Rgb(o.r, o.g, o.b, o.opacity); -} - -function rgb(r, g, b, opacity) { - return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity); -} - -function Rgb(r, g, b, opacity) { - this.r = +r; - this.g = +g; - this.b = +b; - this.opacity = +opacity; -} - -define(Rgb, rgb, extend(Color, { - brighter: function(k) { - k = k == null ? brighter : Math.pow(brighter, k); - return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity); - }, - darker: function(k) { - k = k == null ? darker : Math.pow(darker, k); - return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity); - }, - rgb: function() { - return this; - }, - displayable: function() { - return (-0.5 <= this.r && this.r < 255.5) - && (-0.5 <= this.g && this.g < 255.5) - && (-0.5 <= this.b && this.b < 255.5) - && (0 <= this.opacity && this.opacity <= 1); - }, - hex: rgb_formatHex, // Deprecated! Use color.formatHex. - formatHex: rgb_formatHex, - formatRgb: rgb_formatRgb, - toString: rgb_formatRgb -})); - -function rgb_formatHex() { - return "#" + hex(this.r) + hex(this.g) + hex(this.b); -} - -function rgb_formatRgb() { - var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a)); - return (a === 1 ? "rgb(" : "rgba(") - + Math.max(0, Math.min(255, Math.round(this.r) || 0)) + ", " - + Math.max(0, Math.min(255, Math.round(this.g) || 0)) + ", " - + Math.max(0, Math.min(255, Math.round(this.b) || 0)) - + (a === 1 ? ")" : ", " + a + ")"); -} - -function hex(value) { - value = Math.max(0, Math.min(255, Math.round(value) || 0)); - return (value < 16 ? "0" : "") + value.toString(16); -} - -function hsla(h, s, l, a) { - if (a <= 0) h = s = l = NaN; - else if (l <= 0 || l >= 1) h = s = NaN; - else if (s <= 0) h = NaN; - return new Hsl(h, s, l, a); -} - -function hslConvert(o) { - if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity); - if (!(o instanceof Color)) o = color(o); - if (!o) return new Hsl; - if (o instanceof Hsl) return o; - o = o.rgb(); - var r = o.r / 255, - g = o.g / 255, - b = o.b / 255, - min = Math.min(r, g, b), - max = Math.max(r, g, b), - h = NaN, - s = max - min, - l = (max + min) / 2; - if (s) { - if (r === max) h = (g - b) / s + (g < b) * 6; - else if (g === max) h = (b - r) / s + 2; - else h = (r - g) / s + 4; - s /= l < 0.5 ? max + min : 2 - max - min; - h *= 60; - } else { - s = l > 0 && l < 1 ? 0 : h; - } - return new Hsl(h, s, l, o.opacity); -} - -function hsl(h, s, l, opacity) { - return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity); -} - -function Hsl(h, s, l, opacity) { - this.h = +h; - this.s = +s; - this.l = +l; - this.opacity = +opacity; -} - -define(Hsl, hsl, extend(Color, { - brighter: function(k) { - k = k == null ? brighter : Math.pow(brighter, k); - return new Hsl(this.h, this.s, this.l * k, this.opacity); - }, - darker: function(k) { - k = k == null ? darker : Math.pow(darker, k); - return new Hsl(this.h, this.s, this.l * k, this.opacity); - }, - rgb: function() { - var h = this.h % 360 + (this.h < 0) * 360, - s = isNaN(h) || isNaN(this.s) ? 0 : this.s, - l = this.l, - m2 = l + (l < 0.5 ? l : 1 - l) * s, - m1 = 2 * l - m2; - return new Rgb( - hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2), - hsl2rgb(h, m1, m2), - hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2), - this.opacity - ); - }, - displayable: function() { - return (0 <= this.s && this.s <= 1 || isNaN(this.s)) - && (0 <= this.l && this.l <= 1) - && (0 <= this.opacity && this.opacity <= 1); - }, - formatHsl: function() { - var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a)); - return (a === 1 ? "hsl(" : "hsla(") - + (this.h || 0) + ", " - + (this.s || 0) * 100 + "%, " - + (this.l || 0) * 100 + "%" - + (a === 1 ? ")" : ", " + a + ")"); - } -})); - -/* From FvD 13.37, CSS Color Module Level 3 */ -function hsl2rgb(h, m1, m2) { - return (h < 60 ? m1 + (m2 - m1) * h / 60 - : h < 180 ? m2 - : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60 - : m1) * 255; -} - -var interpolateRgb = (function rgbGamma(y) { - var color = gamma(y); - - function rgb$1(start, end) { - var r = color((start = rgb(start)).r, (end = rgb(end)).r), - g = color(start.g, end.g), - b = color(start.b, end.b), - opacity = nogamma(start.opacity, end.opacity); - return function(t) { - start.r = r(t); - start.g = g(t); - start.b = b(t); - start.opacity = opacity(t); - return start + ""; - }; - } - - rgb$1.gamma = rgbGamma; - - return rgb$1; -})(1); - -/** - * @param keyframesValue "255,255,0,50" 表示rgba - * @return rgba(255, 255, 0, 0.5) - */ -/** - * @param hex "#fbafff" 表示16进制 - * @return rgba(251,175,255,1) - */ -function transformHexToRgba(hex) { - hex = hex.replace('#', '0x'); - var colorNum = Number(hex); - var r = (colorNum >>> 24); - var g = (colorNum >>> 16) & 0x00ff; - var b = (colorNum >>> 8) & 0x0000ff; - var a = colorNum & 0x000000ff; - return "rgba(" + r + "," + g + "," + b + "," + a / 255.0 + ")"; -} -/** - * @param hex "#fbafff" 表示16进制 - * @return { r: 251, g: 175, b: 255, a: 100 } - */ -function transformHexToRgbaObj(hex) { - hex = hex.replace('#', '0x'); - var colorNum = Number(hex); - var r = (colorNum >>> 24); - var g = (colorNum >>> 16) & 0x00ff; - var b = (colorNum >>> 8) & 0x0000ff; - var a = (colorNum & 0x000000ff) / 255.0 * 100; - return { r: r, g: g, b: b, a: a }; -} -/** rgba(0, 233, 250, 0.9448125164992826) - * @param rgba rgba(251, 175, 255, 0.5) - * @return { r: 251, g: 175, b: 255, a: 100 } - */ -function transformRgbaToRgbaObj(rgba) { - var match = rgba.match(/rgba?\((\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*([\d\.]+))?\s*\)/); - if (!match) - return { r: 0, g: 0, b: 0, a: 0 }; - var _a = [Number(match[1]), Number(match[2]), Number(match[3]), Number(match[4])], r = _a[0], g = _a[1], b = _a[2], a = _a[3]; - return { r: r, g: g, b: b, a: isNaN(a) ? 100 : a * 100 }; -} - -var InterpolateColor = /** @class */ (function () { - function InterpolateColor(beginValue, endValue) { - this.startColor = transformHexToRgba(beginValue); - this.endColor = transformHexToRgba(endValue); - this.interpolator = new interpolateRgb(this.startColor, this.endColor); - } - InterpolateColor.prototype.value = function (time) { - var value = this.interpolator(time); - return transformRgbaToRgbaObj(value); - }; - return InterpolateColor; -}()); - -/** - * Bezier Curves formulas obtained from - * http://en.wikipedia.org/wiki/Bézier_curve - */ -function CubicBezierP0(t, p) { - var k = 1 - t; - return k * k * k * p; -} -function CubicBezierP1(t, p) { - var k = 1 - t; - return 3 * k * k * t * p; -} -function CubicBezierP2(t, p) { - return 3 * (1 - t) * t * t * p; -} -function CubicBezierP3(t, p) { - return t * t * t * p; -} -function CubicBezier(t, p0, p1, p2, p3) { - return (CubicBezierP0(t, p0) - + CubicBezierP1(t, p1) - + CubicBezierP2(t, p2) - + CubicBezierP3(t, p3)); -} -var Bezier = /** @class */ (function () { - function Bezier(c1, c2, c3, c4) { - this.c1 = 0.0; - this.c2 = 0.0; - this.c3 = 0.0; - this.c4 = 0.0; - this.c1 = c1; - this.c2 = c2; - this.c3 = c3; - this.c4 = c4; - } - Bezier.prototype.evaluate = function (t) { - return CubicBezier(t, this.c1, this.c2, this.c3, this.c4); - }; - return Bezier; -}()); - -var InterpolateBezier = /** @class */ (function () { - function InterpolateBezier(startValue, endValue) { - this.startValue = startValue; - this.endValue = endValue; - var inter = endValue - startValue; - var c1 = this.startValue; - var c2 = this.startValue + (inter) * 0.25; - var c3 = this.startValue + (inter) * 0.75; - var c4 = this.endValue; - this.interpolator = new Bezier(c1, c2, c3, c4); - } - InterpolateBezier.prototype.value = function (time) { - return this.interpolator.evaluate(time); - }; - return InterpolateBezier; -}()); - -/** - * Abstract base class of interpolants over parametric samples. - * - * The parameter domain is one dimensional, typically the time or a path - * along a curve defined by the data. - * - * The sample values can have any dimensionality and derived classes may - * apply special interpretations to the data. - * - * This class provides the interval seek in a Template Method, deferring - * the actual interpolation to derived classes. - * - * Time complexity is O(1) for linear access crossing at most two points - * and O(log N) for random access, where N is the number of positions. - * - * References: - * - * http://www.oodesign.com/template-method-pattern.html - * - * @author tschw - */ -function Interpolant(parameterPositions, sampleValues, sampleSize, resultBuffer) { - this.parameterPositions = parameterPositions; - this._cachedIndex = 0; - this.resultBuffer = resultBuffer !== undefined ? resultBuffer : new sampleValues.constructor(sampleSize); - this.sampleValues = sampleValues; - this.valueSize = sampleSize; -} - -Object.assign(Interpolant.prototype, { - evaluate: function evaluate(t) { - var pp = this.parameterPositions; - var i1 = this._cachedIndex; - var t1 = pp[i1]; - var t0 = pp[i1 - 1]; - - validate_interval: { - seek: { - var right; - - linear_scan: { - // - See http://jsperf.com/comparison-to-undefined/3 - // - slower code: - // - - // - if ( t >= t1 || t1 === undefined ) { - forward_scan: if (!(t < t1)) { - for (var giveUpAt = i1 + 2;;) { - if (t1 === undefined) { - if (t < t0) break forward_scan; // after end - - i1 = pp.length; - this._cachedIndex = i1; - return this.afterEnd_(i1 - 1, t, t0); - } - - if (i1 === giveUpAt) break; // this loop - - t0 = t1; - t1 = pp[++i1]; - - if (t < t1) { - // we have arrived at the sought interval - break seek; - } - } // prepare binary search on the right side of the index - - - right = pp.length; - break linear_scan; - } // - slower code: - // - if ( t < t0 || t0 === undefined ) { - - - if (!(t >= t0)) { - // looping? - var t1global = pp[1]; - - if (t < t1global) { - i1 = 2; // + 1, using the scan for the details - - t0 = t1global; - } // linear reverse scan - - - for (var _giveUpAt = i1 - 2;;) { - if (t0 === undefined) { - // before start - this._cachedIndex = 0; - return this.beforeStart_(0, t, t1); - } - - if (i1 === _giveUpAt) break; // this loop - - t1 = t0; - t0 = pp[--i1 - 1]; - - if (t >= t0) { - // we have arrived at the sought interval - break seek; - } - } // prepare binary search on the left side of the index - - - right = i1; - i1 = 0; - break linear_scan; - } // the interval is valid - - - break validate_interval; - } // linear scan - // binary search - - - while (i1 < right) { - var mid = i1 + right >>> 1; - - if (t < pp[mid]) { - right = mid; - } else { - i1 = mid + 1; - } - } - - t1 = pp[i1]; - t0 = pp[i1 - 1]; // check boundary cases, again - - if (t0 === undefined) { - this._cachedIndex = 0; - return this.beforeStart_(0, t, t1); - } - - if (t1 === undefined) { - i1 = pp.length; - this._cachedIndex = i1; - return this.afterEnd_(i1 - 1, t0, t); - } - } // seek - - - this._cachedIndex = i1; - this.intervalChanged_(i1, t0, t1); - } // validate_interval - - - return this.interpolate_(i1, t0, t, t1); - }, - settings: null, - // optional, subclass-specific settings structure - // Note: The indirection allows central control of many interpolants. - // --- Protected interface - DefaultSettings_: {}, - getSettings_: function getSettings_() { - return this.settings || this.DefaultSettings_; - }, - copySampleValue_: function copySampleValue_(index) { - // copies a sample value to the result buffer - var result = this.resultBuffer; - var values = this.sampleValues; - var stride = this.valueSize; - var offset = index * stride; - - for (var i = 0; i !== stride; ++i) { - result[i] = values[offset + i]; - } - - return result; - }, - // Template methods for derived classes: - interpolate_: function interpolate_() - /* i1, t0, t, t1 */ - { - throw new Error('call to abstract method'); // implementations shall return this.resultBuffer - }, - intervalChanged_: function intervalChanged_() - /* i1, t0, t1 */ - {// empty - } -}); // DECLARE ALIAS AFTER assign prototype - -Object.assign(Interpolant.prototype, { - // ( 0, t, t0 ), returns this.resultBuffer - beforeStart_: Interpolant.prototype.copySampleValue_, - // ( N-1, tN-1, t ), returns this.resultBuffer - afterEnd_: Interpolant.prototype.copySampleValue_ -}); - -/** - * @author tschw - */ - -function LinearInterpolant(parameterPositions, sampleValues, sampleSize, resultBuffer) { - Interpolant.call(this, parameterPositions, sampleValues, sampleSize, resultBuffer); -} - -LinearInterpolant.prototype = Object.assign(Object.create(Interpolant.prototype), { - constructor: LinearInterpolant, - interpolate_: function interpolate_(i1, t0, t, t1) { - var result = this.resultBuffer; - var values = this.sampleValues; - var stride = this.valueSize; - var offset1 = i1 * stride; - var offset0 = offset1 - stride; - var weight1 = (t - t0) / (t1 - t0); - var weight0 = 1 - weight1; - - for (var i = 0; i !== stride; ++i) { - result[i] = values[offset0 + i] * weight0 + values[offset1 + i] * weight1; - } - - return result; - } -}); - -var InterpolateLinear = /** @class */ (function () { - function InterpolateLinear(startValue, endValue) { - this.startValue = startValue; - this.endValue = endValue; - var times = [0, 1]; - var values = [startValue, endValue]; - var valueSize = values.length / times.length; - this.interpolator = new LinearInterpolant(times, values, valueSize); - } - InterpolateLinear.prototype.value = function (time) { - var value = this.interpolator.evaluate(time); - return value[0]; - }; - return InterpolateLinear; -}()); - -// 插值类型 -var InterpolationType; -(function (InterpolationType) { - InterpolationType[InterpolationType["Linear"] = 0] = "Linear"; - InterpolationType[InterpolationType["Bezier"] = 1] = "Bezier"; -})(InterpolationType || (InterpolationType = {})); -// 关键帧动画类型 -var KeyframeMode; -(function (KeyframeMode) { - KeyframeMode[KeyframeMode["Continuous"] = 0] = "Continuous"; - KeyframeMode[KeyframeMode["Discontinuous"] = 1] = "Discontinuous"; -})(KeyframeMode || (KeyframeMode = {})); -// 关键帧外插模式 (曲线在第一个关键帧之前和最后一个关键帧之后的延伸方式) -var ExtrapolationMode; -(function (ExtrapolationMode) { - ExtrapolationMode[ExtrapolationMode["Constant"] = 0] = "Constant"; - ExtrapolationMode[ExtrapolationMode["Linear"] = 1] = "Linear"; -})(ExtrapolationMode || (ExtrapolationMode = {})); -// 默认的插值类型 -var DEFAULT_EASING = InterpolationType.Linear; -// 默认的关键帧 -var DEFAULT_KEYFRAME = [0, 0, InterpolationType.Linear]; -// 默认的外插模式 -var DEFAULT_EXTRAPOLATION_MODE = ExtrapolationMode.Linear; -var AnimationClipState; -(function (AnimationClipState) { - AnimationClipState[AnimationClipState["Stopped"] = 0] = "Stopped"; - AnimationClipState[AnimationClipState["Playing"] = 1] = "Playing"; - AnimationClipState[AnimationClipState["Paused"] = 2] = "Paused"; -})(AnimationClipState || (AnimationClipState = {})); -var AnimationClipType; -(function (AnimationClipType) { - AnimationClipType[AnimationClipType["Component"] = 0] = "Component"; - AnimationClipType[AnimationClipType["GlTF"] = 1] = "GlTF"; -})(AnimationClipType || (AnimationClipType = {})); -var ValueType; -(function (ValueType) { - ValueType[ValueType["Num"] = 0] = "Num"; - ValueType[ValueType["Hex"] = 1] = "Hex"; - ValueType[ValueType["Mat3f"] = 2] = "Mat3f"; - ValueType[ValueType["Quaternion"] = 3] = "Quaternion"; -})(ValueType || (ValueType = {})); -var PropertyValueType; -(function (PropertyValueType) { - PropertyValueType[PropertyValueType["number"] = 0] = "number"; - PropertyValueType[PropertyValueType["string"] = 1] = "string"; - PropertyValueType[PropertyValueType["quaternion"] = 2] = "quaternion"; -})(PropertyValueType || (PropertyValueType = {})); - -var InterpolateMat3f = /** @class */ (function () { - function InterpolateMat3f(startValue, endValue, interpolationType) { - var _this = this; - this.startValues = startValue.split(',').map(parseFloat); - this.endValues = endValue.split(',').map(parseFloat); - this.interpolators = this.startValues.map(function (v1, index) { - if (interpolationType === InterpolationType.Bezier) { - return new InterpolateLinear(v1, _this.endValues[index]); - } - return new InterpolateBezier(v1, _this.endValues[index]); - }); - } - InterpolateMat3f.prototype.value = function (time) { - var values = this.interpolators.map(function (interpolator) { return interpolator.value(time); }); - return values.join(','); - }; - return InterpolateMat3f; -}()); - -var Keyframe = /** @class */ (function () { - function Keyframe(keyFrameArray) { - var _a = keyFrameArray || DEFAULT_KEYFRAME, time = _a[0], value = _a[1], interpolationType = _a[2]; - this.time = time; - this.value = value; - this.interpolationType = interpolationType; - } - Keyframe.prototype.getTime = function () { - return this.time; - }; - Keyframe.prototype.getValue = function () { - return this.value; - }; - Keyframe.prototype.getType = function () { - return this.interpolationType; - }; - return Keyframe; -}()); - -/** - * @author alteredq / http://alteredqualia.com/ - * @author mrdoob / http://mrdoob.com/ - * @author WestLangley / http://github.com/WestLangley - * @author thezwap - */ -var _lut = []; - -for (var i = 0; i < 256; i++) { - _lut[i] = (i < 16 ? '0' : '') + i.toString(16); -} - -var MathUtils = { - DEG2RAD: Math.PI / 180, - RAD2DEG: 180 / Math.PI, - generateUUID: function generateUUID() { - // http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/21963136#21963136 - var d0 = Math.random() * 0xffffffff | 0; - var d1 = Math.random() * 0xffffffff | 0; - var d2 = Math.random() * 0xffffffff | 0; - var d3 = Math.random() * 0xffffffff | 0; - var uuid = "".concat(_lut[d0 & 0xff] + _lut[d0 >> 8 & 0xff] + _lut[d0 >> 16 & 0xff] + _lut[d0 >> 24 & 0xff], "-").concat(_lut[d1 & 0xff]).concat(_lut[d1 >> 8 & 0xff], "-").concat(_lut[d1 >> 16 & 0x0f | 0x40]).concat(_lut[d1 >> 24 & 0xff], "-").concat(_lut[d2 & 0x3f | 0x80]).concat(_lut[d2 >> 8 & 0xff], "-").concat(_lut[d2 >> 16 & 0xff]).concat(_lut[d2 >> 24 & 0xff]).concat(_lut[d3 & 0xff]).concat(_lut[d3 >> 8 & 0xff]).concat(_lut[d3 >> 16 & 0xff]).concat(_lut[d3 >> 24 & 0xff]); // .toUpperCase() here flattens concatenated strings to save heap memory space. - - return uuid.toUpperCase(); - }, - clamp: function clamp(value, min, max) { - return Math.max(min, Math.min(max, value)); - }, - // compute euclidian modulo of m % n - // https://en.wikipedia.org/wiki/Modulo_operation - euclideanModulo: function euclideanModulo(n, m) { - return (n % m + m) % m; - }, - // Linear mapping from range to range - mapLinear: function mapLinear(x, a1, a2, b1, b2) { - return b1 + (x - a1) * (b2 - b1) / (a2 - a1); - }, - // https://en.wikipedia.org/wiki/Linear_interpolation - lerp: function lerp(x, y, t) { - return (1 - t) * x + t * y; - }, - // http://en.wikipedia.org/wiki/Smoothstep - smoothstep: function smoothstep(x, min, max) { - if (x <= min) return 0; - if (x >= max) return 1; - x = (x - min) / (max - min); - return x * x * (3 - 2 * x); - }, - smootherstep: function smootherstep(x, min, max) { - if (x <= min) return 0; - if (x >= max) return 1; - x = (x - min) / (max - min); - return x * x * x * (x * (x * 6 - 15) + 10); - }, - // Random integer from interval - randInt: function randInt(low, high) { - return low + Math.floor(Math.random() * (high - low + 1)); - }, - // Random float from interval - randFloat: function randFloat(low, high) { - return low + Math.random() * (high - low); - }, - // Random float from <-range/2, range/2> interval - randFloatSpread: function randFloatSpread(range) { - return range * (0.5 - Math.random()); - }, - degToRad: function degToRad(degrees) { - return degrees * MathUtils.DEG2RAD; - }, - radToDeg: function radToDeg(radians) { - return radians * MathUtils.RAD2DEG; - }, - isPowerOfTwo: function isPowerOfTwo(value) { - return (value & value - 1) === 0 && value !== 0; - }, - ceilPowerOfTwo: function ceilPowerOfTwo(value) { - return Math.pow(2, Math.ceil(Math.log(value) / Math.LN2)); - }, - floorPowerOfTwo: function floorPowerOfTwo(value) { - return Math.pow(2, Math.floor(Math.log(value) / Math.LN2)); - }, - setQuaternionFromProperEuler: function setQuaternionFromProperEuler(q, a, b, c, order) { - // Intrinsic Proper Euler Angles - see https://en.wikipedia.org/wiki/Euler_angles - // rotations are applied to the axes in the order specified by 'order' - // rotation by angle 'a' is applied first, then by angle 'b', then by angle 'c' - // angles are in radians - var cos = Math.cos; - var sin = Math.sin; - var c2 = cos(b / 2); - var s2 = sin(b / 2); - var c13 = cos((a + c) / 2); - var s13 = sin((a + c) / 2); - var c1_3 = cos((a - c) / 2); - var s1_3 = sin((a - c) / 2); - var c3_1 = cos((c - a) / 2); - var s3_1 = sin((c - a) / 2); - - switch (order) { - case 'XYX': - q.set(c2 * s13, s2 * c1_3, s2 * s1_3, c2 * c13); - break; - - case 'YZY': - q.set(s2 * s1_3, c2 * s13, s2 * c1_3, c2 * c13); - break; - - case 'ZXZ': - q.set(s2 * c1_3, s2 * s1_3, c2 * s13, c2 * c13); - break; - - case 'XZX': - q.set(c2 * s13, s2 * s3_1, s2 * c3_1, c2 * c13); - break; - - case 'YXY': - q.set(s2 * c3_1, c2 * s13, s2 * s3_1, c2 * c13); - break; - - case 'ZYZ': - q.set(s2 * s3_1, s2 * c3_1, c2 * s13, c2 * c13); - break; - - default: - console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: ".concat(order)); - } - } -}; - -/** - * @author mikael emtinger / http://gomo.se/ - * @author alteredq / http://alteredqualia.com/ - * @author WestLangley / http://github.com/WestLangley - * @author bhouston / http://clara.io - */ - -function Quaternion() { - var x = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; - var y = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; - var z = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0; - var w = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1; - this._x = x; - this._y = y; - this._z = z; - this._w = w; -} - -Object.assign(Quaternion, { - slerp: function slerp(qa, qb, qm, t) { - return qm.copy(qa).slerp(qb, t); - }, - slerpFlat: function slerpFlat(dst, dstOffset, src0, srcOffset0, src1, srcOffset1, t) { - // fuzz-free, array-based Quaternion SLERP operation - var x0 = src0[srcOffset0 + 0]; - var y0 = src0[srcOffset0 + 1]; - var z0 = src0[srcOffset0 + 2]; - var w0 = src0[srcOffset0 + 3]; - var x1 = src1[srcOffset1 + 0]; - var y1 = src1[srcOffset1 + 1]; - var z1 = src1[srcOffset1 + 2]; - var w1 = src1[srcOffset1 + 3]; - - if (w0 !== w1 || x0 !== x1 || y0 !== y1 || z0 !== z1) { - var s = 1 - t; - var cos = x0 * x1 + y0 * y1 + z0 * z1 + w0 * w1; - var dir = cos >= 0 ? 1 : -1; - var sqrSin = 1 - cos * cos; // Skip the Slerp for tiny steps to avoid numeric problems: - - if (sqrSin > Number.EPSILON) { - var sin = Math.sqrt(sqrSin); - var len = Math.atan2(sin, cos * dir); - s = Math.sin(s * len) / sin; - t = Math.sin(t * len) / sin; - } - - var tDir = t * dir; - x0 = x0 * s + x1 * tDir; - y0 = y0 * s + y1 * tDir; - z0 = z0 * s + z1 * tDir; - w0 = w0 * s + w1 * tDir; // Normalize in case we just did a lerp: - - if (s === 1 - t) { - var f = 1 / Math.sqrt(x0 * x0 + y0 * y0 + z0 * z0 + w0 * w0); - x0 *= f; - y0 *= f; - z0 *= f; - w0 *= f; - } - } - - dst[dstOffset] = x0; - dst[dstOffset + 1] = y0; - dst[dstOffset + 2] = z0; - dst[dstOffset + 3] = w0; - }, - multiplyQuaternionsFlat: function multiplyQuaternionsFlat(dst, dstOffset, src0, srcOffset0, src1, srcOffset1) { - var x0 = src0[srcOffset0]; - var y0 = src0[srcOffset0 + 1]; - var z0 = src0[srcOffset0 + 2]; - var w0 = src0[srcOffset0 + 3]; - var x1 = src1[srcOffset1]; - var y1 = src1[srcOffset1 + 1]; - var z1 = src1[srcOffset1 + 2]; - var w1 = src1[srcOffset1 + 3]; - dst[dstOffset] = x0 * w1 + w0 * x1 + y0 * z1 - z0 * y1; - dst[dstOffset + 1] = y0 * w1 + w0 * y1 + z0 * x1 - x0 * z1; - dst[dstOffset + 2] = z0 * w1 + w0 * z1 + x0 * y1 - y0 * x1; - dst[dstOffset + 3] = w0 * w1 - x0 * x1 - y0 * y1 - z0 * z1; - return dst; - } -}); -Object.defineProperties(Quaternion.prototype, { - x: { - get: function get() { - return this._x; - }, - set: function set(value) { - this._x = value; - - this._onChangeCallback(); - } - }, - y: { - get: function get() { - return this._y; - }, - set: function set(value) { - this._y = value; - - this._onChangeCallback(); - } - }, - z: { - get: function get() { - return this._z; - }, - set: function set(value) { - this._z = value; - - this._onChangeCallback(); - } - }, - w: { - get: function get() { - return this._w; - }, - set: function set(value) { - this._w = value; - - this._onChangeCallback(); - } - } -}); -Object.assign(Quaternion.prototype, { - isQuaternion: true, - set: function set(x, y, z, w) { - this._x = x; - this._y = y; - this._z = z; - this._w = w; - - this._onChangeCallback(); - - return this; - }, - clone: function clone() { - return new this.constructor(this._x, this._y, this._z, this._w); - }, - copy: function copy(quaternion) { - this._x = quaternion.x; - this._y = quaternion.y; - this._z = quaternion.z; - this._w = quaternion.w; - - this._onChangeCallback(); - - return this; - }, - setFromEuler: function setFromEuler(euler, update) { - if (!(euler && euler.isEuler)) { - throw new Error('THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.'); - } - - var x = euler._x; - var y = euler._y; - var z = euler._z; - var order = euler.order; // http://www.mathworks.com/matlabcentral/fileexchange/ - // 20696-function-to-convert-between-dcm-euler-angles-quaternions-and-euler-vectors/ - // content/SpinCalc.m - - var cos = Math.cos; - var sin = Math.sin; - var c1 = cos(x / 2); - var c2 = cos(y / 2); - var c3 = cos(z / 2); - var s1 = sin(x / 2); - var s2 = sin(y / 2); - var s3 = sin(z / 2); - - switch (order) { - case 'XYZ': - this._x = s1 * c2 * c3 + c1 * s2 * s3; - this._y = c1 * s2 * c3 - s1 * c2 * s3; - this._z = c1 * c2 * s3 + s1 * s2 * c3; - this._w = c1 * c2 * c3 - s1 * s2 * s3; - break; - - case 'YXZ': - this._x = s1 * c2 * c3 + c1 * s2 * s3; - this._y = c1 * s2 * c3 - s1 * c2 * s3; - this._z = c1 * c2 * s3 - s1 * s2 * c3; - this._w = c1 * c2 * c3 + s1 * s2 * s3; - break; - - case 'ZXY': - this._x = s1 * c2 * c3 - c1 * s2 * s3; - this._y = c1 * s2 * c3 + s1 * c2 * s3; - this._z = c1 * c2 * s3 + s1 * s2 * c3; - this._w = c1 * c2 * c3 - s1 * s2 * s3; - break; - - case 'ZYX': - this._x = s1 * c2 * c3 - c1 * s2 * s3; - this._y = c1 * s2 * c3 + s1 * c2 * s3; - this._z = c1 * c2 * s3 - s1 * s2 * c3; - this._w = c1 * c2 * c3 + s1 * s2 * s3; - break; - - case 'YZX': - this._x = s1 * c2 * c3 + c1 * s2 * s3; - this._y = c1 * s2 * c3 + s1 * c2 * s3; - this._z = c1 * c2 * s3 - s1 * s2 * c3; - this._w = c1 * c2 * c3 - s1 * s2 * s3; - break; - - case 'XZY': - this._x = s1 * c2 * c3 - c1 * s2 * s3; - this._y = c1 * s2 * c3 - s1 * c2 * s3; - this._z = c1 * c2 * s3 + s1 * s2 * c3; - this._w = c1 * c2 * c3 + s1 * s2 * s3; - break; - - default: - console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: ".concat(order)); - } - - if (update !== false) this._onChangeCallback(); - return this; - }, - setFromAxisAngle: function setFromAxisAngle(axis, angle) { - // http://www.euclideanspace.com/maths/geometry/rotations/conversions/angleToQuaternion/index.htm - // assumes axis is normalized - var halfAngle = angle / 2; - var s = Math.sin(halfAngle); - this._x = axis.x * s; - this._y = axis.y * s; - this._z = axis.z * s; - this._w = Math.cos(halfAngle); - - this._onChangeCallback(); - - return this; - }, - setFromRotationMatrix: function setFromRotationMatrix(m) { - // http://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToQuaternion/index.htm - // assumes the upper 3x3 of m is a pure rotation matrix (i.e, unscaled) - var te = m.elements; - var m11 = te[0]; - var m12 = te[4]; - var m13 = te[8]; - var m21 = te[1]; - var m22 = te[5]; - var m23 = te[9]; - var m31 = te[2]; - var m32 = te[6]; - var m33 = te[10]; - var trace = m11 + m22 + m33; - - if (trace > 0) { - var s = 0.5 / Math.sqrt(trace + 1.0); - this._w = 0.25 / s; - this._x = (m32 - m23) * s; - this._y = (m13 - m31) * s; - this._z = (m21 - m12) * s; - } else if (m11 > m22 && m11 > m33) { - var _s = 2.0 * Math.sqrt(1.0 + m11 - m22 - m33); - - this._w = (m32 - m23) / _s; - this._x = 0.25 * _s; - this._y = (m12 + m21) / _s; - this._z = (m13 + m31) / _s; - } else if (m22 > m33) { - var _s2 = 2.0 * Math.sqrt(1.0 + m22 - m11 - m33); - - this._w = (m13 - m31) / _s2; - this._x = (m12 + m21) / _s2; - this._y = 0.25 * _s2; - this._z = (m23 + m32) / _s2; - } else { - var _s3 = 2.0 * Math.sqrt(1.0 + m33 - m11 - m22); - - this._w = (m21 - m12) / _s3; - this._x = (m13 + m31) / _s3; - this._y = (m23 + m32) / _s3; - this._z = 0.25 * _s3; - } - - this._onChangeCallback(); - - return this; - }, - setFromUnitVectors: function setFromUnitVectors(vFrom, vTo) { - // assumes direction vectors vFrom and vTo are normalized - var EPS = 0.000001; - var r = vFrom.dot(vTo) + 1; - - if (r < EPS) { - r = 0; - - if (Math.abs(vFrom.x) > Math.abs(vFrom.z)) { - this._x = -vFrom.y; - this._y = vFrom.x; - this._z = 0; - this._w = r; - } else { - this._x = 0; - this._y = -vFrom.z; - this._z = vFrom.y; - this._w = r; - } - } else { - // crossVectors( vFrom, vTo ); // inlined to avoid cyclic dependency on Vector3 - this._x = vFrom.y * vTo.z - vFrom.z * vTo.y; - this._y = vFrom.z * vTo.x - vFrom.x * vTo.z; - this._z = vFrom.x * vTo.y - vFrom.y * vTo.x; - this._w = r; - } - - return this.normalize(); - }, - angleTo: function angleTo(q) { - return 2 * Math.acos(Math.abs(MathUtils.clamp(this.dot(q), -1, 1))); - }, - rotateTowards: function rotateTowards(q, step) { - var angle = this.angleTo(q); - if (angle === 0) return this; - var t = Math.min(1, step / angle); - this.slerp(q, t); - return this; - }, - inverse: function inverse() { - // quaternion is assumed to have unit length - return this.conjugate(); - }, - conjugate: function conjugate() { - this._x *= -1; - this._y *= -1; - this._z *= -1; - - this._onChangeCallback(); - - return this; - }, - dot: function dot(v) { - return this._x * v._x + this._y * v._y + this._z * v._z + this._w * v._w; - }, - lengthSq: function lengthSq() { - return this._x * this._x + this._y * this._y + this._z * this._z + this._w * this._w; - }, - length: function length() { - return Math.sqrt(this._x * this._x + this._y * this._y + this._z * this._z + this._w * this._w); - }, - normalize: function normalize() { - var l = this.length(); - - if (l === 0) { - this._x = 0; - this._y = 0; - this._z = 0; - this._w = 1; - } else { - l = 1 / l; - this._x = this._x * l; - this._y = this._y * l; - this._z = this._z * l; - this._w = this._w * l; - } - - this._onChangeCallback(); - - return this; - }, - multiply: function multiply(q, p) { - if (p !== undefined) { - console.warn('THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead.'); - return this.multiplyQuaternions(q, p); - } - - return this.multiplyQuaternions(this, q); - }, - premultiply: function premultiply(q) { - return this.multiplyQuaternions(q, this); - }, - multiplyQuaternions: function multiplyQuaternions(a, b) { - // from http://www.euclideanspace.com/maths/algebra/realNormedAlgebra/quaternions/code/index.htm - var qax = a._x; - var qay = a._y; - var qaz = a._z; - var qaw = a._w; - var qbx = b._x; - var qby = b._y; - var qbz = b._z; - var qbw = b._w; - this._x = qax * qbw + qaw * qbx + qay * qbz - qaz * qby; - this._y = qay * qbw + qaw * qby + qaz * qbx - qax * qbz; - this._z = qaz * qbw + qaw * qbz + qax * qby - qay * qbx; - this._w = qaw * qbw - qax * qbx - qay * qby - qaz * qbz; - - this._onChangeCallback(); - - return this; - }, - slerp: function slerp(qb, t) { - if (t === 0) return this; - if (t === 1) return this.copy(qb); - var x = this._x; - var y = this._y; - var z = this._z; - var w = this._w; // http://www.euclideanspace.com/maths/algebra/realNormedAlgebra/quaternions/slerp/ - - var cosHalfTheta = w * qb._w + x * qb._x + y * qb._y + z * qb._z; - - if (cosHalfTheta < 0) { - this._w = -qb._w; - this._x = -qb._x; - this._y = -qb._y; - this._z = -qb._z; - cosHalfTheta = -cosHalfTheta; - } else { - this.copy(qb); - } - - if (cosHalfTheta >= 1.0) { - this._w = w; - this._x = x; - this._y = y; - this._z = z; - return this; - } - - var sqrSinHalfTheta = 1.0 - cosHalfTheta * cosHalfTheta; - - if (sqrSinHalfTheta <= Number.EPSILON) { - var s = 1 - t; - this._w = s * w + t * this._w; - this._x = s * x + t * this._x; - this._y = s * y + t * this._y; - this._z = s * z + t * this._z; - this.normalize(); - - this._onChangeCallback(); - - return this; - } - - var sinHalfTheta = Math.sqrt(sqrSinHalfTheta); - var halfTheta = Math.atan2(sinHalfTheta, cosHalfTheta); - var ratioA = Math.sin((1 - t) * halfTheta) / sinHalfTheta; - var ratioB = Math.sin(t * halfTheta) / sinHalfTheta; - this._w = w * ratioA + this._w * ratioB; - this._x = x * ratioA + this._x * ratioB; - this._y = y * ratioA + this._y * ratioB; - this._z = z * ratioA + this._z * ratioB; - - this._onChangeCallback(); - - return this; - }, - equals: function equals(quaternion) { - return quaternion._x === this._x && quaternion._y === this._y && quaternion._z === this._z && quaternion._w === this._w; - }, - fromArray: function fromArray(array, offset) { - if (offset === undefined) offset = 0; - this._x = array[offset]; - this._y = array[offset + 1]; - this._z = array[offset + 2]; - this._w = array[offset + 3]; - - this._onChangeCallback(); - - return this; - }, - toArray: function toArray(array, offset) { - if (array === undefined) array = []; - if (offset === undefined) offset = 0; - array[offset] = this._x; - array[offset + 1] = this._y; - array[offset + 2] = this._z; - array[offset + 3] = this._w; - return array; - }, - fromBufferAttribute: function fromBufferAttribute(attribute, index) { - this._x = attribute.getX(index); - this._y = attribute.getY(index); - this._z = attribute.getZ(index); - this._w = attribute.getW(index); - return this; - }, - _onChange: function _onChange(callback) { - this._onChangeCallback = callback; - return this; - }, - _onChangeCallback: function _onChangeCallback() {} -}); - -/** - * @author mrdoob / http://mrdoob.com/ - * @author kile / http://kile.stravaganza.org/ - * @author philogb / http://blog.thejit.org/ - * @author mikael emtinger / http://gomo.se/ - * @author egraether / http://egraether.com/ - * @author WestLangley / http://github.com/WestLangley - */ - -var _vector = new Vector3(); - -var _quaternion = new Quaternion(); - -function Vector3() { - var x = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; - var y = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; - var z = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0; - this.x = x; - this.y = y; - this.z = z; -} - -Object.assign(Vector3.prototype, { - isVector3: true, - set: function set(x, y, z) { - this.x = x; - this.y = y; - this.z = z; - return this; - }, - setScalar: function setScalar(scalar) { - this.x = scalar; - this.y = scalar; - this.z = scalar; - return this; - }, - setX: function setX(x) { - this.x = x; - return this; - }, - setY: function setY(y) { - this.y = y; - return this; - }, - setZ: function setZ(z) { - this.z = z; - return this; - }, - setComponent: function setComponent(index, value) { - switch (index) { - case 0: - this.x = value; - break; - - case 1: - this.y = value; - break; - - case 2: - this.z = value; - break; - - default: - throw new Error("index is out of range: ".concat(index)); - } - - return this; - }, - getComponent: function getComponent(index) { - switch (index) { - case 0: - return this.x; - - case 1: - return this.y; - - case 2: - return this.z; - - default: - throw new Error("index is out of range: ".concat(index)); - } - }, - clone: function clone() { - return new this.constructor(this.x, this.y, this.z); - }, - copy: function copy(v) { - this.x = v.x; - this.y = v.y; - this.z = v.z; - return this; - }, - add: function add(v, w) { - if (w !== undefined) { - console.warn('THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead.'); - return this.addVectors(v, w); - } - - this.x += v.x; - this.y += v.y; - this.z += v.z; - return this; - }, - addScalar: function addScalar(s) { - this.x += s; - this.y += s; - this.z += s; - return this; - }, - addVectors: function addVectors(a, b) { - this.x = a.x + b.x; - this.y = a.y + b.y; - this.z = a.z + b.z; - return this; - }, - addScaledVector: function addScaledVector(v, s) { - this.x += v.x * s; - this.y += v.y * s; - this.z += v.z * s; - return this; - }, - sub: function sub(v, w) { - if (w !== undefined) { - console.warn('THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead.'); - return this.subVectors(v, w); - } - - this.x -= v.x; - this.y -= v.y; - this.z -= v.z; - return this; - }, - subScalar: function subScalar(s) { - this.x -= s; - this.y -= s; - this.z -= s; - return this; - }, - subVectors: function subVectors(a, b) { - this.x = a.x - b.x; - this.y = a.y - b.y; - this.z = a.z - b.z; - return this; - }, - multiply: function multiply(v, w) { - if (w !== undefined) { - console.warn('THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead.'); - return this.multiplyVectors(v, w); - } - - this.x *= v.x; - this.y *= v.y; - this.z *= v.z; - return this; - }, - multiplyScalar: function multiplyScalar(scalar) { - this.x *= scalar; - this.y *= scalar; - this.z *= scalar; - return this; - }, - multiplyVectors: function multiplyVectors(a, b) { - this.x = a.x * b.x; - this.y = a.y * b.y; - this.z = a.z * b.z; - return this; - }, - applyEuler: function applyEuler(euler) { - if (!(euler && euler.isEuler)) { - console.error('THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order.'); - } - - return this.applyQuaternion(_quaternion.setFromEuler(euler)); - }, - applyAxisAngle: function applyAxisAngle(axis, angle) { - return this.applyQuaternion(_quaternion.setFromAxisAngle(axis, angle)); - }, - applyMatrix3: function applyMatrix3(m) { - var x = this.x; - var y = this.y; - var z = this.z; - var e = m.elements; - this.x = e[0] * x + e[3] * y + e[6] * z; - this.y = e[1] * x + e[4] * y + e[7] * z; - this.z = e[2] * x + e[5] * y + e[8] * z; - return this; - }, - applyNormalMatrix: function applyNormalMatrix(m) { - return this.applyMatrix3(m).normalize(); - }, - applyMatrix4: function applyMatrix4(m) { - var x = this.x; - var y = this.y; - var z = this.z; - var e = m.elements; - var w = 1 / (e[3] * x + e[7] * y + e[11] * z + e[15]); - this.x = (e[0] * x + e[4] * y + e[8] * z + e[12]) * w; - this.y = (e[1] * x + e[5] * y + e[9] * z + e[13]) * w; - this.z = (e[2] * x + e[6] * y + e[10] * z + e[14]) * w; - return this; - }, - applyQuaternion: function applyQuaternion(q) { - var x = this.x; - var y = this.y; - var z = this.z; - var qx = q.x; - var qy = q.y; - var qz = q.z; - var qw = q.w; // calculate quat * vector - - var ix = qw * x + qy * z - qz * y; - var iy = qw * y + qz * x - qx * z; - var iz = qw * z + qx * y - qy * x; - var iw = -qx * x - qy * y - qz * z; // calculate result * inverse quat - - this.x = ix * qw + iw * -qx + iy * -qz - iz * -qy; - this.y = iy * qw + iw * -qy + iz * -qx - ix * -qz; - this.z = iz * qw + iw * -qz + ix * -qy - iy * -qx; - return this; - }, - project: function project(camera) { - return this.applyMatrix4(camera.matrixWorldInverse).applyMatrix4(camera.projectionMatrix); - }, - unproject: function unproject(camera) { - return this.applyMatrix4(camera.projectionMatrixInverse).applyMatrix4(camera.matrixWorld); - }, - transformDirection: function transformDirection(m) { - // input: THREE.Matrix4 affine matrix - // vector interpreted as a direction - var x = this.x; - var y = this.y; - var z = this.z; - var e = m.elements; - this.x = e[0] * x + e[4] * y + e[8] * z; - this.y = e[1] * x + e[5] * y + e[9] * z; - this.z = e[2] * x + e[6] * y + e[10] * z; - return this.normalize(); - }, - divide: function divide(v) { - this.x /= v.x; - this.y /= v.y; - this.z /= v.z; - return this; - }, - divideScalar: function divideScalar(scalar) { - return this.multiplyScalar(1 / scalar); - }, - min: function min(v) { - this.x = Math.min(this.x, v.x); - this.y = Math.min(this.y, v.y); - this.z = Math.min(this.z, v.z); - return this; - }, - max: function max(v) { - this.x = Math.max(this.x, v.x); - this.y = Math.max(this.y, v.y); - this.z = Math.max(this.z, v.z); - return this; - }, - clamp: function clamp(min, max) { - // assumes min < max, componentwise - this.x = Math.max(min.x, Math.min(max.x, this.x)); - this.y = Math.max(min.y, Math.min(max.y, this.y)); - this.z = Math.max(min.z, Math.min(max.z, this.z)); - return this; - }, - clampScalar: function clampScalar(minVal, maxVal) { - this.x = Math.max(minVal, Math.min(maxVal, this.x)); - this.y = Math.max(minVal, Math.min(maxVal, this.y)); - this.z = Math.max(minVal, Math.min(maxVal, this.z)); - return this; - }, - clampLength: function clampLength(min, max) { - var length = this.length(); - return this.divideScalar(length || 1).multiplyScalar(Math.max(min, Math.min(max, length))); - }, - floor: function floor() { - this.x = Math.floor(this.x); - this.y = Math.floor(this.y); - this.z = Math.floor(this.z); - return this; - }, - ceil: function ceil() { - this.x = Math.ceil(this.x); - this.y = Math.ceil(this.y); - this.z = Math.ceil(this.z); - return this; - }, - round: function round() { - this.x = Math.round(this.x); - this.y = Math.round(this.y); - this.z = Math.round(this.z); - return this; - }, - roundToZero: function roundToZero() { - this.x = this.x < 0 ? Math.ceil(this.x) : Math.floor(this.x); - this.y = this.y < 0 ? Math.ceil(this.y) : Math.floor(this.y); - this.z = this.z < 0 ? Math.ceil(this.z) : Math.floor(this.z); - return this; - }, - negate: function negate() { - this.x = -this.x; - this.y = -this.y; - this.z = -this.z; - return this; - }, - dot: function dot(v) { - return this.x * v.x + this.y * v.y + this.z * v.z; - }, - // TODO lengthSquared? - lengthSq: function lengthSq() { - return this.x * this.x + this.y * this.y + this.z * this.z; - }, - length: function length() { - return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z); - }, - manhattanLength: function manhattanLength() { - return Math.abs(this.x) + Math.abs(this.y) + Math.abs(this.z); - }, - normalize: function normalize() { - return this.divideScalar(this.length() || 1); - }, - setLength: function setLength(length) { - return this.normalize().multiplyScalar(length); - }, - lerp: function lerp(v, alpha) { - this.x += (v.x - this.x) * alpha; - this.y += (v.y - this.y) * alpha; - this.z += (v.z - this.z) * alpha; - return this; - }, - lerpVectors: function lerpVectors(v1, v2, alpha) { - this.x = v1.x + (v2.x - v1.x) * alpha; - this.y = v1.y + (v2.y - v1.y) * alpha; - this.z = v1.z + (v2.z - v1.z) * alpha; - return this; - }, - cross: function cross(v, w) { - if (w !== undefined) { - console.warn('THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead.'); - return this.crossVectors(v, w); - } - - return this.crossVectors(this, v); - }, - crossVectors: function crossVectors(a, b) { - var ax = a.x; - var ay = a.y; - var az = a.z; - var bx = b.x; - var by = b.y; - var bz = b.z; - this.x = ay * bz - az * by; - this.y = az * bx - ax * bz; - this.z = ax * by - ay * bx; - return this; - }, - projectOnVector: function projectOnVector(v) { - var denominator = v.lengthSq(); - if (denominator === 0) return this.set(0, 0, 0); - var scalar = v.dot(this) / denominator; - return this.copy(v).multiplyScalar(scalar); - }, - projectOnPlane: function projectOnPlane(planeNormal) { - _vector.copy(this).projectOnVector(planeNormal); - - return this.sub(_vector); - }, - reflect: function reflect(normal) { - // reflect incident vector off plane orthogonal to normal - // normal is assumed to have unit length - return this.sub(_vector.copy(normal).multiplyScalar(2 * this.dot(normal))); - }, - angleTo: function angleTo(v) { - var denominator = Math.sqrt(this.lengthSq() * v.lengthSq()); - if (denominator === 0) return Math.PI / 2; - var theta = this.dot(v) / denominator; // clamp, to handle numerical problems - - return Math.acos(MathUtils.clamp(theta, -1, 1)); - }, - distanceTo: function distanceTo(v) { - return Math.sqrt(this.distanceToSquared(v)); - }, - distanceToSquared: function distanceToSquared(v) { - var dx = this.x - v.x; - var dy = this.y - v.y; - var dz = this.z - v.z; - return dx * dx + dy * dy + dz * dz; - }, - manhattanDistanceTo: function manhattanDistanceTo(v) { - return Math.abs(this.x - v.x) + Math.abs(this.y - v.y) + Math.abs(this.z - v.z); - }, - setFromSpherical: function setFromSpherical(s) { - return this.setFromSphericalCoords(s.radius, s.phi, s.theta); - }, - setFromSphericalCoords: function setFromSphericalCoords(radius, phi, theta) { - var sinPhiRadius = Math.sin(phi) * radius; - this.x = sinPhiRadius * Math.sin(theta); - this.y = Math.cos(phi) * radius; - this.z = sinPhiRadius * Math.cos(theta); - return this; - }, - setFromCylindrical: function setFromCylindrical(c) { - return this.setFromCylindricalCoords(c.radius, c.theta, c.y); - }, - setFromCylindricalCoords: function setFromCylindricalCoords(radius, theta, y) { - this.x = radius * Math.sin(theta); - this.y = y; - this.z = radius * Math.cos(theta); - return this; - }, - setFromMatrixPosition: function setFromMatrixPosition(m) { - var e = m.elements; - this.x = e[12]; - this.y = e[13]; - this.z = e[14]; - return this; - }, - setFromMatrixScale: function setFromMatrixScale(m) { - var sx = this.setFromMatrixColumn(m, 0).length(); - var sy = this.setFromMatrixColumn(m, 1).length(); - var sz = this.setFromMatrixColumn(m, 2).length(); - this.x = sx; - this.y = sy; - this.z = sz; - return this; - }, - setFromMatrixColumn: function setFromMatrixColumn(m, index) { - return this.fromArray(m.elements, index * 4); - }, - setFromMatrix3Column: function setFromMatrix3Column(m, index) { - return this.fromArray(m.elements, index * 3); - }, - equals: function equals(v) { - return v.x === this.x && v.y === this.y && v.z === this.z; - }, - fromArray: function fromArray(array, offset) { - if (offset === undefined) offset = 0; - this.x = array[offset]; - this.y = array[offset + 1]; - this.z = array[offset + 2]; - return this; - }, - toArray: function toArray(array, offset) { - if (array === undefined) array = []; - if (offset === undefined) offset = 0; - array[offset] = this.x; - array[offset + 1] = this.y; - array[offset + 2] = this.z; - return array; - }, - fromBufferAttribute: function fromBufferAttribute(attribute, index, offset) { - if (offset !== undefined) { - console.warn('THREE.Vector3: offset has been removed from .fromBufferAttribute().'); - } - - this.x = attribute.getX(index); - this.y = attribute.getY(index); - this.z = attribute.getZ(index); - return this; - }, - random: function random() { - this.x = Math.random(); - this.y = Math.random(); - this.z = Math.random(); - return this; - } -}); - -var _v1 = new Vector3(); - -var _m1 = new Matrix4(); - -var _zero = new Vector3(0, 0, 0); - -var _one = new Vector3(1, 1, 1); - -var _x = new Vector3(); - -var _y = new Vector3(); - -var _z = new Vector3(); -/** - * @author mrdoob / http://mrdoob.com/ - * @author supereggbert / http://www.paulbrunt.co.uk/ - * @author philogb / http://blog.thejit.org/ - * @author jordi_ros / http://plattsoft.com - * @author D1plo1d / http://github.com/D1plo1d - * @author alteredq / http://alteredqualia.com/ - * @author mikael emtinger / http://gomo.se/ - * @author timknip / http://www.floorplanner.com/ - * @author bhouston / http://clara.io - * @author WestLangley / http://github.com/WestLangley - */ - - -function Matrix4() { - this.elements = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]; - - if (arguments.length > 0) { - console.error('THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.'); - } -} - -Object.assign(Matrix4.prototype, { - isMatrix4: true, - set: function set(n11, n12, n13, n14, n21, n22, n23, n24, n31, n32, n33, n34, n41, n42, n43, n44) { - var te = this.elements; - te[0] = n11; - te[4] = n12; - te[8] = n13; - te[12] = n14; - te[1] = n21; - te[5] = n22; - te[9] = n23; - te[13] = n24; - te[2] = n31; - te[6] = n32; - te[10] = n33; - te[14] = n34; - te[3] = n41; - te[7] = n42; - te[11] = n43; - te[15] = n44; - return this; - }, - identity: function identity() { - this.set(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); - return this; - }, - clone: function clone() { - return new Matrix4().fromArray(this.elements); - }, - copy: function copy(m) { - var te = this.elements; - var me = m.elements; - te[0] = me[0]; - te[1] = me[1]; - te[2] = me[2]; - te[3] = me[3]; - te[4] = me[4]; - te[5] = me[5]; - te[6] = me[6]; - te[7] = me[7]; - te[8] = me[8]; - te[9] = me[9]; - te[10] = me[10]; - te[11] = me[11]; - te[12] = me[12]; - te[13] = me[13]; - te[14] = me[14]; - te[15] = me[15]; - return this; - }, - copyPosition: function copyPosition(m) { - var te = this.elements; - var me = m.elements; - te[12] = me[12]; - te[13] = me[13]; - te[14] = me[14]; - return this; - }, - extractBasis: function extractBasis(xAxis, yAxis, zAxis) { - xAxis.setFromMatrixColumn(this, 0); - yAxis.setFromMatrixColumn(this, 1); - zAxis.setFromMatrixColumn(this, 2); - return this; - }, - makeBasis: function makeBasis(xAxis, yAxis, zAxis) { - this.set(xAxis.x, yAxis.x, zAxis.x, 0, xAxis.y, yAxis.y, zAxis.y, 0, xAxis.z, yAxis.z, zAxis.z, 0, 0, 0, 0, 1); - return this; - }, - extractRotation: function extractRotation(m) { - // this method does not support reflection matrices - var te = this.elements; - var me = m.elements; - - var scaleX = 1 / _v1.setFromMatrixColumn(m, 0).length(); - - var scaleY = 1 / _v1.setFromMatrixColumn(m, 1).length(); - - var scaleZ = 1 / _v1.setFromMatrixColumn(m, 2).length(); - - te[0] = me[0] * scaleX; - te[1] = me[1] * scaleX; - te[2] = me[2] * scaleX; - te[3] = 0; - te[4] = me[4] * scaleY; - te[5] = me[5] * scaleY; - te[6] = me[6] * scaleY; - te[7] = 0; - te[8] = me[8] * scaleZ; - te[9] = me[9] * scaleZ; - te[10] = me[10] * scaleZ; - te[11] = 0; - te[12] = 0; - te[13] = 0; - te[14] = 0; - te[15] = 1; - return this; - }, - makeRotationFromEuler: function makeRotationFromEuler(euler) { - if (!(euler && euler.isEuler)) { - console.error('THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.'); - } - - var te = this.elements; - var x = euler.x; - var y = euler.y; - var z = euler.z; - var a = Math.cos(x); - var b = Math.sin(x); - var c = Math.cos(y); - var d = Math.sin(y); - var e = Math.cos(z); - var f = Math.sin(z); - - if (euler.order === 'XYZ') { - var ae = a * e; - var af = a * f; - var be = b * e; - var bf = b * f; - te[0] = c * e; - te[4] = -c * f; - te[8] = d; - te[1] = af + be * d; - te[5] = ae - bf * d; - te[9] = -b * c; - te[2] = bf - ae * d; - te[6] = be + af * d; - te[10] = a * c; - } else if (euler.order === 'YXZ') { - var ce = c * e; - var cf = c * f; - var de = d * e; - var df = d * f; - te[0] = ce + df * b; - te[4] = de * b - cf; - te[8] = a * d; - te[1] = a * f; - te[5] = a * e; - te[9] = -b; - te[2] = cf * b - de; - te[6] = df + ce * b; - te[10] = a * c; - } else if (euler.order === 'ZXY') { - var _ce = c * e; - - var _cf = c * f; - - var _de = d * e; - - var _df = d * f; - - te[0] = _ce - _df * b; - te[4] = -a * f; - te[8] = _de + _cf * b; - te[1] = _cf + _de * b; - te[5] = a * e; - te[9] = _df - _ce * b; - te[2] = -a * d; - te[6] = b; - te[10] = a * c; - } else if (euler.order === 'ZYX') { - var _ae = a * e; - - var _af = a * f; - - var _be = b * e; - - var _bf = b * f; - - te[0] = c * e; - te[4] = _be * d - _af; - te[8] = _ae * d + _bf; - te[1] = c * f; - te[5] = _bf * d + _ae; - te[9] = _af * d - _be; - te[2] = -d; - te[6] = b * c; - te[10] = a * c; - } else if (euler.order === 'YZX') { - var ac = a * c; - var ad = a * d; - var bc = b * c; - var bd = b * d; - te[0] = c * e; - te[4] = bd - ac * f; - te[8] = bc * f + ad; - te[1] = f; - te[5] = a * e; - te[9] = -b * e; - te[2] = -d * e; - te[6] = ad * f + bc; - te[10] = ac - bd * f; - } else if (euler.order === 'XZY') { - var _ac = a * c; - - var _ad = a * d; - - var _bc = b * c; - - var _bd = b * d; - - te[0] = c * e; - te[4] = -f; - te[8] = d * e; - te[1] = _ac * f + _bd; - te[5] = a * e; - te[9] = _ad * f - _bc; - te[2] = _bc * f - _ad; - te[6] = b * e; - te[10] = _bd * f + _ac; - } // bottom row - - - te[3] = 0; - te[7] = 0; - te[11] = 0; // last column - - te[12] = 0; - te[13] = 0; - te[14] = 0; - te[15] = 1; - return this; - }, - makeRotationFromQuaternion: function makeRotationFromQuaternion(q) { - return this.compose(_zero, q, _one); - }, - lookAt: function lookAt(eye, target, up) { - var te = this.elements; - - _z.subVectors(eye, target); - - if (_z.lengthSq() === 0) { - // eye and target are in the same position - _z.z = 1; - } - - _z.normalize(); - - _x.crossVectors(up, _z); - - if (_x.lengthSq() === 0) { - // up and z are parallel - if (Math.abs(up.z) === 1) { - _z.x += 0.0001; - } else { - _z.z += 0.0001; - } - - _z.normalize(); - - _x.crossVectors(up, _z); - } - - _x.normalize(); - - _y.crossVectors(_z, _x); - - te[0] = _x.x; - te[4] = _y.x; - te[8] = _z.x; - te[1] = _x.y; - te[5] = _y.y; - te[9] = _z.y; - te[2] = _x.z; - te[6] = _y.z; - te[10] = _z.z; - return this; - }, - multiply: function multiply(m, n) { - if (n !== undefined) { - console.warn('THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead.'); - return this.multiplyMatrices(m, n); - } - - return this.multiplyMatrices(this, m); - }, - premultiply: function premultiply(m) { - return this.multiplyMatrices(m, this); - }, - multiplyMatrices: function multiplyMatrices(a, b) { - var ae = a.elements; - var be = b.elements; - var te = this.elements; - var a11 = ae[0]; - var a12 = ae[4]; - var a13 = ae[8]; - var a14 = ae[12]; - var a21 = ae[1]; - var a22 = ae[5]; - var a23 = ae[9]; - var a24 = ae[13]; - var a31 = ae[2]; - var a32 = ae[6]; - var a33 = ae[10]; - var a34 = ae[14]; - var a41 = ae[3]; - var a42 = ae[7]; - var a43 = ae[11]; - var a44 = ae[15]; - var b11 = be[0]; - var b12 = be[4]; - var b13 = be[8]; - var b14 = be[12]; - var b21 = be[1]; - var b22 = be[5]; - var b23 = be[9]; - var b24 = be[13]; - var b31 = be[2]; - var b32 = be[6]; - var b33 = be[10]; - var b34 = be[14]; - var b41 = be[3]; - var b42 = be[7]; - var b43 = be[11]; - var b44 = be[15]; - te[0] = a11 * b11 + a12 * b21 + a13 * b31 + a14 * b41; - te[4] = a11 * b12 + a12 * b22 + a13 * b32 + a14 * b42; - te[8] = a11 * b13 + a12 * b23 + a13 * b33 + a14 * b43; - te[12] = a11 * b14 + a12 * b24 + a13 * b34 + a14 * b44; - te[1] = a21 * b11 + a22 * b21 + a23 * b31 + a24 * b41; - te[5] = a21 * b12 + a22 * b22 + a23 * b32 + a24 * b42; - te[9] = a21 * b13 + a22 * b23 + a23 * b33 + a24 * b43; - te[13] = a21 * b14 + a22 * b24 + a23 * b34 + a24 * b44; - te[2] = a31 * b11 + a32 * b21 + a33 * b31 + a34 * b41; - te[6] = a31 * b12 + a32 * b22 + a33 * b32 + a34 * b42; - te[10] = a31 * b13 + a32 * b23 + a33 * b33 + a34 * b43; - te[14] = a31 * b14 + a32 * b24 + a33 * b34 + a34 * b44; - te[3] = a41 * b11 + a42 * b21 + a43 * b31 + a44 * b41; - te[7] = a41 * b12 + a42 * b22 + a43 * b32 + a44 * b42; - te[11] = a41 * b13 + a42 * b23 + a43 * b33 + a44 * b43; - te[15] = a41 * b14 + a42 * b24 + a43 * b34 + a44 * b44; - return this; - }, - multiplyScalar: function multiplyScalar(s) { - var te = this.elements; - te[0] *= s; - te[4] *= s; - te[8] *= s; - te[12] *= s; - te[1] *= s; - te[5] *= s; - te[9] *= s; - te[13] *= s; - te[2] *= s; - te[6] *= s; - te[10] *= s; - te[14] *= s; - te[3] *= s; - te[7] *= s; - te[11] *= s; - te[15] *= s; - return this; - }, - determinant: function determinant() { - var te = this.elements; - var n11 = te[0]; - var n12 = te[4]; - var n13 = te[8]; - var n14 = te[12]; - var n21 = te[1]; - var n22 = te[5]; - var n23 = te[9]; - var n24 = te[13]; - var n31 = te[2]; - var n32 = te[6]; - var n33 = te[10]; - var n34 = te[14]; - var n41 = te[3]; - var n42 = te[7]; - var n43 = te[11]; - var n44 = te[15]; // TODO: make this more efficient - // ( based on http://www.euclideanspace.com/maths/algebra/matrix/functions/inverse/fourD/index.htm ) - - return n41 * (+n14 * n23 * n32 - n13 * n24 * n32 - n14 * n22 * n33 + n12 * n24 * n33 + n13 * n22 * n34 - n12 * n23 * n34) + n42 * (+n11 * n23 * n34 - n11 * n24 * n33 + n14 * n21 * n33 - n13 * n21 * n34 + n13 * n24 * n31 - n14 * n23 * n31) + n43 * (+n11 * n24 * n32 - n11 * n22 * n34 - n14 * n21 * n32 + n12 * n21 * n34 + n14 * n22 * n31 - n12 * n24 * n31) + n44 * (-n13 * n22 * n31 - n11 * n23 * n32 + n11 * n22 * n33 + n13 * n21 * n32 - n12 * n21 * n33 + n12 * n23 * n31); - }, - transpose: function transpose() { - var te = this.elements; - var tmp; - tmp = te[1]; - te[1] = te[4]; - te[4] = tmp; - tmp = te[2]; - te[2] = te[8]; - te[8] = tmp; - tmp = te[6]; - te[6] = te[9]; - te[9] = tmp; - tmp = te[3]; - te[3] = te[12]; - te[12] = tmp; - tmp = te[7]; - te[7] = te[13]; - te[13] = tmp; - tmp = te[11]; - te[11] = te[14]; - te[14] = tmp; - return this; - }, - setPosition: function setPosition(x, y, z) { - var te = this.elements; - - if (x.isVector3) { - te[12] = x.x; - te[13] = x.y; - te[14] = x.z; - } else { - te[12] = x; - te[13] = y; - te[14] = z; - } - - return this; - }, - getInverse: function getInverse(m, throwOnDegenerate) { - if (throwOnDegenerate !== undefined) { - console.warn('THREE.Matrix4: .getInverse() can no longer be configured to throw on degenerate.'); - } // based on http://www.euclideanspace.com/maths/algebra/matrix/functions/inverse/fourD/index.htm - - - var te = this.elements; - var me = m.elements; - var n11 = me[0]; - var n21 = me[1]; - var n31 = me[2]; - var n41 = me[3]; - var n12 = me[4]; - var n22 = me[5]; - var n32 = me[6]; - var n42 = me[7]; - var n13 = me[8]; - var n23 = me[9]; - var n33 = me[10]; - var n43 = me[11]; - var n14 = me[12]; - var n24 = me[13]; - var n34 = me[14]; - var n44 = me[15]; - var t11 = n23 * n34 * n42 - n24 * n33 * n42 + n24 * n32 * n43 - n22 * n34 * n43 - n23 * n32 * n44 + n22 * n33 * n44; - var t12 = n14 * n33 * n42 - n13 * n34 * n42 - n14 * n32 * n43 + n12 * n34 * n43 + n13 * n32 * n44 - n12 * n33 * n44; - var t13 = n13 * n24 * n42 - n14 * n23 * n42 + n14 * n22 * n43 - n12 * n24 * n43 - n13 * n22 * n44 + n12 * n23 * n44; - var t14 = n14 * n23 * n32 - n13 * n24 * n32 - n14 * n22 * n33 + n12 * n24 * n33 + n13 * n22 * n34 - n12 * n23 * n34; - var det = n11 * t11 + n21 * t12 + n31 * t13 + n41 * t14; - if (det === 0) return this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - var detInv = 1 / det; - te[0] = t11 * detInv; - te[1] = (n24 * n33 * n41 - n23 * n34 * n41 - n24 * n31 * n43 + n21 * n34 * n43 + n23 * n31 * n44 - n21 * n33 * n44) * detInv; - te[2] = (n22 * n34 * n41 - n24 * n32 * n41 + n24 * n31 * n42 - n21 * n34 * n42 - n22 * n31 * n44 + n21 * n32 * n44) * detInv; - te[3] = (n23 * n32 * n41 - n22 * n33 * n41 - n23 * n31 * n42 + n21 * n33 * n42 + n22 * n31 * n43 - n21 * n32 * n43) * detInv; - te[4] = t12 * detInv; - te[5] = (n13 * n34 * n41 - n14 * n33 * n41 + n14 * n31 * n43 - n11 * n34 * n43 - n13 * n31 * n44 + n11 * n33 * n44) * detInv; - te[6] = (n14 * n32 * n41 - n12 * n34 * n41 - n14 * n31 * n42 + n11 * n34 * n42 + n12 * n31 * n44 - n11 * n32 * n44) * detInv; - te[7] = (n12 * n33 * n41 - n13 * n32 * n41 + n13 * n31 * n42 - n11 * n33 * n42 - n12 * n31 * n43 + n11 * n32 * n43) * detInv; - te[8] = t13 * detInv; - te[9] = (n14 * n23 * n41 - n13 * n24 * n41 - n14 * n21 * n43 + n11 * n24 * n43 + n13 * n21 * n44 - n11 * n23 * n44) * detInv; - te[10] = (n12 * n24 * n41 - n14 * n22 * n41 + n14 * n21 * n42 - n11 * n24 * n42 - n12 * n21 * n44 + n11 * n22 * n44) * detInv; - te[11] = (n13 * n22 * n41 - n12 * n23 * n41 - n13 * n21 * n42 + n11 * n23 * n42 + n12 * n21 * n43 - n11 * n22 * n43) * detInv; - te[12] = t14 * detInv; - te[13] = (n13 * n24 * n31 - n14 * n23 * n31 + n14 * n21 * n33 - n11 * n24 * n33 - n13 * n21 * n34 + n11 * n23 * n34) * detInv; - te[14] = (n14 * n22 * n31 - n12 * n24 * n31 - n14 * n21 * n32 + n11 * n24 * n32 + n12 * n21 * n34 - n11 * n22 * n34) * detInv; - te[15] = (n12 * n23 * n31 - n13 * n22 * n31 + n13 * n21 * n32 - n11 * n23 * n32 - n12 * n21 * n33 + n11 * n22 * n33) * detInv; - return this; - }, - scale: function scale(v) { - var te = this.elements; - var x = v.x; - var y = v.y; - var z = v.z; - te[0] *= x; - te[4] *= y; - te[8] *= z; - te[1] *= x; - te[5] *= y; - te[9] *= z; - te[2] *= x; - te[6] *= y; - te[10] *= z; - te[3] *= x; - te[7] *= y; - te[11] *= z; - return this; - }, - getMaxScaleOnAxis: function getMaxScaleOnAxis() { - var te = this.elements; - var scaleXSq = te[0] * te[0] + te[1] * te[1] + te[2] * te[2]; - var scaleYSq = te[4] * te[4] + te[5] * te[5] + te[6] * te[6]; - var scaleZSq = te[8] * te[8] + te[9] * te[9] + te[10] * te[10]; - return Math.sqrt(Math.max(scaleXSq, scaleYSq, scaleZSq)); - }, - makeTranslation: function makeTranslation(x, y, z) { - this.set(1, 0, 0, x, 0, 1, 0, y, 0, 0, 1, z, 0, 0, 0, 1); - return this; - }, - makeRotationX: function makeRotationX(theta) { - var c = Math.cos(theta); - var s = Math.sin(theta); - this.set(1, 0, 0, 0, 0, c, -s, 0, 0, s, c, 0, 0, 0, 0, 1); - return this; - }, - makeRotationY: function makeRotationY(theta) { - var c = Math.cos(theta); - var s = Math.sin(theta); - this.set(c, 0, s, 0, 0, 1, 0, 0, -s, 0, c, 0, 0, 0, 0, 1); - return this; - }, - makeRotationZ: function makeRotationZ(theta) { - var c = Math.cos(theta); - var s = Math.sin(theta); - this.set(c, -s, 0, 0, s, c, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); - return this; - }, - makeRotationAxis: function makeRotationAxis(axis, angle) { - // Based on http://www.gamedev.net/reference/articles/article1199.asp - var c = Math.cos(angle); - var s = Math.sin(angle); - var t = 1 - c; - var x = axis.x; - var y = axis.y; - var z = axis.z; - var tx = t * x; - var ty = t * y; - this.set(tx * x + c, tx * y - s * z, tx * z + s * y, 0, tx * y + s * z, ty * y + c, ty * z - s * x, 0, tx * z - s * y, ty * z + s * x, t * z * z + c, 0, 0, 0, 0, 1); - return this; - }, - makeScale: function makeScale(x, y, z) { - this.set(x, 0, 0, 0, 0, y, 0, 0, 0, 0, z, 0, 0, 0, 0, 1); - return this; - }, - makeShear: function makeShear(x, y, z) { - this.set(1, y, z, 0, x, 1, z, 0, x, y, 1, 0, 0, 0, 0, 1); - return this; - }, - compose: function compose(position, quaternion, scale) { - var te = this.elements; - var x = quaternion._x; - var y = quaternion._y; - var z = quaternion._z; - var w = quaternion._w; - var x2 = x + x; - var y2 = y + y; - var z2 = z + z; - var xx = x * x2; - var xy = x * y2; - var xz = x * z2; - var yy = y * y2; - var yz = y * z2; - var zz = z * z2; - var wx = w * x2; - var wy = w * y2; - var wz = w * z2; - var sx = scale.x; - var sy = scale.y; - var sz = scale.z; - te[0] = (1 - (yy + zz)) * sx; - te[1] = (xy + wz) * sx; - te[2] = (xz - wy) * sx; - te[3] = 0; - te[4] = (xy - wz) * sy; - te[5] = (1 - (xx + zz)) * sy; - te[6] = (yz + wx) * sy; - te[7] = 0; - te[8] = (xz + wy) * sz; - te[9] = (yz - wx) * sz; - te[10] = (1 - (xx + yy)) * sz; - te[11] = 0; - te[12] = position.x; - te[13] = position.y; - te[14] = position.z; - te[15] = 1; - return this; - }, - decompose: function decompose(position, quaternion, scale) { - var te = this.elements; - - var sx = _v1.set(te[0], te[1], te[2]).length(); - - var sy = _v1.set(te[4], te[5], te[6]).length(); - - var sz = _v1.set(te[8], te[9], te[10]).length(); // if determine is negative, we need to invert one scale - - - var det = this.determinant(); - if (det < 0) sx = -sx; - position.x = te[12]; - position.y = te[13]; - position.z = te[14]; // scale the rotation part - - _m1.copy(this); - - var invSX = 1 / sx; - var invSY = 1 / sy; - var invSZ = 1 / sz; - _m1.elements[0] *= invSX; - _m1.elements[1] *= invSX; - _m1.elements[2] *= invSX; - _m1.elements[4] *= invSY; - _m1.elements[5] *= invSY; - _m1.elements[6] *= invSY; - _m1.elements[8] *= invSZ; - _m1.elements[9] *= invSZ; - _m1.elements[10] *= invSZ; - quaternion.setFromRotationMatrix(_m1); - scale.x = sx; - scale.y = sy; - scale.z = sz; - return this; - }, - makePerspective: function makePerspective(left, right, top, bottom, near, far) { - if (far === undefined) { - console.warn('THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.'); - } - - var te = this.elements; - var x = 2 * near / (right - left); - var y = 2 * near / (top - bottom); - var a = (right + left) / (right - left); - var b = (top + bottom) / (top - bottom); - var c = -(far + near) / (far - near); - var d = -2 * far * near / (far - near); - te[0] = x; - te[4] = 0; - te[8] = a; - te[12] = 0; - te[1] = 0; - te[5] = y; - te[9] = b; - te[13] = 0; - te[2] = 0; - te[6] = 0; - te[10] = c; - te[14] = d; - te[3] = 0; - te[7] = 0; - te[11] = -1; - te[15] = 0; - return this; - }, - makeOrthographic: function makeOrthographic(left, right, top, bottom, near, far) { - var te = this.elements; - var w = 1.0 / (right - left); - var h = 1.0 / (top - bottom); - var p = 1.0 / (far - near); - var x = (right + left) * w; - var y = (top + bottom) * h; - var z = (far + near) * p; - te[0] = 2 * w; - te[4] = 0; - te[8] = 0; - te[12] = -x; - te[1] = 0; - te[5] = 2 * h; - te[9] = 0; - te[13] = -y; - te[2] = 0; - te[6] = 0; - te[10] = -2 * p; - te[14] = -z; - te[3] = 0; - te[7] = 0; - te[11] = 0; - te[15] = 1; - return this; - }, - equals: function equals(matrix) { - var te = this.elements; - var me = matrix.elements; - - for (var i = 0; i < 16; i++) { - if (te[i] !== me[i]) return false; - } - - return true; - }, - fromArray: function fromArray(array, offset) { - if (offset === undefined) offset = 0; - - for (var i = 0; i < 16; i++) { - this.elements[i] = array[i + offset]; - } - - return this; - }, - toArray: function toArray(array, offset) { - if (array === undefined) array = []; - if (offset === undefined) offset = 0; - var te = this.elements; - array[offset] = te[0]; - array[offset + 1] = te[1]; - array[offset + 2] = te[2]; - array[offset + 3] = te[3]; - array[offset + 4] = te[4]; - array[offset + 5] = te[5]; - array[offset + 6] = te[6]; - array[offset + 7] = te[7]; - array[offset + 8] = te[8]; - array[offset + 9] = te[9]; - array[offset + 10] = te[10]; - array[offset + 11] = te[11]; - array[offset + 12] = te[12]; - array[offset + 13] = te[13]; - array[offset + 14] = te[14]; - array[offset + 15] = te[15]; - return array; - } -}); - -/** - * @author mrdoob / http://mrdoob.com/ - * @author WestLangley / http://github.com/WestLangley - * @author bhouston / http://clara.io - */ - -var _matrix = new Matrix4(); - -var _quaternion$1 = new Quaternion(); - -function Euler() { - var x = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; - var y = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; - var z = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0; - var order = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : Euler.DefaultOrder; - this._x = x; - this._y = y; - this._z = z; - this._order = order; -} - -Euler.RotationOrders = ['XYZ', 'YZX', 'ZXY', 'XZY', 'YXZ', 'ZYX']; -Euler.DefaultOrder = 'XYZ'; -Object.defineProperties(Euler.prototype, { - x: { - get: function get() { - return this._x; - }, - set: function set(value) { - this._x = value; - - this._onChangeCallback(); - } - }, - y: { - get: function get() { - return this._y; - }, - set: function set(value) { - this._y = value; - - this._onChangeCallback(); - } - }, - z: { - get: function get() { - return this._z; - }, - set: function set(value) { - this._z = value; - - this._onChangeCallback(); - } - }, - order: { - get: function get() { - return this._order; - }, - set: function set(value) { - this._order = value; - - this._onChangeCallback(); - } - } -}); -Object.assign(Euler.prototype, { - isEuler: true, - set: function set(x, y, z, order) { - this._x = x; - this._y = y; - this._z = z; - this._order = order || this._order; - - this._onChangeCallback(); - - return this; - }, - clone: function clone() { - return new this.constructor(this._x, this._y, this._z, this._order); - }, - copy: function copy(euler) { - this._x = euler._x; - this._y = euler._y; - this._z = euler._z; - this._order = euler._order; - - this._onChangeCallback(); - - return this; - }, - setFromRotationMatrix: function setFromRotationMatrix(m, order, update) { - var clamp = MathUtils.clamp; // assumes the upper 3x3 of m is a pure rotation matrix (i.e, unscaled) - - var te = m.elements; - var m11 = te[0]; - var m12 = te[4]; - var m13 = te[8]; - var m21 = te[1]; - var m22 = te[5]; - var m23 = te[9]; - var m31 = te[2]; - var m32 = te[6]; - var m33 = te[10]; - order = order || this._order; - - switch (order) { - case 'XYZ': - this._y = Math.asin(clamp(m13, -1, 1)); - - if (Math.abs(m13) < 0.9999999) { - this._x = Math.atan2(-m23, m33); - this._z = Math.atan2(-m12, m11); - } else { - this._x = Math.atan2(m32, m22); - this._z = 0; - } - - break; - - case 'YXZ': - this._x = Math.asin(-clamp(m23, -1, 1)); - - if (Math.abs(m23) < 0.9999999) { - this._y = Math.atan2(m13, m33); - this._z = Math.atan2(m21, m22); - } else { - this._y = Math.atan2(-m31, m11); - this._z = 0; - } - - break; - - case 'ZXY': - this._x = Math.asin(clamp(m32, -1, 1)); - - if (Math.abs(m32) < 0.9999999) { - this._y = Math.atan2(-m31, m33); - this._z = Math.atan2(-m12, m22); - } else { - this._y = 0; - this._z = Math.atan2(m21, m11); - } - - break; - - case 'ZYX': - this._y = Math.asin(-clamp(m31, -1, 1)); - - if (Math.abs(m31) < 0.9999999) { - this._x = Math.atan2(m32, m33); - this._z = Math.atan2(m21, m11); - } else { - this._x = 0; - this._z = Math.atan2(-m12, m22); - } - - break; - - case 'YZX': - this._z = Math.asin(clamp(m21, -1, 1)); - - if (Math.abs(m21) < 0.9999999) { - this._x = Math.atan2(-m23, m22); - this._y = Math.atan2(-m31, m11); - } else { - this._x = 0; - this._y = Math.atan2(m13, m33); - } - - break; - - case 'XZY': - this._z = Math.asin(-clamp(m12, -1, 1)); - - if (Math.abs(m12) < 0.9999999) { - this._x = Math.atan2(m32, m22); - this._y = Math.atan2(m13, m11); - } else { - this._x = Math.atan2(-m23, m33); - this._y = 0; - } - - break; - - default: - console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: ".concat(order)); - } - - this._order = order; - if (update !== false) this._onChangeCallback(); - return this; - }, - setFromQuaternion: function setFromQuaternion(q, order, update) { - _matrix.makeRotationFromQuaternion(q); - - return this.setFromRotationMatrix(_matrix, order, update); - }, - setFromVector3: function setFromVector3(v, order) { - return this.set(v.x, v.y, v.z, order || this._order); - }, - reorder: function reorder(newOrder) { - // WARNING: this discards revolution information -bhouston - _quaternion$1.setFromEuler(this); - - return this.setFromQuaternion(_quaternion$1, newOrder); - }, - equals: function equals(euler) { - return euler._x === this._x && euler._y === this._y && euler._z === this._z && euler._order === this._order; - }, - fromArray: function fromArray(array) { - this._x = array[0]; - this._y = array[1]; - this._z = array[2]; - if (array[3] !== undefined) this._order = array[3]; - - this._onChangeCallback(); - - return this; - }, - toArray: function toArray(array, offset) { - if (array === undefined) array = []; - if (offset === undefined) offset = 0; - array[offset] = this._x; - array[offset + 1] = this._y; - array[offset + 2] = this._z; - array[offset + 3] = this._order; - return array; - }, - toVector3: function toVector3(optionalResult) { - if (optionalResult) { - return optionalResult.set(this._x, this._y, this._z); - } - - return new Vector3(this._x, this._y, this._z); - }, - _onChange: function _onChange(callback) { - this._onChangeCallback = callback; - return this; - }, - _onChangeCallback: function _onChangeCallback() {} -}); - -/** - * 欧拉角旋转 转 四元数 - * @param x - * @param y - * @param z - */ -function eulerToQuaternion(x, y, z) { - var degToAngle = Math.PI / 180; - var v3 = new Euler(x * degToAngle, y * degToAngle, z * degToAngle); - var quat = new Quaternion(); - quat.setFromEuler(v3); - var rotation = { - x: quat.x, - y: quat.y, - z: quat.z, - w: quat.w, - }; - return rotation; -} - -var KeyframeTrack = /** @class */ (function () { - function KeyframeTrack(propertyTrack, duration) { - var propertyPath = propertyTrack.propertyPath, keyframes = propertyTrack.keyframes, _a = propertyTrack.valueType, valueType = _a === void 0 ? ValueType.Num : _a; - this.initPropertyPath(propertyPath); - this.initKeyframes(keyframes); - this.valueType = valueType; - this.duration = duration; - this.extrapolationMode = DEFAULT_EXTRAPOLATION_MODE; - this.cacheValueMap = {}; - this.cacheInterpolatorMap = {}; - } - // "1/BasicTransform/position/x" => name, entityId, componentType, attributePath - KeyframeTrack.prototype.initPropertyPath = function (propertyPath) { - var _a = propertyPath.split('/'), entityId = _a[0], componentType = _a[1], attributePath = _a.slice(2); - this.name = propertyPath; - this.entityId = entityId; - this.componentType = componentType; - this.attributePath = attributePath.join('.'); - }; - KeyframeTrack.prototype.initKeyframes = function (keyframes) { - this.keyframes = keyframes.sort(function (a, b) { - var _a = [a[0], b[0]], time1 = _a[0], time2 = _a[1]; - return time1 - time2; - }).map(function (keyframe) { return new Keyframe(keyframe); }); // 根据时间对关键帧排序 - this.firstKeyframe = this.keyframes[0]; // 第一个关键帧 - this.finallyKeyframe = this.keyframes[this.keyframes.length - 1]; // 最后一个关键帧 - }; - KeyframeTrack.prototype.getValueAt = function (deltaTime) { - // 1. 边界条件判断 - if (isNaN(deltaTime)) - return; - if (deltaTime <= 0) - return this.transformValueByType(this.firstKeyframe.getValue()); - if (deltaTime >= this.duration) - return this.finallyKeyframe.getValue(); // 边界条件 -> 时间大于总时长 (可能吗?) - // 2. 从cache里面找找看 - if (this.cacheValueMap[deltaTime]) - return this.cacheValueMap[deltaTime]; - // 3. 找到此时的时间在关键帧中所处的位置, 并计算参数 - var _a = this.calcParams(deltaTime), currentTime = _a[0], beginValue = _a[1], endValue = _a[2], duration = _a[3], interpolationType = _a[4]; - // 4. 计算插值 - var value = this.getInterpolationValue(currentTime, beginValue, endValue, duration, interpolationType); - // 5. 缓存 - this.cacheValueMap[deltaTime] = value; - return value; - }; - KeyframeTrack.prototype.getName = function () { - return this.name; - }; - KeyframeTrack.prototype.getComponentType = function () { - return this.componentType; - }; - KeyframeTrack.prototype.getAttributePath = function () { - return this.attributePath; - }; - KeyframeTrack.prototype.getValueType = function () { - return this.valueType; - }; - KeyframeTrack.prototype.transformValueByType = function (value) { - switch (this.valueType) { - case ValueType.Hex: - return transformHexToRgbaObj(value); - case ValueType.Quaternion: - return eulerToQuaternion(value.x, value.y, value.z); - default: - return value; - } - }; - KeyframeTrack.prototype.calcParams = function (deltaTime) { - switch (this.extrapolationMode) { - case ExtrapolationMode.Constant: - return this.calcParamsConstant(deltaTime); - case ExtrapolationMode.Linear: - return this.calcParamsLinear(deltaTime); - default: - return this.calcParamsLinear(deltaTime); - } - }; - // 计算 常量 关键帧外插模式时候的参数 (第一帧之前的帧跟第一帧一样, 最后一帧之后的帧和最后一帧一样, 如果前一个关键帧已经是最后一个关键帧,那么后一个关键帧也使用该帧) - KeyframeTrack.prototype.calcParamsConstant = function (deltaTime) { - var currentTime; - var beginValue; - var endValue; - var duration; - var interpolationType; - if (deltaTime <= this.firstKeyframe.getTime()) { // 2.1 处于第一个关键帧之前 - currentTime = deltaTime; - beginValue = this.firstKeyframe.getValue(); - endValue = this.firstKeyframe.getValue(); - duration = this.firstKeyframe.getTime(); - interpolationType = this.firstKeyframe.getType(); - } - else if (deltaTime >= this.finallyKeyframe.getTime()) { // 2.1 处于最后一个关键帧之后 - currentTime = deltaTime - this.finallyKeyframe.getTime(); - beginValue = this.finallyKeyframe.getValue(); - endValue = this.finallyKeyframe.getValue(); - duration = this.duration - this.finallyKeyframe.getTime(); - interpolationType = this.finallyKeyframe.getType(); - } - else { // 2.3 处于中间关键帧之间, 进行二分查找 - var _a = this.binarySearchKeyframe(deltaTime), beforeKeyframe = _a[0], afterKeyframe = _a[1]; - currentTime = deltaTime - beforeKeyframe.getTime(); - beginValue = beforeKeyframe.getValue(); - endValue = afterKeyframe.getValue(); - duration = afterKeyframe.getTime() - beforeKeyframe.getTime(); - interpolationType = afterKeyframe.getType(); - } - return [currentTime, beginValue, endValue, duration, interpolationType]; - }; - // 计算 线性 关键帧外插模式时候的参数 (第一帧之前的帧使用最后一帧, 最后一帧之后的帧使用第一帧) - KeyframeTrack.prototype.calcParamsLinear = function (deltaTime) { - var currentTime; - var beginValue; - var endValue; - var duration; - var interpolationType; - if (deltaTime <= this.firstKeyframe.getTime()) { // 2.1 处于第一个关键帧之前 - currentTime = deltaTime; - beginValue = this.firstKeyframe.getValue(); - endValue = this.firstKeyframe.getValue(); - duration = this.firstKeyframe.getTime(); - interpolationType = this.firstKeyframe.getType(); - } - else if (deltaTime >= this.finallyKeyframe.getTime()) { // 2.1 处于最后一个关键帧之后 - currentTime = deltaTime - this.finallyKeyframe.getTime(); - beginValue = this.finallyKeyframe.getValue(); - endValue = this.finallyKeyframe.getValue(); - duration = this.duration - this.finallyKeyframe.getTime(); - interpolationType = this.finallyKeyframe.getType(); - } - else { // 2.3 处于中间关键帧之间 - var _a = this.binarySearchKeyframe(deltaTime), beforeKeyframe = _a[0], afterKeyframe = _a[1]; - currentTime = deltaTime - beforeKeyframe.getTime(); - beginValue = beforeKeyframe.getValue(); - endValue = afterKeyframe.getValue(); - duration = afterKeyframe.getTime() - beforeKeyframe.getTime(); - interpolationType = afterKeyframe.getType(); - } - return [currentTime, beginValue, endValue, duration, interpolationType]; - }; - // 二分法查找前后帧 - KeyframeTrack.prototype.binarySearchKeyframe = function (deltaTime) { - var keyframes = this.keyframes; - var left = 0; - var right = keyframes.length - 1; - while (left <= right) { - var mid = left + Math.floor((right - left) / 2); - var currentFrame = keyframes[mid]; - if (deltaTime < currentFrame.getTime()) { // 如果 deltaTime < 当前的时间, 则查找前半部分 - right = mid; - } - else if (deltaTime > currentFrame.getTime()) { // 如果 deltaTime > 当前的时间, 则查找后半部分 - left = mid; - } - else { // 正好时间是相等的 - return [keyframes[mid], keyframes[mid]]; - } - if (right - left === 1) { // 找到前后帧 - return [keyframes[left], keyframes[right]]; - } - } - return [keyframes[left], keyframes[right]]; - }; - KeyframeTrack.prototype.getInterpolationType = function (beforeKeyframe, afterKeyframe) { - if (!afterKeyframe) - return beforeKeyframe.getType(); - return afterKeyframe.getType(); - }; - KeyframeTrack.prototype.getInterpolationValue = function (deltaTime, beginValue, endValue, duration, interpolationType) { - var interpolator = this.getInterpolator(beginValue, endValue, duration, interpolationType); - var time = isNaN(deltaTime / duration) ? 0 : deltaTime / duration; - var value = interpolator.value(time); - return value; - }; - KeyframeTrack.prototype.getInterpolator = function (beginValue, endValue, duration, interpolationType) { - var key = "key-" + beginValue + "-" + endValue + "-" + duration; - if (this.cacheInterpolatorMap[key]) { - return this.cacheInterpolatorMap[key]; - } - var interpolator; - switch (this.valueType) { - case ValueType.Hex: - interpolator = new InterpolateColor(beginValue, endValue); - break; - case ValueType.Mat3f: - interpolator = new InterpolateMat3f(beginValue, endValue, interpolationType); - break; - default: - switch (interpolationType) { - case InterpolationType.Bezier: - interpolator = new InterpolateBezier(beginValue, endValue); - break; - case InterpolationType.Linear: - default: - interpolator = new InterpolateLinear(beginValue, endValue); - break; - } - } - this.cacheInterpolatorMap[key] = interpolator; - return interpolator; - }; - return KeyframeTrack; -}()); - -var Animation = /** @class */ (function () { - function Animation(config) { - this.propertyTracks = []; - this.init(config); - } - Animation.prototype.init = function (config) { - var _this = this; - this.duration = config.duration; - this.propertyTracks = config.propertyTracks; - // 1. 根据 propertyTracks 数组生成对应的 KeyframeTrack数组 - this.keyframeTracks = this.propertyTracks.map(function (propertyTrack) { return new KeyframeTrack(propertyTrack, _this.duration); }); - }; - // 根据current time(µs microsecond 微秒)获取插值 - Animation.prototype.getValueAtTime = function (time) { - var deltaTime = time % this.duration; - return this.getValueAtDeltaTime(deltaTime); - }; - // 根据delta time(µs microsecond 微秒)获取插值 - Animation.prototype.getValueAtDeltaTime = function (deltaTime) { - var values = this.keyframeTracks.map(function (keyframeTrack) { return ({ - componentType: keyframeTrack.getComponentType(), - propertyPath: keyframeTrack.getAttributePath(), - valueType: keyframeTrack.getValueType(), - value: keyframeTrack.getValueAt(deltaTime), - }); }); - return values; - }; - // 根据progress(百分比)获取插值 - Animation.prototype.getValueAtProgress = function (progress) { - var deltaTime = this.duration * progress; - return this.getValueAtDeltaTime(deltaTime); - }; - return Animation; -}()); - -function patchComponent(component, _propertyPath, _valueType) { - Object.defineProperties(component, { - getComponentInstance: { - value: function (componentType, propertyPath) { - switch (componentType) { - case light.MeshRenderer3DComponent.componentType: { - var index = propertyPath.split('.')[0]; - return component.getPrimitiveMaterial(Number(index)).asPbrMaterial(); - } - default: - return component; - } - }, - }, - setProperty: { - value: function (c, _, propertyPath, value, valueType) { - switch (valueType) { - case ValueType.Hex: { - var r = value.r, g = value.g, b = value.b, a = value.a; - c.base_color_factor_.set(0, parseFloat(r) / 255); - c.base_color_factor_.set(1, parseFloat(g) / 255); - c.base_color_factor_.set(2, parseFloat(b) / 255); - c.base_color_factor_.set(3, parseFloat(a) / 100); - break; - } - case ValueType.Mat3f: { - var _a = value.split(',').map(parseFloat), v1 = _a[0], v2 = _a[1], v3 = _a[2], v4 = _a[3], v5 = _a[4], v6 = _a[5], v7 = _a[6], v8 = _a[7], v9 = _a[8]; - var m1 = light.float3.create(v1, v2, v3); - var m2 = light.float3.create(v4, v5, v6); - var m3 = light.float3.create(v7, v8, v9); - c.base_color_uv_matrix_.set(0, m1); - c.base_color_uv_matrix_.set(1, m2); - c.base_color_uv_matrix_.set(2, m3); - break; - } - default: { - var component_1 = c; - var keyPath = propertyPath.split('.'); - var lastKeyIndex = keyPath.length - 1; - for (var i = 0; i < lastKeyIndex; i++) { - var key = keyPath[i]; - if (!(key in component_1)) { - component_1[key] = parseInt(key) !== parseInt(key) ? {} : []; - } - component_1 = component_1[key]; - } - component_1[keyPath[lastKeyIndex]] = value; - } - } - }, - }, - }); -} -var AnimationController = /** @class */ (function (_super) { - __extends(AnimationController, _super); - function AnimationController(entityId, entityManager, eventManager, scriptSystem) { - var _this = _super.call(this, entityId, entityManager, eventManager, scriptSystem) || this; - _this.cacheClipsProgress = []; - _this.resourceVersions = []; - _this.configure(); - return _this; - } - AnimationController.prototype.configure = function () { - console.log('AnimationBehavior ----> configure'); - // 0. 没有组件动画提前return - var animationClips = this.getAnimationControllerClips(); - var hasComponentAnimation = this.hasComponentAnimation(animationClips); - if (!hasComponentAnimation) - return; - // 1. 读取文件 - var resourceKey = this.getResourceKey(); - if (!resourceKey) - return; - var fileData = light.FileSystem.readTextFromResource(this.entityManager, resourceKey); - // 2. 获取关键帧信息 - var animationData = JSON.parse(fileData); - var clips = animationData.clips; - // 3. 初始化动画数组 - this.animationClips = clips.map(function (clip) { return new Animation(clip); }); - // 4. 缓存此时的动画组件播放状态 - this.backupResourceVersion(); - }; - AnimationController.prototype.backupResourceVersion = function () { - var animationClips = this.getAnimationControllerClips(); - var resourceVersions = []; - for (var i = 0; i < animationClips.size(); i++) { - resourceVersions[i] = animationClips.get(i).resourceVersion; - } - this.resourceVersions = resourceVersions; - }; - AnimationController.prototype.backupClipsProgress = function () { - var animationClips = this.getAnimationControllerClips(); - var cacheClipsProgress = []; - for (var i = 0; i < animationClips.size(); i++) { - cacheClipsProgress[i] = animationClips.get(i).progress; - } - this.cacheClipsProgress = cacheClipsProgress; - }; - AnimationController.prototype.getResourceKey = function () { - var animationClips = this.getAnimationControllerClips(); - if (animationClips.size() === 0) - return ''; - for (var i = 0; i < animationClips.size(); i++) { - if (animationClips.get(i).type === 0 /* Component */) { - return animationClips.get(i).resourceKey; - } - } - }; - AnimationController.prototype.getAnimationControllerClips = function () { - var animationControllerComp = this.getComponent(light.AnimationController); - var clips = animationControllerComp.clips; - return clips; - }; - AnimationController.prototype.getComponent = function (componentType, propertyPath, valueType) { - var component = this.entity.getComponent(componentType); - patchComponent(component); - return component; - }; - AnimationController.prototype.checkResourceVersion = function (animationClips) { - // 1. 还没有初始化 - if (!this.animationClips) { - this.configure(); - return; - } - // 2. 比较动画文件的版本号 - for (var i = 0; i < animationClips.size(); i++) { - var clip = animationClips.get(i); - var resourceVersion = clip.resourceVersion; - var prevResourceVersion = this.resourceVersions[i]; - if (prevResourceVersion !== resourceVersion) { - this.configure(); - return; - } - } - }; - AnimationController.prototype.hasComponentAnimation = function (animationClips) { - var hasAnim = false; - animationClips.forEach(function (clip) { - if (clip.type === 0 /* Component */) { - hasAnim = true; - } - }); - return hasAnim; - }; - // 每一帧会调用此方法, 单位为微秒microsecond - AnimationController.prototype.update = function (_time) { - var _this = this; - var animationClips = this.getAnimationControllerClips(); - // 0. 没有组件动画提前return - var hasComponentAnimation = this.hasComponentAnimation(animationClips); - if (!hasComponentAnimation) - return; - // 1. 检查动画文件版本 是否需要重新读取动画文件 - this.checkResourceVersion(animationClips); - // 2. 点击动画组件时候播放 找到动画组件, 找到其中progress与上回不一致的, 注: progress其实是time, 并非百分比, 单位为微秒 - for (var i = 0; i < animationClips.size(); i++) { - var clip = animationClips.get(i); - var progress = clip.progress, clipIndex = clip.clipIndex, type = clip.type; - if (type === 1 /* GlTF */) - continue; - if (this.cacheClipsProgress[i] === progress) - continue; - if (!this.animationClips[clipIndex]) - continue; - // 2.1 根据progress更新组件 - var clipValues = this.animationClips[clipIndex].getValueAtTime(progress); - clipValues.forEach(function (clipValue) { - var componentType = clipValue.componentType, propertyPath = clipValue.propertyPath, value = clipValue.value, valueType = clipValue.valueType; - _this.updateComponent(componentType, propertyPath, value, valueType); - }); - } - // 3. 缓存此时的progress - this.backupClipsProgress(); - }; - AnimationController.prototype.updateComponent = function (componentType, propertyPath, value, valueType) { - var component = this.getComponent(componentType, propertyPath, valueType); - if (!component) - return; - var componentInstance = component.getComponentInstance(componentType, propertyPath); - switch (componentType) { - case light.BasicTransform.componentType: - case light.ScreenTransform.componentType: - this.updateTransformComponent(componentInstance, componentType, propertyPath, value, valueType, component); - break; - default: - component.setProperty(componentInstance, componentType, propertyPath, value, valueType); - break; - } - }; - AnimationController.prototype.updateTransformComponent = function (componentInstance, componentType, propertyPath, value, valueType, component) { - var pathArray = propertyPath.split('.'); - var lastPath = pathArray[pathArray.length - 1]; - if (propertyPath.indexOf('position') === 0) { - var componentPosition = componentInstance.position; - componentPosition[lastPath] = value; - componentInstance.SetPosition(componentPosition); - } - else if (propertyPath.indexOf('eEuler') === 0) { - if (!this.cacheEuler) { - this.cacheEuler = {}; - } - this.cacheEuler[propertyPath.split('.')[1]] = value; - if (this.cacheEuler.x !== undefined && this.cacheEuler.y !== undefined && this.cacheEuler.z !== undefined) { - var _a = this.cacheEuler, x = _a.x, y = _a.y, z = _a.z; - var rotation = eulerToQuaternion(x, y, z); - var componentRotation = componentInstance.rotation; - componentRotation.x = rotation.x; - componentRotation.y = rotation.y; - componentRotation.z = rotation.z; - componentRotation.w = rotation.w; - componentInstance.SetRotation(componentRotation); - this.cacheEuler = null; - } - } - else if (propertyPath.indexOf('scale') === 0) { - var componentScale = componentInstance.scale; - componentScale[lastPath] = value; - componentInstance.SetScale(componentScale); - } - else { - component.setProperty(componentInstance, componentType, propertyPath, value, valueType); - } - }; - AnimationController.prototype.destroy = function () { - this.animationClips = null; - this.cacheClipsProgress = null; - this.resourceVersions = null; - this.cacheEuler = null; - _super.prototype.destroy.call(this); - }; - return AnimationController; -}(BaseBehavior)); -light.on('start', function (entityManager, eventManager, scriptSystem) { - // 1. 从entity里面找到所有包含动画组件的entity - var entitiesWithAnimation = entityManager.entitiesWithComponents(light.AnimationController.componentType); - // 2. 对每个entity都注册一个 AnimationController - entitiesWithAnimation.forEach(function (entity, _i) { - var idComponent = entity.getComponent(light.EntityIdentifier); - if (!idComponent) - return; - var AnimationBehavior = new AnimationController(idComponent.id, entityManager, eventManager, scriptSystem); - light.runtime.addBehavior(AnimationBehavior); - }); -}); - -var Node = /** @class */ (function () { - function Node() { - } - return Node; -}()); -var EventNode = /** @class */ (function (_super) { - __extends(EventNode, _super); - function EventNode() { - return _super !== null && _super.apply(this, arguments) || this; - } - return EventNode; -}(Node)); - -var StartNode = /** @class */ (function (_super) { - __extends(StartNode, _super); - function StartNode() { - return _super !== null && _super.apply(this, arguments) || this; - } - StartNode.prototype.Run = function () { }; - StartNode.nodeType = 'code/Start'; - return StartNode; -}(EventNode)); -light.NodeContext.registerNode(StartNode); - -var LoopType; -(function (LoopType) { - LoopType["FIXED"] = "\u56FA\u5B9A\u6570\u5B57"; - LoopType["INFINITE"] = "\u65E0\u9650\u5FAA\u73AF"; -})(LoopType || (LoopType = {})); -var TimerNode = /** @class */ (function (_super) { - __extends(TimerNode, _super); - function TimerNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.duration = 1000000; - _this.repeatTimes = 1; - _this.times = 1; - _this._times = 1; - _this.startupTrigger = false; // 刚开始就触发一次 - _this.lastTime = 0; - _this.currentTimes = 0; - return _this; - } - TimerNode.prototype.Update = function () { }; - TimerNode.prototype.Run = function () { - if (this.startupTrigger && this.repeatTimes !== 0) { - this.currentTimes = this.currentTimes + 1; - this.Update(); - } - light.on('update', this.onLightUpdate.bind(this)); - }; - TimerNode.prototype.onLightUpdate = function (time) { - if ((time - this.lastTime) > this.duration - && (this.repeatTimes > this.currentTimes || this.loopType === LoopType.INFINITE)) { - this.Update(); - this.lastTime = time; - this.currentTimes = this.currentTimes + 1; - this.times = this.times + 1; - } - }; - TimerNode.nodeType = 'code/Timer'; - return TimerNode; -}(EventNode)); -light.NodeContext.registerNode(TimerNode); - -var MAX_FACE_NUMBER = 5; -var Queue = [ - light.Image, - light.PAGAsset, - light.HairColor, - light.PinchFace, - light.Liquefaction, - light.LiquefactionV6, - light.MakeupFaceV6, - light.MakeupLipsV6, - light.MakeupIrisV6, - light.Stretch, - light.LUTFilter, - light.GAN, - light.PostEffect, - light.MakeupFace, - light.MakeupLips, - light.MakeupIris, - light.MakeupEyeV6, - light.MakeupEyebrowV6, - light.Smooth, - light.Beauty, - light.BeautyBody, - light.CustomShader, - light.CustomGraph, - light.Tips, - light.CrazyFace, - light.Sticker3D, - light.Snapshot, - light.Particle, , - light.ExpressionTransfer, -]; -var getRelateEntities = function (entityId, entityManager) { - var entities = []; - var entity = entityManager.getEntityById(entityId); - if (entity) { - var faceTrack = entity.getComponent(light.FaceTracking); - entities.push(entity); - if (faceTrack) { - if (faceTrack.duplicate_entity_id_) { // 新版 - for (var i = 0; i < faceTrack.duplicate_entity_id_.size(); i += 1) { - var id = faceTrack.duplicate_entity_id_.get(i); - var relateEntity = entityManager.getEntityById(id); - if (relateEntity === null || relateEntity === void 0 ? void 0 : relateEntity.transform) { - entities.push(relateEntity); - } - } - } - else { - var faceIds = new Array(MAX_FACE_NUMBER - 1).fill(0) // 兼容旧版 - .map(function (value, i) { return entityId + ((i + 1) * 10000); }); - faceIds.forEach(function (id) { - var relateEntity = entityManager.getEntityById(id); - if (relateEntity === null || relateEntity === void 0 ? void 0 : relateEntity.transform) { - entities.push(relateEntity); - } - }); - } - } - } - return entities; -}; -var showEntities = function (ids, entityManager) { - if (ids === void 0) { ids = []; } - ids.forEach(function (entityId) { - var entities = getRelateEntities(entityId, entityManager); // 获取人脸跟随的对象集 - entities.forEach(function (entity) { - var timeOffset = entity.getComponent(light.TimeOffset); - var timeContrl = entity.getComponent(light.TimeControl); - if (timeOffset) { - timeOffset.startOffset = light.getCurrentTime(); - } - if (timeContrl) { - timeContrl.reset(); - timeContrl.currentTime = 0; - } - var setTransform = true; - Queue.forEach(function (queueItem) { - var cmp = entity.getComponent(queueItem); - if (cmp) { - cmp.enabled = true; - setTransform = false; - } - }); - if (setTransform) { - [ - light.BasicTransform, - light.ScreenTransform, - ].forEach(function (item) { - var cmp = entity.getComponent(item); - if (cmp) { - cmp.objectEnabled = true; - } - }); - } - }); - }); -}; -var hideEntities = function (ids, entityManager) { - if (ids === void 0) { ids = []; } - ids.forEach(function (entityId) { - getRelateEntities(entityId, entityManager).forEach(function (entity, _i) { - var setTransform = true; - Queue.forEach(function (queueItem) { - var cmp = entity.getComponent(queueItem); - if (cmp) { - cmp.enabled = false; - setTransform = false; - } - }); - if (setTransform) { - [ - light.BasicTransform, - light.ScreenTransform, - ].forEach(function (item) { - var cmp = entity.getComponent(item); - if (cmp) { - cmp.objectEnabled = false; - } - }); - } - }); - }); -}; -// 判断entity的component是否enable 如果为跟脸贴纸 还需要判断transform是否visible -var isEntityHide = function (id, entityManager) { - var cmpEnable = false; - var entity = entityManager.getEntityById(id); - if (entity) { - Queue.forEach(function (queueItem) { - var cmp = entity.getComponent(queueItem); - if (cmp) { - if (!cmp.enabled) { - return true; - } - cmpEnable = cmp.enabled; - } - }); - [light.BasicTransform, light.ScreenTransform].forEach(function (item) { - var cmp = entity.getComponent(item); - if (cmp) { - cmpEnable = cmp.objectEnabled && cmp.visible && cmpEnable; - } - }); - } - return !cmpEnable; -}; - -var ObjectQueueNode = /** @class */ (function (_super) { - __extends(ObjectQueueNode, _super); - function ObjectQueueNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.toShow = []; - _this.toHide = []; - _this.init = false; - _this.random = false; - _this.indexToDisplay = 0; - return _this; - } - ObjectQueueNode.prototype.Run = function () { - var _this = this; - var _a; - this.toShow = []; - this.toHide = []; - if (this.random) { - this.indexToDisplay = Math.floor(Math.random() * this.entityToDisplay.length); - } - (_a = this.entityToDisplay) === null || _a === void 0 ? void 0 : _a.forEach(function (entityId, i) { - var entity = _this.entityManager.getEntityById(entityId); - if (entity) { - if (i === _this.indexToDisplay % _this.entityToDisplay.length) { - _this.toShow.push(entityId); - } - else { - _this.toHide.push(entityId); - } - } - }); - this.indexToDisplay = this.indexToDisplay + 1; - showEntities(this.toShow, this.entityManager); - hideEntities(this.toHide, this.entityManager); - this.Next(); - }; - ObjectQueueNode.prototype.Next = function () { }; - ObjectQueueNode.nodeType = 'code/ObjectQueue'; - return ObjectQueueNode; -}(Node)); -light.NodeContext.registerNode(ObjectQueueNode); - -var SwitchObjectNode = /** @class */ (function (_super) { - __extends(SwitchObjectNode, _super); - function SwitchObjectNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.entityToDisplay = []; - _this.entityToHide = []; - _this.init = false; - return _this; - } - SwitchObjectNode.prototype.Run = function () { - showEntities(this.entityToDisplay, this.entityManager); - hideEntities(this.entityToHide, this.entityManager); - this.Next(); - }; - SwitchObjectNode.prototype.Next = function () { }; - SwitchObjectNode.nodeType = 'code/SwitchObject'; - return SwitchObjectNode; -}(Node)); -light.NodeContext.registerNode(SwitchObjectNode); - -var FaceAction$1; -(function (FaceAction) { - FaceAction[FaceAction["FaceDetected"] = 0] = "FaceDetected"; - FaceAction[FaceAction["OpenMouth"] = 1] = "OpenMouth"; - FaceAction[FaceAction["BlinkEyebrow"] = 2] = "BlinkEyebrow"; - FaceAction[FaceAction["BlinkEye"] = 3] = "BlinkEye"; - FaceAction[FaceAction["ShakeHead"] = 4] = "ShakeHead"; - FaceAction[FaceAction["Kiss"] = 5] = "Kiss"; - FaceAction[FaceAction["BlinkLeftEye"] = 6] = "BlinkLeftEye"; - FaceAction[FaceAction["BlinkRightEye"] = 7] = "BlinkRightEye"; - FaceAction[FaceAction["Nod"] = 8] = "Nod"; - FaceAction[FaceAction["Smile"] = 9] = "Smile"; - FaceAction[FaceAction["MouthOccluded"] = 10] = "MouthOccluded"; - FaceAction[FaceAction["LeftEyeOccluded"] = 11] = "LeftEyeOccluded"; - FaceAction[FaceAction["RightEyeOccluded"] = 12] = "RightEyeOccluded"; - FaceAction[FaceAction["DoubleEyeOccluded"] = 13] = "DoubleEyeOccluded"; -})(FaceAction$1 || (FaceAction$1 = {})); -var GestureAction$1; -(function (GestureAction) { - GestureAction[GestureAction["HEART"] = 0] = "HEART"; - GestureAction[GestureAction["PAPER"] = 1] = "PAPER"; - GestureAction[GestureAction["SCISSOR"] = 2] = "SCISSOR"; - GestureAction[GestureAction["FIST"] = 3] = "FIST"; - GestureAction[GestureAction["ONE"] = 4] = "ONE"; - GestureAction[GestureAction["LOVE"] = 5] = "LOVE"; - GestureAction[GestureAction["LIKE"] = 6] = "LIKE"; - GestureAction[GestureAction["OK"] = 7] = "OK"; - GestureAction[GestureAction["ROCK"] = 8] = "ROCK"; - GestureAction[GestureAction["SIX"] = 9] = "SIX"; - GestureAction[GestureAction["EIGHT"] = 10] = "EIGHT"; - GestureAction[GestureAction["LIFT"] = 11] = "LIFT"; - GestureAction[GestureAction["CONGRATULATE"] = 12] = "CONGRATULATE"; -})(GestureAction$1 || (GestureAction$1 = {})); -// 记录一次流程生命周期已开启的AI能力 -var enabledAI = []; -function openAIFeature(features, entityManager, eventManager) { - var aiRequire = new light.VectorString(); - features === null || features === void 0 ? void 0 : features.forEach(function (feature) { - if (enabledAI.indexOf(feature) === -1) { - aiRequire.add(feature); - enabledAI.push(feature); - } - }); - if (aiRequire.size() > 0) { - var event = new light.ScriptOpenAIEvent(entityManager, aiRequire); - eventManager.emit(event); - } -} -function getAIClassData(features, entityManager) { - var aiClassData = {}; - features === null || features === void 0 ? void 0 : features.forEach(function (feature) { - var datas = light.AIDataUtils.GetJsEventListFromAIDataCenter(entityManager, feature); - var keys = datas.getKeys(); - for (var i = 0; i < keys.size(); i++) { - var key = keys.get(i); - var value = JSON.parse(datas.get(key)); - aiClassData[key] = value; - } - }); - return aiClassData; -} -function getAIPointData(feature, entityManager) { - var datas = light.AIDataUtils.GetAIPointDataFromAIDataCenter(entityManager, feature); - var res = []; - for (var i = 0; i < datas.size(); i++) { - var data = JSON.parse(JSON.stringify(datas.get(i))); - var points = []; - var pointsData = datas.get(i)['point_array_']; - if (pointsData === null || pointsData === void 0 ? void 0 : pointsData.size()) { - for (var j = 0; j < pointsData.size(); j++) { - points.push(pointsData.get(j)); - } - data.point_array_ = points; - } - res.push(data); - } - return res; -} -function actionNameToEvent(name) { - var str = name.toLowerCase(); - str = str.replace(/^\S/, function (s) { return s.toUpperCase(); }); - return "on" + str; -} - -var GestureNode = /** @class */ (function (_super) { - __extends(GestureNode, _super); - function GestureNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.times = 1; - _this.currentGesture = GestureAction$1.HEART; - return _this; - } - GestureNode.prototype.Run = function () { - this.actionEventName = actionNameToEvent(light.GestureAction[this.currentGesture]); - openAIFeature(["Hand_Gesture" /* HAND_GESTURE */], this.entityManager, this.eventManager); - light.on('update', this.onUpdate.bind(this)); - }; - GestureNode.prototype.onUpdate = function () { - var aiData = getAIClassData(["Hand_Gesture" /* HAND_GESTURE */], this.entityManager); - var expressions = aiData === null || aiData === void 0 ? void 0 : aiData[this.actionEventName]; - var hasGesture = expressions && expressions.length > 0; - if (this.lastState !== hasGesture) { - this.lastState = hasGesture; - if (hasGesture) { - this.Detected(); - this.times = this.times + 1; - } - else { - this.Lost(); - } - } - }; - GestureNode.prototype.Detected = function () { }; - GestureNode.prototype.Lost = function () { }; - GestureNode.nodeType = 'code/Gesture'; - return GestureNode; -}(EventNode)); -light.NodeContext.registerNode(GestureNode); - -var AIFeature; -(function (AIFeature) { - AIFeature["onSmile"] = "Smile"; - AIFeature["onKiss"] = "Pout"; -})(AIFeature || (AIFeature = {})); -var DefaultAIFeature = "Expression" /* EXPRESSION */; -var FaceEventNode = /** @class */ (function (_super) { - __extends(FaceEventNode, _super); - function FaceEventNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.faceAction = light.FaceAction.OpenMouth; - _this.times = 1; - return _this; - } - FaceEventNode.prototype.Run = function () { - this.actionEventName = actionNameToEvent(light.FaceAction[this.faceAction]); - var aifeature = AIFeature[this.actionEventName] ? AIFeature[this.actionEventName] : DefaultAIFeature; - openAIFeature([aifeature], this.entityManager, this.eventManager); - light.on('update', this.onUpdate.bind(this)); - }; - FaceEventNode.prototype.onUpdate = function () { - var aifeature = AIFeature[this.actionEventName] ? AIFeature[this.actionEventName] : DefaultAIFeature; - var data = getAIClassData([aifeature], this.entityManager); - var expressions = data === null || data === void 0 ? void 0 : data[this.actionEventName]; - var detected = expressions && expressions.length > 0; - if (detected) { - var trackId = expressions[0]; - var faceInfo = { - trackID: trackId, - expression: [this.faceAction], - }; - this.faceOutput = faceInfo; - if (trackId !== this.lastTrackId || detected !== this.lastState) { - console.log("FaceEventNode: onDetected: " + trackId); - this.onDetected(); - this.times = this.times + 1; - } - this.lastTrackId = trackId; - } - else if (this.lastState) { - this.lastTrackId = -1; - console.log('FaceEventNode: Lost'); - this.Lost(); - } - this.lastState = detected; - }; - FaceEventNode.prototype.onDetected = function () { }; - FaceEventNode.prototype.Lost = function () { }; - FaceEventNode.nodeType = 'code/FaceEvent'; - return FaceEventNode; -}(EventNode)); -light.NodeContext.registerNode(FaceEventNode); - -var MusicNode = /** @class */ (function (_super) { - __extends(MusicNode, _super); - function MusicNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.highlightOffset = 0; - _this.slowRhythmOffset = 0; - _this.drumOffset = 0; - _this.startValueOffset = 0; - _this.endValueOffset = 0; - _this.curMusicTime = -1; - return _this; - } - MusicNode.prototype.Run = function () { - light.on('RhythmEvent', this.onMusicData.bind(this)); - }; - MusicNode.prototype.onMusicData = function (params) { - if (params.rhythmInfos.HighlightValueTrail) { - for (var i = 0, size = params.rhythmInfos.HighlightValueTrail.length; i < size; i++) { - if (Math.abs(params.rhythmInfos.HighlightValueTrail[i].time + this.highlightOffset - params.elapseTime) - <= params.elapseTime - this.curMusicTime) { - this.onHighlightValueTrail(); - } - } - } - if (params.rhythmInfos.SlowRhythmTrail) { - for (var i = 0, size = params.rhythmInfos.SlowRhythmTrail.length; i < size; i++) { - if (Math.abs(params.rhythmInfos.SlowRhythmTrail[i].time + this.slowRhythmOffset - params.elapseTime) - <= params.elapseTime - this.curMusicTime) { - this.onSlowRhythmTrail(); - } - } - } - if (params.rhythmInfos.DrumTrail) { - for (var i = 0, size = params.rhythmInfos.DrumTrail.length; i < size; i++) { - if (Math.abs(params.rhythmInfos.DrumTrail[i].time + this.drumOffset - params.elapseTime) - <= params.elapseTime - this.curMusicTime) { - this.onDrumTrail(); - } - } - } - if (params.rhythmInfos.StartValueTrail) { - for (var i = 0, size = params.rhythmInfos.StartValueTrail.length; i < size; i++) { - if (params.rhythmInfos.StartValueTrail[i].index === 0) { - if (Math.abs(params.rhythmInfos.StartValueTrail[i].time + this.startValueOffset - params.elapseTime) - <= params.elapseTime - this.curMusicTime) { - this.onStartValueTrail(); - } - } - else { - if (Math.abs(params.rhythmInfos.StartValueTrail[i].time + this.endValueOffset - params.elapseTime) - <= params.elapseTime - this.curMusicTime) { - this.onEndValueTrail(); - } - } - } - } - this.curMusicTime = params.elapseTime; - }; - MusicNode.prototype.onStartValueTrail = function () { }; - MusicNode.prototype.onEndValueTrail = function () { }; - MusicNode.prototype.onHighlightValueTrail = function () { }; - MusicNode.prototype.onSlowRhythmTrail = function () { }; - MusicNode.prototype.onDrumTrail = function () { }; - MusicNode.nodeType = 'code/music'; - return MusicNode; -}(EventNode)); -light.NodeContext.registerNode(MusicNode); - -var AnimationNode = /** @class */ (function (_super) { - __extends(AnimationNode, _super); - function AnimationNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.loopCount = 0; - _this.setProgress = false; - _this.progress = 0; - _this.onUpdate = function (time) { - console.error('AnimationNode update'); - if (_this.loopCount < 0) { - return; - } - var entity = _this.entityManager.getEntityById(_this.entityId); - var controller = entity.getComponent(light.AnimationController); - var timeCtrls = entity.getComponent(light.TimeControlList); - if (timeCtrls) { - controller.clips.forEach(function (clip, index) { - if (_this.clipIndex === index && clip.state === 1 /* Playing */) { - if (timeCtrls.timeControlArray.get(index).currentTime >= (_this.loopCount + 1) * clip.duration) { - clip.state = 2 /* Paused */; - clip.progress = clip.duration; - _this.detachEvent(); - _this.Finish(); - } - } - }); - } - else { - controller.clips.forEach(function (clip, index) { - if (_this.clipIndex === index && clip.state === 1 /* Playing */) { - if ((light.getCurrentTime() - clip.startTime) >= (_this.loopCount + 1) * clip.duration) { - clip.state = 2 /* Paused */; - clip.progress = clip.duration; - _this.detachEvent(); - _this.Finish(); - } - } - }); - } - }; - return _this; - } - AnimationNode.prototype.Play = function () { - var _this = this; - var entity = this.entityManager.getEntityById(this.entityId); - var controller = entity.getComponent(light.AnimationController); - var timeCtrls = entity.getComponent(light.TimeControlList); - if (timeCtrls) { - controller.clips.forEach(function (clip, index) { - if (_this.clipIndex === index) { - clip.state = 1 /* Playing */; - timeCtrls.timeControlArray.get(index).pause = false; - timeCtrls.timeControlArray.get(index).loopCount = _this.loopCount; - if (_this.setProgress) { - timeCtrls.timeControlArray.get(index).currentTime = _this.progress; - } - // clip.progress != timeCtrl.currentTime 触发刷新 - clip.progress = 1; - } - else { - clip.state = 0 /* Stopped */; - timeCtrls.timeControlArray.get(index).pause = true; - } - }); - } - else { - controller.clips.forEach(function (clip, index) { - if (_this.clipIndex === index) { - clip.state = 1 /* Playing */; - if (_this.setProgress) { - clip.progress = _this.progress; - } - clip.startTime = light.getCurrentTime() - clip.progress; - } - else { - clip.state = 0 /* Stopped */; - } - }); - } - this.detachEvent(); - light.on('update', this.onUpdate); - this.Next(); - }; - AnimationNode.prototype.Pause = function () { - var _this = this; - var entity = this.entityManager.getEntityById(this.entityId); - var controller = entity.getComponent(light.AnimationController); - var timeCtrls = entity.getComponent(light.TimeControlList); - controller.clips.forEach(function (clip, index) { - if (_this.clipIndex === index) { - clip.state = 2 /* Paused */; - if (timeCtrls) { - timeCtrls.timeControlArray.get(index).pause = true; - } - } - }); - this.detachEvent(); - this.Next(); - }; - AnimationNode.prototype.Stop = function () { - var _this = this; - var entity = this.entityManager.getEntityById(this.entityId); - var controller = entity.getComponent(light.AnimationController); - var timeCtrls = entity.getComponent(light.TimeControlList); - controller.clips.forEach(function (clip, index) { - if (_this.clipIndex === index) { - clip.state = 0 /* Stopped */; - if (timeCtrls) { - timeCtrls.timeControlArray.get(index).pause = true; - timeCtrls.timeControlArray.get(index).currentTime = 0; - // clip.progress != timeCtrl.currentTime 触发刷新 - clip.progress = 1; - } - } - }); - this.detachEvent(); - this.Next(); - }; - AnimationNode.prototype.Next = function () { }; - AnimationNode.prototype.Finish = function () { }; - AnimationNode.prototype.detachEvent = function () { - light.removeListener('update', this.onUpdate); - }; - AnimationNode.nodeType = 'code/AnimationNode'; - return AnimationNode; -}(Node)); -light.NodeContext.registerNode(AnimationNode); - -var LoopType$1; -(function (LoopType) { - LoopType["FIXED"] = "\u56FA\u5B9A\u6570\u5B57"; - LoopType["INFINITE"] = "\u65E0\u9650\u5FAA\u73AF"; -})(LoopType$1 || (LoopType$1 = {})); -var QueueNode = /** @class */ (function (_super) { - __extends(QueueNode, _super); - function QueueNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.indexToDisplay = 0; - _this.indexToHide = 0; - _this.repeatTimes = 1; - _this.init = false; - _this.toShow = []; - _this.toHide = []; - return _this; - } - QueueNode.prototype.Run = function () { - this.toShow = []; - this.toHide = []; - var _a = this, entityToDisplay = _a.entityToDisplay, entityToHide = _a.entityToHide, repeatTimes = _a.repeatTimes; - if (entityToDisplay.length) { - if (this.indexToDisplay < entityToDisplay.length * repeatTimes || this.loopType === LoopType$1.INFINITE) { - var entityId = entityToDisplay[this.indexToDisplay % entityToDisplay.length]; - var entity = this.entityManager.getEntityById(entityId); - if (entity) { - this.toShow.push(entityId); - this.indexToDisplay += 1; - } - } - } - if (entityToHide.length) { - if (this.indexToHide < entityToHide.length * repeatTimes || this.loopType === LoopType$1.INFINITE) { - var entityId = entityToHide[this.indexToHide % entityToHide.length]; - var entity = this.entityManager.getEntityById(entityId); - if (entity) { - this.toHide.push(entityId); - this.indexToHide += 1; - } - } - } - showEntities(this.toShow, this.entityManager); - hideEntities(this.toHide, this.entityManager); - this.Next(); - }; - QueueNode.prototype.Next = function () { }; - QueueNode.nodeType = 'code/Queue'; - return QueueNode; -}(Node)); -light.NodeContext.registerNode(QueueNode); - -var AccumulationNumberNode = /** @class */ (function (_super) { - __extends(AccumulationNumberNode, _super); - function AccumulationNumberNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.Value = 0; - return _this; - } - AccumulationNumberNode.prototype.Run = function () { - if (this.current === undefined) { - this.current = this.from; - this.Value = this.current; - this.Next(); - } - else { - if (this.current + this.step > this.to) { - return; - } - this.current += this.step; - this.Value = this.current; - this.Next(); - } - }; - AccumulationNumberNode.prototype.Next = function () { }; - AccumulationNumberNode.nodeType = 'code/accumulationNumber'; - return AccumulationNumberNode; -}(Node)); -light.NodeContext.registerNode(AccumulationNumberNode); - -var MAX_AGE = 66; -// 年龄判断 -var AgeNode = /** @class */ (function (_super) { - __extends(AgeNode, _super); - function AgeNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.ageRange = []; - _this.MAX_AGE = 66; - _this.lastAgeInfo = {}; - return _this; - } - AgeNode.prototype.Run = function () { - var faceInput = this.faceInput; - if (!(faceInput === null || faceInput === void 0 ? void 0 : faceInput.age)) { - return; - } - // 上次的人脸而且年龄相同,不重复触发 - if (this.lastAgeInfo[faceInput.trackID] === faceInput.age) { - return; - } - this.ageOutput = faceInput; - if (this.ageRange.length === 0) { - this.Next(); - } - else { - var funName = ''; - var age = faceInput.age; - this.ageRange.sort(function (a, b) { return a - b; }); - var start = 0; - for (var i = 0, size = this.ageRange.length; i < size; i++) { - if (this.ageRange[i] === start) { - continue; - } - if (age < this.ageRange[i]) { - funName = start + "_" + this.ageRange[i]; - if (!this[funName]) { - this[funName] = function () { }; - } - this[funName](); - return; - } - start = this.ageRange[i]; - } - if (start < MAX_AGE && start <= age && age < MAX_AGE) { - funName = start + "_" + MAX_AGE; - if (!this[funName]) { - this[funName] = function () { }; - } - this[funName](); - } - } - }; - AgeNode.prototype.Next = function () { }; - AgeNode.nodeType = 'code/Age'; - return AgeNode; -}(Node)); -light.NodeContext.registerNode(AgeNode); - -var AgeEventNode = /** @class */ (function (_super) { - __extends(AgeEventNode, _super); - function AgeEventNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.lastAgeInfo = {}; - _this.customEvents = []; - _this.MAX_AGE = 66; - _this.AI_FETURE = [ - "Expression" /* EXPRESSION */, - "Age" /* AGE */, - "Gender" /* GENDER */, - "Smile" /* SMILE */, - ]; - return _this; - } - AgeEventNode.prototype.Run = function () { - openAIFeature(this.AI_FETURE, this.entityManager, this.eventManager); - light.on('update', this.onUpdate.bind(this)); - }; - AgeEventNode.prototype.onUpdate = function () { - var _this = this; - var data = getAIClassData(this.AI_FETURE, this.entityManager); - var expressions = data === null || data === void 0 ? void 0 : data.onAge; - var detected = expressions && expressions.length > 0; - if (detected) { - expressions.forEach(function (ageRange, _index) { - var trackID = ageRange[0]; - var age = ageRange[1]; - if (!_this.lastAgeInfo[trackID] || _this.lastAgeInfo[trackID] !== age) { - _this.ageOutput = { - trackID: ageRange[0], - age: age, - }; - _this.ageNumberOutput = age; - _this.trackIndexOutput = ageRange[0]; - var start_1 = 0; - var invoke_1 = false; - if (_this.ageRange.length > 0) { - _this.ageRange.forEach(function (_age, _i) { - if (invoke_1) { - return; - } - if (age < _age) { - if (!_this[start_1 + "_" + _age]) { - _this[start_1 + "_" + _age] = function () { }; - } - _this[start_1 + "_" + _age](); - invoke_1 = true; - } - start_1 = _age; - }); - if (!invoke_1 && age <= _this.MAX_AGE) { - if (!_this[start_1 + "_" + _this.MAX_AGE]) { - _this[start_1 + "_" + _this.MAX_AGE] = function () { }; - } - _this[start_1 + "_" + _this.MAX_AGE](); - } - } - else { - if (!_this['Next']) { - _this['Next'] = function () { }; - } - _this['Next'](); - } - } - }); - } - }; - AgeEventNode.nodeType = 'code/AgeEvent'; - return AgeEventNode; -}(EventNode)); -light.NodeContext.registerNode(AgeEventNode); - -var AndNode = /** @class */ (function (_super) { - __extends(AndNode, _super); - function AndNode() { - return _super !== null && _super.apply(this, arguments) || this; - } - AndNode.prototype.Run = function () { - if (this.A && this.B) { - this.True(); - } - else { - this.False(); - } - }; - AndNode.prototype.True = function () { }; - AndNode.prototype.False = function () { }; - AndNode.nodeType = 'code/And'; - return AndNode; -}(Node)); -light.NodeContext.registerNode(AndNode); - -var CompareNode = /** @class */ (function (_super) { - __extends(CompareNode, _super); - function CompareNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.A = 0; - _this.B = 0; - return _this; - } - CompareNode.prototype.Run = function () { - if (this.A == this.B) { - this.Equal(); - } - else if (this.A > this.B) { - this.Bigger(); - } - else { - this.Smaller(); - } - }; - CompareNode.prototype.Equal = function () { }; - CompareNode.prototype.Bigger = function () { }; - CompareNode.prototype.Smaller = function () { }; - CompareNode.nodeType = 'code/compare'; - return CompareNode; -}(Node)); -light.NodeContext.registerNode(CompareNode); - -var ConstNumberNode = /** @class */ (function (_super) { - __extends(ConstNumberNode, _super); - function ConstNumberNode() { - return _super !== null && _super.apply(this, arguments) || this; - } - Object.defineProperty(ConstNumberNode.prototype, "Value", { - get: function () { - return this._value; - }, - set: function (v) { - this._value = v; - }, - enumerable: false, - configurable: true - }); - ConstNumberNode.nodeType = 'code/constNumber'; - return ConstNumberNode; -}(Node)); -light.NodeContext.registerNode(ConstNumberNode); - -var CorrelationNode = /** @class */ (function (_super) { - __extends(CorrelationNode, _super); - function CorrelationNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.faceIndex = -1; - return _this; - } - CorrelationNode.prototype.Run = function () { - var _this = this; - this.entityToDisplay.forEach(function (entityId) { - getRelateEntities(entityId, _this.entityManager).forEach(function (entity) { - if (entity) { - var component = entity.getComponent(light.FaceTracking); - if (component) { - var index = new light.VectorInt(); - index.add(_this.faceIndex); - component.faceIndex = index; - } - } - }); - }); - this.Next(); - }; - CorrelationNode.prototype.Next = function () { }; - CorrelationNode.nodeType = 'code/Correlation'; - return CorrelationNode; -}(Node)); -light.NodeContext.registerNode(CorrelationNode); - -var DelayNode = /** @class */ (function (_super) { - __extends(DelayNode, _super); - function DelayNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.duration = 1000000; - return _this; - } - DelayNode.prototype.Run = function () { - var _this = this; - var currentTime = light.getCurrentTime(); - var invoked = false; - light.on('update', function (time) { - if (time - currentTime >= _this.duration && !invoked) { - invoked = true; - _this.Next(); - } - }); - }; - DelayNode.prototype.Next = function () { }; - DelayNode.nodeType = 'code/Delay'; - return DelayNode; -}(Node)); -light.NodeContext.registerNode(DelayNode); - -var FaceNode = /** @class */ (function (_super) { - __extends(FaceNode, _super); - function FaceNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.times = 1; - _this.AI_FEATURE = [ - "Expression" /* EXPRESSION */, - "Age" /* AGE */, - "Gender" /* GENDER */, - "Smile" /* SMILE */, - ]; - return _this; - } - FaceNode.prototype.Run = function () { - this.actionEventName = actionNameToEvent(light.FaceAction[light.FaceAction.FaceDetected]); - openAIFeature(this.AI_FEATURE, this.entityManager, this.eventManager); - light.on('update', this.onUpdate.bind(this)); - }; - FaceNode.prototype.onUpdate = function () { - var _this = this; - var data = getAIClassData(this.AI_FEATURE, this.entityManager); - var expressions = data === null || data === void 0 ? void 0 : data[this.actionEventName]; - var detected = expressions && expressions.length > 0; - if (detected) { - var faces = this.getAllFaceInfo(data); - faces.forEach(function (face) { - _this.faceOutput = face; - _this.onNext(); - }); - this.times += 1; - var trackId = expressions[0]; - if (detected !== this.lastState) { - console.log("FaceNode: onDetected: " + trackId); - this.onDetected(); - } - } - else if (this.lastState) { - console.log('FaceNode: Lost'); - this.Lost(); - } - this.lastState = detected; - }; - FaceNode.prototype.onNext = function () { }; - FaceNode.prototype.Lost = function () { }; - FaceNode.prototype.onDetected = function () { }; - FaceNode.prototype.getAllFaceInfo = function (params) { - if (params === void 0) { params = {}; } - var keys = Object.keys(params); - var allFaceInfo = []; // 人脸数据总集 - var _loop_1 = function (i, size) { - console.log("expression_Key:::" + keys[i]); - switch (keys[i]) { - case 'onAge': { - var ageInfo_1 = params.onAge; // [[1, 29], [2, 24]] - if (ageInfo_1) { - var _loop_2 = function (j, ageCount) { - // 先找trackID,找得到就更新age,找不到就新增一个 - var exist = allFaceInfo.find(function (info) { return info.trackID === ageInfo_1[j][0]; }); - if (exist) { - exist.age = ageInfo_1[j][1]; - } - else { - var faceInfo = { - trackID: ageInfo_1[j][0], - age: ageInfo_1[j][1], - }; - allFaceInfo.push(faceInfo); - } - }; - for (var j = 0, ageCount = ageInfo_1.length; j < ageCount; j++) { - _loop_2(j, ageCount); - } - } - break; - } - case 'onMale': { - var maleInfo_1 = params.onMale; // [1,2,3] - if (maleInfo_1) { - var _loop_3 = function (j, maleCount) { - var exist = allFaceInfo.find(function (info) { return info.trackID === maleInfo_1[j]; }); - if (exist) { - exist.gender = 0; - } - else { - var faceInfo = { - trackID: maleInfo_1[j], - gender: 0, - faceIndex: allFaceInfo.length, - }; - allFaceInfo.push(faceInfo); - } - }; - for (var j = 0, maleCount = maleInfo_1.length; j < maleCount; j++) { - _loop_3(j, maleCount); - } - } - break; - } - case 'onFemale': { - var femaleInfo_1 = params.onFemale; // [4,5,6] - if (femaleInfo_1) { - var _loop_4 = function (j, femaleCount) { - var exist = allFaceInfo.find(function (info) { return info.trackID === femaleInfo_1[j]; }); - if (exist) { - exist.gender = 1; - } - else { - var faceInfo = { - trackID: femaleInfo_1[j], - gender: 1, - faceIndex: allFaceInfo.length, - }; - allFaceInfo.push(faceInfo); - } - }; - for (var j = 0, femaleCount = femaleInfo_1.length; j < femaleCount; j++) { - _loop_4(j, femaleCount); - } - } - break; - } - case 'onFacedetected': - case 'onOpenmouth': - case 'onBlinkeyebrow': - case 'onBlinkeye': - case 'onShakehead': - case 'onKiss': - case 'onBlinklefteye': - case 'onBlinkrighteye': - case 'onNod': - case 'onSmile': - case 'onMouthoccluded': - case 'onLefteyeoccluded': - case 'onRighteyeoccluded': - case 'onDoubleeyeoccluded': { - var expressionInfo_1 = params[keys[i]]; - if (expressionInfo_1) { - var _loop_5 = function (j, count) { - var exist = allFaceInfo.find(function (info) { return info.trackID === expressionInfo_1[j]; }); - if (exist) { - if (!exist.expression) { - exist.expression = []; - } - exist.expression.push(keys[i]); - } - else { - var faceInfo = { - trackID: expressionInfo_1[j], - faceIndex: allFaceInfo.length, - expression: [keys[i]], - }; - allFaceInfo.push(faceInfo); - } - }; - for (var j = 0, count = expressionInfo_1.length; j < count; j++) { - _loop_5(j, count); - } - } - break; - } - } - }; - for (var i = 0, size = keys.length; i < size; i++) { - _loop_1(i); - } - return allFaceInfo; - }; - FaceNode.nodeType = 'code/Face'; - return FaceNode; -}(EventNode)); -light.NodeContext.registerNode(FaceNode); - -var AIFeature$1; -(function (AIFeature) { - AIFeature["onSmile"] = "Smile"; - AIFeature["onKiss"] = "Pout"; -})(AIFeature$1 || (AIFeature$1 = {})); -var DefaultAIFeature$1 = "Expression" /* EXPRESSION */; -var FaceActionNode = /** @class */ (function (_super) { - __extends(FaceActionNode, _super); - function FaceActionNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.lastExpressionInfo = {}; - return _this; - } - FaceActionNode.prototype.onDetected = function () { }; - FaceActionNode.prototype.Lost = function () { }; - FaceActionNode.prototype.Run = function () { - var _a, _b; - this.actionEventName = actionNameToEvent(light.FaceAction[this.faceAction]); - if (((_a = this.faceInput) === null || _a === void 0 ? void 0 : _a.expression) && ((_b = this.faceInput) === null || _b === void 0 ? void 0 : _b.expression.indexOf(this.actionEventName)) > -1) { - this.faceOutput = this.faceInput; - this.onDetected(); - } - light.on('update', this.onUpdate.bind(this)); - }; - FaceActionNode.prototype.onUpdate = function () { - var aifeature = AIFeature$1[this.actionEventName] ? AIFeature$1[this.actionEventName] : DefaultAIFeature$1; - var data = getAIClassData([aifeature], this.entityManager); - var expressions = data === null || data === void 0 ? void 0 : data[this.actionEventName]; - var detected = expressions && expressions.length > 0; - if (!detected && this.lastState) { - this.Lost(); - } - this.lastState = detected; - }; - FaceActionNode.nodeType = 'code/FaceAction'; - return FaceActionNode; -}(Node)); -light.NodeContext.registerNode(FaceActionNode); - -var GenderNode = /** @class */ (function (_super) { - __extends(GenderNode, _super); - function GenderNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.lastGenderInfo = {}; - return _this; - } - GenderNode.prototype.Run = function () { - if (!this.faceInput) { - return; - } - this.faceOutput = this.faceInput; - if (this.faceInput.gender === 0) { - console.log('this.faceInput.gender:male'); - if (!this.lastGenderInfo[this.faceInput.trackID]) { - this.onMale(); - } - } - else if (this.faceInput.gender === 1) { - console.log('this.faceInput.gender:Female'); - if (!this.lastGenderInfo[this.faceInput.trackID]) { - this.onFemale(); - } - } - this.lastGenderInfo[this.faceInput.trackID] = this.faceInput.gender; - }; - GenderNode.prototype.onMale = function () { }; - GenderNode.prototype.onFemale = function () { }; - GenderNode.nodeType = 'code/Gender'; - return GenderNode; -}(Node)); -light.NodeContext.registerNode(GenderNode); - -var GenderEventNode = /** @class */ (function (_super) { - __extends(GenderEventNode, _super); - function GenderEventNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.lastMaleInfo = {}; - _this.lastFemaleInfo = {}; - _this.times = 1; - return _this; - } - GenderEventNode.prototype.Run = function () { - openAIFeature(["Gender" /* GENDER */], this.entityManager, this.eventManager); - light.on('update', this.onUpdate.bind(this)); - }; - GenderEventNode.prototype.onUpdate = function () { - var _this = this; - var data = getAIClassData(["Gender" /* GENDER */], this.entityManager); - if (data['onMale']) { - if (!this.lastMaleInfo[data['onMale'].join(',')]) { - data['onMale'].forEach(function (id) { - _this.genderOutput = { - trackID: id, - gender: 0, - }; - _this.onMale(); - _this.times += 1; - }); - this.lastMaleInfo[data['onMale'].join(',')] = true; - } - } - if (data['onFemale']) { - if (!this.lastFemaleInfo[['onFemale'].join(',')]) { - data['onFemale'].forEach(function (id) { - _this.genderOutput = { - trackID: id, - gender: 1, - }; - _this.onFemale(); - _this.times += 1; - }); - this.lastFemaleInfo[data['onFemale'].join(',')] = true; - } - } - }; - GenderEventNode.prototype.onMale = function () { }; - GenderEventNode.prototype.onFemale = function () { }; - GenderEventNode.nodeType = 'code/GenderEvent'; - return GenderEventNode; -}(EventNode)); -light.NodeContext.registerNode(GenderEventNode); - -var GradientType; -(function (GradientType) { - GradientType[GradientType["LINEAR"] = 1] = "LINEAR"; - GradientType[GradientType["EASE_IN"] = 2] = "EASE_IN"; - GradientType[GradientType["EASE_OUT"] = 3] = "EASE_OUT"; - GradientType[GradientType["EASE_IN_OUT"] = 4] = "EASE_IN_OUT"; - GradientType[GradientType["SIN"] = 5] = "SIN"; - GradientType[GradientType["COS"] = 6] = "COS"; -})(GradientType || (GradientType = {})); -var GradientNode = /** @class */ (function (_super) { - __extends(GradientNode, _super); - function GradientNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.currentTime = 0; - _this.timeStart = -1; - _this.listened = false; - return _this; - } - GradientNode.prototype.onUpdate = function (time) { - // currentTime为初始值0时,更新timeStart - if (this.currentTime === 0) { - this.timeStart = time; - } - this.currentTime = time; - if (this.timeStart === -1) { - return; - } - if (time / 1000 - this.timeStart / 1000 <= this.duration / 1000) { - var current = (this.currentTime - this.timeStart) / 1000; - var start = this.from; - var range = this.to - this.from; - var duration = this.duration / 1000; - var handler = {}; - handler[GradientType.LINEAR] = this.linear; - handler[GradientType.EASE_IN] = this.easeInQuad; - handler[GradientType.EASE_OUT] = this.easeOutQuad; - handler[GradientType.EASE_IN_OUT] = this.easeInOutQuad; - handler[GradientType.SIN] = this.sin; - handler[GradientType.COS] = this.cos; - this.CurrentValue = handler[this.gradientType](current, start, range, duration); - this.Next(); - } - else { - this.Finish(); - this.timeStart = -1; - } - }; - GradientNode.prototype.Run = function () { - if (this.to === this.from || this.duration === 0) { // 校验输入值 - return; - } - if (this.currentTime === undefined) { - this.currentTime = this.from; - } - // 首次调用Run时,currentTime为初始值0,导致timeStart非准确start时间 - this.timeStart = this.currentTime; - if (this.listened) { - return; - } - this.listened = true; - light.on('update', this.onUpdate.bind(this)); - }; - GradientNode.prototype.Next = function () { }; - GradientNode.prototype.easeInOutQuad = function (currentTime, startValue, rangeValue, duration) { - currentTime /= duration / 2; - if (currentTime < 1) - return rangeValue / 2 * currentTime * currentTime + startValue; - currentTime -= 1; - return -rangeValue / 2 * (currentTime * (currentTime - 2) - 1) + startValue; - }; - GradientNode.prototype.easeOutQuad = function (currentTime, startValue, rangeValue, duration) { - currentTime /= duration; - return -rangeValue * currentTime * (currentTime - 2) + startValue; - }; - GradientNode.prototype.easeInQuad = function (currentTime, startValue, rangeValue, duration) { - currentTime /= duration; - return rangeValue * currentTime * currentTime + startValue; - }; - GradientNode.prototype.linear = function (currentTime, startValue, rangeValue, duration) { - return rangeValue * currentTime / duration + startValue; - }; - GradientNode.prototype.sin = function (currentTime, startValue, rangeValue, duration) { - return Math.sin(2 * Math.PI * currentTime / duration) * rangeValue + startValue; - }; - GradientNode.prototype.cos = function (currentTime, startValue, rangeValue, duration) { - return Math.cos(2 * Math.PI * currentTime / duration) * rangeValue + startValue; - }; - GradientNode.prototype.Finish = function () { }; - GradientNode.nodeType = 'code/Gradient'; - return GradientNode; -}(Node)); -light.NodeContext.registerNode(GradientNode); - -var IfNode = /** @class */ (function (_super) { - __extends(IfNode, _super); - function IfNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this._dep = false; - return _this; - } - Object.defineProperty(IfNode.prototype, "dep", { - get: function () { - return this._dep; - }, - set: function (v) { - this._dep = v; - }, - enumerable: false, - configurable: true - }); - IfNode.prototype.Run = function () { - if (this.dep) { - this.True(); - } - else { - this.False(); - } - }; - IfNode.prototype.True = function () { }; - IfNode.prototype.False = function () { }; - IfNode.nodeType = 'code/if'; - return IfNode; -}(Node)); -light.NodeContext.registerNode(IfNode); - -var InvertNode = /** @class */ (function (_super) { - __extends(InvertNode, _super); - function InvertNode() { - return _super !== null && _super.apply(this, arguments) || this; - } - InvertNode.prototype.Run = function () { - if (!this.A) { - this.True(); - } - else { - this.False(); - } - }; - InvertNode.prototype.True = function () { }; - InvertNode.prototype.False = function () { }; - InvertNode.nodeType = 'code/Invert'; - return InvertNode; -}(Node)); -light.NodeContext.registerNode(InvertNode); - -var LutNode = /** @class */ (function (_super) { - __extends(LutNode, _super); - function LutNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.strengthInput = -1; - return _this; - } - LutNode.prototype.Run = function () { - showEntities([this.lutEntityId], this.entityManager); - var entity = this.entityManager.getEntityById(this.lutEntityId); - var lut = entity.getComponent(light.LUTFilter); - if (lut) { - lut.intensity = this.strengthInput >= 0 ? this.strengthInput : this.strength; - } - this.Next(); - }; - LutNode.prototype.Next = function () { }; - LutNode.nodeType = 'code/Lut'; - return LutNode; -}(Node)); -light.NodeContext.registerNode(LutNode); - -var OrNode = /** @class */ (function (_super) { - __extends(OrNode, _super); - function OrNode() { - return _super !== null && _super.apply(this, arguments) || this; - } - OrNode.prototype.Run = function () { - if (this.A || this.B) { - this.True(); - } - else { - this.False(); - } - }; - OrNode.prototype.True = function () { }; - OrNode.prototype.False = function () { }; - OrNode.nodeType = 'code/Or'; - return OrNode; -}(Node)); -light.NodeContext.registerNode(OrNode); - -var BranchMode; -(function (BranchMode) { - BranchMode[BranchMode["Queue"] = 1] = "Queue"; - BranchMode[BranchMode["Random"] = 2] = "Random"; -})(BranchMode || (BranchMode = {})); -var QueueBranchNode = /** @class */ (function (_super) { - __extends(QueueBranchNode, _super); - function QueueBranchNode() { - var _this = _super.call(this) || this; - _this.currentIndex = 0; - _this.branchMode = BranchMode.Queue; - _this.randomStart = false; - if (_this.randomStart && _this.branchMode === BranchMode.Queue) { - _this.currentIndex = Math.floor(Math.random() * 10); - } - return _this; - } - QueueBranchNode.prototype.Run = function () { - var Limit = 5; - var max = 0; - for (var i = 0; i < Limit; i++) { - if (this["Next" + i]) { - max = max + 1; - } - else { - break; - } - } - if (this.branchMode === BranchMode.Queue) { - this["Next" + this.currentIndex % max](); - this.currentIndex = this.currentIndex + 1; - } - else { - this["Next" + Math.floor(Math.random() * max)](); - } - }; - QueueBranchNode.nodeType = 'code/queueBranch'; - return QueueBranchNode; -}(Node)); -light.NodeContext.registerNode(QueueBranchNode); - -var RandomNode = /** @class */ (function (_super) { - __extends(RandomNode, _super); - function RandomNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.toShow = []; - _this.toHide = []; - _this.init = false; - return _this; - } - RandomNode.prototype.Run = function () { - this.toShow = []; - this.toHide = []; - if (this.entityToDisplay.length) { - var entityId = this.entityToDisplay[Math.floor(Math.random() * this.entityToDisplay.length)]; - var entity = this.entityManager.getEntityById(entityId); - if (entity) { - this.toShow.push(entityId); - } - } - if (this.entityToHide.length) { - var entityId = this.entityToHide[Math.floor(Math.random() * this.entityToHide.length)]; - this.toHide.push(entityId); - } - showEntities(this.toShow, this.entityManager); - hideEntities(this.toHide, this.entityManager); - this.Next(); - }; - RandomNode.prototype.Next = function () { }; - RandomNode.nodeType = 'code/Random'; - return RandomNode; -}(Node)); -light.NodeContext.registerNode(RandomNode); - -var RandomNumberNode = /** @class */ (function (_super) { - __extends(RandomNumberNode, _super); - function RandomNumberNode() { - var _this = _super.call(this) || this; - _this.isInteger = false; - _this.setValue(); - return _this; - } - RandomNumberNode.prototype.setValue = function () { - if (this.isInteger) { - return Math.round(Math.round(this.from) + (Math.random() * (this.to - this.from))); - } - return this.from + (Math.random() * (this.to - this.from)); - }; - RandomNumberNode.prototype.Run = function () { - this.Value = this.setValue(); - this.Next(); - }; - RandomNumberNode.prototype.Next = function () { }; - RandomNumberNode.nodeType = 'code/randomNumber'; - return RandomNumberNode; -}(Node)); -light.NodeContext.registerNode(RandomNumberNode); - -var SumNode = /** @class */ (function (_super) { - __extends(SumNode, _super); - function SumNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.A = 0; - _this.B = 0; - return _this; - } - SumNode.prototype.Run = function () { - this.Sum = this.A + this.B; - this.Diff = this.A - this.B; - this.Multiply = this.A * this.B; - this.Divide = this.B === 0 ? 0 : this.A / this.B; - this.Complement = this.A % this.B; - this.Next(); - }; - SumNode.prototype.Next = function () { - }; - SumNode.nodeType = 'code/Sum'; - return SumNode; -}(Node)); -light.NodeContext.registerNode(SumNode); - -var TransformNode = /** @class */ (function (_super) { - __extends(TransformNode, _super); - function TransformNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.xInput = 0; - _this.yInput = 0; - _this.wInput = 0; - _this.hInput = 0; - _this.rotationInput = 0; - _this.scalexInput = 1; - _this.scaleyInput = 1; - _this.accumulation = true; - return _this; - } - TransformNode.prototype.Run = function () { - if (!this.entityId) { - this.Next(); - return; - } - var entity = this.entityManager.getEntityById(this.entityId); - var cmp = entity.getComponent(light.ScreenTransform); - cmp.offset.bottom = this.accumulation ? (cmp.offset.bottom - this.hInput / 2) - : (this.hInput || cmp.offset.bottom); - cmp.offset.top = this.accumulation ? (cmp.offset.top + this.hInput / 2) - : (this.hInput || cmp.offset.top); - cmp.offset.left = this.accumulation ? (cmp.offset.left - this.wInput / 2) - : (this.wInput || cmp.offset.left); - cmp.offset.right = this.accumulation ? (cmp.offset.right + this.wInput / 2) - : (this.wInput || cmp.offset.right); - cmp.anchor.left = this.accumulation ? (cmp.anchor.left + this.xInput) - : (this.xInput || cmp.anchor.left); - cmp.anchor.right = this.accumulation ? (cmp.anchor.right + this.xInput) - : (this.xInput || cmp.anchor.right); - cmp.anchor.top = this.accumulation ? (cmp.anchor.top + this.yInput) - : (this.yInput || cmp.anchor.top); - cmp.anchor.bottom = this.accumulation ? (cmp.anchor.bottom + this.yInput) - : (this.yInput || cmp.anchor.bottom); - var _a = cmp.rotation, x = _a.x, y = _a.y, z = _a.z, w = _a.w; - var euler = new Euler(x, y, z); - var quater = new Quaternion(x, y, z, w); - euler.setFromQuaternion(quater); - euler.z = this.accumulation ? euler.z + this.rotationInput / 180 * Math.PI - : (this.rotationInput / 180 * Math.PI || euler.z); - quater.setFromEuler(euler); - cmp.rotation.x = quater.x; - cmp.rotation.y = quater.y; - cmp.rotation.z = quater.z; - cmp.rotation.w = quater.w; - var xSymbol = cmp.scale.x / Math.abs(cmp.scale.x); - var ySymbol = cmp.scale.y / Math.abs(cmp.scale.y); - cmp.scale.x = xSymbol * this.scalexInput + (this.accumulation ? cmp.scale.x : 0); - cmp.scale.y = ySymbol * this.scaleyInput + (this.accumulation ? cmp.scale.y : 0); - this.Next(); - }; - TransformNode.prototype.Next = function () { - }; - TransformNode.nodeType = 'code/Transform'; - return TransformNode; -}(Node)); -light.NodeContext.registerNode(TransformNode); - -var TransformNode$1 = /** @class */ (function (_super) { - __extends(TransformNode, _super); - function TransformNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.X = 0; - _this.Y = 0; - _this.Z = 0; - _this.xInput = 0; - _this.yInput = 0; - _this.zInput = 0; - _this.rotateX = 0; - _this.rotateY = 0; - _this.rotateZ = 0; - _this.rotateXInput = 0; - _this.rotateYInput = 0; - _this.rotateZInput = 0; - _this.scaleX = 0; - _this.scaleY = 0; - _this.scaleZ = 0; - _this.scaleXInput = 0; - _this.scaleYInput = 0; - _this.scaleZInput = 0; - return _this; - } - TransformNode.prototype.Run = function () { - var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z; - if (!this.entityId) { - this.Next(); - return; - } - var entity = this.entityManager.getEntityById(this.entityId); - var cmp = entity.getComponent(light.BasicTransform); - if (cmp) { - var vec3 = new light.Vec3((_c = (_b = (_a = this.xInput) !== null && _a !== void 0 ? _a : this.X) !== null && _b !== void 0 ? _b : cmp.position.x) !== null && _c !== void 0 ? _c : 0, (_f = (_e = (_d = this.yInput) !== null && _d !== void 0 ? _d : this.Y) !== null && _e !== void 0 ? _e : cmp.position.y) !== null && _f !== void 0 ? _f : 0, (_j = (_h = (_g = this.zInput) !== null && _g !== void 0 ? _g : this.Z) !== null && _h !== void 0 ? _h : cmp.position.z) !== null && _j !== void 0 ? _j : 0); - var svec3 = new light.Vec3((_m = (_l = (_k = this.scaleXInput) !== null && _k !== void 0 ? _k : this.scaleX) !== null && _l !== void 0 ? _l : cmp.scale.x) !== null && _m !== void 0 ? _m : 0, (_q = (_p = (_o = this.scaleYInput) !== null && _o !== void 0 ? _o : this.scaleY) !== null && _p !== void 0 ? _p : cmp.scale.y) !== null && _q !== void 0 ? _q : 0, (_t = (_s = (_r = this.scaleZInput) !== null && _r !== void 0 ? _r : this.scaleZ) !== null && _s !== void 0 ? _s : cmp.scale.z) !== null && _t !== void 0 ? _t : 0); - var _0 = cmp.rotation, x = _0.x, y = _0.y, z = _0.z, w = _0.w; - var valueX = (_v = (_u = this.rotateXInput) !== null && _u !== void 0 ? _u : this.rotateX) !== null && _v !== void 0 ? _v : x; - var valueY = (_x = (_w = this.rotateYInput) !== null && _w !== void 0 ? _w : this.rotateY) !== null && _x !== void 0 ? _x : y; - var valueZ = (_z = (_y = this.rotateZInput) !== null && _y !== void 0 ? _y : this.rotateZ) !== null && _z !== void 0 ? _z : z; - valueX = valueX / 180 * Math.PI; - valueY = valueY / 180 * Math.PI; - valueZ = valueZ / 180 * Math.PI; - var euler = new Euler(x, y, z); - var quater = new Quaternion(x, y, z, w); - euler.setFromQuaternion(quater); - euler.x = valueX; - euler.y = valueY; - euler.z = valueZ; - quater.setFromEuler(euler); - cmp.SetRotation(new light.Quat(quater.w, quater.x, quater.y, quater.z)); - cmp.SetScale(svec3); - cmp.SetPosition(vec3); - this.Next(); - } - }; - TransformNode.prototype.Next = function () { - }; - TransformNode.nodeType = 'code/Transform3D'; - return TransformNode; -}(Node)); -light.NodeContext.registerNode(TransformNode$1); - -var LoopType$2; -(function (LoopType) { - LoopType["FIXED"] = "\u56FA\u5B9A\u6570\u5B57"; - LoopType["INFINITE"] = "\u65E0\u9650\u5FAA\u73AF"; -})(LoopType$2 || (LoopType$2 = {})); -var UpdateNode = /** @class */ (function (_super) { - __extends(UpdateNode, _super); - function UpdateNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.repeatTimes = 1; - _this.frame = 1; - _this.currentFrame = 0; - _this.startupTrigger = false; // 刚开始就触发一次 - _this.currentTimes = 0; - return _this; - } - UpdateNode.prototype.Run = function () { - if (this.startupTrigger && this.repeatTimes !== 0) { - this.Update(); - this.currentTimes = this.currentTimes + 1; - } - light.on('update', this.onFrameUpdate.bind(this)); - }; - UpdateNode.prototype.onFrameUpdate = function (_val) { - if (this.currentFrame !== 0) { - var trigger = (this.currentFrame % this.frame) === 0; - var infinite = this.loopType === LoopType$2.INFINITE; - var eligible = this.repeatTimes > this.currentTimes; - if (infinite || eligible) { - if (trigger) { - this.Update(); - this.currentTimes = this.currentTimes + 1; - } - } - } - this.currentFrame += 1; - }; - UpdateNode.prototype.Update = function () { }; - UpdateNode.nodeType = 'code/Update'; - return UpdateNode; -}(EventNode)); -light.NodeContext.registerNode(UpdateNode); - -var LoopType$3; -(function (LoopType) { - LoopType["FIXED"] = "\u56FA\u5B9A\u6570\u5B57"; - LoopType["INFINITE"] = "\u65E0\u9650\u5FAA\u73AF"; -})(LoopType$3 || (LoopType$3 = {})); -var TimesNode = /** @class */ (function (_super) { - __extends(TimesNode, _super); - function TimesNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.total = 2; - _this.times = 1; - _this.repeat = 1; - return _this; - } - TimesNode.prototype.Run = function () { - var repeat = this.loopType === LoopType$3.INFINITE ? Infinity : this.repeat; - if (this.times > this.total * repeat) { - return; - } - var index = (this.times - 1) % this.total; - if (!this["Next" + (index + 1)]) { - this["Next" + (index + 1)] = function () { }; - } - this["Next" + (index + 1)](); - this.times = this.times + 1; - }; - TimesNode.nodeType = 'code/times'; - return TimesNode; -}(Node)); -light.NodeContext.registerNode(TimesNode); - -var LoopType$4; -(function (LoopType) { - LoopType["FIXED"] = "\u56FA\u5B9A\u6570\u5B57"; - LoopType["INFINITE"] = "\u65E0\u9650\u5FAA\u73AF"; -})(LoopType$4 || (LoopType$4 = {})); -var play = /** @class */ (function (_super) { - __extends(play, _super); - function play() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.init = false; - _this.keepLastFrame = false; - _this.playtimes = 1; - return _this; - } - play.prototype.Run = function () { - var _this = this; - var entity = this.entityManager.getEntityById(this.entityId); - if (entity) { - showEntities([this.entityId], this.entityManager); - if (this.loopType === LoopType$4.INFINITE) { - return; - } - var timeOffset = entity.getComponent(light.TimeOffset); - var timeContrl = entity.getComponent(light.TimeControl); - var timeContrlList = entity.getComponent(light.TimeControlList); - if (timeOffset) { - if (timeContrlList === null || timeContrlList === void 0 ? void 0 : timeContrlList.timeControlArray) { - for (var i = 0; i < timeContrlList.timeControlArray.size(); i++) { - timeContrlList.timeControlArray.get(i).reset(); - timeContrlList.timeControlArray.get(i).currentTime = 0; - } - } - else if (timeContrl) { - timeContrl.reset(); - timeContrl.currentTime = 0; - } - else { - timeOffset.startOffset = light.getCurrentTime(); - } - timeOffset.loopCount = this.playtimes - 1; - timeOffset.visibleWhileOverTime = this.keepLastFrame; - var currentTime = light.getCurrentTime(); - var endTime_1 = currentTime + (timeOffset.duration - * (this.loopType === LoopType$4.INFINITE ? Infinity : this.playtimes)); - var invoked_1 = false; - light.on('update', function (time) { - if (time > endTime_1 && !invoked_1) { - invoked_1 = true; - _this.Finish(); - } - }); - } - } - this.Next(); - }; - play.prototype.Pause = function () { - var entity = this.entityManager.getEntityById(this.entityId); - if (entity) { - var timeOffset = entity.getComponent(light.TimeOffset); - var timeContrl = entity.getComponent(light.TimeControl); - if (timeContrl) { - timeContrl.pause = true; - timeContrl.loopCount = 0; - timeContrl.visibleWhileOverTime = true; - } - if (timeOffset) { - timeOffset.loopCount = 0; - timeOffset.visibleWhileOverTime = true; - } - } - }; - play.prototype.Next = function () { }; - play.prototype.Finish = function () { }; - play.nodeType = 'code/play'; - return play; -}(Node)); -light.NodeContext.registerNode(play); - -var SnapshotNode = /** @class */ (function (_super) { - __extends(SnapshotNode, _super); - function SnapshotNode() { - return _super !== null && _super.apply(this, arguments) || this; - } - SnapshotNode.prototype.Run = function () { - var _this = this; - showEntities([this.entityId], this.entityManager); - light.once('update', function () { - hideEntities([_this.entityId], _this.entityManager); - }); - this.Next(); - }; - SnapshotNode.prototype.Next = function () { }; - SnapshotNode.nodeType = 'code/Snapshot'; - return SnapshotNode; -}(Node)); -light.NodeContext.registerNode(SnapshotNode); - -var TransformNode$2 = /** @class */ (function (_super) { - __extends(TransformNode, _super); - function TransformNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.entities = []; - _this.duration = 1000000; - return _this; - } - TransformNode.prototype.Run = function () { - var _this = this; - if (this.entities.length < 2) { - return; - } - var originCoor = {}; - this.entities.forEach(function (entityId) { - var entity = _this.entityManager.getEntityById(entityId); - if (entity) { - var cmp = entity.getComponent(light.ScreenTransform); - if (cmp) { - originCoor[entityId] = { - left: cmp.anchor.left, - right: cmp.anchor.right, - top: cmp.anchor.top, - bottom: cmp.anchor.bottom, - }; - } - } - }); - if (Object.keys(originCoor).length < 2) { - return; - } - this.entities.forEach(function (entityId, i) { - var from = _this.entityManager.getEntityById(entityId); - var targetId = _this.entities[i + 1] || _this.entities[0]; - var pos = ['left', 'right', 'top', 'bottom']; - var invoke = (new Array(pos.length)).fill(false); - var timeStart = (new Array(pos.length)).fill(light.getCurrentTime()); - light.on('update', function (time) { - if (invoke.every(function (i) { return i == true; })) { - return; - } - pos.forEach(function (pos, idx) { - var currentTime = light.getCurrentTime(); - var transform = from.getComponent(light.ScreenTransform); - if (timeStart[idx] === -1 || invoke[idx]) { - return; - } - if (time - timeStart[idx] <= _this.duration) { - if (transform) { - var value = _this.linear((currentTime - timeStart[idx]) / 1000, originCoor[entityId][pos], originCoor[targetId][pos] - originCoor[entityId][pos], _this.duration / 1000); - transform.anchor[pos] = value; - } - currentTime = time; - } - else { - if (transform) { - transform.anchor[pos] = originCoor[targetId][pos]; - } - timeStart[idx] = -1; - invoke[idx] = true; - } - }); - }); - }); - this.Next(); - }; - TransformNode.prototype.linear = function (currentTime, startValue, changeValue, duration) { - return changeValue * currentTime / duration + startValue; - }; - TransformNode.prototype.Next = function () { - }; - TransformNode.nodeType = 'code/Translate'; - return TransformNode; -}(Node)); -light.NodeContext.registerNode(TransformNode$2); - -var LotteryNode = /** @class */ (function (_super) { - __extends(LotteryNode, _super); - function LotteryNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.from = 0; - _this.to = 1; - _this.repeat = false; - _this.n = 2; - _this.isInteger = false; - return _this; - } - LotteryNode.prototype.Run = function () { - var _a = this, n = _a.n, repeat = _a.repeat, from = _a.from, to = _a.to; - var result = []; - if (to - from + 1 >= n) { // 判断区间内是否可以产生n个不重复的值 - if (repeat) { - while (result.length !== n) { - result.push(this.generateRandom(from, to)); - } - } - else { - while ((new Set(result)).size !== n) { - result.push(this.generateRandom(from, to)); - } - result = Array.from((new Set(result))); - } - } - else { - while (result.length !== n) { - result.push(this.generateRandom(from, to)); - } - } - for (var i = 0; i < n; i++) { - this["number" + (i + 1)] = result[i]; - } - this.Next(); - }; - LotteryNode.prototype.generateRandom = function (from, to) { - if (this.isInteger) { - return Math.round(Math.round(from) + (Math.random() * (to - from))); - } - return from + (Math.random() * (to - from)); - }; - LotteryNode.prototype.Next = function () { }; - LotteryNode.nodeType = 'code/Lottery'; - return LotteryNode; -}(Node)); -light.NodeContext.registerNode(LotteryNode); - -var IfNode$1 = /** @class */ (function (_super) { - __extends(IfNode, _super); - function IfNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.time1 = -1; - _this.time2 = -1; - _this.gap = 1000000; - return _this; - } - IfNode.prototype.Event1 = function () { - this.time1 = light.getCurrentTime(); - if (this.time2 !== -1 && Math.abs(this.time1 - this.time2) <= this.gap) { - this.Next(); - } - }; - IfNode.prototype.Event2 = function () { - this.time2 = light.getCurrentTime(); - if (this.time1 !== -1 && Math.abs(this.time1 - this.time2) <= this.gap) { - this.Next(); - } - }; - IfNode.prototype.Next = function () { }; - IfNode.nodeType = 'code/Merge'; - return IfNode; -}(Node)); -light.NodeContext.registerNode(IfNode$1); - -var LotteryNode$1 = /** @class */ (function (_super) { - __extends(LotteryNode, _super); - function LotteryNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.from = 0; - _this.to = 1; - _this.duration = 1000000; // 编辑器里以微秒处理 - _this.progress = -1; - return _this; - } - LotteryNode.prototype.Run = function () { - var _this = this; - var entity = this.entityManager.getEntityById(this.entityId); - if (!entity) - return; - var face = entity.getComponent(light.CrazyFace); - if (!face) - return; - if (this.progress !== -1) { - face.progress = this.progress; - showEntities([this.entityId], this.entityManager); - this.Next(); - } - else { - var timeStart_1 = light.getCurrentTime(); - var invoked_1 = false; - var resetInitialValue_1 = false; - light.on('update', function (time) { - var currentTime = light.getCurrentTime(); - if (timeStart_1 === -1 || invoked_1) { - return; - } - if (!resetInitialValue_1) { - resetInitialValue_1 = true; - face.progress = _this.from; - showEntities([_this.entityId], _this.entityManager); - } - if (time - timeStart_1 <= _this.duration) { - face.progress = _this.linear((currentTime - timeStart_1) / 1000, _this.from, _this.to - _this.from, _this.duration / 1000); - } - else { - _this.Next(); - invoked_1 = true; - timeStart_1 = -1; - } - }); - } - }; - LotteryNode.prototype.linear = function (currentTime, startValue, changeValue, duration) { - return changeValue * currentTime / duration + startValue; - }; - LotteryNode.prototype.Next = function () { }; - LotteryNode.nodeType = 'code/Fusion'; - return LotteryNode; -}(Node)); -light.NodeContext.registerNode(LotteryNode$1); - -var Status; -(function (Status) { - Status[Status["Detected"] = 1] = "Detected"; - Status[Status["Lost"] = 2] = "Lost"; - Status[Status["UNINITIALIZED"] = 3] = "UNINITIALIZED"; -})(Status || (Status = {})); -var PointNode = /** @class */ (function (_super) { - __extends(PointNode, _super); - function PointNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.pitchMin = 0; - _this.pitchMax = 1; - _this.yawMin = 0; - _this.yawMax = 1; - _this.rollMin = 0; - _this.rollMax = 1; - _this.x1 = 0; - _this.x2 = 1; - _this.y1 = 0; - _this.y2 = 1; - _this.ratio = 1.2; // 丢失的比例 - _this.status = {}; - _this.init = false; - _this.minWidth = 0.8; - _this.minHeight = 0.8; - return _this; - } - PointNode.prototype.Run = function () { - if (this.init) { - for (var id in this.status) { - this.status[id] = Status.UNINITIALIZED; - } - return; - } - this.init = true; - openAIFeature([ - "Face_Point" /* FACE_POINT */, - ], this.entityManager, this.eventManager); - light.on('update', this.update.bind(this)); - }; - PointNode.prototype.getMinValue = function (value) { - if (value > 0) { - return value / this.ratio; - } - return value * this.ratio; - }; - PointNode.prototype.getMaxValue = function (value) { - if (value > 0) { - return value * this.ratio; - } - return value / this.ratio; - }; - PointNode.prototype.update = function () { - var _this = this; - var datas = getAIPointData("Face_Point" /* FACE_POINT */, this.entityManager); - var _loop_1 = function (i) { - var data = datas[i]; - var id_ = data.id_, roll_ = data.roll_, pitch_ = data.pitch_, canvas_width_ = data.canvas_width_, canvas_height_ = data.canvas_height_, yaw_ = data.yaw_, point_array_ = data.point_array_; - var minX; - var maxX; - var minY; - var maxY; - if (point_array_ === null || point_array_ === void 0 ? void 0 : point_array_.length) { - var xs = []; - var ys = []; - for (var i_1 = 0; i_1 < point_array_.length; i_1++) { - if (i_1 % 2 === 0) { - xs.push(point_array_[i_1]); - } - else { - ys.push((point_array_[i_1])); - } - } - minX = Math.min.apply(Math, xs); - maxX = Math.max.apply(Math, xs); - minY = Math.min.apply(Math, ys); - maxY = Math.max.apply(Math, ys); - } - if (this_1.status[id_] === undefined) { - this_1.status[id_] = Status.UNINITIALIZED; - } - var isDetect = function () { return _this.isBetween(roll_, _this.rollMin, _this.rollMax) - && _this.isBetween(yaw_, _this.yawMin, _this.yawMax) - && _this.isBetween(pitch_, _this.pitchMin, _this.pitchMax) - && _this.isBetween(minX, _this.x1 * canvas_width_, _this.x2 * canvas_width_) - && _this.isBetween(maxX, _this.x1 * canvas_width_, _this.x2 * canvas_width_) - && _this.isBetween(minY, _this.y1 * canvas_height_, _this.y2 * canvas_height_) - && _this.isBetween(maxY, _this.y1 * canvas_height_, _this.y2 * canvas_height_) - && isVaildFace(); }; - var isLost = function () { return !_this.isBetween(roll_, _this.getMinValue(_this.rollMin), _this.getMaxValue(_this.rollMax)) - || !_this.isBetween(yaw_, _this.getMinValue(_this.yawMin), _this.getMaxValue(_this.yawMax)) - || !_this.isBetween(pitch_, _this.getMinValue(_this.pitchMin), _this.getMaxValue(_this.pitchMax)) - || !_this.isBetween(minX, _this.getMinValue(_this.x1 * canvas_width_), _this.getMaxValue(_this.x2 * canvas_width_)) - || !_this.isBetween(maxX, _this.getMinValue(_this.x1 * canvas_width_), _this.getMaxValue(_this.x2 * canvas_width_)) - || !_this.isBetween(minY, _this.getMinValue(_this.y1 * canvas_height_), _this.getMaxValue(_this.y2 * canvas_height_)) - || !_this.isBetween(maxY, _this.getMinValue(_this.y1 * canvas_height_), _this.getMaxValue(_this.y2 * canvas_height_)) - || !isVaildFace(); }; - var isVaildFace = function () { return (maxX - minX) > (_this.minWidth * canvas_width_) - && (maxY - minY) > (_this.minHeight * canvas_height_); }; - if (this_1.status[id_] === Status.UNINITIALIZED) { - if (isDetect()) { - this_1.faceId = id_; - this_1.faceIndex = i; - this_1.status[id_] = Status.Detected; - this_1.Detected(); - } - else if (isLost()) { - this_1.faceId = id_; - this_1.faceIndex = i; - this_1.status[id_] = Status.Lost; - this_1.Lost(); - } - } - else if (this_1.status[id_] === Status.Lost) { // 初始化或丢失之后处理 - if (isDetect()) { - this_1.faceId = id_; - this_1.faceIndex = i; - this_1.status[id_] = Status.Detected; - this_1.Detected(); - } - } - else if (this_1.status[id_] === Status.Detected) { // 检测到时处理 - if (isLost()) { - this_1.faceId = id_; - this_1.faceIndex = i; - this_1.status[id_] = Status.Lost; - this_1.Lost(); - } - } - }; - var this_1 = this; - for (var i = 0; i < datas.length; i++) { - _loop_1(i); - } - }; - PointNode.prototype.isBetween = function (v, min, max) { - if (min <= v && v <= max) { - return true; - } - return false; - }; - PointNode.prototype.Detected = function () { }; - PointNode.prototype.Lost = function () { }; - PointNode.nodeType = 'code/Point'; - return PointNode; -}(Node)); -light.NodeContext.registerNode(PointNode); - -var PostEffectNode = /** @class */ (function (_super) { - __extends(PostEffectNode, _super); - function PostEffectNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.strengthInput = 0; - _this.starMaxScaleInput = 0; - _this.starMinScaleInput = 0; - _this.starScalePeriodInput = 0; - _this.maxCornersInput = 0; - _this.minDistanceInput = 0; - _this.brightnessInput = 0; - _this.contrastInput = 0; - _this.hueInput = 0; - _this.highlightsInput = 0; - _this.sharpnessInput = 0; - _this.shadowsInput = 0; - _this.saturationInput = 0; - _this.temperatureInput = 0; - return _this; - } - PostEffectNode.prototype.Run = function () { - showEntities([this.entityId], this.entityManager); - var entity = this.entityManager.getEntityById(this.entityId); - var postEffect = entity.getComponent(light.PostEffect); - if (postEffect) { - if (postEffect.getEffectJson()) { - var json = JSON.parse(postEffect.getEffectJson()); - json.effectStrength = this.strengthInput > 0 ? this.strengthInput : json.effectStrength; - json.starMaxScale = this.starMaxScaleInput > 0 ? this.starMaxScaleInput : json.starMaxScale; - json.starMinScale = this.starMinScaleInput > 0 ? this.starMinScaleInput : json.starMinScale; - json.starScalePeriod = this.starScalePeriodInput > 0 ? this.starScalePeriodInput : json.starScalePeriod; - json.minDistance = this.minDistanceInput > 0 ? this.minDistanceInput : json.minDistance; - json.maxCorners = this.maxCornersInput > 0 ? this.maxCornersInput : json.maxCorners; - json.brightness = this.brightnessInput > 0 ? this.brightnessInput : json.brightness; - json.contrast = this.contrastInput > 0 ? this.contrastInput : json.contrast; - json.hue = this.hueInput > 0 ? this.hueInput : json.hue; - json.highlights = this.highlightsInput > 0 ? this.highlightsInput : json.highlights; - json.sharpness = this.sharpnessInput > 0 ? this.sharpnessInput : json.sharpness; - json.shadows = this.shadowsInput > 0 ? this.shadowsInput : json.shadows; - json.saturation = this.saturationInput > 0 ? this.saturationInput : json.saturation; - json.temperature = this.temperatureInput > 0 ? this.temperatureInput : json.temperature; - postEffect.setEffectJson(JSON.stringify(json)); - } - } - this.Next(); - }; - PostEffectNode.prototype.Next = function () { }; - PostEffectNode.nodeType = 'code/PostEffect'; - return PostEffectNode; -}(Node)); -light.NodeContext.registerNode(PostEffectNode); - -var ParticleNode = /** @class */ (function (_super) { - __extends(ParticleNode, _super); - function ParticleNode() { - return _super !== null && _super.apply(this, arguments) || this; - } - ParticleNode.prototype.Run = function () { - var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z; - if (!this.entityId) - return; - var entity = this.entityManager.getEntityById(this.entityId); - showEntities([this.entityId], this.entityManager); - if (entity) { - var particle = entity.getComponent(light.ParticleEffect); - if (particle) { - var vec3 = new light.Vec3((_c = (_b = (_a = this.xInput) !== null && _a !== void 0 ? _a : this.x) !== null && _b !== void 0 ? _b : particle.emitterLength.x) !== null && _c !== void 0 ? _c : 0, (_f = (_e = (_d = this.yInput) !== null && _d !== void 0 ? _d : this.y) !== null && _e !== void 0 ? _e : particle.emitterLength.y) !== null && _f !== void 0 ? _f : 0, (_j = (_h = (_g = this.zInput) !== null && _g !== void 0 ? _g : this.z) !== null && _h !== void 0 ? _h : particle.emitterLength.z) !== null && _j !== void 0 ? _j : 0); - var dvec3 = new light.Vec3((_m = (_l = (_k = this.directionXInput) !== null && _k !== void 0 ? _k : this.directionX) !== null && _l !== void 0 ? _l : particle.emissionVector.x) !== null && _m !== void 0 ? _m : 0, (_q = (_p = (_o = this.directionYInput) !== null && _o !== void 0 ? _o : this.directionY) !== null && _p !== void 0 ? _p : particle.emissionVector.y) !== null && _q !== void 0 ? _q : 0, (_t = (_s = (_r = this.directionZInput) !== null && _r !== void 0 ? _r : this.directionZ) !== null && _s !== void 0 ? _s : particle.emissionVector.z) !== null && _t !== void 0 ? _t : 0); - particle.emitterLength = vec3; - particle.emissionVector = dvec3; - particle.speed = (_w = (_v = (_u = this.speedInput) !== null && _u !== void 0 ? _u : this.speed) !== null && _v !== void 0 ? _v : particle.speed) !== null && _w !== void 0 ? _w : 0.1; - particle.maxParticles = (_z = (_y = (_x = this.maxInput) !== null && _x !== void 0 ? _x : this.max) !== null && _y !== void 0 ? _y : particle.maxParticles) !== null && _z !== void 0 ? _z : 0; - particle.speedRandom = false; - particle.emissionVectorRandom = false; - particle.updateComponentData = true; - } - } - this.Next(); - }; - ParticleNode.prototype.Next = function () { }; - ParticleNode.nodeType = 'code/Particle'; - return ParticleNode; -}(Node)); -light.NodeContext.registerNode(ParticleNode); - -var ThrottleNode = /** @class */ (function (_super) { - __extends(ThrottleNode, _super); - function ThrottleNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.value = 1000000; - _this.triggerTime = -1; // 上一次触发时间 - return _this; - } - ThrottleNode.prototype.Next = function () { }; - ThrottleNode.prototype.Run = function () { - if (this.triggerTime < 0 // 首次触发及间隔超过 - || (this.triggerTime >= 0 && (this.triggerTime + this.value < light.getCurrentTime()))) { - this.triggerTime = light.getCurrentTime(); - this.Next(); - } - }; - ThrottleNode.nodeType = 'code/throttle'; - return ThrottleNode; -}(Node)); -light.NodeContext.registerNode(ThrottleNode); - -var UserMaterialNode = /** @class */ (function (_super) { - __extends(UserMaterialNode, _super); - function UserMaterialNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.lastpaths = []; - return _this; - } - UserMaterialNode.prototype.Run = function () { - var _this = this; - light.on('update', function () { - var entity = _this.entityManager.getEntityById(_this.entityId); - if (entity) { - var cmp = entity.getComponent(light.UserMaterial); - if (cmp) { - var clipData = cmp.getClipDataPaths(); - if ((clipData === null || clipData === void 0 ? void 0 : clipData.size) && clipData.size()) { - var paths = []; - for (var i = 0; i < clipData.size(); i++) { - paths.push(clipData.get(i)); - } - if (paths.length !== _this.lastpaths.length || !paths.every(function (path, i) { return path === _this.lastpaths[i]; })) { - if (_this.lastpaths.length === 0) { - _this.Next(); - } - else { - _this.Change(); - } - _this.lastpaths = paths; - } - } - } - } - }); - }; - UserMaterialNode.prototype.Next = function () { }; - UserMaterialNode.prototype.Change = function () { }; - UserMaterialNode.nodeType = 'code/userMaterial'; - return UserMaterialNode; -}(EventNode)); -light.NodeContext.registerNode(UserMaterialNode); - -var TouchEventNode = /** @class */ (function (_super) { - __extends(TouchEventNode, _super); - function TouchEventNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.init = false; - return _this; - } - TouchEventNode.prototype.Run = function () { - var _this = this; - if (!this.init) { - this.init = true; - light.on('TouchEvent', function () { - _this.Next(); - }); - } - }; - TouchEventNode.prototype.Next = function () { }; - TouchEventNode.nodeType = 'code/touchEvent'; - return TouchEventNode; -}(EventNode)); -light.NodeContext.registerNode(TouchEventNode); - -var Status$1; -(function (Status) { - Status[Status["Detected"] = 1] = "Detected"; - Status[Status["Lost"] = 2] = "Lost"; - Status[Status["UNINITIALIZED"] = 3] = "UNINITIALIZED"; -})(Status$1 || (Status$1 = {})); -var PointNode$1 = /** @class */ (function (_super) { - __extends(PointNode, _super); - function PointNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.detected = false; - return _this; - } - PointNode.prototype.transform = function (value, max) { - var rangeMin = -1; - var rangeMax = 1; - var range = rangeMax - rangeMin; - return ((range * value / max) + rangeMin); - }; - PointNode.prototype.Run = function () { - var _this = this; - openAIFeature(["Hand_Gesture" /* HAND_GESTURE */], this.entityManager, this.eventManager); - light.on('update', function (_time) { - var handPointdatas = getAIPointData("Hand_Point" /* HAND_POINT */, _this.entityManager); - var firstHand = handPointdatas === null || handPointdatas === void 0 ? void 0 : handPointdatas[0]; - if (firstHand) { - _this.detected = true; - var canvas_width_ = firstHand.canvas_width_; - var canvas_height_ = firstHand.canvas_height_; - var points = firstHand.point_array_; - var xs = points.filter(function (point, index) { return (index % 2 === 0); }); - var ys = points.filter(function (point, index) { return (index % 2 === 1); }); - var minX = Math.min.apply(Math, xs); - var maxX = Math.max.apply(Math, xs); - var minY = Math.min.apply(Math, ys); - var maxY = Math.max.apply(Math, ys); - _this.horizonX1 = _this.transform(minX, canvas_width_); - _this.horizonX2 = _this.transform(maxX, canvas_width_); - _this.horizonMiddle = _this.transform((minX + maxX) / 2, canvas_width_); - _this.verticalY1 = _this.transform(minY, canvas_height_); - _this.verticalY2 = _this.transform(maxY, canvas_height_); - _this.verticalMiddle = _this.transform((minY + maxY) / 2, canvas_height_); - _this.screenWidth = canvas_width_; - _this.screenHeight = canvas_height_; - _this.Detect(); - } - else { - _this.detected = false; - _this.Lost(); - } - }); - }; - PointNode.prototype.Detect = function () { }; - PointNode.prototype.Lost = function () { }; - PointNode.nodeType = 'code/handpoint'; - return PointNode; -}(Node)); -light.NodeContext.registerNode(PointNode$1); - -var OpenMouthRatioNode = /** @class */ (function (_super) { - __extends(OpenMouthRatioNode, _super); - function OpenMouthRatioNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.Value = 1.0; - _this.init = false; - _this.ratio = 1.0; - _this.nose_x = -1; - _this.nose_y = -1; - _this.mouse_up_x = -1; - _this.mouse_up_y = -1; - _this.mouse_down_x = -1; - _this.mouse_down_y = -1; - _this.originDis = -1; - _this.currentDis = -1; - return _this; - } - OpenMouthRatioNode.prototype.Run = function () { - if (!this.init) { - this.init = true; - light.on('update', this.update.bind(this)); - } - }; - OpenMouthRatioNode.prototype.update = function () { - var datas = getAIPointData("Face_Point" /* FACE_POINT */, this.entityManager); - if (datas.length > 0) { - var person = datas[0]; - var id_ = person.id_, roll_ = person.roll_, pitch_ = person.pitch_, canvas_width_ = person.canvas_width_, canvas_height_ = person.canvas_height_, yaw_ = person.yaw_, point_array_ = person.point_array_; - this.nose_x = person.point_array_[128] / person.canvas_width_ * 2 - 1; - this.nose_y = -(person.point_array_[129] / person.canvas_height_ * 2 - 1); - this.mouse_up_x = person.point_array_[170] / person.canvas_width_ * 2 - 1; - this.mouse_up_y = -(person.point_array_[171] / person.canvas_height_ * 2 - 1); - this.mouse_down_x = person.point_array_[138] / person.canvas_width_ * 2 - 1; - this.mouse_down_y = -(person.point_array_[139] / person.canvas_height_ * 2 - 1); - this.currentDis = this.calcDis(this.mouse_up_x, this.mouse_up_y, this.mouse_down_x, this.mouse_down_y); - if (this.originDis === -1) { - this.originDis = this.currentDis; - } - this.ratio = this.currentDis / this.originDis; - this.ratio = Math.max(this.ratio, 1) * this.inputRatio; - } - else { - this.ratio = 1.0; - } - this.Value = this.ratio; - this.Next(); - }; - OpenMouthRatioNode.prototype.calcDis = function (sx, sy, fx, fy) { - return Math.sqrt((sx - fx) * (sx - fx) + (sy - fy) * (sy - fy)); - }; - OpenMouthRatioNode.prototype.Next = function () { - }; - OpenMouthRatioNode.nodeType = 'code/OpenMouthRatio'; - return OpenMouthRatioNode; -}(Node)); -light.NodeContext.registerNode(OpenMouthRatioNode); - -var StateEventNode = /** @class */ (function (_super) { - __extends(StateEventNode, _super); - function StateEventNode() { - var _this = _super.call(this) || this; - _this.total = 3; - _this.repeat = 1; - _this.currentIndex = 0; - return _this; - } - StateEventNode.prototype.Run1 = function () { - this.triggerEvent(0); - }; - StateEventNode.prototype.Run2 = function () { - this.triggerEvent(1); - }; - StateEventNode.prototype.Run3 = function () { - this.triggerEvent(2); - }; - StateEventNode.prototype.Run4 = function () { - this.triggerEvent(3); - }; - StateEventNode.prototype.Run5 = function () { - this.triggerEvent(4); - }; - StateEventNode.prototype.Run6 = function () { - this.triggerEvent(5); - }; - StateEventNode.prototype.Run7 = function () { - this.triggerEvent(6); - }; - StateEventNode.prototype.Run8 = function () { - this.triggerEvent(7); - }; - StateEventNode.prototype.Run9 = function () { - this.triggerEvent(8); - }; - StateEventNode.prototype.Run10 = function () { - this.triggerEvent(9); - }; - StateEventNode.prototype.triggerEvent = function (index) { - var currentIndex = 0; - if (this.repeat < 0) { - currentIndex = this.currentIndex % this.total; - } - else if (this.repeat > 0) { - if (this.currentIndex < this.total * this.repeat) { - currentIndex = this.currentIndex % this.total; - } - else { - currentIndex = this.currentIndex; - } - } - else { - currentIndex = -1; - } - if (currentIndex === index) { - if (this["Next" + (currentIndex + 1)]) { - this["Next" + (currentIndex + 1)](); - } - this.currentIndex = this.currentIndex + 1; - } - }; - StateEventNode.nodeType = 'code/stateEvent'; - return StateEventNode; -}(Node)); -light.NodeContext.registerNode(StateEventNode); - -var ParallelNode = /** @class */ (function (_super) { - __extends(ParallelNode, _super); - function ParallelNode() { - return _super !== null && _super.apply(this, arguments) || this; - } - ParallelNode.prototype.Event1 = function () { - this.Next(); - }; - ParallelNode.prototype.Event2 = function () { - this.Next(); - }; - ParallelNode.prototype.Event3 = function () { - this.Next(); - }; - ParallelNode.prototype.Event4 = function () { - this.Next(); - }; - ParallelNode.prototype.Event5 = function () { - this.Next(); - }; - ParallelNode.prototype.Next = function () { }; - ParallelNode.nodeType = 'code/Parallel'; - return ParallelNode; -}(Node)); -light.NodeContext.registerNode(ParallelNode); - -var Interaction; -(function (Interaction) { - Interaction["CLICK"] = "\u70B9\u51FB"; - Interaction["DCLICK"] = "\u53CC\u51FB"; - Interaction["LCLICK"] = "\u957F\u6309"; - Interaction["HAND"] = "\u624B\u51FA\u73B0"; - Interaction["FINGER"] = "\u98DF\u6307\u6307\u5C16\u51FA\u73B0"; - Interaction["FACE"] = "\u5168\u8138\u51FA\u73B0"; - Interaction["NOSE"] = "\u9F3B\u5B50\u51FA\u73B0"; - Interaction["MOUSE"] = "\u5634\u5DF4\u51FA\u73B0"; - Interaction["LEFTEYE"] = "\u5DE6\u773C\u51FA\u73B0"; - Interaction["RIGHTEYE"] = "\u53F3\u773C\u51FA\u73B0"; -})(Interaction || (Interaction = {})); -var LongClickTime = 500; // 长按阈值时间 -var DoubleClickTime = 300; // 双击阈值时间 -var HEIGHT = 1280; // 画布标准高 -var sampleNumber = 20; // 采样数量 -var ScreenEventNode = /** @class */ (function (_super) { - __extends(ScreenEventNode, _super); - function ScreenEventNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.isDetected = false; - _this.count = 0; - _this.times = 0; - _this.longPressedState = { - longPressedDownTime: undefined, - longPressedTriggered: false, - }; - _this.lastTwoTimePressedTime = []; // 记录最近两次按下的时间 用来判读是否为双击 - // AI点位 - _this.facePoint = Array.from({ length: 90 }, function (v, k) { return k; }); - _this.nosePoint = [56, 57, 58, 59, 60, 61, 62, 64]; - _this.mousePoint = [65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82]; - _this.leftEyePoint = [35, 36, 37, 38, 39, 40, 41, 42, 43, 44]; - _this.rightEyePoint = [45, 46, 47, 48, 49, 50, 51, 52, 53, 54]; - _this.handPoint = Array.from({ length: 32 }, function (v, k) { return k; }); - _this.onePoint = [15, 16, 17]; - return _this; - } - ScreenEventNode.prototype.onDetected = function () { }; - ScreenEventNode.prototype.Lost = function () { }; - ScreenEventNode.prototype.Run = function () { - var _this = this; - switch (this.interactionType) { - case Interaction.CLICK: - case Interaction.DCLICK: - case Interaction.LCLICK: - light.on('TouchEvent', function (event) { - _this.onReceive(event); - }); - break; - case Interaction.FACE: - case Interaction.MOUSE: - case Interaction.NOSE: - case Interaction.LEFTEYE: - case Interaction.RIGHTEYE: - openAIFeature(["Expression" /* EXPRESSION */], // , light.AIClassFeature.HAND_GESTURE], - this.entityManager, this.eventManager); - break; - case Interaction.HAND: - case Interaction.FINGER: - openAIFeature(["Hand_Gesture" /* HAND_GESTURE */, "Hand_Point" /* HAND_POINT */], this.entityManager, this.eventManager); - break; - } - light.on('RenderWillStartEvent', function (event) { - _this.onReceive(event); - }); - light.on('update', this.onUpdate.bind(this)); - }; - ScreenEventNode.prototype.onUpdate = function (currentTime) { - // 在onUpdate中 处理长按事件 - if (this.interactionType === Interaction.LCLICK) { - this.processLongClickEvent(currentTime); - return; - } - var aiData = []; - switch (this.interactionType) { - case Interaction.HAND: - case Interaction.FINGER: - aiData = getAIPointData("Hand_Point" /* HAND_POINT */, this.entityManager); - break; - case Interaction.FACE: - case Interaction.MOUSE: - case Interaction.NOSE: - case Interaction.LEFTEYE: - case Interaction.RIGHTEYE: - aiData = getAIPointData("Face_Point" /* FACE_POINT */, this.entityManager); - break; - } - var rects = []; - if (!aiData && aiData.length === 0) { - this.onLost(); - return; - } - for (var i = 0; i < aiData.length; i++) { - var data = aiData[i]; - var AIDataRect = this.getAIDataRect(this.interactionType, data); - rects.push(AIDataRect); - } - if (rects.length > 0) { - var triggered = this.isInConstrainRects(rects, this.entityRect); - this.onTriggered(triggered); - } - }; - ScreenEventNode.prototype.getAIDataRect = function (actionEventName, data) { - var id_ = data.id_, canvas_width_ = data.canvas_width_, canvas_height_ = data.canvas_height_, point_array_ = data.point_array_; - var minX; - var maxX; - var minY; - var maxY; - if (point_array_ === null || point_array_ === void 0 ? void 0 : point_array_.length) { - var xs = []; - var ys = []; - var points = []; - switch (actionEventName) { - case Interaction.FACE: - points = this.facePoint; - break; - case Interaction.MOUSE: - points = this.mousePoint; - break; - case Interaction.NOSE: - points = this.nosePoint; - break; - case Interaction.LEFTEYE: - points = this.leftEyePoint; - break; - case Interaction.RIGHTEYE: - points = this.rightEyePoint; - break; - case Interaction.HAND: - points = this.handPoint; - break; - case Interaction.FINGER: - points = this.onePoint; - break; - } - var beganIndex = points[0] * 2; - var length = (points[0] + points.length) * 2; - for (var i = beganIndex; i < length; i++) { - if (i % 2 === 0) { - xs.push(point_array_[i]); - } - else { - ys.push((point_array_[i])); - } - } - minX = Math.min.apply(Math, xs) / canvas_width_; - maxX = Math.max.apply(Math, xs) / canvas_width_; - minY = Math.min.apply(Math, ys) / canvas_height_; - maxY = Math.max.apply(Math, ys) / canvas_height_; - // 对于一个点 看做面积为1的矩形 - if (minX === maxX) { - maxX = minX + 1; - } - if (minY === maxY) { - maxY = minY + 1; - } - } - return { left: minX, top: minY, right: maxX, bottom: maxY }; - }; - ScreenEventNode.prototype.onReceive = function (event) { - switch (event.type()) { - case 'RenderWillStartEvent': - this.entityRect = this.getEntityRect(this.entity); - break; - case 'TouchEvent': { - var clickState = this.getClickEventType(event); - this.touchEventInfo = { - point: { - x: event.getX(), - y: event.getY(), - }, - downTime: event.getDownTime(), - eventTime: event.getEventTime(), - }; - this.onTouchEventProcess(clickState, this.touchEventInfo); - break; - } - } - }; - ScreenEventNode.prototype.onTriggered = function (isTriggered, time) { - if (isTriggered) { - if (!this.isDetected) { - this.times = 0; - } - this.times = time || 0; - this.isDetected = true; - this.count += 1; - this.onDetected(); - } - else { - this.onLost(); - } - }; - ScreenEventNode.prototype.onLost = function () { - if (this.isDetected) { - this.Lost(); - } - this.isDetected = false; - }; - ScreenEventNode.prototype.onTouchEventProcess = function (clickState, event) { - if ((clickState === null || clickState === void 0 ? void 0 : clickState.clickType) && clickState.clickType === this.interactionType - && clickState.triggered === true && event) { - var ratio = this.getRatio(); - if (this.isInConstrainRotationRect({ x: event.point.x / ratio / HEIGHT, y: event.point.y / HEIGHT }, this.entityRect)) { - this.onTriggered(true, event.eventTime - event.downTime); - } - else { - this.onLost(); - } - } - else { - this.times = 0; - this.onLost(); - } - }; - ScreenEventNode.prototype.getClickEventType = function (event) { - var clickState = { - clickType: undefined, - triggered: false, - }; - if (event && event.type() === 'TouchEvent') { - var downTime = event.getDownTime(); - var eventTime = event.getEventTime(); - if (event.getAction() === 0) { // press - this.currentPressedTime = downTime; - this.pushPressedTimeStack(this.currentPressedTime); - if (this.lastTwoTimePressedTime.length === 2 - && downTime - this.lastTwoTimePressedTime[0] < DoubleClickTime) { - clickState.clickType = Interaction.DCLICK; - } - else { - clickState.clickType = Interaction.CLICK; - } - clickState.triggered = true; - } - else if (event.getAction() === 1) { // release - if (this.currentPressedTime && eventTime - downTime > LongClickTime) { - this.times = eventTime - downTime; - } - this.currentPressedTime = undefined; - this.longPressedState = { - longPressedDownTime: undefined, - longPressedTriggered: false, - }; - clickState.triggered = false; - } - } - return clickState; - }; - // 根据 update 的 currentTime 判断是否为长按 - ScreenEventNode.prototype.processLongClickEvent = function (currentTime) { - if (this.interactionType === Interaction.LCLICK && this.currentPressedTime - && !this.longPressedState.longPressedTriggered) { - if (!this.longPressedState.longPressedDownTime) { - this.longPressedState.longPressedDownTime = currentTime; - } - if ((currentTime - this.longPressedState.longPressedDownTime) / 1000 >= LongClickTime) { - this.longPressedState.longPressedTriggered = true; - var clickState = { - clickType: Interaction.LCLICK, - triggered: true, - }; - this.onTouchEventProcess(clickState, this.touchEventInfo); - } - } - }; - ScreenEventNode.prototype.pushPressedTimeStack = function (time) { - if (this.lastTwoTimePressedTime.length === 2) { - this.lastTwoTimePressedTime.splice(0, 1); - } - this.lastTwoTimePressedTime.push(time); - }; - ScreenEventNode.prototype.getRatio = function () { - var devWidth = light.DeviceUtils.GetSurfaceWidth(this.entityManager); - var devHeight = light.DeviceUtils.GetSurfaceHeight(this.entityManager); - return devWidth / devHeight; - }; - ScreenEventNode.prototype.getEntityRect = function (entityId) { - var entity = this.entityManager.getEntityById(entityId); - var transform = entity.getComponent(light.ScreenTransform); - if (isEntityHide(entityId, this.entityManager)) { - return undefined; - } - var transformArray = this.getParentTransforms(transform); - transformArray.splice(0, 1); // 删除自己 - var pSize; - if (transformArray.length > 0) { - pSize = this.getParentSize(transform, transformArray); - } - if (!pSize) { - return undefined; - } - var size = this.getSizeFromTransform(transform, pSize); - var position = this.getPositionFromTransform(transform, pSize); - var angle = this.get2DRotationFromTransform(transform); - var local = { x: position.x + pSize.width / 2, y: -position.y + pSize.height / 2 }; - var originPoint = { x: local.x - size.width / 2, y: local.y - size.height / 2 }; - var transformOrigin = { - x: ((transform.pivot.x * size.width) / 2 + local.x) / pSize.width, - y: ((-transform.pivot.y * size.height) / 2 + local.y) / pSize.height, - }; - var rect = { - left: originPoint.x / pSize.width, - top: originPoint.y / pSize.height, - right: (originPoint.x + size.width) / pSize.width, - bottom: (originPoint.y + size.height) / pSize.height, - }; - return { rect: rect, transformOrigin: transformOrigin, angle: angle }; - }; - ScreenEventNode.prototype.getParentSize = function (transform, transformArray) { - var ratio = this.getRatio(); - var parentSize = { width: ratio * HEIGHT, height: HEIGHT }; - for (var i = transformArray.length - 1; i >= 0; i--) { - parentSize = this.getSizeFromTransform(transformArray[i], parentSize); - } - return parentSize; - }; - ScreenEventNode.prototype.getParentTransforms = function (transform) { - var result = [transform]; - if (!this.entityManager.valid(transform.parent)) { - return [transform]; - } - var parent = this.entityManager.get(transform.parent); - var parentTransform = parent.getComponent(light.ScreenTransform); - if (parentTransform != null) { - result = result.concat(this.getParentTransforms(parentTransform)); - } - else { - return [transform]; - } - return result; - }; - ScreenEventNode.prototype.getSizeFromTransform = function (transform, parentSize) { - var width = (transform.anchor.right - transform.anchor.left) / 2 * parentSize.width - + (transform.offset.right - transform.offset.left); - var height = (transform.anchor.top - transform.anchor.bottom) / 2 * parentSize.height - + (transform.offset.top - transform.offset.bottom); - return { width: width, height: height }; - }; - ScreenEventNode.prototype.getPositionFromTransform = function (transform, pSize) { - var left = transform.anchor.left * pSize.width / 2 + transform.offset.left; - var right = transform.anchor.right * pSize.width / 2 + transform.offset.right; - var top = transform.anchor.top * pSize.height / 2 + transform.offset.top; - var bottom = transform.anchor.bottom * pSize.height / 2 + transform.offset.bottom; - var position = { x: (right + left) / 2, y: (top + bottom) / 2 }; - position.x += (right - left) / 2 * transform.pivot.x; - position.y += (top - bottom) / 2 * transform.pivot.y; - return position; - }; - ScreenEventNode.prototype.get2DRotationFromTransform = function (transform) { - var _a = transform.rotation, x = _a.x, y = _a.y, z = _a.z, w = _a.w; - var euler = new Euler(); - var quat = new Quaternion(x, y, z, w); - euler.setFromQuaternion(quat); - return euler.z; - }; - ScreenEventNode.prototype.isInConstrainRect = function (point, rect) { - if (!rect) { - return false; - } - var x = point.x; - var y = point.y; - return x > rect.left && x < rect.right - && y > rect.top && y < rect.bottom; - }; - // 点击触发判定 - ScreenEventNode.prototype.isInConstrainRotationRect = function (point, rRect) { - if (!rRect) { - return false; - } - var transformOrigin = rRect.transformOrigin, angle = rRect.angle, rect = rRect.rect; - var revertPoint = this.rotateByPoint(point, transformOrigin, angle); - var x = revertPoint.x; - var y = revertPoint.y; - return x > rect.left && x < rect.right - && y > rect.top && y < rect.bottom; - }; - // AI触发判定 - ScreenEventNode.prototype.isInConstrainRects = function (originRect, rRect) { - var _this = this; - if (!rRect) { - return false; - } - var transformOrigin = rRect.transformOrigin, angle = rRect.angle, rect = rRect.rect; - // 性能提升(1):旋转角度小于10度 按照没有旋转处理 - var isSmallAngle = Math.abs(angle) < Math.PI / 18; - return originRect.some(function (oRect) { - var overlapRatio = 0; - if (isSmallAngle) { - if (_this.isRectIntersecting(oRect, rect)) { - overlapRatio = _this.getIntersectingAreaMaxPercent(oRect, rect); - } - } - else { - overlapRatio = _this.getRectArea(oRect) < _this.getRectArea(rect) - ? _this.getSampleOfRect(oRect, rect, transformOrigin, angle) - : _this.getSampleOfRect(rect, oRect, transformOrigin, -angle); - } - if (overlapRatio >= 0.2) { - return true; - } - }); - }; - // 性能提升(2):使用采样算法模拟碰撞面积 准确度降低 效率提高 - ScreenEventNode.prototype.getSampleOfRect = function (smallerRect, biggerRect, transformOrigin, angle) { - var _this = this; - var rectPoint = this.calculateAreaBySampleAlgorithm(smallerRect); - var rotateRectPoint = rectPoint.map(function (point) { return _this.rotateByPoint(point, transformOrigin, angle); }); - var number = 0; - rotateRectPoint.forEach(function (point) { - if (_this.isInConstrainRect(point, biggerRect)) { - number += 1; - } - }); - return number / rotateRectPoint.length; - }; - ScreenEventNode.prototype.calculateAreaBySampleAlgorithm = function (rect) { - var index = sampleNumber; - var points = []; - var widthStep = (rect.right - rect.left) / index; - var heightStep = (rect.bottom - rect.top) / index; - var startX = rect.left; - var startY = rect.top; - for (var i = 0; i < index; i++) { - for (var j = 0; j < index; j++) { - points.push({ x: startX + widthStep * i, y: startY + heightStep * j }); - } - } - return points; - }; - // 逆时针旋转角度为正 - ScreenEventNode.prototype.rotateByPoint = function (originPoint, pivot, rotation) { - var ratio = this.getRatio(); - var newOriginPointX = (originPoint.x - pivot.x) * Math.cos(rotation) - - (originPoint.y - pivot.y) / ratio * Math.sin(rotation) + pivot.x; - var newOriginPointY = (originPoint.x - pivot.x) * ratio * Math.sin(rotation) - + (originPoint.y - pivot.y) * Math.cos(rotation) + pivot.y; - return { x: newOriginPointX, y: newOriginPointY }; - }; - ScreenEventNode.prototype.isRectIntersecting = function (originRect, targetRect) { - return (Math.abs(targetRect.right + targetRect.left - originRect.right - originRect.left) - <= originRect.right - originRect.left + targetRect.right - targetRect.left) - && (Math.abs(targetRect.bottom + targetRect.top - originRect.bottom - originRect.top) - <= originRect.bottom - originRect.top + targetRect.bottom - targetRect.top); - }; - ScreenEventNode.prototype.getIntersectingAreaMaxPercent = function (originRect, targetRect) { - var IntersectingArea = this.getIntersectingArea(originRect, targetRect); - var originRectPercent = IntersectingArea / this.getRectArea(originRect); - var targetRectPercent = IntersectingArea / this.getRectArea(targetRect); - return Math.max(originRectPercent, targetRectPercent); - }; - ScreenEventNode.prototype.getIntersectingArea = function (originRect, targetRect) { - var left = Math.max(originRect.left, targetRect.left); - var top = Math.max(originRect.top, targetRect.top); - var right = Math.min(originRect.right, targetRect.right); - var bottom = Math.min(originRect.bottom, targetRect.bottom); - return this.getRectArea({ left: left, right: right, top: top, bottom: bottom }); - }; - ScreenEventNode.prototype.getRectArea = function (rect) { - return (rect.right - rect.left) * (rect.bottom - rect.top); - }; - ScreenEventNode.nodeType = 'code/ScreenEvent'; - return ScreenEventNode; -}(Node)); -light.NodeContext.registerNode(ScreenEventNode); - -var ViewPointEventNode = /** @class */ (function (_super) { - __extends(ViewPointEventNode, _super); - function ViewPointEventNode() { - return _super !== null && _super.apply(this, arguments) || this; - } - ViewPointEventNode.prototype.Run = function () { - openAIFeature(["View_Point" /* VIEW_POINT */], this.entityManager, this.eventManager); - light.on('update', this.onUpdate.bind(this)); - }; - ViewPointEventNode.prototype.onUpdate = function () { - // 获取视动点位 - var points = light.AIDataUtils.GetViewPoint(this.entityManager); - var screenX = points.get(0); - var screenY = points.get(1); - var screenWidth = light.DeviceUtils.GetSurfaceWidth(this.entityManager); - var screenHeight = light.DeviceUtils.GetSurfaceHeight(this.entityManager); - this.viewPointX = screenX / screenWidth; - this.viewPointY = screenY / screenHeight; - this.Next(); - }; - ViewPointEventNode.prototype.Next = function () { - }; - ViewPointEventNode.nodeType = 'code/ViewPointEvent'; - return ViewPointEventNode; -}(Node)); -light.NodeContext.registerNode(ViewPointEventNode); - -var _a; -var RegionType; -(function (RegionType) { - RegionType["RECT"] = "\u77E9\u5F62"; - RegionType["CIRCLE"] = "\u5706\u5F62"; -})(RegionType || (RegionType = {})); -function square(x) { - return x * x; -} -var checkInRegionFunctions = (_a = {}, - _a[RegionType.RECT] = function (x, y, x1, y1, x2, y2) { return x >= x1 && y >= y1 && x <= x2 && y <= y2; }, - _a[RegionType.CIRCLE] = function (x, y, x1, y1, x2, y2) { - var xRadius = Math.abs(x1 - x2) / 2; - var yRadius = Math.abs(y1 - y2) / 2; - var xCenter = (x1 + x2) / 2; - var yCenter = (y1 + y2) / 2; - return square(x - xCenter) / square(xRadius) + square(y - yCenter) / square(yRadius) <= 1; - }, - _a); -var RegionNode = /** @class */ (function (_super) { - __extends(RegionNode, _super); - function RegionNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.X = 0; - _this.Y = 0; - _this.x1 = 0; - _this.y1 = 0; - _this.x2 = 0; - _this.y2 = 0; - _this.regionType = RegionType.RECT; - return _this; - } - RegionNode.prototype.Run = function () { - var checkInRegion = checkInRegionFunctions[this.regionType]; - if (checkInRegion(this.X, this.Y, this.x1, this.y1, this.x2, this.y2)) { - this.InSide(); - } - else { - this.OutSide(); - } - }; - RegionNode.prototype.InSide = function () { - }; - RegionNode.prototype.OutSide = function () { - }; - RegionNode.nodeType = 'code/region'; - return RegionNode; -}(Node)); -light.NodeContext.registerNode(RegionNode); - -var ValueNode = /** @class */ (function (_super) { - __extends(ValueNode, _super); - function ValueNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.valueType = 'number'; - _this._numberValue = 2; - _this._stringValue = ''; - _this._colorValue = '#00000000'; - _this._boolValue = true; - _this._fileValue = ''; - _this._vector2Value = { x: 0, y: 0 }; - _this._vector3Value = { x: 1, y: 1, z: 0 }; - _this._vector4Value = { top: 0, right: 0, bottom: 0, left: 0 }; - return _this; - } - Object.defineProperty(ValueNode.prototype, "numberValue", { - get: function () { - return this._numberValue; - }, - set: function (v) { - this._numberValue = v; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(ValueNode.prototype, "stringValue", { - get: function () { - return this._stringValue; - }, - set: function (v) { - this._stringValue = v; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(ValueNode.prototype, "fileValue", { - get: function () { - return this._fileValue; - }, - set: function (v) { - this._fileValue = v; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(ValueNode.prototype, "colorValue", { - get: function () { - return this._colorValue; - }, - set: function (v) { - this._colorValue = v; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(ValueNode.prototype, "boolValue", { - get: function () { - return this._boolValue; - }, - set: function (v) { - this._boolValue = v; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(ValueNode.prototype, "vector2Value", { - get: function () { - return this._vector2Value; - }, - set: function (v) { - this._vector2Value = v; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(ValueNode.prototype, "vector3Value", { - get: function () { - return this._vector3Value; - }, - set: function (v) { - this._vector3Value = v; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(ValueNode.prototype, "vector4Value", { - get: function () { - return this._vector4Value; - }, - set: function (v) { - this._vector4Value = v; - }, - enumerable: false, - configurable: true - }); - ValueNode.nodeType = 'code/value'; - return ValueNode; -}(Node)); -light.NodeContext.registerNode(ValueNode); - -var CommonComponent = /** @class */ (function (_super) { - __extends(CommonComponent, _super); - function CommonComponent() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.entityId = null; - _this.componentProps = []; // 当前对象的组件的全量属性 - _this.componentType = null; - return _this; - } - CommonComponent.prototype.Run = function () { - var _this = this; - var _a; - if (this.entityId) { - var entity = this.entityManager.getEntityById(this.entityId); - var comp_1 = entity.getComponent(light[this.componentType]); - if (comp_1) { - if ((_a = this.componentProps) === null || _a === void 0 ? void 0 : _a.length) { - this.componentProps.forEach(function (prop) { - if (_this[prop] !== null && _this[prop] !== undefined) { - _this.assignProp(comp_1, prop); - } - }); - } - } - this.Next(); - } - }; - CommonComponent.prototype.Next = function () { }; - CommonComponent.prototype.assignProp = function (target, prop) { - if (!target[prop]) { - // todo studio上的属性与SDK不是完全一一对应的 有些属性会进行转化 比如ScreenTransform在ls上是eEuler position 但SDK是rotation和anchor/offset - return; - } - var isRectProps = function (props) { return typeof props.top !== 'undefined' - && typeof props.left !== 'undefined' - && typeof props.right !== 'undefined' - && typeof props.bottom !== 'undefined'; }; - var isV3Props = function (props) { return typeof props.x !== 'undefined' - && typeof props.y !== 'undefined' - && typeof props.z !== 'undefined'; }; - var isV2Props = function (props) { return typeof props.x !== 'undefined' - && typeof props.y !== 'undefined'; }; - if (isV3Props(this[prop])) { - target[prop].x = this[prop].x; - target[prop].y = this[prop].y; - target[prop].z = this[prop].z; - } - else if (isV2Props(this[prop])) { - target[prop].x = this[prop].x; - target[prop].y = this[prop].y; - } - else if (isRectProps(this[prop])) { - target[prop].right = this[prop].right; - target[prop].left = this[prop].left; - target[prop].top = this[prop].top; - target[prop].bottom = this[prop].bottom; - } - else { - target[prop] = this[prop]; - } - }; - CommonComponent.nodeType = 'code/commonComponent'; - return CommonComponent; -}(Node)); -light.NodeContext.registerNode(CommonComponent); - -if (typeof (globalThis) === 'undefined') { - this['globalThis'] = this; -} -globalThis.configure = light.configure; -globalThis.update = light.update; - -})(light); \ No newline at end of file diff --git a/application/App-UIKit/2dMotionRes.bundle/video_keaituya/sh.pag b/application/App-UIKit/2dMotionRes.bundle/video_keaituya/sh.pag deleted file mode 100644 index 905bf535..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_keaituya/sh.pag and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_keaituya/shanshan.pag b/application/App-UIKit/2dMotionRes.bundle/video_keaituya/shanshan.pag deleted file mode 100644 index c8a86ec6..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_keaituya/shanshan.pag and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_keaituya/template.json b/application/App-UIKit/2dMotionRes.bundle/video_keaituya/template.json deleted file mode 100644 index 48455411..00000000 --- a/application/App-UIKit/2dMotionRes.bundle/video_keaituya/template.json +++ /dev/null @@ -1,1805 +0,0 @@ -{ - "componentLevel": 4, - "madeIn": "LightStudio", - "root": { - "id": 16, - "name": "拍摄模板", - "children": [ - { - "id": 17, - "name": "2D画板", - "children": [ - { - "id": 23, - "name": "2D空对象", - "children": [ - { - "id": 35, - "name": "脸妆", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 35, - "componentID": 35001 - }, - { - "componentID": 35002, - "enabled": true, - "entityId": 35, - "faceExchangeImageDisableFaceCrop": true, - "faceExchangeImageEnableOpacity": false, - "faceImage": "3201f2e5-f8b4-4037-9a74-59406b407244", - "faceMask": "none", - "facePointsFile": "", - "facePointsOption": false, - "maskImage": "", - "type": "MakeupFaceV7", - "visMethod": 0, - "version": 2, - "makeupFaceVersion": "v7" - }, - { - "alpha": 0.81, - "componentID": 35003, - "enabled": true, - "entityId": 35, - "mode": "multiply", - "type": "BlendMode", - "version": 4 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "female", - "type": "FaceTracking", - "enabled": true, - "entityId": 35, - "componentID": 35004 - }, - { - "type": "EntityIdentifier", - "name": "脸妆", - "id": 35, - "enabled": true - } - ] - }, - { - "id": 71, - "name": "眼妆", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 71, - "componentID": 71001 - }, - { - "componentID": 71002, - "cropRect": { - "bottom": 1048, - "left": 413, - "right": 1118, - "top": 803 - }, - "enabled": true, - "entityId": 71, - "eyeCropImageName": "cropImage/眼影zpdd_crop.png", - "eyeImageName": "7e6ddedb-3305-43bf-a6ad-ab68384790bb", - "minVisibility": 0, - "type": "MakeupEyeV6", - "visMethod": 0, - "version": 2 - }, - { - "alpha": 0.84, - "componentID": 71003, - "enabled": true, - "entityId": 71, - "mode": "multiply", - "type": "BlendMode", - "version": 4 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "female", - "type": "FaceTracking", - "enabled": true, - "entityId": 71, - "componentID": 71004 - }, - { - "type": "EntityIdentifier", - "name": "眼妆", - "id": 71, - "enabled": true - } - ] - }, - { - "id": 85, - "name": "唇彩", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 85, - "componentID": 85001 - }, - { - "alpha": 0.21, - "componentID": 85003, - "enabled": true, - "entityId": 85, - "mode": "multiply", - "type": "BlendMode", - "version": 38 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "female", - "type": "FaceTracking", - "enabled": true, - "entityId": 85, - "componentID": 85004 - }, - { - "type": "EntityIdentifier", - "name": "唇彩", - "id": 85, - "enabled": true - } - ] - }, - { - "id": 100, - "name": "唇彩", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 100, - "componentID": 100001 - }, - { - "closeMouseMask": "", - "componentID": 100002, - "enabled": true, - "entityId": 100, - "lipsColor": "", - "lipsImage": "b42268c1-c828-493e-86ee-035b88848f6b", - "lipsImageCrop": "cropImage/口红正片叠底_crop.png", - "lipsImageCropRect": { - "bottom": 1420, - "left": 622, - "right": 918, - "top": 1260 - }, - "lipsLut": "", - "lipsMask": "Default", - "lipsMaskCrop": "cropImage/default_mask_crop.png", - "lipsMaskCropRect": { - "bottom": 2048, - "left": 0, - "right": 1536, - "top": 0 - }, - "lipsMaskEnum": 0, - "lipsType": "Image", - "minVisibility": 0, - "openMouseMask": "", - "type": "MakeupLipsV6", - "version": 5, - "visMethod": 0 - }, - { - "alpha": 0.58, - "componentID": 100003, - "enabled": true, - "entityId": 100, - "mode": "multiply", - "type": "BlendMode", - "version": 63 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "female", - "type": "FaceTracking", - "enabled": true, - "entityId": 100, - "componentID": 100004 - }, - { - "type": "EntityIdentifier", - "name": "唇彩", - "id": 100, - "enabled": true - } - ] - }, - { - "id": 129, - "name": "脸妆", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 129, - "componentID": 129001 - }, - { - "componentID": 129002, - "enabled": true, - "entityId": 129, - "faceExchangeImageDisableFaceCrop": true, - "faceExchangeImageEnableOpacity": false, - "faceImage": "08fc88e7-aad0-4c2f-a94a-391fd5f1f015", - "faceMask": "none", - "facePointsFile": "", - "facePointsOption": false, - "maskImage": "", - "type": "MakeupFaceV7", - "visMethod": 0, - "version": 2, - "makeupFaceVersion": "v7" - }, - { - "alpha": 0.62, - "componentID": 129003, - "enabled": true, - "entityId": 129, - "mode": "screen", - "type": "BlendMode", - "version": 8 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "female", - "type": "FaceTracking", - "enabled": true, - "entityId": 129, - "componentID": 129004 - }, - { - "type": "EntityIdentifier", - "name": "脸妆", - "id": 129, - "enabled": true - } - ] - } - ], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "top": 1, - "bottom": -1, - "left": -1, - "right": 1 - }, - "offset": { - "top": 0, - "bottom": 0, - "left": 0, - "right": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 23, - "componentID": 23001 - }, - { - "type": "EntityIdentifier", - "name": "2D空对象", - "id": 23, - "enabled": true - } - ] - }, - { - "id": 66, - "name": "滤镜", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 66, - "componentID": 66001 - }, - { - "componentID": 66002, - "enabled": true, - "entityId": 66, - "intensity": 0.8200000000000001, - "src": "dd9b9e0b-3a94-455b-8beb-20c584af9848", - "type": "LUTFilter", - "version": 42 - }, - { - "startOffset": 0, - "duration": -2147483648, - "endOffset": 0, - "loopCount": -2147483648, - "type": "TimeOffset", - "enabled": true, - "entityId": 66, - "componentID": 66003, - "version": 1 - }, - { - "type": "EntityIdentifier", - "name": "滤镜", - "id": 66, - "enabled": true - } - ] - }, - { - "id": 18, - "name": "前景贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 18, - "componentID": 18001, - "type": "ScreenTransform", - "enabled": true, - "version": 5 - }, - { - "componentID": 18002, - "enabled": true, - "entityId": 18, - "scaleMode": 3, - "src": "4dfe3975-9ee2-4692-9b1c-c545358ce675", - "type": "Image", - "version": 12 - }, - { - "alpha": 0.9, - "componentID": 18003, - "enabled": true, - "entityId": 18, - "mode": "normal", - "type": "BlendMode", - "version": 87 - }, - { - "componentID": 18004, - "duration": 2000000, - "enabled": true, - "endOffset": -2147483648, - "entityId": 18, - "loopCount": -1, - "startOffset": 0, - "type": "TimeOffset", - "version": 19 - }, - { - "type": "EntityIdentifier", - "name": "前景贴纸", - "id": 18, - "enabled": true - } - ] - }, - { - "id": 31, - "name": "人脸跟随贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0.008471180555555513, - "right": 0.008471180555555513, - "top": 0.03798896484375014, - "bottom": 0.03798896484375014 - }, - "offset": { - "left": -241.50500000000002, - "right": 241.50500000000002, - "top": 72.005, - "bottom": -72.005 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 31, - "componentID": 31001, - "version": 313 - }, - { - "componentID": 31002, - "enabled": true, - "entityId": 31, - "scaleMode": 2, - "src": "51b026f8-3fee-41c2-83c8-f302a11b3d4e", - "type": "Image", - "version": 3 - }, - { - "alpha": 0.8, - "componentID": 31003, - "enabled": true, - "entityId": 31, - "mode": "normal", - "type": "BlendMode", - "version": 26 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "", - "type": "FaceTracking", - "enabled": true, - "entityId": 31, - "componentID": 31004 - }, - { - "startOffset": 0, - "duration": 2000000, - "endOffset": -2147483648, - "loopCount": -1, - "type": "TimeOffset", - "enabled": true, - "entityId": 31, - "componentID": 31005, - "version": null - }, - { - "type": "EntityIdentifier", - "name": "人脸跟随贴纸", - "id": 31, - "enabled": true - } - ] - }, - { - "id": 19, - "name": "前景贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 19, - "componentID": 19001, - "type": "ScreenTransform", - "enabled": true, - "version": 3 - }, - { - "componentID": 19002, - "enabled": true, - "entityId": 19, - "scaleMode": 3, - "src": "96850bd9-01e1-46bc-8a06-7bbf9d5a08c1", - "type": "Image", - "version": 5 - }, - { - "alpha": 0.9, - "componentID": 19003, - "enabled": true, - "entityId": 19, - "mode": "normal", - "type": "BlendMode", - "version": 82 - }, - { - "startOffset": 0, - "duration": 2000000, - "endOffset": -2147483648, - "loopCount": -1, - "type": "TimeOffset", - "enabled": true, - "entityId": 19, - "componentID": 19004, - "version": null - }, - { - "type": "EntityIdentifier", - "name": "前景贴纸", - "id": 19, - "enabled": true - } - ] - }, - { - "id": 110, - "name": "前景贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 45.06376195536653, - "left": 0.49946865037190147, - "right": -0.49946865037190147, - "top": -42.93836344314563 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 110, - "componentID": 110001, - "type": "ScreenTransform", - "enabled": true, - "version": 704 - }, - { - "componentID": 110002, - "enabled": true, - "entityId": 110, - "scaleMode": 3, - "src": "689419e3-8ef6-4980-9901-21fbce30c057", - "type": "Image", - "version": 9 - }, - { - "alpha": 0.6900000000000001, - "componentID": 110003, - "enabled": true, - "entityId": 110, - "mode": "add", - "type": "BlendMode", - "version": 6 - }, - { - "startOffset": 0, - "duration": 2330000, - "endOffset": -2147483648, - "loopCount": -1, - "type": "TimeOffset", - "enabled": true, - "entityId": 110, - "componentID": 110004, - "version": 2 - }, - { - "type": "EntityIdentifier", - "name": "前景贴纸", - "id": 110, - "enabled": true - } - ] - }, - { - "id": 38, - "name": "音乐", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 38, - "componentID": 38001 - }, - { - "audioSourceType": 1, - "componentID": 38002, - "enabled": true, - "entityId": 38, - "speed": 1, - "type": "AudioSource", - "version": 10, - "volume": 1, - "volumeEffects": [], - "src": "84fec02d-70de-4a54-92b6-e7d746b5253e" - }, - { - "startOffset": 0, - "duration": 24890000, - "endOffset": -2147483648, - "loopCount": 0, - "type": "TimeOffset", - "enabled": true, - "entityId": 38, - "componentID": 38003, - "version": null - }, - { - "type": "EntityIdentifier", - "name": "音乐", - "id": 38, - "enabled": true - } - ] - } - ], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "entityId": 17, - "componentID": 17001, - "type": "ScreenTransform", - "enabled": true, - "version": 2, - "objectEnabled": true - }, - { - "componentID": 17002, - "enabled": true, - "entityId": 17, - "renderTargetKey": "RenderTarget", - "type": "Camera", - "version": 2 - }, - { - "type": "EntityIdentifier", - "name": "2D画板", - "id": 17, - "enabled": true - } - ] - }, - { - "id": 20, - "name": "流程管理", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 20, - "componentID": 20001 - }, - { - "type": "EntityIdentifier", - "name": "流程管理", - "id": 20 - }, - { - "type": "Script", - "entityId": 20, - "scriptPath": "a2284146-a08f-46f9-a277-312335145b7d", - "enabled": true, - "componentID": 99999 - } - ] - }, - { - "id": 75, - "name": "light.js", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "EntityIdentifier", - "name": "light.js", - "id": 75 - }, - { - "type": "Script", - "entityId": 75, - "scriptPath": "a32a5b3d-dc61-4787-965a-745f8c74c661", - "enabled": true, - "componentID": 99999 - }, - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 75 - } - ] - } - ], - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 16, - "componentID": 16001, - "type": "ScreenTransform", - "enabled": true, - "version": 20 - }, - { - "enableRotation": true, - "resetWhenStartRecord": true, - "type": "ExtraSetting", - "enabled": true, - "version": 1, - "entityId": 16, - "componentID": 16002 - }, - { - "type": "EntityIdentifier", - "name": "拍摄模板", - "id": 16, - "enabled": true - } - ], - "enabled": true, - "version": 0 - }, - "inputSources": { - "84fec02d-70de-4a54-92b6-e7d746b5253e": { - "type": "AudioClipData", - "commandMap": {}, - "loopCount": -1, - "path": "bgm.mp3", - "timeRange": { - "startTime": 0, - "duration": 24890000 - }, - "rhythmPath": "", - "key": "84fec02d-70de-4a54-92b6-e7d746b5253e" - }, - "a32a5b3d-dc61-4787-965a-745f8c74c661": { - "type": "js", - "commandMap": {}, - "key": "a32a5b3d-dc61-4787-965a-745f8c74c661", - "path": "scripts/light.js", - "label": "light.js" - }, - "a2284146-a08f-46f9-a277-312335145b7d": { - "type": "js", - "commandMap": {}, - "key": "a2284146-a08f-46f9-a277-312335145b7d", - "path": "scripts/20.flow.js", - "label": "20.flow.js" - }, - "RenderTarget": { - "type": "RenderTarget", - "commandMap": {}, - "width": 0, - "height": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "NEAREST", - "minFilter": "NEAREST", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "RenderTarget", - "path": "RenderTarget.rdt", - "label": "RenderTarget.rdt", - "inputKey": "DeviceCameraTexture", - "input": "DeviceCameraTexture" - }, - "DeviceCameraTexture": { - "type": "TextureData", - "commandMap": {}, - "key": "DeviceCameraTexture", - "path": "DeviceCameraTexture.tex", - "label": "DeviceCameraTexture.tex" - }, - "3201f2e5-f8b4-4037-9a74-59406b407244": { - "type": "ImageData", - "commandMap": {}, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "3201f2e5-f8b4-4037-9a74-59406b407244", - "path": "修容正片叠底.png", - "label": "修容正片叠底.png", - "compression": 0, - "actualSize": 39175, - "resolution": { - "height": 2048, - "width": 1536 - } - }, - "7e6ddedb-3305-43bf-a6ad-ab68384790bb": { - "type": "ImageData", - "commandMap": {}, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "7e6ddedb-3305-43bf-a6ad-ab68384790bb", - "path": "眼影zpdd.png", - "label": "眼影zpdd.png", - "actualSize": 42649, - "resolution": { - "height": 2048, - "width": 1536 - } - }, - "b42268c1-c828-493e-86ee-035b88848f6b": { - "type": "ImageData", - "commandMap": {}, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "b42268c1-c828-493e-86ee-035b88848f6b", - "path": "口红正片叠底.png", - "label": "口红正片叠底.png", - "actualSize": 9125, - "resolution": { - "height": 2048, - "width": 1536 - } - }, - "08fc88e7-aad0-4c2f-a94a-391fd5f1f015": { - "type": "ImageData", - "commandMap": {}, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "08fc88e7-aad0-4c2f-a94a-391fd5f1f015", - "path": "高光滤色.png", - "label": "高光滤色.png", - "compression": 0, - "actualSize": 29944, - "resolution": { - "height": 2048, - "width": 1536 - } - }, - "dd9b9e0b-3a94-455b-8beb-20c584af9848": { - "type": "ImageData", - "commandMap": {}, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "dd9b9e0b-3a94-455b-8beb-20c584af9848", - "path": "郁金香.png", - "label": "郁金香.png", - "compression": 0, - "actualSize": 219654, - "resolution": { - "height": 512, - "width": 512 - } - }, - "4dfe3975-9ee2-4692-9b1c-c545358ce675": { - "type": "PAGFileData", - "commandMap": {}, - "loopCount": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "NEAREST", - "minFilter": "NEAREST", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "4dfe3975-9ee2-4692-9b1c-c545358ce675", - "path": "cx.pag", - "label": "cx.pag", - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "duration": 2000000, - "resolution": { - "width": 720, - "height": 1280 - }, - "frameRate": 12, - "hasAudio": false - }, - "51b026f8-3fee-41c2-83c8-f302a11b3d4e": { - "type": "PAGFileData", - "commandMap": {}, - "loopCount": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "NEAREST", - "minFilter": "NEAREST", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "51b026f8-3fee-41c2-83c8-f302a11b3d4e", - "path": "sh.pag", - "label": "sh.pag", - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "duration": 2000000, - "resolution": { - "width": 334, - "height": 100 - }, - "frameRate": 12, - "hasAudio": false - }, - "96850bd9-01e1-46bc-8a06-7bbf9d5a08c1": { - "type": "PAGFileData", - "commandMap": {}, - "loopCount": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "NEAREST", - "minFilter": "NEAREST", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "96850bd9-01e1-46bc-8a06-7bbf9d5a08c1", - "path": "xh.pag", - "label": "xh.pag", - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "duration": 2000000, - "resolution": { - "width": 720, - "height": 1280 - }, - "frameRate": 12, - "hasAudio": false - }, - "689419e3-8ef6-4980-9901-21fbce30c057": { - "type": "PAGFileData", - "commandMap": {}, - "loopCount": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "NEAREST", - "minFilter": "NEAREST", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "689419e3-8ef6-4980-9901-21fbce30c057", - "path": "shanshan.pag", - "label": "shanshan.pag", - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "duration": 2333334, - "resolution": { - "width": 720, - "height": 1151 - }, - "frameRate": 12, - "hasAudio": false - }, - "2a598e82-9dea-4591-9358-e7f84f5bea46": { - "type": "folder", - "commandMap": {}, - "key": "2a598e82-9dea-4591-9358-e7f84f5bea46", - "label": "root", - "path": "./" - }, - "76011b03-2cb5-4946-a59e-8b86cb0b1fb5": { - "type": "folder", - "commandMap": {}, - "key": "76011b03-2cb5-4946-a59e-8b86cb0b1fb5", - "label": "scripts", - "path": "scripts" - }, - "b1a01682-e16a-4fce-9d55-1276d76bffb4": { - "type": "default", - "commandMap": {}, - "key": "b1a01682-e16a-4fce-9d55-1276d76bffb4", - "path": "video_childrendrawn.2021-05-08-06-28-30-093Z.bak", - "label": "video_childrendrawn.2021-05-08-06-28-30-093Z.bak" - }, - "2c2fad8d-4171-4bc3-97f4-bdc9877aa872": { - "type": "default", - "commandMap": {}, - "key": "2c2fad8d-4171-4bc3-97f4-bdc9877aa872", - "label": "video_childrendrawn.2021-05-28-04-19-07-753Z.bak", - "path": "video_childrendrawn.2021-05-28-04-19-07-753Z.bak" - } - }, - "preset": {}, - "properties": { - "layout": { - "width": 720, - "height": 1280 - }, - "boundsTrackerPlaceHolders": [], - "musicIDs": [], - "fonts": [], - "movieConfig": { - "sourceType": 2, - "minClipAssetCount": 1, - "maxClipAssetCount": 999, - "minImageDuration": 1000000, - "maxImageDuration": 10000000, - "minVideoDuration": 2000000, - "preferredCoverTime": 1000000, - "originVolume": 1, - "cropEvents": [ - "SlowRhythmTrail" - ], - "imageCropSpace": 0, - "videoCropSpace": -1, - "disableEventsWhileTransition": true - }, - "materialConfigs": [], - "resourceIDs": [] - }, - "needStudioLibScript": true -} \ No newline at end of file diff --git a/application/App-UIKit/2dMotionRes.bundle/video_keaituya/template.png b/application/App-UIKit/2dMotionRes.bundle/video_keaituya/template.png deleted file mode 100644 index 3c76ce2c..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_keaituya/template.png and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_keaituya/video_childrendrawn.2021-05-08-06-28-30-093Z.bak b/application/App-UIKit/2dMotionRes.bundle/video_keaituya/video_childrendrawn.2021-05-08-06-28-30-093Z.bak deleted file mode 100644 index 5a15b5cd..00000000 --- a/application/App-UIKit/2dMotionRes.bundle/video_keaituya/video_childrendrawn.2021-05-08-06-28-30-093Z.bak +++ /dev/null @@ -1,1890 +0,0 @@ -{ - "name": "video_childrendrawn", - "author": "cxz", - "category": 1, - "scene": { - "id": 16, - "name": "拍摄模板", - "children": [ - { - "id": 17, - "name": "2D画板", - "children": [ - { - "id": 23, - "name": "2D空对象", - "children": [ - { - "id": 35, - "name": "脸妆", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 35, - "componentID": 35001 - }, - { - "componentID": 35002, - "enabled": true, - "entityId": 35, - "faceExchangeImageDisableFaceCrop": true, - "faceExchangeImageEnableOpacity": false, - "faceImage": "3201f2e5-f8b4-4037-9a74-59406b407244", - "faceMask": "none", - "facePointsFile": "", - "facePointsOption": false, - "maskImage": "", - "type": "MakeupFaceV6", - "visMethod": 0, - "version": 2 - }, - { - "alpha": 0.81, - "componentID": 35003, - "enabled": true, - "entityId": 35, - "mode": "multiply", - "type": "BlendMode", - "version": 4 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "female", - "type": "FaceTracking", - "enabled": true, - "entityId": 35, - "componentID": 35004 - } - ] - }, - { - "id": 71, - "name": "眼妆", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 71, - "componentID": 71001 - }, - { - "componentID": 71002, - "cropRect": { - "bottom": 1048, - "left": 413, - "right": 1118, - "top": 803 - }, - "enabled": true, - "entityId": 71, - "eyeCropImageName": "cropImage/眼影zpdd_crop.png", - "eyeImageName": "7e6ddedb-3305-43bf-a6ad-ab68384790bb", - "minVisibility": 0, - "type": "MakeupEyeV6", - "visMethod": 0, - "version": 2 - }, - { - "alpha": 0.84, - "componentID": 71003, - "enabled": true, - "entityId": 71, - "mode": "multiply", - "type": "BlendMode", - "version": 4 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "female", - "type": "FaceTracking", - "enabled": true, - "entityId": 71, - "componentID": 71004 - } - ] - }, - { - "id": 85, - "name": "唇彩", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 85, - "componentID": 85001 - }, - { - "closeMouseMask": "", - "componentID": 85002, - "enabled": true, - "entityId": 85, - "lipsColor": "#bda036ff", - "lipsImage": "", - "lipsImageCrop": "", - "lipsImageCropRect": { - "bottom": 110, - "left": 180, - "right": 200, - "top": 446 - }, - "lipsLut": "", - "lipsMask": "", - "lipsMaskCrop": "", - "lipsMaskCropRect": { - "bottom": 110, - "left": 180, - "right": 200, - "top": 446 - }, - "lipsMaskEnum": 0, - "lipsType": "Color", - "minVisibility": 0, - "openMouseMask": "", - "type": "MakeupLipsV6", - "version": 20, - "visMethod": 0 - }, - { - "alpha": 0.21, - "componentID": 85003, - "enabled": true, - "entityId": 85, - "mode": "multiply", - "type": "BlendMode", - "version": 38 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "female", - "type": "FaceTracking", - "enabled": true, - "entityId": 85, - "componentID": 85004 - } - ] - }, - { - "id": 100, - "name": "唇彩", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 100, - "componentID": 100001 - }, - { - "closeMouseMask": "", - "componentID": 100002, - "enabled": true, - "entityId": 100, - "lipsColor": "", - "lipsImage": "b42268c1-c828-493e-86ee-035b88848f6b", - "lipsImageCrop": "cropImage/口红正片叠底_crop.png", - "lipsImageCropRect": { - "bottom": 1420, - "left": 622, - "right": 918, - "top": 1260 - }, - "lipsLut": "", - "lipsMask": "", - "lipsMaskCrop": "cropImage/口红正片叠底_Mask_crop.png", - "lipsMaskCropRect": { - "bottom": 2047, - "left": 0, - "right": 1535, - "top": 0 - }, - "lipsMaskEnum": 0, - "lipsType": "Image", - "minVisibility": 0, - "openMouseMask": "", - "type": "MakeupLipsV6", - "visMethod": 0, - "version": 2 - }, - { - "alpha": 0.58, - "componentID": 100003, - "enabled": true, - "entityId": 100, - "mode": "multiply", - "type": "BlendMode", - "version": 63 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "female", - "type": "FaceTracking", - "enabled": true, - "entityId": 100, - "componentID": 100004 - } - ] - }, - { - "id": 129, - "name": "脸妆", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 129, - "componentID": 129001 - }, - { - "componentID": 129002, - "enabled": true, - "entityId": 129, - "faceExchangeImageDisableFaceCrop": true, - "faceExchangeImageEnableOpacity": false, - "faceImage": "08fc88e7-aad0-4c2f-a94a-391fd5f1f015", - "faceMask": "none", - "facePointsFile": "", - "facePointsOption": false, - "maskImage": "", - "type": "MakeupFaceV6", - "visMethod": 0, - "version": 2 - }, - { - "alpha": 0.62, - "componentID": 129003, - "enabled": true, - "entityId": 129, - "mode": "screen", - "type": "BlendMode", - "version": 8 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "female", - "type": "FaceTracking", - "enabled": true, - "entityId": 129, - "componentID": 129004 - } - ] - } - ], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "top": 1, - "bottom": -1, - "left": -1, - "right": 1 - }, - "offset": { - "top": 0, - "bottom": 0, - "left": 0, - "right": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 23, - "componentID": 23001 - } - ] - }, - { - "id": 66, - "name": "滤镜", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 66, - "componentID": 66001 - }, - { - "componentID": 66002, - "enabled": true, - "entityId": 66, - "intensity": 0.8200000000000001, - "src": "dd9b9e0b-3a94-455b-8beb-20c584af9848", - "type": "LUTFilter", - "version": 42 - }, - { - "eAlignMode": 0, - "startOffset": 0, - "duration": 2000000, - "endOffset": 0, - "loopCount": 0, - "type": "TimeOffset", - "enabled": true, - "entityId": 66, - "componentID": 66003, - "version": 1 - } - ] - }, - { - "id": 18, - "name": "前景贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 18, - "componentID": 18001, - "version": 3 - }, - { - "componentID": 18002, - "enabled": true, - "entityId": 18, - "scaleMode": 2, - "src": "4dfe3975-9ee2-4692-9b1c-c545358ce675", - "type": "Image", - "version": 10 - }, - { - "alpha": 0.9, - "componentID": 18003, - "enabled": true, - "entityId": 18, - "mode": "normal", - "type": "BlendMode", - "version": 87 - }, - { - "componentID": 18004, - "duration": 2000000, - "eAlignMode": 2, - "enabled": true, - "endOffset": 0, - "entityId": 18, - "loopCount": -1, - "startOffset": 0, - "type": "TimeOffset", - "version": 19 - } - ] - }, - { - "id": 31, - "name": "人脸跟随贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0.008471180555555513, - "right": 0.008471180555555513, - "top": 0.03798896484375014, - "bottom": 0.03798896484375014 - }, - "offset": { - "left": -241.50500000000002, - "right": 241.50500000000002, - "top": 72.005, - "bottom": -72.005 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 31, - "componentID": 31001, - "version": 313 - }, - { - "componentID": 31002, - "enabled": true, - "entityId": 31, - "scaleMode": 2, - "src": "51b026f8-3fee-41c2-83c8-f302a11b3d4e", - "type": "Image", - "version": 3 - }, - { - "alpha": 0.8, - "componentID": 31003, - "enabled": true, - "entityId": 31, - "mode": "normal", - "type": "BlendMode", - "version": 26 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "", - "type": "FaceTracking", - "enabled": true, - "entityId": 31, - "componentID": 31004 - }, - { - "eAlignMode": 2, - "startOffset": 0, - "duration": 2000000, - "endOffset": 0, - "loopCount": -1, - "type": "TimeOffset", - "enabled": true, - "entityId": 31, - "componentID": 31005, - "version": null - } - ] - }, - { - "id": 19, - "name": "前景贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 19, - "componentID": 19001, - "version": 1 - }, - { - "componentID": 19002, - "enabled": true, - "entityId": 19, - "scaleMode": 2, - "src": "96850bd9-01e1-46bc-8a06-7bbf9d5a08c1", - "type": "Image", - "version": 3 - }, - { - "alpha": 0.9, - "componentID": 19003, - "enabled": true, - "entityId": 19, - "mode": "normal", - "type": "BlendMode", - "version": 82 - }, - { - "eAlignMode": 2, - "startOffset": 0, - "duration": 2000000, - "endOffset": 0, - "loopCount": -1, - "type": "TimeOffset", - "enabled": true, - "entityId": 19, - "componentID": 19004, - "version": null - } - ] - }, - { - "id": 110, - "name": "前景贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0.001660467587672576, - "bottom": 0.001660467587672576 - }, - "offset": { - "left": -359.5005313496281, - "right": 359.5005313496281, - "top": 595.9989373007439, - "bottom": -595.9989373007439 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 110, - "componentID": 110001, - "version": 702 - }, - { - "componentID": 110002, - "enabled": true, - "entityId": 110, - "scaleMode": 2, - "src": "689419e3-8ef6-4980-9901-21fbce30c057", - "type": "Image", - "version": 7 - }, - { - "alpha": 0.6900000000000001, - "componentID": 110003, - "enabled": true, - "entityId": 110, - "mode": "add", - "type": "BlendMode", - "version": 6 - }, - { - "eAlignMode": 2, - "startOffset": 0, - "duration": 2330000, - "endOffset": 0, - "loopCount": -1, - "type": "TimeOffset", - "enabled": true, - "entityId": 110, - "componentID": 110004, - "version": 2 - } - ] - }, - { - "id": 38, - "name": "音乐", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 38, - "componentID": 38001 - }, - { - "audioSourceType": 1, - "componentID": 38002, - "eAudioMeta": { - "rhythmPath": "", - "startTime": 0, - "duration": 24890000, - "enableRhythm": true - }, - "eAudioType": 1, - "eHasVolumeEffects": false, - "eKey": "audioSource", - "enabled": true, - "entityId": 38, - "speed": 1, - "type": "AudioSource", - "version": 10, - "volume": 1, - "volumeEffects": [ - { - "duration": 2000000, - "eAlignMode": 2, - "end": 1, - "endOffset": 0, - "interpolationType": 1, - "loopCount": -1, - "start": 1, - "startOffset": 0 - } - ], - "ePath": "84fec02d-70de-4a54-92b6-e7d746b5253e" - }, - { - "eAlignMode": 2, - "startOffset": 0, - "duration": 24890000, - "endOffset": 0, - "loopCount": 0, - "type": "TimeOffset", - "enabled": true, - "entityId": 38, - "componentID": 38003, - "version": null - } - ] - } - ], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 0, - "x": 0, - "y": 0, - "z": 0 - }, - "entityId": 17, - "componentID": 17001, - "type": "ScreenTransform", - "enabled": true, - "version": 2, - "objectEnabled": true - }, - { - "componentID": 17002, - "enabled": true, - "entityId": 17, - "renderTargetKey": "RenderTarget", - "type": "Camera", - "version": 2 - } - ] - }, - { - "id": 20, - "name": "流程管理", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 20, - "componentID": 20001 - }, - { - "eGraphData": { - "graph": { - "last_node_id": 5, - "last_link_id": 4, - "nodes": [ - { - "id": 2, - "type": "code/SwitchObject", - "pos": { - "0": 288, - "1": 165, - "2": 0, - "3": 0, - "4": 0, - "5": 0, - "6": 0, - "7": 0, - "8": 0, - "9": 0 - }, - "size": { - "0": 300, - "1": 42 - }, - "flags": { - "_initSize": false - }, - "order": 1, - "mode": 0, - "inputs": [ - { - "name": "Run", - "type": -1, - "link": 2 - } - ], - "outputs": [ - { - "name": "Next", - "type": -1, - "links": null - } - ], - "properties": { - "entityToHide": [ - 19 - ] - } - }, - { - "id": 1, - "type": "code/Start", - "pos": { - "0": 19, - "1": 409, - "2": 0, - "3": 0, - "4": 0, - "5": 0, - "6": 0, - "7": 0, - "8": 0, - "9": 0 - }, - "size": { - "0": 200, - "1": 42 - }, - "flags": {}, - "order": 0, - "mode": 0, - "inputs": [], - "outputs": [ - { - "name": "Next", - "type": -1, - "links": [ - 2, - 3 - ] - } - ], - "properties": { - "started": false - } - }, - { - "id": 3, - "type": "code/play", - "pos": { - "0": 319, - "1": 466, - "2": 0, - "3": 0, - "4": 0, - "5": 0, - "6": 0, - "7": 0, - "8": 0, - "9": 0 - }, - "size": { - "0": 200, - "1": 42 - }, - "flags": { - "_initSize": false - }, - "order": 2, - "mode": 0, - "inputs": [ - { - "name": "Run", - "type": -1, - "link": 3 - } - ], - "outputs": [ - { - "name": "Next", - "type": -1, - "links": [ - 4 - ] - } - ], - "properties": { - "entityId": 18, - "playtimes": 1, - "keepLastFrame": false - } - }, - { - "id": 5, - "type": "code/SwitchObject", - "pos": { - "0": 584, - "1": 471, - "2": 0, - "3": 0, - "4": 0, - "5": 0, - "6": 0, - "7": 0, - "8": 0, - "9": 0 - }, - "size": { - "0": 300, - "1": 42 - }, - "flags": { - "_initSize": false - }, - "order": 3, - "mode": 0, - "inputs": [ - { - "name": "Run", - "type": -1, - "link": 4 - } - ], - "outputs": [ - { - "name": "Next", - "type": -1, - "links": null - } - ], - "properties": { - "entityToDisplay": [ - 19 - ] - } - } - ], - "links": [ - [ - 2, - 1, - 0, - 2, - 0, - -1 - ], - [ - 3, - 1, - 0, - 3, - 0, - -1 - ], - [ - 4, - 3, - 0, - 5, - 0, - -1 - ] - ], - "groups": [], - "config": {}, - "version": 0.4 - } - }, - "type": "FlowGraph", - "enabled": true, - "entityId": 20, - "componentID": 20002, - "customNodes": [], - "version": 27 - } - ] - } - ], - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 0, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 16, - "componentID": 16001, - "type": "ScreenTransform", - "enabled": true, - "version": 4 - }, - { - "enableRotation": true, - "resetWhenStartRecord": true, - "type": "ExtraSetting", - "enabled": true, - "version": 1, - "entityId": 16, - "componentID": 16002 - } - ], - "enabled": true, - "version": 0 - }, - "resources": { - "items": [ - { - "isInnerRes": false, - "type": "folder", - "key": "520132a1-b555-493d-883c-704ec7761425", - "label": "root", - "path": "./" - }, - { - "isInnerRes": false, - "type": "AudioClipData", - "loopCount": -1, - "key": "84fec02d-70de-4a54-92b6-e7d746b5253e", - "label": "bgm.mp3", - "path": "bgm.mp3", - "duration": 24894694, - "timeRange": { - "startTime": 0, - "duration": 24894694 - } - }, - { - "isInnerRes": false, - "type": "TextureData", - "key": "DeviceCameraTexture", - "path": "DeviceCameraTexture.tex", - "label": "DeviceCameraTexture.tex" - }, - { - "isInnerRes": false, - "type": "RenderTarget", - "width": 0, - "height": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "NEAREST", - "minFilter": "NEAREST", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "RenderTarget", - "path": "RenderTarget.rdt", - "label": "RenderTarget.rdt", - "inputKey": "DeviceCameraTexture", - "input": "DeviceCameraTexture" - }, - { - "isInnerRes": false, - "type": "folder", - "key": "d699fa2b-8cb6-485a-8da5-2292c282bbb0", - "label": "scripts", - "path": "scripts" - }, - { - "isInnerRes": false, - "type": "js", - "key": "a2284146-a08f-46f9-a277-312335145b7d", - "label": "20.flow.js", - "path": "scripts/20.flow.js" - }, - { - "isInnerRes": false, - "type": "js", - "key": "a32a5b3d-dc61-4787-965a-745f8c74c661", - "label": "light.js", - "path": "scripts/light.js" - }, - { - "isInnerRes": false, - "type": "PAGFileData", - "loopCount": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "NEAREST", - "minFilter": "NEAREST", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "51b026f8-3fee-41c2-83c8-f302a11b3d4e", - "label": "sh.pag", - "path": "sh.pag", - "duration": 2000000, - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "resolution": { - "width": 334, - "height": 100 - }, - "frameRate": 12, - "hasAudio": false - }, - { - "isInnerRes": false, - "type": "PAGFileData", - "loopCount": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "NEAREST", - "minFilter": "NEAREST", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "689419e3-8ef6-4980-9901-21fbce30c057", - "label": "shanshan.pag", - "path": "shanshan.pag", - "duration": 2333334, - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "resolution": { - "width": 720, - "height": 1151 - }, - "frameRate": 12, - "hasAudio": false - }, - { - "isInnerRes": false, - "type": "PAGFileData", - "loopCount": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "NEAREST", - "minFilter": "NEAREST", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "96850bd9-01e1-46bc-8a06-7bbf9d5a08c1", - "label": "xh.pag", - "path": "xh.pag", - "duration": 2000000, - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "resolution": { - "width": 720, - "height": 1280 - }, - "frameRate": 12, - "hasAudio": false - }, - { - "isInnerRes": false, - "type": "ImageData", - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "3201f2e5-f8b4-4037-9a74-59406b407244", - "label": "修容正片叠底.png", - "path": "修容正片叠底.png", - "actualSize": 39175, - "resolution": { - "height": 2048, - "width": 1536 - }, - "compression": 0 - }, - { - "isInnerRes": false, - "type": "ImageData", - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "b42268c1-c828-493e-86ee-035b88848f6b", - "label": "口红正片叠底.png", - "path": "口红正片叠底.png", - "actualSize": 9125, - "resolution": { - "height": 2048, - "width": 1536 - } - }, - { - "isInnerRes": false, - "type": "ImageData", - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "7e6ddedb-3305-43bf-a6ad-ab68384790bb", - "label": "眼影zpdd.png", - "path": "眼影zpdd.png", - "actualSize": 42649, - "resolution": { - "height": 2048, - "width": 1536 - } - }, - { - "isInnerRes": false, - "type": "ImageData", - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "dd9b9e0b-3a94-455b-8beb-20c584af9848", - "label": "郁金香.png", - "path": "郁金香.png", - "actualSize": 219654, - "resolution": { - "height": 512, - "width": 512 - }, - "compression": 0 - }, - { - "isInnerRes": false, - "type": "ImageData", - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "08fc88e7-aad0-4c2f-a94a-391fd5f1f015", - "label": "高光滤色.png", - "path": "高光滤色.png", - "actualSize": 29944, - "resolution": { - "height": 2048, - "width": 1536 - }, - "compression": 0 - }, - { - "isInnerRes": false, - "type": "PAGFileData", - "key": "4dfe3975-9ee2-4692-9b1c-c545358ce675", - "label": "cx.pag", - "path": "cx.pag", - "duration": 2000000, - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "loopCount": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "NEAREST", - "minFilter": "NEAREST", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "resolution": { - "width": 720, - "height": 1280 - }, - "frameRate": 12, - "hasAudio": false - } - ] - }, - "cloudResourceData": [], - "componentLevel": 230, - "path": "/Users/cxz/Desktop/video_childrendrawn/" -} \ No newline at end of file diff --git a/application/App-UIKit/2dMotionRes.bundle/video_keaituya/video_childrendrawn.2021-05-28-04-19-07-753Z.bak b/application/App-UIKit/2dMotionRes.bundle/video_keaituya/video_childrendrawn.2021-05-28-04-19-07-753Z.bak deleted file mode 100644 index 159d5cb8..00000000 --- a/application/App-UIKit/2dMotionRes.bundle/video_keaituya/video_childrendrawn.2021-05-28-04-19-07-753Z.bak +++ /dev/null @@ -1,1731 +0,0 @@ -{ - "name": "video_childrendrawn", - "author": "cxz", - "category": 1, - "scene": { - "id": 16, - "name": "拍摄模板", - "children": [ - { - "id": 17, - "name": "2D画板", - "children": [ - { - "id": 23, - "name": "2D空对象", - "children": [ - { - "id": 35, - "name": "脸妆", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 35, - "componentID": 35001 - }, - { - "componentID": 35002, - "enabled": true, - "entityId": 35, - "faceExchangeImageDisableFaceCrop": true, - "faceExchangeImageEnableOpacity": false, - "faceImage": "3201f2e5-f8b4-4037-9a74-59406b407244", - "faceMask": "none", - "facePointsFile": "", - "facePointsOption": false, - "maskImage": "", - "type": "MakeupFaceV6", - "visMethod": 0, - "version": 2 - }, - { - "alpha": 0.81, - "componentID": 35003, - "enabled": true, - "entityId": 35, - "mode": "multiply", - "type": "BlendMode", - "version": 4 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "female", - "type": "FaceTracking", - "enabled": true, - "entityId": 35, - "componentID": 35004 - } - ] - }, - { - "id": 71, - "name": "眼妆", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 71, - "componentID": 71001 - }, - { - "componentID": 71002, - "cropRect": { - "bottom": 1048, - "left": 413, - "right": 1118, - "top": 803 - }, - "enabled": true, - "entityId": 71, - "eyeCropImageName": "cropImage/眼影zpdd_crop.png", - "eyeImageName": "7e6ddedb-3305-43bf-a6ad-ab68384790bb", - "minVisibility": 0, - "type": "MakeupEyeV6", - "visMethod": 0, - "version": 2 - }, - { - "alpha": 0.84, - "componentID": 71003, - "enabled": true, - "entityId": 71, - "mode": "multiply", - "type": "BlendMode", - "version": 4 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "female", - "type": "FaceTracking", - "enabled": true, - "entityId": 71, - "componentID": 71004 - } - ] - }, - { - "id": 85, - "name": "唇彩", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 85, - "componentID": 85001 - }, - { - "closeMouseMask": "", - "componentID": 85002, - "enabled": true, - "entityId": 85, - "lipsColor": "#bda036ff", - "lipsImage": "", - "lipsImageCrop": "", - "lipsImageCropRect": { - "bottom": 110, - "left": 180, - "right": 200, - "top": 446 - }, - "lipsLut": "", - "lipsMask": "", - "lipsMaskCrop": "", - "lipsMaskCropRect": { - "bottom": 110, - "left": 180, - "right": 200, - "top": 446 - }, - "lipsMaskEnum": 0, - "lipsType": "Color", - "minVisibility": 0, - "openMouseMask": "", - "type": "MakeupLipsV6", - "version": 20, - "visMethod": 0 - }, - { - "alpha": 0.21, - "componentID": 85003, - "enabled": true, - "entityId": 85, - "mode": "multiply", - "type": "BlendMode", - "version": 38 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "female", - "type": "FaceTracking", - "enabled": true, - "entityId": 85, - "componentID": 85004 - } - ] - }, - { - "id": 100, - "name": "唇彩", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 100, - "componentID": 100001 - }, - { - "closeMouseMask": "", - "componentID": 100002, - "enabled": true, - "entityId": 100, - "lipsColor": "", - "lipsImage": "b42268c1-c828-493e-86ee-035b88848f6b", - "lipsImageCrop": "cropImage/口红正片叠底_crop.png", - "lipsImageCropRect": { - "bottom": 1420, - "left": 622, - "right": 918, - "top": 1260 - }, - "lipsLut": "", - "lipsMask": "", - "lipsMaskCrop": "cropImage/口红正片叠底_Mask_crop.png", - "lipsMaskCropRect": { - "bottom": 2047, - "left": 0, - "right": 1535, - "top": 0 - }, - "lipsMaskEnum": 0, - "lipsType": "Image", - "minVisibility": 0, - "openMouseMask": "", - "type": "MakeupLipsV6", - "visMethod": 0, - "version": 2 - }, - { - "alpha": 0.58, - "componentID": 100003, - "enabled": true, - "entityId": 100, - "mode": "multiply", - "type": "BlendMode", - "version": 63 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "female", - "type": "FaceTracking", - "enabled": true, - "entityId": 100, - "componentID": 100004 - } - ] - }, - { - "id": 129, - "name": "脸妆", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 129, - "componentID": 129001 - }, - { - "componentID": 129002, - "enabled": true, - "entityId": 129, - "faceExchangeImageDisableFaceCrop": true, - "faceExchangeImageEnableOpacity": false, - "faceImage": "08fc88e7-aad0-4c2f-a94a-391fd5f1f015", - "faceMask": "none", - "facePointsFile": "", - "facePointsOption": false, - "maskImage": "", - "type": "MakeupFaceV6", - "visMethod": 0, - "version": 2 - }, - { - "alpha": 0.62, - "componentID": 129003, - "enabled": true, - "entityId": 129, - "mode": "screen", - "type": "BlendMode", - "version": 8 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "female", - "type": "FaceTracking", - "enabled": true, - "entityId": 129, - "componentID": 129004 - } - ] - } - ], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "top": 1, - "bottom": -1, - "left": -1, - "right": 1 - }, - "offset": { - "top": 0, - "bottom": 0, - "left": 0, - "right": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 23, - "componentID": 23001 - } - ] - }, - { - "id": 66, - "name": "滤镜", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 66, - "componentID": 66001 - }, - { - "componentID": 66002, - "enabled": true, - "entityId": 66, - "intensity": 0.8200000000000001, - "src": "dd9b9e0b-3a94-455b-8beb-20c584af9848", - "type": "LUTFilter", - "version": 42 - }, - { - "eAlignMode": 0, - "startOffset": 0, - "duration": 2000000, - "endOffset": 0, - "loopCount": 0, - "type": "TimeOffset", - "enabled": true, - "entityId": 66, - "componentID": 66003, - "version": 1 - } - ] - }, - { - "id": 18, - "name": "前景贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 18, - "componentID": 18001, - "version": 3 - }, - { - "componentID": 18002, - "enabled": true, - "entityId": 18, - "scaleMode": 2, - "src": "4dfe3975-9ee2-4692-9b1c-c545358ce675", - "type": "Image", - "version": 10 - }, - { - "alpha": 0.9, - "componentID": 18003, - "enabled": true, - "entityId": 18, - "mode": "normal", - "type": "BlendMode", - "version": 87 - }, - { - "componentID": 18004, - "duration": 2000000, - "eAlignMode": 2, - "enabled": true, - "endOffset": 0, - "entityId": 18, - "loopCount": -1, - "startOffset": 0, - "type": "TimeOffset", - "version": 19 - } - ] - }, - { - "id": 31, - "name": "人脸跟随贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0.008471180555555513, - "right": 0.008471180555555513, - "top": 0.03798896484375014, - "bottom": 0.03798896484375014 - }, - "offset": { - "left": -241.50500000000002, - "right": 241.50500000000002, - "top": 72.005, - "bottom": -72.005 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 31, - "componentID": 31001, - "version": 313 - }, - { - "componentID": 31002, - "enabled": true, - "entityId": 31, - "scaleMode": 2, - "src": "51b026f8-3fee-41c2-83c8-f302a11b3d4e", - "type": "Image", - "version": 3 - }, - { - "alpha": 0.8, - "componentID": 31003, - "enabled": true, - "entityId": 31, - "mode": "normal", - "type": "BlendMode", - "version": 26 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "", - "type": "FaceTracking", - "enabled": true, - "entityId": 31, - "componentID": 31004 - }, - { - "eAlignMode": 2, - "startOffset": 0, - "duration": 2000000, - "endOffset": 0, - "loopCount": -1, - "type": "TimeOffset", - "enabled": true, - "entityId": 31, - "componentID": 31005, - "version": null - } - ] - }, - { - "id": 19, - "name": "前景贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 19, - "componentID": 19001, - "version": 1 - }, - { - "componentID": 19002, - "enabled": true, - "entityId": 19, - "scaleMode": 2, - "src": "96850bd9-01e1-46bc-8a06-7bbf9d5a08c1", - "type": "Image", - "version": 3 - }, - { - "alpha": 0.9, - "componentID": 19003, - "enabled": true, - "entityId": 19, - "mode": "normal", - "type": "BlendMode", - "version": 82 - }, - { - "eAlignMode": 2, - "startOffset": 0, - "duration": 2000000, - "endOffset": 0, - "loopCount": -1, - "type": "TimeOffset", - "enabled": true, - "entityId": 19, - "componentID": 19004, - "version": null - } - ] - }, - { - "id": 110, - "name": "前景贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0.001660467587672576, - "bottom": 0.001660467587672576 - }, - "offset": { - "left": -359.5005313496281, - "right": 359.5005313496281, - "top": 595.9989373007439, - "bottom": -595.9989373007439 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 110, - "componentID": 110001, - "version": 702 - }, - { - "componentID": 110002, - "enabled": true, - "entityId": 110, - "scaleMode": 2, - "src": "689419e3-8ef6-4980-9901-21fbce30c057", - "type": "Image", - "version": 7 - }, - { - "alpha": 0.6900000000000001, - "componentID": 110003, - "enabled": true, - "entityId": 110, - "mode": "add", - "type": "BlendMode", - "version": 6 - }, - { - "eAlignMode": 2, - "startOffset": 0, - "duration": 2330000, - "endOffset": 0, - "loopCount": -1, - "type": "TimeOffset", - "enabled": true, - "entityId": 110, - "componentID": 110004, - "version": 2 - } - ] - }, - { - "id": 38, - "name": "音乐", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 38, - "componentID": 38001 - }, - { - "audioSourceType": 1, - "componentID": 38002, - "eAudioMeta": { - "rhythmPath": "", - "startTime": 0, - "duration": 24890000, - "enableRhythm": true - }, - "eAudioType": 1, - "eHasVolumeEffects": false, - "eKey": "audioSource", - "enabled": true, - "entityId": 38, - "speed": 1, - "type": "AudioSource", - "version": 10, - "volume": 1, - "volumeEffects": [ - { - "duration": 2000000, - "eAlignMode": 2, - "end": 1, - "endOffset": 0, - "interpolationType": 1, - "loopCount": -1, - "start": 1, - "startOffset": 0 - } - ], - "ePath": "84fec02d-70de-4a54-92b6-e7d746b5253e" - }, - { - "eAlignMode": 2, - "startOffset": 0, - "duration": 24890000, - "endOffset": 0, - "loopCount": 0, - "type": "TimeOffset", - "enabled": true, - "entityId": 38, - "componentID": 38003, - "version": null - } - ] - } - ], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 0, - "x": 0, - "y": 0, - "z": 0 - }, - "entityId": 17, - "componentID": 17001, - "type": "ScreenTransform", - "enabled": true, - "version": 2, - "objectEnabled": true - }, - { - "componentID": 17002, - "enabled": true, - "entityId": 17, - "renderTargetKey": "RenderTarget", - "type": "Camera", - "version": 2 - } - ] - }, - { - "id": 20, - "name": "流程管理", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 20, - "componentID": 20001 - }, - { - "eGraphData": { - "graph": { - "last_node_id": 5, - "last_link_id": 4, - "nodes": [ - { - "id": 2, - "type": "code/SwitchObject", - "pos": { - "0": 288, - "1": 165, - "2": 0, - "3": 0, - "4": 0, - "5": 0, - "6": 0, - "7": 0, - "8": 0, - "9": 0 - }, - "size": { - "0": 300, - "1": 42 - }, - "flags": { - "_initSize": false - }, - "order": 1, - "mode": 0, - "inputs": [ - { - "name": "Run", - "type": -1, - "link": 2 - } - ], - "outputs": [ - { - "name": "Next", - "type": -1, - "links": null - } - ], - "properties": { - "entityToHide": [ - 19 - ] - } - }, - { - "id": 1, - "type": "code/Start", - "pos": { - "0": 19, - "1": 409, - "2": 0, - "3": 0, - "4": 0, - "5": 0, - "6": 0, - "7": 0, - "8": 0, - "9": 0 - }, - "size": { - "0": 200, - "1": 42 - }, - "flags": {}, - "order": 0, - "mode": 0, - "inputs": [], - "outputs": [ - { - "name": "Next", - "type": -1, - "links": [ - 2, - 3 - ] - } - ], - "properties": { - "started": false - } - }, - { - "id": 3, - "type": "code/play", - "pos": { - "0": 319, - "1": 466, - "2": 0, - "3": 0, - "4": 0, - "5": 0, - "6": 0, - "7": 0, - "8": 0, - "9": 0 - }, - "size": { - "0": 200, - "1": 42 - }, - "flags": { - "_initSize": false - }, - "order": 2, - "mode": 0, - "inputs": [ - { - "name": "Run", - "type": -1, - "link": 3 - } - ], - "outputs": [ - { - "name": "Next", - "type": -1, - "links": [ - 4 - ] - } - ], - "properties": { - "entityId": 18, - "playtimes": 1, - "keepLastFrame": false - } - }, - { - "id": 5, - "type": "code/SwitchObject", - "pos": { - "0": 584, - "1": 471, - "2": 0, - "3": 0, - "4": 0, - "5": 0, - "6": 0, - "7": 0, - "8": 0, - "9": 0 - }, - "size": { - "0": 300, - "1": 42 - }, - "flags": { - "_initSize": false - }, - "order": 3, - "mode": 0, - "inputs": [ - { - "name": "Run", - "type": -1, - "link": 4 - } - ], - "outputs": [ - { - "name": "Next", - "type": -1, - "links": null - } - ], - "properties": { - "entityToDisplay": [ - 19 - ] - } - } - ], - "links": [ - [ - 2, - 1, - 0, - 2, - 0, - -1 - ], - [ - 3, - 1, - 0, - 3, - 0, - -1 - ], - [ - 4, - 3, - 0, - 5, - 0, - -1 - ] - ], - "groups": [], - "config": {}, - "version": 0.4 - } - }, - "type": "FlowGraph", - "enabled": true, - "entityId": 20, - "componentID": 20002, - "customNodes": [], - "version": 27 - } - ] - } - ], - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 0, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 16, - "componentID": 16001, - "type": "ScreenTransform", - "enabled": true, - "version": 4 - }, - { - "enableRotation": true, - "resetWhenStartRecord": true, - "type": "ExtraSetting", - "enabled": true, - "version": 1, - "entityId": 16, - "componentID": 16002 - } - ], - "enabled": true, - "version": 0 - }, - "resources": { - "items": [ - { - "key": "84fec02d-70de-4a54-92b6-e7d746b5253e", - "type": "AudioClipData", - "path": "bgm.mp3", - "label": "bgm.mp3", - "timeRange": { - "startTime": 0, - "duration": 24894694 - }, - "loopCount": -1 - }, - { - "key": "4dfe3975-9ee2-4692-9b1c-c545358ce675", - "type": "PAGFileData", - "path": "cx.pag", - "label": "cx.pag", - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "loopCount": 0 - }, - { - "key": "DeviceCameraTexture", - "type": "TextureData", - "path": "DeviceCameraTexture.tex", - "label": "DeviceCameraTexture.tex" - }, - { - "key": "RenderTarget", - "type": "RenderTarget", - "path": "RenderTarget.rdt", - "label": "RenderTarget.rdt", - "inputKey": "DeviceCameraTexture" - }, - { - "key": "a2284146-a08f-46f9-a277-312335145b7d", - "type": "js", - "path": "scripts/20.flow.js", - "label": "20.flow.js" - }, - { - "key": "a32a5b3d-dc61-4787-965a-745f8c74c661", - "type": "js", - "path": "scripts/light.js", - "label": "light.js" - }, - { - "key": "51b026f8-3fee-41c2-83c8-f302a11b3d4e", - "type": "PAGFileData", - "path": "sh.pag", - "label": "sh.pag", - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "loopCount": 0 - }, - { - "key": "689419e3-8ef6-4980-9901-21fbce30c057", - "type": "PAGFileData", - "path": "shanshan.pag", - "label": "shanshan.pag", - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "loopCount": 0 - }, - { - "key": "b1a01682-e16a-4fce-9d55-1276d76bffb4", - "type": "default", - "path": "video_childrendrawn.2021-05-08-06-28-30-093Z.bak", - "label": "video_childrendrawn.2021-05-08-06-28-30-093Z.bak" - }, - { - "key": "96850bd9-01e1-46bc-8a06-7bbf9d5a08c1", - "type": "PAGFileData", - "path": "xh.pag", - "label": "xh.pag", - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "loopCount": 0 - }, - { - "key": "3201f2e5-f8b4-4037-9a74-59406b407244", - "type": "ImageData", - "path": "修容正片叠底.png", - "label": "修容正片叠底.png", - "compression": 0 - }, - { - "key": "b42268c1-c828-493e-86ee-035b88848f6b", - "type": "ImageData", - "path": "口红正片叠底.png", - "label": "口红正片叠底.png" - }, - { - "key": "7e6ddedb-3305-43bf-a6ad-ab68384790bb", - "type": "ImageData", - "path": "眼影zpdd.png", - "label": "眼影zpdd.png" - }, - { - "key": "dd9b9e0b-3a94-455b-8beb-20c584af9848", - "type": "ImageData", - "path": "郁金香.png", - "label": "郁金香.png", - "compression": 0 - }, - { - "key": "08fc88e7-aad0-4c2f-a94a-391fd5f1f015", - "type": "ImageData", - "path": "高光滤色.png", - "label": "高光滤色.png", - "compression": 0 - } - ] - }, - "cloudResourceData": [], - "componentLevel": 4, - "path": "/Users/cxz/Desktop/video_childrendrawn/" -} \ No newline at end of file diff --git a/application/App-UIKit/2dMotionRes.bundle/video_keaituya/video_childrendrawn.studio b/application/App-UIKit/2dMotionRes.bundle/video_keaituya/video_childrendrawn.studio deleted file mode 100644 index 1c374eff..00000000 --- a/application/App-UIKit/2dMotionRes.bundle/video_keaituya/video_childrendrawn.studio +++ /dev/null @@ -1,1919 +0,0 @@ -{ - "name": "video_childrendrawn", - "author": "cxz", - "category": 1, - "scene": { - "id": 16, - "name": "拍摄模板", - "children": [ - { - "id": 17, - "name": "2D画板", - "children": [ - { - "id": 23, - "name": "2D空对象", - "children": [ - { - "id": 35, - "name": "脸妆", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 35, - "componentID": 35001 - }, - { - "componentID": 35002, - "enabled": true, - "entityId": 35, - "faceExchangeImageDisableFaceCrop": true, - "faceExchangeImageEnableOpacity": false, - "faceImage": "3201f2e5-f8b4-4037-9a74-59406b407244", - "faceMask": "none", - "facePointsFile": "", - "facePointsOption": false, - "maskImage": "", - "type": "MakeupFaceV6", - "visMethod": 0, - "version": 2 - }, - { - "alpha": 0.81, - "componentID": 35003, - "enabled": true, - "entityId": 35, - "mode": "multiply", - "type": "BlendMode", - "version": 4 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "female", - "type": "FaceTracking", - "enabled": true, - "entityId": 35, - "componentID": 35004 - } - ] - }, - { - "id": 71, - "name": "眼妆", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 71, - "componentID": 71001 - }, - { - "componentID": 71002, - "cropRect": { - "bottom": 1048, - "left": 413, - "right": 1118, - "top": 803 - }, - "enabled": true, - "entityId": 71, - "eyeCropImageName": "cropImage/眼影zpdd_crop.png", - "eyeImageName": "7e6ddedb-3305-43bf-a6ad-ab68384790bb", - "minVisibility": 0, - "type": "MakeupEyeV6", - "visMethod": 0, - "version": 2 - }, - { - "alpha": 0.84, - "componentID": 71003, - "enabled": true, - "entityId": 71, - "mode": "multiply", - "type": "BlendMode", - "version": 4 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "female", - "type": "FaceTracking", - "enabled": true, - "entityId": 71, - "componentID": 71004 - } - ] - }, - { - "id": 85, - "name": "唇彩", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 85, - "componentID": 85001 - }, - { - "closeMouseMask": "", - "componentID": 85002, - "enabled": true, - "entityId": 85, - "lipsColor": "#bda036ff", - "lipsImage": "", - "lipsImageCrop": "", - "lipsImageCropRect": { - "bottom": 110, - "left": 180, - "right": 200, - "top": 446 - }, - "lipsLut": "", - "lipsMask": "", - "lipsMaskCrop": "", - "lipsMaskCropRect": { - "bottom": 110, - "left": 180, - "right": 200, - "top": 446 - }, - "lipsMaskEnum": 0, - "lipsType": "Color", - "minVisibility": 0, - "openMouseMask": "", - "type": "MakeupLipsV6", - "version": 20, - "visMethod": 0 - }, - { - "alpha": 0.21, - "componentID": 85003, - "enabled": true, - "entityId": 85, - "mode": "multiply", - "type": "BlendMode", - "version": 38 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "female", - "type": "FaceTracking", - "enabled": true, - "entityId": 85, - "componentID": 85004 - } - ] - }, - { - "id": 100, - "name": "唇彩", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 100, - "componentID": 100001 - }, - { - "closeMouseMask": "", - "componentID": 100002, - "enabled": true, - "entityId": 100, - "lipsColor": "", - "lipsImage": "b42268c1-c828-493e-86ee-035b88848f6b", - "lipsImageCrop": "cropImage/口红正片叠底_crop.png", - "lipsImageCropRect": { - "bottom": 1420, - "left": 622, - "right": 918, - "top": 1260 - }, - "lipsLut": "", - "lipsMask": "Default", - "lipsMaskCrop": "cropImage/default_mask_crop.png", - "lipsMaskCropRect": { - "bottom": 2048, - "left": 0, - "right": 1536, - "top": 0 - }, - "lipsMaskEnum": 0, - "lipsType": "Image", - "minVisibility": 0, - "openMouseMask": "", - "type": "MakeupLipsV6", - "version": 5, - "visMethod": 0 - }, - { - "alpha": 0.58, - "componentID": 100003, - "enabled": true, - "entityId": 100, - "mode": "multiply", - "type": "BlendMode", - "version": 63 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "female", - "type": "FaceTracking", - "enabled": true, - "entityId": 100, - "componentID": 100004 - } - ] - }, - { - "id": 129, - "name": "脸妆", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 129, - "componentID": 129001 - }, - { - "componentID": 129002, - "enabled": true, - "entityId": 129, - "faceExchangeImageDisableFaceCrop": true, - "faceExchangeImageEnableOpacity": false, - "faceImage": "08fc88e7-aad0-4c2f-a94a-391fd5f1f015", - "faceMask": "none", - "facePointsFile": "", - "facePointsOption": false, - "maskImage": "", - "type": "MakeupFaceV6", - "visMethod": 0, - "version": 2 - }, - { - "alpha": 0.62, - "componentID": 129003, - "enabled": true, - "entityId": 129, - "mode": "screen", - "type": "BlendMode", - "version": 8 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "female", - "type": "FaceTracking", - "enabled": true, - "entityId": 129, - "componentID": 129004 - } - ] - } - ], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "top": 1, - "bottom": -1, - "left": -1, - "right": 1 - }, - "offset": { - "top": 0, - "bottom": 0, - "left": 0, - "right": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 23, - "componentID": 23001 - } - ] - }, - { - "id": 66, - "name": "滤镜", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 66, - "componentID": 66001 - }, - { - "componentID": 66002, - "enabled": true, - "entityId": 66, - "intensity": 0.8200000000000001, - "src": "dd9b9e0b-3a94-455b-8beb-20c584af9848", - "type": "LUTFilter", - "version": 42 - }, - { - "eAlignMode": 0, - "startOffset": 0, - "duration": 2000000, - "endOffset": 0, - "loopCount": 0, - "type": "TimeOffset", - "enabled": true, - "entityId": 66, - "componentID": 66003, - "version": 1 - } - ] - }, - { - "id": 18, - "name": "前景贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 18, - "componentID": 18001, - "type": "ScreenTransform", - "enabled": true, - "version": 5 - }, - { - "componentID": 18002, - "enabled": true, - "entityId": 18, - "scaleMode": 3, - "src": "4dfe3975-9ee2-4692-9b1c-c545358ce675", - "type": "Image", - "version": 12 - }, - { - "alpha": 0.9, - "componentID": 18003, - "enabled": true, - "entityId": 18, - "mode": "normal", - "type": "BlendMode", - "version": 87 - }, - { - "componentID": 18004, - "duration": 2000000, - "eAlignMode": 2, - "enabled": true, - "endOffset": 0, - "entityId": 18, - "loopCount": -1, - "startOffset": 0, - "type": "TimeOffset", - "version": 19 - } - ] - }, - { - "id": 31, - "name": "人脸跟随贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0.008471180555555513, - "right": 0.008471180555555513, - "top": 0.03798896484375014, - "bottom": 0.03798896484375014 - }, - "offset": { - "left": -241.50500000000002, - "right": 241.50500000000002, - "top": 72.005, - "bottom": -72.005 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 31, - "componentID": 31001, - "version": 313 - }, - { - "componentID": 31002, - "enabled": true, - "entityId": 31, - "scaleMode": 2, - "src": "51b026f8-3fee-41c2-83c8-f302a11b3d4e", - "type": "Image", - "version": 3 - }, - { - "alpha": 0.8, - "componentID": 31003, - "enabled": true, - "entityId": 31, - "mode": "normal", - "type": "BlendMode", - "version": 26 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "", - "type": "FaceTracking", - "enabled": true, - "entityId": 31, - "componentID": 31004 - }, - { - "eAlignMode": 2, - "startOffset": 0, - "duration": 2000000, - "endOffset": 0, - "loopCount": -1, - "type": "TimeOffset", - "enabled": true, - "entityId": 31, - "componentID": 31005, - "version": null - } - ] - }, - { - "id": 19, - "name": "前景贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 19, - "componentID": 19001, - "type": "ScreenTransform", - "enabled": true, - "version": 3 - }, - { - "componentID": 19002, - "enabled": true, - "entityId": 19, - "scaleMode": 3, - "src": "96850bd9-01e1-46bc-8a06-7bbf9d5a08c1", - "type": "Image", - "version": 5 - }, - { - "alpha": 0.9, - "componentID": 19003, - "enabled": true, - "entityId": 19, - "mode": "normal", - "type": "BlendMode", - "version": 82 - }, - { - "eAlignMode": 2, - "startOffset": 0, - "duration": 2000000, - "endOffset": 0, - "loopCount": -1, - "type": "TimeOffset", - "enabled": true, - "entityId": 19, - "componentID": 19004, - "version": null - } - ] - }, - { - "id": 110, - "name": "前景贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 45.06376195536653, - "left": 0.49946865037190147, - "right": -0.49946865037190147, - "top": -42.93836344314563 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 110, - "componentID": 110001, - "type": "ScreenTransform", - "enabled": true, - "version": 704 - }, - { - "componentID": 110002, - "enabled": true, - "entityId": 110, - "scaleMode": 3, - "src": "689419e3-8ef6-4980-9901-21fbce30c057", - "type": "Image", - "version": 9 - }, - { - "alpha": 0.6900000000000001, - "componentID": 110003, - "enabled": true, - "entityId": 110, - "mode": "add", - "type": "BlendMode", - "version": 6 - }, - { - "eAlignMode": 2, - "startOffset": 0, - "duration": 2330000, - "endOffset": 0, - "loopCount": -1, - "type": "TimeOffset", - "enabled": true, - "entityId": 110, - "componentID": 110004, - "version": 2 - } - ] - }, - { - "id": 38, - "name": "音乐", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 38, - "componentID": 38001 - }, - { - "audioSourceType": 1, - "componentID": 38002, - "eAudioMeta": { - "rhythmPath": "", - "startTime": 0, - "duration": 24890000, - "enableRhythm": true - }, - "eAudioType": 1, - "eHasVolumeEffects": false, - "eKey": "audioSource", - "enabled": true, - "entityId": 38, - "speed": 1, - "type": "AudioSource", - "version": 10, - "volume": 1, - "volumeEffects": [ - { - "duration": 2000000, - "eAlignMode": 2, - "end": 1, - "endOffset": 0, - "interpolationType": 1, - "loopCount": -1, - "start": 1, - "startOffset": 0 - } - ], - "ePath": "84fec02d-70de-4a54-92b6-e7d746b5253e" - }, - { - "eAlignMode": 2, - "startOffset": 0, - "duration": 24890000, - "endOffset": 0, - "loopCount": 0, - "type": "TimeOffset", - "enabled": true, - "entityId": 38, - "componentID": 38003, - "version": null - } - ] - } - ], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 0, - "x": 0, - "y": 0, - "z": 0 - }, - "entityId": 17, - "componentID": 17001, - "type": "ScreenTransform", - "enabled": true, - "version": 2, - "objectEnabled": true - }, - { - "componentID": 17002, - "enabled": true, - "entityId": 17, - "renderTargetKey": "RenderTarget", - "type": "Camera", - "version": 2 - } - ] - }, - { - "id": 20, - "name": "流程管理", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 20, - "componentID": 20001 - }, - { - "eGraphData": { - "graph": { - "last_node_id": 5, - "last_link_id": 4, - "nodes": [ - { - "id": 2, - "type": "code/SwitchObject", - "pos": { - "0": 288, - "1": 165, - "2": 0, - "3": 0, - "4": 0, - "5": 0, - "6": 0, - "7": 0, - "8": 0, - "9": 0 - }, - "size": { - "0": 300, - "1": 42 - }, - "flags": { - "_initSize": false - }, - "order": 1, - "mode": 0, - "inputs": [ - { - "name": "Run", - "type": -1, - "link": 2 - } - ], - "outputs": [ - { - "name": "Next", - "type": -1, - "links": null - } - ], - "properties": { - "entityToHide": [ - 19 - ] - } - }, - { - "id": 1, - "type": "code/Start", - "pos": { - "0": 19, - "1": 409, - "2": 0, - "3": 0, - "4": 0, - "5": 0, - "6": 0, - "7": 0, - "8": 0, - "9": 0 - }, - "size": { - "0": 200, - "1": 42 - }, - "flags": {}, - "order": 0, - "mode": 0, - "inputs": [], - "outputs": [ - { - "name": "Next", - "type": -1, - "links": [ - 2, - 3 - ] - } - ], - "properties": { - "started": false - } - }, - { - "id": 3, - "type": "code/play", - "pos": { - "0": 319, - "1": 466, - "2": 0, - "3": 0, - "4": 0, - "5": 0, - "6": 0, - "7": 0, - "8": 0, - "9": 0 - }, - "size": { - "0": 200, - "1": 42 - }, - "flags": { - "_initSize": false - }, - "order": 2, - "mode": 0, - "inputs": [ - { - "name": "Run", - "type": -1, - "link": 3 - } - ], - "outputs": [ - { - "name": "Next", - "type": -1, - "links": [ - 4 - ] - } - ], - "properties": { - "entityId": 18, - "playtimes": 1, - "keepLastFrame": false - } - }, - { - "id": 5, - "type": "code/SwitchObject", - "pos": { - "0": 584, - "1": 471, - "2": 0, - "3": 0, - "4": 0, - "5": 0, - "6": 0, - "7": 0, - "8": 0, - "9": 0 - }, - "size": { - "0": 300, - "1": 42 - }, - "flags": { - "_initSize": false - }, - "order": 3, - "mode": 0, - "inputs": [ - { - "name": "Run", - "type": -1, - "link": 4 - } - ], - "outputs": [ - { - "name": "Next", - "type": -1, - "links": null - } - ], - "properties": { - "entityToDisplay": [ - 19 - ] - } - } - ], - "links": [ - [ - 2, - 1, - 0, - 2, - 0, - -1 - ], - [ - 3, - 1, - 0, - 3, - 0, - -1 - ], - [ - 4, - 3, - 0, - 5, - 0, - -1 - ] - ], - "groups": [], - "config": {}, - "version": 0.4 - } - }, - "type": "FlowGraph", - "enabled": true, - "entityId": 20, - "componentID": 20002, - "customNodes": [], - "version": 27 - } - ] - } - ], - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 0, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 16, - "componentID": 16001, - "type": "ScreenTransform", - "enabled": true, - "version": 20 - }, - { - "enableRotation": true, - "resetWhenStartRecord": true, - "type": "ExtraSetting", - "enabled": true, - "version": 1, - "entityId": 16, - "componentID": 16002 - } - ], - "enabled": true, - "version": 0 - }, - "resources": { - "items": [ - { - "type": "folder", - "commandMap": {}, - "key": "2a598e82-9dea-4591-9358-e7f84f5bea46", - "label": "root", - "path": "./" - }, - { - "type": "AudioClipData", - "commandMap": {}, - "loopCount": -1, - "key": "84fec02d-70de-4a54-92b6-e7d746b5253e", - "path": "bgm.mp3", - "label": "bgm.mp3", - "timeRange": { - "startTime": 0, - "duration": 24894694 - }, - "duration": 24894694 - }, - { - "type": "PAGFileData", - "commandMap": {}, - "loopCount": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "NEAREST", - "minFilter": "NEAREST", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "4dfe3975-9ee2-4692-9b1c-c545358ce675", - "path": "cx.pag", - "label": "cx.pag", - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "duration": 2000000, - "resolution": { - "width": 720, - "height": 1280 - }, - "frameRate": 12, - "hasAudio": false - }, - { - "type": "TextureData", - "commandMap": {}, - "key": "DeviceCameraTexture", - "path": "DeviceCameraTexture.tex", - "label": "DeviceCameraTexture.tex" - }, - { - "type": "RenderTarget", - "commandMap": {}, - "width": 0, - "height": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "NEAREST", - "minFilter": "NEAREST", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "RenderTarget", - "path": "RenderTarget.rdt", - "label": "RenderTarget.rdt", - "inputKey": "DeviceCameraTexture", - "input": "DeviceCameraTexture" - }, - { - "type": "folder", - "commandMap": {}, - "key": "76011b03-2cb5-4946-a59e-8b86cb0b1fb5", - "label": "scripts", - "path": "scripts" - }, - { - "type": "js", - "commandMap": {}, - "key": "a2284146-a08f-46f9-a277-312335145b7d", - "path": "scripts/20.flow.js", - "label": "20.flow.js" - }, - { - "type": "js", - "commandMap": {}, - "key": "a32a5b3d-dc61-4787-965a-745f8c74c661", - "path": "scripts/light.js", - "label": "light.js" - }, - { - "type": "PAGFileData", - "commandMap": {}, - "loopCount": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "NEAREST", - "minFilter": "NEAREST", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "51b026f8-3fee-41c2-83c8-f302a11b3d4e", - "path": "sh.pag", - "label": "sh.pag", - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "duration": 2000000, - "resolution": { - "width": 334, - "height": 100 - }, - "frameRate": 12, - "hasAudio": false - }, - { - "type": "PAGFileData", - "commandMap": {}, - "loopCount": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "NEAREST", - "minFilter": "NEAREST", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "689419e3-8ef6-4980-9901-21fbce30c057", - "path": "shanshan.pag", - "label": "shanshan.pag", - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "duration": 2333334, - "resolution": { - "width": 720, - "height": 1151 - }, - "frameRate": 12, - "hasAudio": false - }, - { - "type": "default", - "commandMap": {}, - "key": "b1a01682-e16a-4fce-9d55-1276d76bffb4", - "path": "video_childrendrawn.2021-05-08-06-28-30-093Z.bak", - "label": "video_childrendrawn.2021-05-08-06-28-30-093Z.bak" - }, - { - "type": "default", - "commandMap": {}, - "key": "2c2fad8d-4171-4bc3-97f4-bdc9877aa872", - "label": "video_childrendrawn.2021-05-28-04-19-07-753Z.bak", - "path": "video_childrendrawn.2021-05-28-04-19-07-753Z.bak" - }, - { - "type": "PAGFileData", - "commandMap": {}, - "loopCount": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "NEAREST", - "minFilter": "NEAREST", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "96850bd9-01e1-46bc-8a06-7bbf9d5a08c1", - "path": "xh.pag", - "label": "xh.pag", - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "duration": 2000000, - "resolution": { - "width": 720, - "height": 1280 - }, - "frameRate": 12, - "hasAudio": false - }, - { - "type": "ImageData", - "commandMap": {}, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "3201f2e5-f8b4-4037-9a74-59406b407244", - "path": "修容正片叠底.png", - "label": "修容正片叠底.png", - "compression": 0, - "actualSize": 39175, - "resolution": { - "height": 2048, - "width": 1536 - } - }, - { - "type": "ImageData", - "commandMap": {}, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "b42268c1-c828-493e-86ee-035b88848f6b", - "path": "口红正片叠底.png", - "label": "口红正片叠底.png", - "actualSize": 9125, - "resolution": { - "height": 2048, - "width": 1536 - } - }, - { - "type": "ImageData", - "commandMap": {}, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "7e6ddedb-3305-43bf-a6ad-ab68384790bb", - "path": "眼影zpdd.png", - "label": "眼影zpdd.png", - "actualSize": 42649, - "resolution": { - "height": 2048, - "width": 1536 - } - }, - { - "type": "ImageData", - "commandMap": {}, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "dd9b9e0b-3a94-455b-8beb-20c584af9848", - "path": "郁金香.png", - "label": "郁金香.png", - "compression": 0, - "actualSize": 219654, - "resolution": { - "height": 512, - "width": 512 - } - }, - { - "type": "ImageData", - "commandMap": {}, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "08fc88e7-aad0-4c2f-a94a-391fd5f1f015", - "path": "高光滤色.png", - "label": "高光滤色.png", - "compression": 0, - "actualSize": 29944, - "resolution": { - "height": 2048, - "width": 1536 - } - } - ] - }, - "cloudResourceData": [], - "componentLevel": 4, - "path": "/Users/zhenli/Documents/light-sdk-youtu/assets/MotionRes/video_keaituya/", - "publishStoreInfo": { - "material_id": "dbulpsntbf0gq", - "material_name": "儿童手绘", - "desc": "儿童手绘", - "thumb": { - "thumb_URL": "https://effect-material-1251316161.cos.ap-nanjing.myqcloud.com/ed04a2e019172d194c3be6fac2029ec1_vRPduA7bOWETkkLE.png", - "thumb_height": 342, - "thumb_width": 342 - }, - "material_component_level": 240, - "platform": 3, - "type": 1, - "video_URL": "", - "thumb_list": [ - { - "thumb_URL": "https://effect-material-1251316161.cos.ap-nanjing.myqcloud.com/ed04a2e019172d194c3be6fac2029ec1_vRPduA7bOWETkkLE.png", - "thumb_height": 342, - "thumb_width": 342 - }, - { - "thumb_URL": "https://effect-material-1251316161.cos.ap-nanjing.myqcloud.com/ed04a2e019172d194c3be6fac2029ec1_mKM4k1qxedmSbjeG.png", - "thumb_height": 342, - "thumb_width": 342 - } - ], - "sdk_info": { - "version": "240", - "type": 1 - } - } -} \ No newline at end of file diff --git a/application/App-UIKit/2dMotionRes.bundle/video_keaituya/xh.pag b/application/App-UIKit/2dMotionRes.bundle/video_keaituya/xh.pag deleted file mode 100644 index 3d3720ea..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_keaituya/xh.pag and /dev/null differ diff --git "a/application/App-UIKit/2dMotionRes.bundle/video_keaituya/\344\277\256\345\256\271\346\255\243\347\211\207\345\217\240\345\272\225.png" "b/application/App-UIKit/2dMotionRes.bundle/video_keaituya/\344\277\256\345\256\271\346\255\243\347\211\207\345\217\240\345\272\225.png" deleted file mode 100644 index 00c1b38e..00000000 Binary files "a/application/App-UIKit/2dMotionRes.bundle/video_keaituya/\344\277\256\345\256\271\346\255\243\347\211\207\345\217\240\345\272\225.png" and /dev/null differ diff --git "a/application/App-UIKit/2dMotionRes.bundle/video_keaituya/\345\217\243\347\272\242\346\255\243\347\211\207\345\217\240\345\272\225.png" "b/application/App-UIKit/2dMotionRes.bundle/video_keaituya/\345\217\243\347\272\242\346\255\243\347\211\207\345\217\240\345\272\225.png" deleted file mode 100644 index c2283631..00000000 Binary files "a/application/App-UIKit/2dMotionRes.bundle/video_keaituya/\345\217\243\347\272\242\346\255\243\347\211\207\345\217\240\345\272\225.png" and /dev/null differ diff --git "a/application/App-UIKit/2dMotionRes.bundle/video_keaituya/\347\234\274\345\275\261zpdd.png" "b/application/App-UIKit/2dMotionRes.bundle/video_keaituya/\347\234\274\345\275\261zpdd.png" deleted file mode 100644 index 68204dc3..00000000 Binary files "a/application/App-UIKit/2dMotionRes.bundle/video_keaituya/\347\234\274\345\275\261zpdd.png" and /dev/null differ diff --git "a/application/App-UIKit/2dMotionRes.bundle/video_keaituya/\351\203\201\351\207\221\351\246\231.png" "b/application/App-UIKit/2dMotionRes.bundle/video_keaituya/\351\203\201\351\207\221\351\246\231.png" deleted file mode 100644 index 39d4db9e..00000000 Binary files "a/application/App-UIKit/2dMotionRes.bundle/video_keaituya/\351\203\201\351\207\221\351\246\231.png" and /dev/null differ diff --git "a/application/App-UIKit/2dMotionRes.bundle/video_keaituya/\351\253\230\345\205\211\346\273\244\350\211\262.png" "b/application/App-UIKit/2dMotionRes.bundle/video_keaituya/\351\253\230\345\205\211\346\273\244\350\211\262.png" deleted file mode 100644 index c99ac8a2..00000000 Binary files "a/application/App-UIKit/2dMotionRes.bundle/video_keaituya/\351\253\230\345\205\211\346\273\244\350\211\262.png" and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_xuanmeizhuang/DeviceCameraTexture.tex b/application/App-UIKit/2dMotionRes.bundle/video_xuanmeizhuang/DeviceCameraTexture.tex deleted file mode 100644 index 119ca577..00000000 --- a/application/App-UIKit/2dMotionRes.bundle/video_xuanmeizhuang/DeviceCameraTexture.tex +++ /dev/null @@ -1,4 +0,0 @@ -{ - "type": "TextureData", - "key": "DeviceCameraTexture" -} \ No newline at end of file diff --git a/application/App-UIKit/2dMotionRes.bundle/video_xuanmeizhuang/RenderTarget.rdt b/application/App-UIKit/2dMotionRes.bundle/video_xuanmeizhuang/RenderTarget.rdt deleted file mode 100644 index a98616e9..00000000 --- a/application/App-UIKit/2dMotionRes.bundle/video_xuanmeizhuang/RenderTarget.rdt +++ /dev/null @@ -1 +0,0 @@ -{"type":"RenderTarget","path":"RenderTarget.rdt","key":"RenderTarget","input":"DeviceCameraTexture"} \ No newline at end of file diff --git a/application/App-UIKit/2dMotionRes.bundle/video_xuanmeizhuang/bgm.mp3 b/application/App-UIKit/2dMotionRes.bundle/video_xuanmeizhuang/bgm.mp3 deleted file mode 100644 index df2ebf26..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_xuanmeizhuang/bgm.mp3 and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_xuanmeizhuang/chuncai_lut.png b/application/App-UIKit/2dMotionRes.bundle/video_xuanmeizhuang/chuncai_lut.png deleted file mode 100644 index e092ac12..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_xuanmeizhuang/chuncai_lut.png and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_xuanmeizhuang/eyemask.png b/application/App-UIKit/2dMotionRes.bundle/video_xuanmeizhuang/eyemask.png deleted file mode 100644 index 7dad7256..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_xuanmeizhuang/eyemask.png and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_xuanmeizhuang/fajia_0.png b/application/App-UIKit/2dMotionRes.bundle/video_xuanmeizhuang/fajia_0.png deleted file mode 100644 index 8abce1d1..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_xuanmeizhuang/fajia_0.png and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_xuanmeizhuang/filterEffect.png b/application/App-UIKit/2dMotionRes.bundle/video_xuanmeizhuang/filterEffect.png deleted file mode 100644 index cd24caaa..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_xuanmeizhuang/filterEffect.png and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_xuanmeizhuang/iris_d_5.png b/application/App-UIKit/2dMotionRes.bundle/video_xuanmeizhuang/iris_d_5.png deleted file mode 100644 index e61fe2dd..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_xuanmeizhuang/iris_d_5.png and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_xuanmeizhuang/multiply.png b/application/App-UIKit/2dMotionRes.bundle/video_xuanmeizhuang/multiply.png deleted file mode 100644 index e7344f0c..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_xuanmeizhuang/multiply.png and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_xuanmeizhuang/softlight.png b/application/App-UIKit/2dMotionRes.bundle/video_xuanmeizhuang/softlight.png deleted file mode 100644 index 822f9d42..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_xuanmeizhuang/softlight.png and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_xuanmeizhuang/template.json b/application/App-UIKit/2dMotionRes.bundle/video_xuanmeizhuang/template.json deleted file mode 100644 index fab4a3ac..00000000 --- a/application/App-UIKit/2dMotionRes.bundle/video_xuanmeizhuang/template.json +++ /dev/null @@ -1,991 +0,0 @@ -{ - "componentLevel": 2, - "madeIn": "LightStudio", - "root": { - "id": 16, - "name": "videovideo_xuanmeizhuang", - "children": [ - { - "id": 17, - "name": "2D画板", - "children": [ - { - "id": 18, - "name": "脸妆", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": false, - "enabled": true, - "entityId": 18, - "componentID": 4, - "objectEnabled": true - }, - { - "componentID": 5, - "enabled": true, - "entityId": 18, - "faceImage": "e00ad328-bd1f-40a0-967a-a63e35d2f869", - "faceMask": "default", - "maskImage": "", - "type": "MakeupFace", - "version": 2 - }, - { - "alpha": 1, - "componentID": 6, - "enabled": true, - "entityId": 18, - "mode": "multiply", - "type": "BlendMode", - "version": 2 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "type": "FaceTracking", - "enabled": true, - "entityId": 18, - "componentID": 7, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "" - }, - { - "type": "EntityIdentifier", - "name": "脸妆", - "id": 18 - } - ] - }, - { - "id": 19, - "name": "脸妆", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": false, - "enabled": true, - "entityId": 19, - "componentID": 8, - "objectEnabled": true - }, - { - "componentID": 9, - "enabled": true, - "entityId": 19, - "faceImage": "25c8cacf-0bca-496c-941b-bd28e7887f28", - "faceMask": "default", - "maskImage": "", - "type": "MakeupFace", - "version": 2 - }, - { - "alpha": 1, - "componentID": 10, - "enabled": true, - "entityId": 19, - "mode": "softlight", - "type": "BlendMode", - "version": 2 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "type": "FaceTracking", - "enabled": true, - "entityId": 19, - "componentID": 11, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "" - }, - { - "type": "EntityIdentifier", - "name": "脸妆", - "id": 19 - } - ] - }, - { - "id": 26, - "name": "脸妆", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": false, - "enabled": true, - "entityId": 26, - "componentID": 21, - "objectEnabled": true - }, - { - "componentID": 32, - "enabled": true, - "entityId": 26, - "faceImage": "5c864706-1374-4fbd-8625-75faea61c8a5", - "faceMask": "default", - "maskImage": "", - "type": "MakeupFace", - "version": 2 - }, - { - "alpha": 1, - "componentID": 33, - "enabled": true, - "entityId": 26, - "mode": "multiply", - "type": "BlendMode", - "version": 2 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "type": "FaceTracking", - "enabled": true, - "entityId": 26, - "componentID": 34, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "" - }, - { - "type": "EntityIdentifier", - "name": "脸妆", - "id": 26 - } - ] - }, - { - "id": 20, - "name": "唇彩", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": false, - "enabled": true, - "entityId": 20, - "componentID": 12, - "objectEnabled": true - }, - { - "closeMouseMask": "", - "componentID": 13, - "enabled": true, - "entityId": 20, - "lipsColor": "#ffffffff", - "lipsImage": "098e2ac2-064f-4919-a0ea-5e904cdf0594", - "lipsLut": "098e2ac2-064f-4919-a0ea-5e904cdf0594", - "lipsMask": "Default", - "lipsType": "Lut", - "openMouseMask": "", - "type": "MakeupLips", - "version": 24 - }, - { - "alpha": 1, - "mode": "normal", - "type": "BlendMode", - "enabled": true, - "entityId": 20, - "componentID": 14 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "type": "FaceTracking", - "enabled": true, - "entityId": 20, - "componentID": 15, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "" - }, - { - "type": "EntityIdentifier", - "name": "唇彩", - "id": 20 - } - ] - }, - { - "id": 21, - "name": "瞳孔", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": false, - "enabled": true, - "entityId": 21, - "componentID": 16, - "objectEnabled": true - }, - { - "componentID": 17, - "enabled": true, - "entityId": 21, - "irisImage": "6d22a115-58e9-423c-b0a2-d08694561a96", - "type": "MakeupIris", - "version": 2 - }, - { - "alpha": 1, - "mode": "normal", - "type": "BlendMode", - "enabled": true, - "entityId": 21, - "componentID": 18 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "type": "FaceTracking", - "enabled": true, - "entityId": 21, - "componentID": 19, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "" - }, - { - "type": "EntityIdentifier", - "name": "瞳孔", - "id": 21 - } - ] - }, - { - "id": 23, - "name": "滤镜", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": false, - "enabled": true, - "entityId": 23, - "componentID": 24, - "objectEnabled": true - }, - { - "componentID": 25, - "enabled": true, - "entityId": 23, - "src": "db158b9a-f787-4d85-ae5a-0597d37eae5b", - "type": "LUTFilter", - "version": 2, - "intensity": 1 - }, - { - "type": "EntityIdentifier", - "name": "滤镜", - "id": 23 - } - ] - }, - { - "id": 24, - "name": "音乐", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": false, - "enabled": true, - "entityId": 24, - "componentID": 26, - "objectEnabled": true - }, - { - "componentID": 27, - "enabled": true, - "entityId": 24, - "speed": 1, - "type": "AudioSource", - "version": 7, - "volume": 1, - "volumeEffects": [], - "audioSourceType": 1, - "src": "6abd1760-2f5b-4e24-90a7-30f255b00f82" - }, - { - "type": "EntityIdentifier", - "name": "音乐", - "id": 24 - } - ] - }, - { - "id": 25, - "name": "人脸跟随贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -275.9999755859375, - "right": 284.0000244140625, - "top": 150.99991455078126, - "bottom": -40.00008544921875 - }, - "pivot": { - "x": -0.014285801478794723, - "y": -0.5811509377045156 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "entityId": 25, - "objectEnabled": true, - "version": 60, - "enabled": true, - "componentID": 35 - }, - { - "componentID": 29, - "enabled": true, - "entityId": 25, - "scaleMode": 2, - "src": "1e6237d5-59d7-4d7a-a6e5-bc4f620c4ec7", - "type": "Image", - "version": 2 - }, - { - "alpha": 1, - "componentID": 30, - "enabled": true, - "entityId": 25, - "mode": "screen", - "type": "BlendMode", - "version": 2 - }, - { - "alignPoints": [ - 89 - ], - "componentID": 31, - "enabled": true, - "entityId": 25, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isAllFrameFaceDetect": false, - "isRefine": true, - "isWaitFirstFrameDetect": false, - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "type": "FaceTracking", - "version": 2, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "" - }, - { - "type": "EntityIdentifier", - "name": "人脸跟随贴纸", - "id": 25 - } - ] - } - ], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "entityId": 17, - "componentID": 2, - "type": "ScreenTransform", - "enabled": true, - "version": 4, - "objectEnabled": true - }, - { - "componentID": 3, - "enabled": true, - "entityId": 17, - "renderTargetKey": "RenderTarget", - "type": "Camera", - "version": 2 - }, - { - "type": "EntityIdentifier", - "name": "2D画板", - "id": 17 - } - ] - } - ], - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "entityId": 16, - "componentID": 1, - "type": "ScreenTransform", - "enabled": true, - "version": 4, - "objectEnabled": true - }, - { - "type": "EntityIdentifier", - "name": "videovideo_xuanmeizhuang", - "id": 16 - } - ], - "enabled": true, - "version": 0 - }, - "inputSources": { - "6abd1760-2f5b-4e24-90a7-30f255b00f82": { - "key": "6abd1760-2f5b-4e24-90a7-30f255b00f82", - "type": "AudioClipData", - "path": "bgm.mp3", - "rhythmPath": "", - "timeRange": { - "startTime": 0, - "duration": 54040000 - }, - "loopCount": -1 - }, - "RenderTarget": { - "key": "RenderTarget", - "type": "RenderTarget", - "path": "RenderTarget.rdt", - "label": "RenderTarget.rdt", - "inputKey": "DeviceCameraTexture" - }, - "DeviceCameraTexture": { - "key": "DeviceCameraTexture", - "type": "TextureData", - "path": "DeviceCameraTexture.tex", - "label": "DeviceCameraTexture.tex" - }, - "e00ad328-bd1f-40a0-967a-a63e35d2f869": { - "key": "e00ad328-bd1f-40a0-967a-a63e35d2f869", - "type": "ImageData", - "path": "multiply.png", - "label": "multiply.png" - }, - "25c8cacf-0bca-496c-941b-bd28e7887f28": { - "key": "25c8cacf-0bca-496c-941b-bd28e7887f28", - "type": "ImageData", - "path": "softlight.png", - "label": "softlight.png" - }, - "5c864706-1374-4fbd-8625-75faea61c8a5": { - "key": "5c864706-1374-4fbd-8625-75faea61c8a5", - "type": "ImageData", - "path": "eyemask.png", - "label": "eyemask.png" - }, - "098e2ac2-064f-4919-a0ea-5e904cdf0594": { - "key": "098e2ac2-064f-4919-a0ea-5e904cdf0594", - "type": "ImageData", - "path": "chuncai_lut.png", - "label": "chuncai_lut.png" - }, - "6d22a115-58e9-423c-b0a2-d08694561a96": { - "key": "6d22a115-58e9-423c-b0a2-d08694561a96", - "type": "ImageData", - "path": "iris_d_5.png", - "label": "iris_d_5.png" - }, - "db158b9a-f787-4d85-ae5a-0597d37eae5b": { - "key": "db158b9a-f787-4d85-ae5a-0597d37eae5b", - "type": "ImageData", - "path": "filterEffect.png", - "label": "filterEffect.png" - }, - "1e6237d5-59d7-4d7a-a6e5-bc4f620c4ec7": { - "key": "1e6237d5-59d7-4d7a-a6e5-bc4f620c4ec7", - "type": "ImageData", - "path": "fajia_0.png", - "label": "fajia_0.png" - }, - "ecd8c1c7-aaea-4074-a453-758f522814ae": { - "key": "ecd8c1c7-aaea-4074-a453-758f522814ae", - "type": "ImageData", - "path": "transparent.png", - "label": "transparent.png" - } - }, - "preset": {}, - "properties": { - "layout": { - "width": 720, - "height": 1280 - }, - "boundsTrackerPlaceHolders": [], - "musicIDs": [], - "fonts": [], - "movieConfig": { - "sourceType": 2, - "minClipAssetCount": 1, - "maxClipAssetCount": 999, - "minImageDuration": 1000000, - "maxImageDuration": 10000000, - "minVideoDuration": 2000000, - "preferredCoverTime": 1000000, - "originVolume": 1 - }, - "resourceIDs": [] - } -} \ No newline at end of file diff --git a/application/App-UIKit/2dMotionRes.bundle/video_xuanmeizhuang/template.png b/application/App-UIKit/2dMotionRes.bundle/video_xuanmeizhuang/template.png deleted file mode 100644 index c7f554c6..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_xuanmeizhuang/template.png and /dev/null differ diff --git a/application/App-UIKit/2dMotionRes.bundle/video_xuanmeizhuang/template.studio b/application/App-UIKit/2dMotionRes.bundle/video_xuanmeizhuang/template.studio deleted file mode 100644 index ea2e291e..00000000 --- a/application/App-UIKit/2dMotionRes.bundle/video_xuanmeizhuang/template.studio +++ /dev/null @@ -1,939 +0,0 @@ -{ - "name": "videovideo_xuanmeizhuang", - "type": "empty", - "author": "", - "category": 1, - "scene": { - "id": 16, - "name": "videovideo_xuanmeizhuang", - "children": [ - { - "id": 17, - "name": "2D画板", - "children": [ - { - "id": 18, - "name": "脸妆", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": false, - "enabled": true, - "entityId": 18, - "componentID": 4, - "objectEnabled": true - }, - { - "componentID": 5, - "enabled": true, - "entityId": 18, - "faceImage": "e00ad328-bd1f-40a0-967a-a63e35d2f869", - "faceMask": "default", - "maskImage": "", - "type": "MakeupFace", - "version": 2 - }, - { - "alpha": 1, - "componentID": 6, - "enabled": true, - "entityId": 18, - "mode": "multiply", - "type": "BlendMode", - "version": 2 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "type": "FaceTracking", - "enabled": true, - "entityId": 18, - "componentID": 7, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true - } - ] - }, - { - "id": 19, - "name": "脸妆", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": false, - "enabled": true, - "entityId": 19, - "componentID": 8, - "objectEnabled": true - }, - { - "componentID": 9, - "enabled": true, - "entityId": 19, - "faceImage": "25c8cacf-0bca-496c-941b-bd28e7887f28", - "faceMask": "default", - "maskImage": "", - "type": "MakeupFace", - "version": 2 - }, - { - "alpha": 1, - "componentID": 10, - "enabled": true, - "entityId": 19, - "mode": "softlight", - "type": "BlendMode", - "version": 2 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "type": "FaceTracking", - "enabled": true, - "entityId": 19, - "componentID": 11, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true - } - ] - }, - { - "id": 26, - "name": "脸妆", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": false, - "enabled": true, - "entityId": 26, - "componentID": 21, - "objectEnabled": true - }, - { - "componentID": 32, - "enabled": true, - "entityId": 26, - "faceImage": "5c864706-1374-4fbd-8625-75faea61c8a5", - "faceMask": "default", - "maskImage": "", - "type": "MakeupFace", - "version": 2 - }, - { - "alpha": 1, - "componentID": 33, - "enabled": true, - "entityId": 26, - "mode": "multiply", - "type": "BlendMode", - "version": 2 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "type": "FaceTracking", - "enabled": true, - "entityId": 26, - "componentID": 34, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true - } - ] - }, - { - "id": 20, - "name": "唇彩", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": false, - "enabled": true, - "entityId": 20, - "componentID": 12, - "objectEnabled": true - }, - { - "closeMouseMask": "", - "componentID": 13, - "enabled": true, - "entityId": 20, - "lipsColor": "#ffffffff", - "lipsImage": "098e2ac2-064f-4919-a0ea-5e904cdf0594", - "lipsLut": "098e2ac2-064f-4919-a0ea-5e904cdf0594", - "lipsMask": "Default", - "lipsType": "Lut", - "openMouseMask": "", - "type": "MakeupLips", - "version": 24 - }, - { - "alpha": 1, - "mode": "normal", - "type": "BlendMode", - "enabled": true, - "entityId": 20, - "componentID": 14 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "type": "FaceTracking", - "enabled": true, - "entityId": 20, - "componentID": 15, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true - } - ] - }, - { - "id": 21, - "name": "瞳孔", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": false, - "enabled": true, - "entityId": 21, - "componentID": 16, - "objectEnabled": true - }, - { - "componentID": 17, - "enabled": true, - "entityId": 21, - "irisImage": "6d22a115-58e9-423c-b0a2-d08694561a96", - "type": "MakeupIris", - "version": 2 - }, - { - "alpha": 1, - "mode": "normal", - "type": "BlendMode", - "enabled": true, - "entityId": 21, - "componentID": 18 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "type": "FaceTracking", - "enabled": true, - "entityId": 21, - "componentID": 19, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true - } - ] - }, - { - "id": 23, - "name": "滤镜", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": false, - "enabled": true, - "entityId": 23, - "componentID": 24, - "objectEnabled": true - }, - { - "componentID": 25, - "enabled": true, - "entityId": 23, - "src": "db158b9a-f787-4d85-ae5a-0597d37eae5b", - "type": "LUTFilter", - "version": 2, - "intensity": 1 - } - ] - }, - { - "id": 24, - "name": "音乐", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": false, - "enabled": true, - "entityId": 24, - "componentID": 26, - "objectEnabled": true - }, - { - "componentID": 27, - "eAudioMeta": { - "rhythmPath": "", - "startTime": 0, - "duration": 54040000, - "enableRhythm": true - }, - "eAudioType": 1, - "eHasVolumeEffects": false, - "eKey": "audioSource", - "enabled": true, - "entityId": 24, - "speed": 1, - "type": "AudioSource", - "version": 6, - "volume": 1, - "volumeEffects": [ - { - "duration": 2000000, - "eAlignMode": 2, - "end": 1, - "endOffset": 0, - "interpolationType": 1, - "start": 1, - "startOffset": 0 - } - ], - "ePath": "6abd1760-2f5b-4e24-90a7-30f255b00f82", - "audioSourceType": 1 - } - ] - }, - { - "id": 25, - "name": "人脸跟随贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -275.9999755859375, - "right": 284.0000244140625, - "top": 150.99991455078126, - "bottom": -40.00008544921875 - }, - "pivot": { - "x": -0.014285801478794723, - "y": -0.5811509377045156 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "entityId": 25, - "objectEnabled": true, - "version": 60, - "enabled": true, - "componentID": 35 - }, - { - "componentID": 29, - "enabled": true, - "entityId": 25, - "scaleMode": 2, - "src": "1e6237d5-59d7-4d7a-a6e5-bc4f620c4ec7", - "type": "Image", - "version": 2 - }, - { - "alpha": 1, - "componentID": 30, - "enabled": true, - "entityId": 25, - "mode": "screen", - "type": "BlendMode", - "version": 2 - }, - { - "alignPoints": [ - 89 - ], - "componentID": 31, - "enabled": true, - "entityId": 25, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isAllFrameFaceDetect": false, - "isRefine": true, - "isWaitFirstFrameDetect": false, - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "type": "FaceTracking", - "version": 2, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true - } - ] - } - ], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "entityId": 17, - "componentID": 2, - "type": "ScreenTransform", - "enabled": true, - "version": 4, - "objectEnabled": true - }, - { - "componentID": 3, - "enabled": true, - "entityId": 17, - "renderTargetKey": "RenderTarget", - "type": "Camera", - "version": 2 - } - ] - } - ], - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 0, - "x": 0, - "y": 0, - "z": 0 - }, - "entityId": 16, - "componentID": 1, - "type": "ScreenTransform", - "enabled": true, - "version": 4, - "objectEnabled": true - } - ], - "enabled": true, - "version": 0 - }, - "path": "/Users/congduan/Desktop/ptu/materials/aekit_materials/repo/wesee/videovideo_xuanmeizhuang/", - "resources": { - "items": [ - { - "key": "6abd1760-2f5b-4e24-90a7-30f255b00f82", - "type": "AudioClipData", - "path": "bgm.mp3", - "label": "bgm.mp3", - "timeRange": { - "startTime": 0, - "duration": 54047347 - }, - "loopCount": -1 - }, - { - "key": "098e2ac2-064f-4919-a0ea-5e904cdf0594", - "type": "ImageData", - "path": "chuncai_lut.png", - "label": "chuncai_lut.png" - }, - { - "key": "DeviceCameraTexture", - "type": "TextureData", - "path": "DeviceCameraTexture.tex", - "label": "DeviceCameraTexture.tex" - }, - { - "key": "5c864706-1374-4fbd-8625-75faea61c8a5", - "type": "ImageData", - "path": "eyemask.png", - "label": "eyemask.png" - }, - { - "key": "1e6237d5-59d7-4d7a-a6e5-bc4f620c4ec7", - "type": "ImageData", - "path": "fajia_0.png", - "label": "fajia_0.png" - }, - { - "key": "db158b9a-f787-4d85-ae5a-0597d37eae5b", - "type": "ImageData", - "path": "filterEffect.png", - "label": "filterEffect.png" - }, - { - "key": "6d22a115-58e9-423c-b0a2-d08694561a96", - "type": "ImageData", - "path": "iris_d_5.png", - "label": "iris_d_5.png" - }, - { - "key": "e00ad328-bd1f-40a0-967a-a63e35d2f869", - "type": "ImageData", - "path": "multiply.png", - "label": "multiply.png" - }, - { - "key": "RenderTarget", - "type": "RenderTarget", - "path": "RenderTarget.rdt", - "label": "RenderTarget.rdt", - "inputKey": "DeviceCameraTexture" - }, - { - "key": "25c8cacf-0bca-496c-941b-bd28e7887f28", - "type": "ImageData", - "path": "softlight.png", - "label": "softlight.png" - }, - { - "key": "ecd8c1c7-aaea-4074-a453-758f522814ae", - "type": "ImageData", - "path": "transparent.png", - "label": "transparent.png" - } - ] - }, - "cloudResourceData": [] -} \ No newline at end of file diff --git a/application/App-UIKit/2dMotionRes.bundle/video_xuanmeizhuang/transparent.png b/application/App-UIKit/2dMotionRes.bundle/video_xuanmeizhuang/transparent.png deleted file mode 100644 index 52ed0c71..00000000 Binary files a/application/App-UIKit/2dMotionRes.bundle/video_xuanmeizhuang/transparent.png and /dev/null differ diff --git a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/DeviceCameraTexture.tex b/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/DeviceCameraTexture.tex deleted file mode 100644 index 119ca577..00000000 --- a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/DeviceCameraTexture.tex +++ /dev/null @@ -1,4 +0,0 @@ -{ - "type": "TextureData", - "key": "DeviceCameraTexture" -} \ No newline at end of file diff --git a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/RenderTarget.rdt b/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/RenderTarget.rdt deleted file mode 100644 index a98616e9..00000000 --- a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/RenderTarget.rdt +++ /dev/null @@ -1 +0,0 @@ -{"type":"RenderTarget","path":"RenderTarget.rdt","key":"RenderTarget","input":"DeviceCameraTexture"} \ No newline at end of file diff --git a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/RenderTarget_camera_1.rdt b/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/RenderTarget_camera_1.rdt deleted file mode 100644 index 4a92dfd3..00000000 --- a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/RenderTarget_camera_1.rdt +++ /dev/null @@ -1 +0,0 @@ -{"type":"RenderTarget","key":"RenderTarget1","input":""} \ No newline at end of file diff --git a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/Soft_4TubeBank_2BlackFlags_ibl.ktx b/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/Soft_4TubeBank_2BlackFlags_ibl.ktx deleted file mode 100644 index 7fa9e767..00000000 Binary files a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/Soft_4TubeBank_2BlackFlags_ibl.ktx and /dev/null differ diff --git a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/XiKuangYanJing33-gltf/XiKuangYanJing33.gltf b/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/XiKuangYanJing33-gltf/XiKuangYanJing33.gltf deleted file mode 100644 index 9e6c6cf1..00000000 --- a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/XiKuangYanJing33-gltf/XiKuangYanJing33.gltf +++ /dev/null @@ -1,229 +0,0 @@ -{ - "accessors": [ - { - "bufferView": 0, - "componentType": 5126, - "count": 5719, - "max": [ - 0.08343115448951721, - 0.0617452971637249, - 0.11599591374397278 - ], - "min": [ - -0.08183712512254715, - 0.017235074192285538, - -0.016414370387792587 - ], - "type": "VEC3" - }, - { - "bufferView": 1, - "componentType": 5126, - "count": 5719, - "type": "VEC3" - }, - { - "bufferView": 2, - "componentType": 5126, - "count": 5719, - "type": "VEC2" - }, - { - "bufferView": 3, - "componentType": 5123, - "count": 26304, - "type": "SCALAR" - }, - { - "bufferView": 4, - "componentType": 5126, - "count": 116, - "max": [ - 0.05568782985210419, - 0.06096777319908142, - 0.1132718101143837 - ], - "min": [ - -0.05481778830289841, - 0.01766805350780487, - 0.10768774896860123 - ], - "type": "VEC3" - }, - { - "bufferView": 5, - "componentType": 5126, - "count": 116, - "type": "VEC3" - }, - { - "bufferView": 6, - "componentType": 5126, - "count": 116, - "type": "VEC2" - }, - { - "bufferView": 7, - "componentType": 5123, - "count": 327, - "type": "SCALAR" - } - ], - "asset": { - "generator": "Khronos glTF Blender I/O v1.2.75", - "version": "2.0" - }, - "bufferViews": [ - { - "buffer": 0, - "byteLength": 68628, - "byteOffset": 0 - }, - { - "buffer": 0, - "byteLength": 68628, - "byteOffset": 68628 - }, - { - "buffer": 0, - "byteLength": 45752, - "byteOffset": 137256 - }, - { - "buffer": 0, - "byteLength": 52608, - "byteOffset": 183008 - }, - { - "buffer": 0, - "byteLength": 1392, - "byteOffset": 235616 - }, - { - "buffer": 0, - "byteLength": 1392, - "byteOffset": 237008 - }, - { - "buffer": 0, - "byteLength": 928, - "byteOffset": 238400 - }, - { - "buffer": 0, - "byteLength": 656, - "byteOffset": 239328 - }, - { - "buffer": 0, - "byteLength": 246080, - "byteOffset": 239984 - } - ], - "buffers": [ - { - "byteLength": 486064, - "uri": "3dc27d57-26c4-4086-9ad8-10f1c999b17b" - } - ], - "images": [ - { - "name": "XiKuangYanJing_BaseColor", - "uri": "99cb25ad-c641-4e16-946c-f646b5f5f780" - } - ], - "materials": [ - { - "doubleSided": true, - "emissiveFactor": [ - 0, - 0, - 0 - ], - "name": "Mat.head", - "pbrMetallicRoughness": { - "baseColorFactor": [ - 0.27028611302375793, - 0.27028611302375793, - 0.27028611302375793, - 1 - ], - "metallicFactor": 0, - "roughnessFactor": 1 - } - }, - { - "alphaMode": "BLEND", - "doubleSided": true, - "emissiveFactor": [ - 0, - 0, - 0 - ], - "name": "Mat.Route666", - "pbrMetallicRoughness": { - "baseColorTexture": { - "index": 0, - "texCoord": 0 - }, - "metallicFactor": 0, - "roughnessFactor": 0.5 - } - } - ], - "meshes": [ - { - "name": "网格", - "primitives": [ - { - "attributes": { - "NORMAL": 1, - "POSITION": 0, - "TEXCOORD_0": 2 - }, - "indices": 3, - "material": 0 - } - ] - }, - { - "name": "网格.001", - "primitives": [ - { - "attributes": { - "NORMAL": 5, - "POSITION": 4, - "TEXCOORD_0": 6 - }, - "indices": 7, - "material": 1 - } - ] - } - ], - "nodes": [ - { - "mesh": 0, - "name": "XiKuangYanJing.001" - }, - { - "mesh": 1, - "name": "jk" - } - ], - "scene": 0, - "scenes": [ - { - "name": "Scene", - "nodes": [ - 0, - 1 - ] - } - ], - "textures": [ - { - "source": 0 - } - ] -} diff --git a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/XiKuangYanJing33-gltf/XiKuangYanJing33.prefab b/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/XiKuangYanJing33-gltf/XiKuangYanJing33.prefab deleted file mode 100644 index e2cd4bbc..00000000 --- a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/XiKuangYanJing33-gltf/XiKuangYanJing33.prefab +++ /dev/null @@ -1,298 +0,0 @@ -{ - "object_tree_root": { - "children": [ - { - "children": [ - { - "children": [ - { - "children": [], - "components": [ - { - "componentID": 0, - "enabled": true, - "entityId": 0, - "needReload": true, - "objectEnabled": true, - "paused": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "type": "BasicTransform", - "visible": true, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - } - }, - { - "componentID": 0, - "enabled": true, - "entityId": 0, - "layers": 1, - "needReload": true, - "paused": false, - "type": "LayerSetComponent" - }, - { - "componentID": 0, - "enabled": true, - "entityId": 0, - "meshIndex": 0, - "meshName": "网格", - "needReload": true, - "paused": false, - "primitiveConfigs": [ - { - "castShadow": true, - "materialResourceKey": "3e5c82fa-7cf5-42bf-b493-c665de1d0a25", - "meshResourceKey": "e4ef00fa-9790-46f4-bf19-0d5ee817f61a", - "primitiveIndex": 0, - "receiveShadow": true - } - ], - "skinned": false, - "type": "MeshRenderer3DComponent" - }, - { - "guid": "0d57c21c-5d04-42c1-ae13-3d5cf6f5ffa5", - "type": "PrefabEntityShadow", - "enabled": true - } - ], - "enabled": true, - "forbid": false, - "id": 0, - "name": "XiKuangYanJing.001" - }, - { - "children": [], - "components": [ - { - "componentID": 0, - "enabled": true, - "entityId": 0, - "needReload": true, - "objectEnabled": true, - "paused": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "type": "BasicTransform", - "visible": true, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - } - }, - { - "componentID": 0, - "enabled": true, - "entityId": 0, - "layers": 1, - "needReload": true, - "paused": false, - "type": "LayerSetComponent" - }, - { - "componentID": 0, - "enabled": true, - "entityId": 0, - "meshIndex": 1, - "meshName": "网格.001", - "needReload": true, - "paused": false, - "primitiveConfigs": [ - { - "castShadow": true, - "materialResourceKey": "470b7f69-b871-4c9f-9f8d-f0c1cf162321", - "meshResourceKey": "824f9a83-5343-4685-8b7c-eb0ffd6715c3", - "primitiveIndex": 0, - "receiveShadow": true - } - ], - "skinned": false, - "type": "MeshRenderer3DComponent" - }, - { - "guid": "0a416d49-26cf-42ed-873f-8cb8c940b953", - "type": "PrefabEntityShadow", - "enabled": true - } - ], - "enabled": true, - "forbid": false, - "id": 0, - "name": "jk" - } - ], - "components": [ - { - "componentID": 0, - "enabled": true, - "entityId": 0, - "needReload": true, - "objectEnabled": true, - "paused": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "type": "BasicTransform", - "visible": true, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - } - }, - { - "guid": "1757c08f-8ab0-4ea0-b54c-f5260cf6b8ba", - "type": "PrefabEntityShadow", - "enabled": true - } - ], - "enabled": true, - "forbid": false, - "id": 0, - "name": "Scene" - } - ], - "components": [ - { - "componentID": 0, - "enabled": true, - "entityId": 0, - "needReload": true, - "objectEnabled": true, - "paused": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "type": "BasicTransform", - "visible": true, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - } - }, - { - "guid": "5e363abf-710b-449b-8942-1971a48cd7eb", - "type": "PrefabEntityShadow", - "enabled": true - } - ], - "enabled": true, - "forbid": false, - "id": 0, - "name": "scenes" - } - ], - "components": [ - { - "componentID": 0, - "enabled": true, - "entityId": 0, - "needReload": true, - "objectEnabled": true, - "paused": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "type": "BasicTransform", - "visible": true, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - } - }, - { - "componentID": 0, - "enabled": true, - "entityId": 0, - "gltfResourceKey": "aeb43bf6-6044-4121-92da-a54ae6afb32d", - "needReload": true, - "paused": false, - "type": "GlbRenderComponent" - }, - { - "guid": "570349d8-706b-409d-a5df-e6ea0ee70135", - "type": "PrefabEntityShadow", - "enabled": true - } - ], - "enabled": true, - "forbid": true, - "id": 0, - "name": "XiKuangYanJing33(prefab)" - }, - "initialized": true -} \ No newline at end of file diff --git a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/XiKuangYanJing33-gltf/XiKuangYanJing33_data.bin b/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/XiKuangYanJing33-gltf/XiKuangYanJing33_data.bin deleted file mode 100644 index cdf9b78e..00000000 Binary files a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/XiKuangYanJing33-gltf/XiKuangYanJing33_data.bin and /dev/null differ diff --git a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/XiKuangYanJing33-gltf/images/XiKuangYanJing33_img0.png b/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/XiKuangYanJing33-gltf/images/XiKuangYanJing33_img0.png deleted file mode 100644 index 20362fb1..00000000 Binary files a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/XiKuangYanJing33-gltf/images/XiKuangYanJing33_img0.png and /dev/null differ diff --git a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/XiKuangYanJing33-gltf/materials/Mat.Route666.material b/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/XiKuangYanJing33-gltf/materials/Mat.Route666.material deleted file mode 100644 index 5ac409c3..00000000 --- a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/XiKuangYanJing33-gltf/materials/Mat.Route666.material +++ /dev/null @@ -1,264 +0,0 @@ -{ - "ao_enable_texture_": false, - "ao_index_": 0, - "ao_sampling_channel_": "r", - "ao_strength_": 1, - "base_color_enable_texture_": true, - "base_color_factor_": [ - 1, - 1, - 1, - 1 - ], - "base_color_index_": 0, - "base_color_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": true, - "uri_": "99cb25ad-c641-4e16-946c-f646b5f5f780" - }, - "base_color_texture_premultiplied_": false, - "base_color_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "blending_": "fade", - "clear_coat_enable_texture_": false, - "clear_coat_factor_": 0, - "clear_coat_index_": -1, - "clear_coat_normal_enable_texture_": false, - "clear_coat_normal_index_": -1, - "clear_coat_normal_scale_": 0, - "clear_coat_normal_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": false, - "uri_": "" - }, - "clear_coat_normal_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "clear_coat_roughness_enable_texture_": false, - "clear_coat_roughness_factor_": 0, - "clear_coat_roughness_index_": -1, - "clear_coat_roughness_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": false, - "uri_": "" - }, - "clear_coat_roughness_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "clear_coat_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": false, - "uri_": "" - }, - "clear_coat_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "color_write_": true, - "culling_mode_": "none", - "depth_culling_": true, - "depth_write_": true, - "double_side_": true, - "emissive_enable_texture_": false, - "emissive_enable_texture_color_multiply_": true, - "emissive_factor_": [ - 0, - 0, - 0, - 1 - ], - "emissive_index_": 0, - "emissive_strength_": 1, - "emissive_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": true, - "uri_": "" - }, - "emissive_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "flipUV_": false, - "metallic_factor_": 1, - "metallic_roughness_enable_texture_": false, - "metallic_roughness_index_": 0, - "metallic_roughness_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": false, - "uri_": "" - }, - "metallic_roughness_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "metallic_sampling_channel_": "b", - "normal_enable_g_reverse_": false, - "normal_enable_texture_": false, - "normal_index_": 0, - "normal_scale_": 1, - "normal_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": false, - "uri_": "" - }, - "normal_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "occlusion_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": false, - "uri_": "" - }, - "occlusion_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "roughness_factor_": 0.5, - "roughness_sampling_channel_": "g", - "shading_model_": "lit", - "specular_ambient_occlusion_": "simple", - "type_": "pbr", - "vertex_transform_": [ - 1, - 0, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 0, - 1 - ] -} \ No newline at end of file diff --git a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/XiKuangYanJing33-gltf/materials/Mat.head.material b/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/XiKuangYanJing33-gltf/materials/Mat.head.material deleted file mode 100644 index 5dd06310..00000000 --- a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/XiKuangYanJing33-gltf/materials/Mat.head.material +++ /dev/null @@ -1,263 +0,0 @@ -{ - "ao_enable_texture_": false, - "ao_index_": -1, - "ao_sampling_channel_": "r", - "ao_strength_": 1.0, - "base_color_enable_texture_": false, - "base_color_factor_": [ - 0.27028611302375793, - 0.27028611302375793, - 0.27028611302375793, - 1.0 - ], - "base_color_index_": -1, - "base_color_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": true, - "uri_": "" - }, - "base_color_texture_premultiplied_": false, - "base_color_uv_matrix_": [ - 1.0, - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 1.0 - ], - "blending_": "opaque", - "clear_coat_enable_texture_": false, - "clear_coat_factor_": 0.0, - "clear_coat_index_": -1, - "clear_coat_normal_enable_texture_": false, - "clear_coat_normal_index_": -1, - "clear_coat_normal_scale_": 0.0, - "clear_coat_normal_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": false, - "uri_": "" - }, - "clear_coat_normal_uv_matrix_": [ - 1.0, - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 1.0 - ], - "clear_coat_roughness_enable_texture_": false, - "clear_coat_roughness_factor_": 0.0, - "clear_coat_roughness_index_": -1, - "clear_coat_roughness_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": false, - "uri_": "" - }, - "clear_coat_roughness_uv_matrix_": [ - 1.0, - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 1.0 - ], - "clear_coat_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": false, - "uri_": "" - }, - "clear_coat_uv_matrix_": [ - 1.0, - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 1.0 - ], - "color_write_": true, - "culling_mode_": "back", - "depth_culling_": true, - "depth_write_": true, - "double_side_": true, - "emissive_enable_texture_": false, - "emissive_enable_texture_color_multiply_": true, - "emissive_factor_": [ - 0.0, - 0.0, - 0.0 - ], - "emissive_index_": -1, - "emissive_strength_": 1.0, - "emissive_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": true, - "uri_": "" - }, - "emissive_uv_matrix_": [ - 1.0, - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 1.0 - ], - "flipUV_": false, - "metallic_factor_": 0.0, - "metallic_roughness_enable_texture_": false, - "metallic_roughness_index_": -1, - "metallic_roughness_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": false, - "uri_": "" - }, - "metallic_roughness_uv_matrix_": [ - 1.0, - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 1.0 - ], - "metallic_sampling_channel_": "b", - "normal_enable_g_reverse_": false, - "normal_enable_texture_": false, - "normal_index_": -1, - "normal_scale_": 1.0, - "normal_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": false, - "uri_": "" - }, - "normal_uv_matrix_": [ - 1.0, - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 1.0 - ], - "occlusion_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": false, - "uri_": "" - }, - "occlusion_uv_matrix_": [ - 1.0, - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 1.0 - ], - "roughness_factor_": 1.0, - "roughness_sampling_channel_": "g", - "shading_model_": "lit", - "specular_ambient_occlusion_": "simple", - "type_": "pbr", - "vertex_transform_": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0 - ] -} diff --git a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/XiKuangYanJing33-gltf/meshes/0_0.mesh b/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/XiKuangYanJing33-gltf/meshes/0_0.mesh deleted file mode 100644 index e7582f1f..00000000 Binary files a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/XiKuangYanJing33-gltf/meshes/0_0.mesh and /dev/null differ diff --git a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/XiKuangYanJing33-gltf/meshes/1_0.mesh b/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/XiKuangYanJing33-gltf/meshes/1_0.mesh deleted file mode 100644 index 1137d628..00000000 Binary files a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/XiKuangYanJing33-gltf/meshes/1_0.mesh and /dev/null differ diff --git a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/bgm.mp3 b/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/bgm.mp3 deleted file mode 100644 index 0cf377ed..00000000 Binary files a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/bgm.mp3 and /dev/null differ diff --git a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/cropImage/lp_crop.png b/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/cropImage/lp_crop.png deleted file mode 100644 index ec164a5d..00000000 Binary files a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/cropImage/lp_crop.png and /dev/null differ diff --git a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/cropImage/yj_crop.png b/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/cropImage/yj_crop.png deleted file mode 100644 index 0c736886..00000000 Binary files a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/cropImage/yj_crop.png and /dev/null differ diff --git a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/cropImage/zc_Mask_crop.png b/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/cropImage/zc_Mask_crop.png deleted file mode 100644 index 2c2ea49a..00000000 Binary files a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/cropImage/zc_Mask_crop.png and /dev/null differ diff --git a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/cropImage/zc_crop.png b/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/cropImage/zc_crop.png deleted file mode 100644 index f7aed33a..00000000 Binary files a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/cropImage/zc_crop.png and /dev/null differ diff --git a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/flower-left.pag b/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/flower-left.pag deleted file mode 100644 index 6a38a808..00000000 Binary files a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/flower-left.pag and /dev/null differ diff --git a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/flower-right.pag b/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/flower-right.pag deleted file mode 100644 index 63c96ddd..00000000 Binary files a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/flower-right.pag and /dev/null differ diff --git a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/holiday-1.pag b/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/holiday-1.pag deleted file mode 100644 index 1837b604..00000000 Binary files a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/holiday-1.pag and /dev/null differ diff --git a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/holiday-2.pag b/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/holiday-2.pag deleted file mode 100644 index ec17cad1..00000000 Binary files a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/holiday-2.pag and /dev/null differ diff --git a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/imgui.ini b/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/imgui.ini deleted file mode 100644 index 4a5c2014..00000000 --- a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/imgui.ini +++ /dev/null @@ -1,5 +0,0 @@ -[Window][Debug##Default] -Pos=60,60 -Size=400,400 -Collapsed=0 - diff --git a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/lebombo_default/lebombo_default_ibl.ktx b/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/lebombo_default/lebombo_default_ibl.ktx deleted file mode 100644 index be7d0056..00000000 Binary files a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/lebombo_default/lebombo_default_ibl.ktx and /dev/null differ diff --git a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/lebombo_default/lebombo_default_skybox.ktx b/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/lebombo_default/lebombo_default_skybox.ktx deleted file mode 100644 index 4926abfe..00000000 Binary files a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/lebombo_default/lebombo_default_skybox.ktx and /dev/null differ diff --git a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/lebombo_default/wuyihuahua.mp3 b/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/lebombo_default/wuyihuahua.mp3 deleted file mode 100644 index 0cf377ed..00000000 Binary files a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/lebombo_default/wuyihuahua.mp3 and /dev/null differ diff --git a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/lp.png b/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/lp.png deleted file mode 100644 index ae1c0411..00000000 Binary files a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/lp.png and /dev/null differ diff --git a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/mt.png b/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/mt.png deleted file mode 100644 index b891c8a9..00000000 Binary files a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/mt.png and /dev/null differ diff --git a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/pbr.material b/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/pbr.material deleted file mode 100644 index b61d39ec..00000000 --- a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/pbr.material +++ /dev/null @@ -1,264 +0,0 @@ -{ - "ao_enable_texture_": false, - "ao_index_": 0, - "ao_sampling_channel_": "r", - "ao_strength_": 1, - "base_color_enable_texture_": false, - "base_color_factor_": [ - 0.09019607843137255, - 0.07058823529411765, - 0.06666666666666667, - 1 - ], - "base_color_index_": 0, - "base_color_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": true, - "uri_": "" - }, - "base_color_texture_premultiplied_": false, - "base_color_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "blending_": "opaque", - "clear_coat_enable_texture_": false, - "clear_coat_factor_": 0, - "clear_coat_index_": -1, - "clear_coat_normal_enable_texture_": false, - "clear_coat_normal_index_": -1, - "clear_coat_normal_scale_": 0, - "clear_coat_normal_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": false, - "uri_": "" - }, - "clear_coat_normal_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "clear_coat_roughness_enable_texture_": false, - "clear_coat_roughness_factor_": 0, - "clear_coat_roughness_index_": -1, - "clear_coat_roughness_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": false, - "uri_": "" - }, - "clear_coat_roughness_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "clear_coat_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": false, - "uri_": "" - }, - "clear_coat_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "color_write_": true, - "culling_mode_": "back", - "depth_culling_": true, - "depth_write_": true, - "double_side_": false, - "emissive_enable_texture_": false, - "emissive_enable_texture_color_multiply_": true, - "emissive_factor_": [ - 0, - 0, - 0, - 1 - ], - "emissive_index_": 0, - "emissive_strength_": 1, - "emissive_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": true, - "uri_": "" - }, - "emissive_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "flipUV_": false, - "metallic_factor_": 0.88, - "metallic_roughness_enable_texture_": false, - "metallic_roughness_index_": 0, - "metallic_roughness_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": false, - "uri_": "" - }, - "metallic_roughness_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "metallic_sampling_channel_": "b", - "normal_enable_g_reverse_": false, - "normal_enable_texture_": false, - "normal_index_": 0, - "normal_scale_": 1, - "normal_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": false, - "uri_": "" - }, - "normal_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "occlusion_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": false, - "uri_": "" - }, - "occlusion_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "roughness_factor_": 0.32, - "roughness_sampling_channel_": "g", - "shading_model_": "lit", - "specular_ambient_occlusion_": "simple", - "type_": "pbr", - "vertex_transform_": [ - 1, - 0, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 0, - 1 - ] -} \ No newline at end of file diff --git a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/pbr_1.material b/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/pbr_1.material deleted file mode 100644 index 4ac0bad3..00000000 --- a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/pbr_1.material +++ /dev/null @@ -1,264 +0,0 @@ -{ - "ao_enable_texture_": false, - "ao_index_": 0, - "ao_sampling_channel_": "r", - "ao_strength_": 1, - "base_color_enable_texture_": false, - "base_color_factor_": [ - 1, - 1, - 1, - 1 - ], - "base_color_index_": 0, - "base_color_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": true, - "uri_": "" - }, - "base_color_texture_premultiplied_": false, - "base_color_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "blending_": "masked", - "clear_coat_enable_texture_": false, - "clear_coat_factor_": 0, - "clear_coat_index_": -1, - "clear_coat_normal_enable_texture_": false, - "clear_coat_normal_index_": -1, - "clear_coat_normal_scale_": 0, - "clear_coat_normal_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": false, - "uri_": "" - }, - "clear_coat_normal_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "clear_coat_roughness_enable_texture_": false, - "clear_coat_roughness_factor_": 0, - "clear_coat_roughness_index_": -1, - "clear_coat_roughness_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": false, - "uri_": "" - }, - "clear_coat_roughness_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "clear_coat_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": false, - "uri_": "" - }, - "clear_coat_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "color_write_": false, - "culling_mode_": "back", - "depth_culling_": true, - "depth_write_": true, - "double_side_": false, - "emissive_enable_texture_": false, - "emissive_enable_texture_color_multiply_": true, - "emissive_factor_": [ - 0, - 0, - 0, - 1 - ], - "emissive_index_": 0, - "emissive_strength_": 1, - "emissive_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": true, - "uri_": "" - }, - "emissive_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "flipUV_": false, - "metallic_factor_": 1, - "metallic_roughness_enable_texture_": false, - "metallic_roughness_index_": 0, - "metallic_roughness_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": false, - "uri_": "" - }, - "metallic_roughness_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "metallic_sampling_channel_": "b", - "normal_enable_g_reverse_": false, - "normal_enable_texture_": false, - "normal_index_": 0, - "normal_scale_": 1, - "normal_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": false, - "uri_": "" - }, - "normal_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "occlusion_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": false, - "uri_": "" - }, - "occlusion_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "roughness_factor_": 0, - "roughness_sampling_channel_": "g", - "shading_model_": "lit", - "specular_ambient_occlusion_": "simple", - "type_": "pbr", - "vertex_transform_": [ - 1, - 0, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 0, - 1 - ] -} \ No newline at end of file diff --git a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/scripts/250.flow.js b/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/scripts/250.flow.js deleted file mode 100644 index bb9e93bc..00000000 --- a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/scripts/250.flow.js +++ /dev/null @@ -1,47 +0,0 @@ -/*** light-js-config -//@requireAbility -***/ -/* 该脚本流程面板生成 */ -// 开始 Flow 生成代码 -let parentId = []; -function bindLightAssetFragmentRootEntityId(entityId){ - if(typeof light.parentId === 'undefined'){ - light.parentId = []; - } - parentId.push(entityId); -} -light.on('start',function (entityManager, eventManager, scriptSystem) { - let localParentId = parentId.shift(); - let getRuntimeID = function(id){ - if(typeof localParentId === 'undefined'){ - return id; - }else{ - return light.EntityUtils.GetRuntimeEntityByID(entityManager, localParentId, id).id; - } - } - var context = new light.NodeContext(entityManager, eventManager, scriptSystem); - // 实例化 - let code_SwitchObject_2 = context.create("code/SwitchObject"); - code_SwitchObject_2.id = "2"; - let code_Start_1 = context.create("code/Start"); - code_Start_1.id = "1"; - let code_SwitchObject_4 = context.create("code/SwitchObject"); - code_SwitchObject_4.id = "4"; - let code_play_3 = context.create("code/play"); - code_play_3.id = "3"; - // 属性赋值 - code_SwitchObject_2.entityToDisplay = []; - code_SwitchObject_2.entityToHide = [13]; - code_SwitchObject_4.entityToDisplay = [13]; - code_SwitchObject_4.entityToHide = []; - code_play_3.entityId = getRuntimeID(9); - code_play_3.loopType = "固定数字"; - code_play_3.playtimes = 1; - code_play_3.keepLastFrame = false; - // 数据连接 - // 事件连接 - context.connectEvent(code_Start_1, "Run", code_SwitchObject_2, "Run") - context.connectEvent(code_play_3, "Next", code_SwitchObject_4, "Run") - context.connectEvent(code_Start_1, "Run", code_play_3, "Run") - code_Start_1.Run(); -}); \ No newline at end of file diff --git a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/scripts/light.js b/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/scripts/light.js deleted file mode 100644 index f8689526..00000000 --- a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/scripts/light.js +++ /dev/null @@ -1,7779 +0,0 @@ - -/*** light-js-config - //@requireAbility -***/ - -(function (light) { - if(light.studioLibLoaded) { - return; - } - light.studioLibLoaded = true; -var SDKRuntime = /** @class */ (function () { - function SDKRuntime() { - this.currentTime = 0; - this.behaviors = []; - } - SDKRuntime.prototype.initialize = function (entityManager, eventManager, scriptSystem) { - var _this = this; - var entities = entityManager.entitiesWithComponents(light.ScriptBehaviors.componentType); - entities.forEach(function (entity) { - var idComponent = entity.getComponent(light.EntityIdentifier); - var lightBehaviorComponent = entity.getComponent(light.ScriptBehaviors); - console.log("JS::lightBehaviorComponent: " + JSON.stringify(lightBehaviorComponent)); - if (!lightBehaviorComponent) { - return; - } - lightBehaviorComponent.behaviorProperties.forEach(function (behaviorPropertiesJson) { - console.log("JS::behaviorPropertiesJson: " + behaviorPropertiesJson); - var behaviorProperties = JSON.parse(behaviorPropertiesJson); - var BehaviorClass = SDKRuntime.BehaviorClasses[behaviorProperties.type]; - if (!BehaviorClass) { - return; - } - var behavior = new BehaviorClass(idComponent.id, entityManager, eventManager, scriptSystem); - Object.assign(behavior, behaviorProperties); - _this.addBehavior(behavior); - }); - }); - this.behaviors.forEach(function (b) { - if (b.configure) { - b.configure(); - } - }); - var maps = light.NodeContext.getAllNodesMap(); - light.FlowNodeClasses.forEach(function (node) { - if (!maps[node.definition.meta.nodeType]) { - node.nodeType = node.definition.meta.nodeType; - light.NodeContext.unregisterNode(node.nodeType); - light.NodeContext.registerNode(node); - } - }); - }; - SDKRuntime.prototype.addBehavior = function (it) { - this.behaviors.push(it); - }; - SDKRuntime.prototype.removeBehavior = function (it) { - var index = this.behaviors.indexOf(it); - if (index >= 0) { - this.behaviors.splice(index, 1); - } - }; - SDKRuntime.prototype.update = function (time, entityManager, eventManager) { - this.currentTime = time; - this.behaviors.forEach(function (b) { - if (b.enabled === false || b.destroyed) { - return; - } - b.entityManager = entityManager; - b.eventManager = eventManager; - if (b.update) { - b.update(time); - } - }); - }; - SDKRuntime.prototype.destroy = function () { - this.behaviors.forEach(function (b) { var _a; return (_a = b.destroy) === null || _a === void 0 ? void 0 : _a.call(b); }); - }; - SDKRuntime.BehaviorClasses = {}; - return SDKRuntime; -}()); -light.SDKRuntime = SDKRuntime; -light.runtime = new SDKRuntime(); -var BaseBehavior = /** @class */ (function () { - function BaseBehavior(entityId, entityManager, eventManager, scriptSystem) { - this.enabled = true; - this.destroyed = false; - this._entity = undefined; - this.entityId = entityId; - this.eventManager = eventManager; - this.entityManager = entityManager; - this.scriptSystem = scriptSystem; - this._entity = this.entityManager.getEntityById(this.entityId); - light.runtime.addBehavior(this); - } - Object.defineProperty(BaseBehavior.prototype, "entity", { - get: function () { - return this.entityManager.getEntityById(this.entityId); - }, - enumerable: false, - configurable: true - }); - BaseBehavior.prototype.destroy = function () { - this.destroyed = true; - this.enabled = false; - light.runtime.removeBehavior(this); - }; - BaseBehavior.definition = null; - return BaseBehavior; -}()); -light.BaseBehavior = BaseBehavior; -light.Behavior = function (definition) { - return function _Behavior(constructor) { - var selfProps = (constructor.prototype._definition - || {}); - var superProps = JSON.parse(JSON.stringify(constructor.definition || {})); - if (!definition.properties) { - definition.properties = []; - } - constructor.definition = definition; - definition.properties = definition.properties - .concat(superProps.properties || []) - .concat(selfProps.properties || []); - delete constructor.prototype._definition; - Object.defineProperty(constructor.prototype, 'definition', { - get: function () { - return constructor.definition; - }, - }); - SDKRuntime.BehaviorClasses[definition.type] = constructor; - return constructor; - }; -}; -light.Property = function Property(type) { - return function (target, propertyKey) { - var proto = target; - if (!proto._definition) { - proto._definition = { - type: 'object', - properties: [], - }; - } - type.name = propertyKey; - if (type.editable !== false) { - type.editable = true; - } - proto._definition.properties.push(type); - }; -}; -var GestureAction; -(function (GestureAction) { - GestureAction[GestureAction["HEART"] = 0] = "HEART"; - GestureAction[GestureAction["PAPER"] = 1] = "PAPER"; - GestureAction[GestureAction["SCISSOR"] = 2] = "SCISSOR"; - GestureAction[GestureAction["FIST"] = 3] = "FIST"; - GestureAction[GestureAction["ONE"] = 4] = "ONE"; - GestureAction[GestureAction["LOVE"] = 5] = "LOVE"; - GestureAction[GestureAction["LIKE"] = 6] = "LIKE"; - GestureAction[GestureAction["OK"] = 7] = "OK"; - GestureAction[GestureAction["ROCK"] = 8] = "ROCK"; - GestureAction[GestureAction["SIX"] = 9] = "SIX"; - GestureAction[GestureAction["EIGHT"] = 10] = "EIGHT"; - GestureAction[GestureAction["LIFT"] = 11] = "LIFT"; - GestureAction[GestureAction["CONGRATULATE"] = 12] = "CONGRATULATE"; -})(GestureAction || (GestureAction = {})); -light.GestureAction = GestureAction; -var FaceAction; -(function (FaceAction) { - FaceAction[FaceAction["FaceDetected"] = 0] = "FaceDetected"; - FaceAction[FaceAction["OpenMouth"] = 1] = "OpenMouth"; - FaceAction[FaceAction["BlinkEyebrow"] = 2] = "BlinkEyebrow"; - FaceAction[FaceAction["BlinkEye"] = 3] = "BlinkEye"; - FaceAction[FaceAction["ShakeHead"] = 4] = "ShakeHead"; - FaceAction[FaceAction["Kiss"] = 5] = "Kiss"; - FaceAction[FaceAction["BlinkLeftEye"] = 6] = "BlinkLeftEye"; - FaceAction[FaceAction["BlinkRightEye"] = 7] = "BlinkRightEye"; - FaceAction[FaceAction["Nod"] = 8] = "Nod"; - FaceAction[FaceAction["Smile"] = 9] = "Smile"; - FaceAction[FaceAction["MouthOccluded"] = 10] = "MouthOccluded"; - FaceAction[FaceAction["LeftEyeOccluded"] = 11] = "LeftEyeOccluded"; - FaceAction[FaceAction["RightEyeOccluded"] = 12] = "RightEyeOccluded"; - FaceAction[FaceAction["DoubleEyeOccluded"] = 13] = "DoubleEyeOccluded"; -})(FaceAction || (FaceAction = {})); -light.FaceAction = FaceAction; -var NodeClasses = {}; -light.NodeContext = /** @class */ (function () { - function NodeContext(entityManager, eventManager, scriptSystem) { - this.entityManager = entityManager; - this.eventManager = eventManager; - this.scriptSystem = scriptSystem; - } - NodeContext.registerNode = function (clazz) { - NodeClasses[clazz.nodeType] = clazz; - }; - NodeContext.unregisterNode = function (nodeType) { - if (NodeClasses[nodeType]) { - delete NodeClasses[nodeType]; - } - }; - NodeContext.getAllNodesMap = function () { - return NodeClasses; - }; - NodeContext.prototype.create = function (type) { - var Clazz = NodeClasses[type]; - if (Clazz) { - var it_1 = new Clazz(); - it_1.entityManager = this.entityManager; - it_1.eventManager = this.eventManager; - it_1.scriptSystem = this.scriptSystem; - return it_1; - } - console.log("Cannot find node: " + type); - }; - NodeContext.prototype.connectData = function (source, property, target, targetProperty) { - var descriptor = { - configurable: true, - enumerable: true, - get: function () { - return source["_studio_" + property]; - }, - set: function (val) { - source["_studio_" + property] = val; - // set值的时候 会触发函数 - var tasks = source['outputArray']; - tasks.forEach(function (task) { return task(); }); - }, - }; - source["_studio_" + property] = source[property]; - Object.defineProperty(source, property, descriptor); - if (!source['outputArray']) { - source['outputArray'] = []; - } - var tasks = source['outputArray']; - var task = function () { - if (light.sendLightCommand) { - light.sendLightCommand(source, property, target, targetProperty, JSON.stringify(source[property])); - } - target[targetProperty] = source[property]; - if (target['Process'] != undefined) { - target['Process'](); - } - }; - tasks.push(task); - }; - NodeContext.prototype.connectEvent = function (source, property, target, targetProperty) { - var propertyTasksName = property + "Tasks__"; - if (!source[propertyTasksName]) { - // 重写应该基于 instance - var descriptor = { - configurable: true, - enumerable: true, - value: function () { - var tasks = this[propertyTasksName]; - tasks.forEach(function (task) { return task(); }); - }, - }; - Object.defineProperty(source, property, descriptor); - source[propertyTasksName] = []; - } - var tasks = source[propertyTasksName]; - var task = function () { - if (light.sendLightCommand) { - light.sendLightCommand(source, property, target, targetProperty); - } - target[targetProperty](); - }; - tasks.push(task); - }; - return NodeContext; -}()); -light.FlowNodeClasses = light.FlowNodeClasses || []; -light['afterconfigure'] = function (entityManager, eventManager, scriptSystem) { - var _a; - (_a = light.BehaviorClasses) === null || _a === void 0 ? void 0 : _a.forEach(function (clazz) { - light.SDKRuntime.BehaviorClasses[clazz.definition.type] = clazz; - }); - light.runtime.initialize(entityManager, eventManager, scriptSystem); - light.emit('start', entityManager, eventManager, scriptSystem); -}; -function update(time, entityManager, eventManager) { - light.runtime.update(time, entityManager, eventManager); - light.emit('update', time, entityManager, eventManager); -} -light.getCurrentTime = function () { - return light.runtime.currentTime; -}; -light.update = update; -light.receive = function (event) { - console.log(event.type()); - if (event.type() === 'CustomDataEvent') { - var cEvent = event; - light.emit(cEvent.event_type, JSON.parse(cEvent.json_data)); - } - else { - light.emit(event.type(), event); - } -}; - -/*! ***************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */ -/* global Reflect, Promise */ - -var extendStatics = function(d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); -}; - -function __extends(d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -} - -var FaceAction$1; -(function (FaceAction) { - FaceAction[FaceAction["FaceDetected"] = 0] = "FaceDetected"; - FaceAction[FaceAction["OpenMouth"] = 1] = "OpenMouth"; - FaceAction[FaceAction["BlinkEyebrow"] = 2] = "BlinkEyebrow"; - FaceAction[FaceAction["BlinkEye"] = 3] = "BlinkEye"; - FaceAction[FaceAction["ShakeHead"] = 4] = "ShakeHead"; - FaceAction[FaceAction["Kiss"] = 5] = "Kiss"; - FaceAction[FaceAction["BlinkLeftEye"] = 6] = "BlinkLeftEye"; - FaceAction[FaceAction["BlinkRightEye"] = 7] = "BlinkRightEye"; - FaceAction[FaceAction["Nod"] = 8] = "Nod"; - FaceAction[FaceAction["Smile"] = 9] = "Smile"; - FaceAction[FaceAction["MouthOccluded"] = 10] = "MouthOccluded"; - FaceAction[FaceAction["LeftEyeOccluded"] = 11] = "LeftEyeOccluded"; - FaceAction[FaceAction["RightEyeOccluded"] = 12] = "RightEyeOccluded"; - FaceAction[FaceAction["DoubleEyeOccluded"] = 13] = "DoubleEyeOccluded"; -})(FaceAction$1 || (FaceAction$1 = {})); -var GestureAction$1; -(function (GestureAction) { - GestureAction[GestureAction["HEART"] = 0] = "HEART"; - GestureAction[GestureAction["PAPER"] = 1] = "PAPER"; - GestureAction[GestureAction["SCISSOR"] = 2] = "SCISSOR"; - GestureAction[GestureAction["FIST"] = 3] = "FIST"; - GestureAction[GestureAction["ONE"] = 4] = "ONE"; - GestureAction[GestureAction["LOVE"] = 5] = "LOVE"; - GestureAction[GestureAction["LIKE"] = 6] = "LIKE"; - GestureAction[GestureAction["OK"] = 7] = "OK"; - GestureAction[GestureAction["ROCK"] = 8] = "ROCK"; - GestureAction[GestureAction["SIX"] = 9] = "SIX"; - GestureAction[GestureAction["EIGHT"] = 10] = "EIGHT"; - GestureAction[GestureAction["LIFT"] = 11] = "LIFT"; - GestureAction[GestureAction["CONGRATULATE"] = 12] = "CONGRATULATE"; -})(GestureAction$1 || (GestureAction$1 = {})); -// 记录一次流程生命周期已开启的AI能力 -var enabledAI = []; -function openAIFeature(features, entityManager, eventManager) { - var aiRequire = new light.VectorString(); - features === null || features === void 0 ? void 0 : features.forEach(function (feature) { - if (enabledAI.indexOf(feature) === -1) { - aiRequire.add(feature); - enabledAI.push(feature); - } - }); - if (aiRequire.size() > 0) { - var event = new light.ScriptOpenAIEvent(entityManager, aiRequire); - eventManager.emit(event); - } -} -function getAIDataFromAIDataCenter(features, entityManager) { - var results = []; - features === null || features === void 0 ? void 0 : features.forEach(function (feature) { - var featureAIResult = []; - var AIData = light.AIDataUtils.GetAIDataFromAIDataCenter(entityManager, feature); - for (var i = 0; i < AIData.size(); i++) { - var aiDetectData = AIData.get(i); - var detectParams = {}; - var AIDetectNames = aiDetectData.detect_params_.getKeys(); - for (var j = 0; j < AIDetectNames.size(); j++) { - var AIDetectName = AIDetectNames.get(j); - var AIDetectResultList = aiDetectData.detect_params_.get(AIDetectName); - var AIDetectResults = []; - for (var k = 0; k < AIDetectResultList.size(); k++) { - AIDetectResults.push(AIDetectResultList.get(k)); - } - detectParams[AIDetectName] = AIDetectResults; - } - var jsAIDetectData = { - aiType: aiDetectData.ai_type_, - traceID: aiDetectData.trace_id_, - detectParams: detectParams, - }; - featureAIResult.push(jsAIDetectData); - } - results.push(featureAIResult); - }); - return results; -} -function getAIClassData(features, entityManager) { - var aiClassData = {}; - features === null || features === void 0 ? void 0 : features.forEach(function (feature) { - var datas = light.AIDataUtils.GetJsEventListFromAIDataCenter(entityManager, feature); - var keys = datas.getKeys(); - for (var i = 0; i < keys.size(); i++) { - var key = keys.get(i); - var value = JSON.parse(datas.get(key)); - aiClassData[key] = value; - } - }); - return aiClassData; -} -function getAIPointData(feature, entityManager) { - var datas = light.AIDataUtils.GetAIPointDataFromAIDataCenter(entityManager, feature); - var res = []; - for (var i = 0; i < datas.size(); i++) { - var data = JSON.parse(JSON.stringify(datas.get(i))); - var points = []; - var pointsData = datas.get(i)['point_array_']; - if (pointsData === null || pointsData === void 0 ? void 0 : pointsData.size()) { - for (var j = 0; j < pointsData.size(); j++) { - points.push(pointsData.get(j)); - } - data.point_array_ = points; - } - res.push(data); - } - return res; -} -function actionNameToEvent(name) { - var str = name.toLowerCase(); - str = str.replace(/^\S/, function (s) { return s.toUpperCase(); }); - return "on" + str; -} - -var Node = /** @class */ (function () { - function Node() { - } - Node.prototype.addListener = function (name, func) { - var bindFunc = func.bind(this); - if (!this.bindFuncs) { - this.bindFuncs = []; - } - this.bindFuncs.push(bindFunc); - // @ts-ignore - light.on(name, bindFunc); - }; - Node.prototype.removeListener = function (name) { - if (this.bindFuncs && this.bindFuncs.length > 0) { - this.bindFuncs.forEach(function (bindFunc) { - light.removeListener(name, bindFunc); - }); - this.bindFuncs = []; - } - }; - Node.prototype.getEntityById = function (entityId) { - if (typeof (entityId) !== 'number') { - return undefined; - } - return this.entityManager.getEntityById(entityId); - }; - return Node; -}()); -var EventNode = /** @class */ (function (_super) { - __extends(EventNode, _super); - function EventNode() { - return _super !== null && _super.apply(this, arguments) || this; - } - return EventNode; -}(Node)); -var DataProcessNode = /** @class */ (function (_super) { - __extends(DataProcessNode, _super); - function DataProcessNode() { - return _super !== null && _super.apply(this, arguments) || this; - } - return DataProcessNode; -}(Node)); -var AITriggerNode = /** @class */ (function (_super) { - __extends(AITriggerNode, _super); - function AITriggerNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - // 是否已触发 - _this.triggered = false; - return _this; - } - AITriggerNode.prototype.Run = function () { - openAIFeature(this.features, this.entityManager, this.eventManager); - light.on('update', this.update.bind(this)); - }; - AITriggerNode.prototype.update = function () { - if (this.shouldTrigger()) { - this.on(); - if (!this.triggered) { - this.detected(); - } - this.triggered = true; - } - else { - this.off(); - if (this.triggered) { - this.lost(); - } - this.triggered = false; - } - }; - // 有时触发 - AITriggerNode.prototype.on = function () { }; - // 无时触发 - AITriggerNode.prototype.off = function () { }; - // 从无到有时触发 - AITriggerNode.prototype.detected = function () { }; - // 从有到无时触发 - AITriggerNode.prototype.lost = function () { }; - return AITriggerNode; -}(EventNode)); - -/** - * @author alteredq / http://alteredqualia.com/ - * @author mrdoob / http://mrdoob.com/ - * @author WestLangley / http://github.com/WestLangley - * @author thezwap - */ -var _lut = []; - -for (var i = 0; i < 256; i++) { - _lut[i] = (i < 16 ? '0' : '') + i.toString(16); -} - -var MathUtils = { - DEG2RAD: Math.PI / 180, - RAD2DEG: 180 / Math.PI, - generateUUID: function generateUUID() { - // http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/21963136#21963136 - var d0 = Math.random() * 0xffffffff | 0; - var d1 = Math.random() * 0xffffffff | 0; - var d2 = Math.random() * 0xffffffff | 0; - var d3 = Math.random() * 0xffffffff | 0; - var uuid = "".concat(_lut[d0 & 0xff] + _lut[d0 >> 8 & 0xff] + _lut[d0 >> 16 & 0xff] + _lut[d0 >> 24 & 0xff], "-").concat(_lut[d1 & 0xff]).concat(_lut[d1 >> 8 & 0xff], "-").concat(_lut[d1 >> 16 & 0x0f | 0x40]).concat(_lut[d1 >> 24 & 0xff], "-").concat(_lut[d2 & 0x3f | 0x80]).concat(_lut[d2 >> 8 & 0xff], "-").concat(_lut[d2 >> 16 & 0xff]).concat(_lut[d2 >> 24 & 0xff]).concat(_lut[d3 & 0xff]).concat(_lut[d3 >> 8 & 0xff]).concat(_lut[d3 >> 16 & 0xff]).concat(_lut[d3 >> 24 & 0xff]); // .toUpperCase() here flattens concatenated strings to save heap memory space. - - return uuid.toUpperCase(); - }, - clamp: function clamp(value, min, max) { - return Math.max(min, Math.min(max, value)); - }, - // compute euclidian modulo of m % n - // https://en.wikipedia.org/wiki/Modulo_operation - euclideanModulo: function euclideanModulo(n, m) { - return (n % m + m) % m; - }, - // Linear mapping from range to range - mapLinear: function mapLinear(x, a1, a2, b1, b2) { - return b1 + (x - a1) * (b2 - b1) / (a2 - a1); - }, - // https://en.wikipedia.org/wiki/Linear_interpolation - lerp: function lerp(x, y, t) { - return (1 - t) * x + t * y; - }, - // http://en.wikipedia.org/wiki/Smoothstep - smoothstep: function smoothstep(x, min, max) { - if (x <= min) return 0; - if (x >= max) return 1; - x = (x - min) / (max - min); - return x * x * (3 - 2 * x); - }, - smootherstep: function smootherstep(x, min, max) { - if (x <= min) return 0; - if (x >= max) return 1; - x = (x - min) / (max - min); - return x * x * x * (x * (x * 6 - 15) + 10); - }, - // Random integer from interval - randInt: function randInt(low, high) { - return low + Math.floor(Math.random() * (high - low + 1)); - }, - // Random float from interval - randFloat: function randFloat(low, high) { - return low + Math.random() * (high - low); - }, - // Random float from <-range/2, range/2> interval - randFloatSpread: function randFloatSpread(range) { - return range * (0.5 - Math.random()); - }, - degToRad: function degToRad(degrees) { - return degrees * MathUtils.DEG2RAD; - }, - radToDeg: function radToDeg(radians) { - return radians * MathUtils.RAD2DEG; - }, - isPowerOfTwo: function isPowerOfTwo(value) { - return (value & value - 1) === 0 && value !== 0; - }, - ceilPowerOfTwo: function ceilPowerOfTwo(value) { - return Math.pow(2, Math.ceil(Math.log(value) / Math.LN2)); - }, - floorPowerOfTwo: function floorPowerOfTwo(value) { - return Math.pow(2, Math.floor(Math.log(value) / Math.LN2)); - }, - setQuaternionFromProperEuler: function setQuaternionFromProperEuler(q, a, b, c, order) { - // Intrinsic Proper Euler Angles - see https://en.wikipedia.org/wiki/Euler_angles - // rotations are applied to the axes in the order specified by 'order' - // rotation by angle 'a' is applied first, then by angle 'b', then by angle 'c' - // angles are in radians - var cos = Math.cos; - var sin = Math.sin; - var c2 = cos(b / 2); - var s2 = sin(b / 2); - var c13 = cos((a + c) / 2); - var s13 = sin((a + c) / 2); - var c1_3 = cos((a - c) / 2); - var s1_3 = sin((a - c) / 2); - var c3_1 = cos((c - a) / 2); - var s3_1 = sin((c - a) / 2); - - switch (order) { - case 'XYX': - q.set(c2 * s13, s2 * c1_3, s2 * s1_3, c2 * c13); - break; - - case 'YZY': - q.set(s2 * s1_3, c2 * s13, s2 * c1_3, c2 * c13); - break; - - case 'ZXZ': - q.set(s2 * c1_3, s2 * s1_3, c2 * s13, c2 * c13); - break; - - case 'XZX': - q.set(c2 * s13, s2 * s3_1, s2 * c3_1, c2 * c13); - break; - - case 'YXY': - q.set(s2 * c3_1, c2 * s13, s2 * s3_1, c2 * c13); - break; - - case 'ZYZ': - q.set(s2 * s3_1, s2 * c3_1, c2 * s13, c2 * c13); - break; - - default: - console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: ".concat(order)); - } - } -}; - -/** - * @author mikael emtinger / http://gomo.se/ - * @author alteredq / http://alteredqualia.com/ - * @author WestLangley / http://github.com/WestLangley - * @author bhouston / http://clara.io - */ - -function Quaternion() { - var x = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; - var y = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; - var z = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0; - var w = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1; - this._x = x; - this._y = y; - this._z = z; - this._w = w; -} - -Object.assign(Quaternion, { - slerp: function slerp(qa, qb, qm, t) { - return qm.copy(qa).slerp(qb, t); - }, - slerpFlat: function slerpFlat(dst, dstOffset, src0, srcOffset0, src1, srcOffset1, t) { - // fuzz-free, array-based Quaternion SLERP operation - var x0 = src0[srcOffset0 + 0]; - var y0 = src0[srcOffset0 + 1]; - var z0 = src0[srcOffset0 + 2]; - var w0 = src0[srcOffset0 + 3]; - var x1 = src1[srcOffset1 + 0]; - var y1 = src1[srcOffset1 + 1]; - var z1 = src1[srcOffset1 + 2]; - var w1 = src1[srcOffset1 + 3]; - - if (w0 !== w1 || x0 !== x1 || y0 !== y1 || z0 !== z1) { - var s = 1 - t; - var cos = x0 * x1 + y0 * y1 + z0 * z1 + w0 * w1; - var dir = cos >= 0 ? 1 : -1; - var sqrSin = 1 - cos * cos; // Skip the Slerp for tiny steps to avoid numeric problems: - - if (sqrSin > Number.EPSILON) { - var sin = Math.sqrt(sqrSin); - var len = Math.atan2(sin, cos * dir); - s = Math.sin(s * len) / sin; - t = Math.sin(t * len) / sin; - } - - var tDir = t * dir; - x0 = x0 * s + x1 * tDir; - y0 = y0 * s + y1 * tDir; - z0 = z0 * s + z1 * tDir; - w0 = w0 * s + w1 * tDir; // Normalize in case we just did a lerp: - - if (s === 1 - t) { - var f = 1 / Math.sqrt(x0 * x0 + y0 * y0 + z0 * z0 + w0 * w0); - x0 *= f; - y0 *= f; - z0 *= f; - w0 *= f; - } - } - - dst[dstOffset] = x0; - dst[dstOffset + 1] = y0; - dst[dstOffset + 2] = z0; - dst[dstOffset + 3] = w0; - }, - multiplyQuaternionsFlat: function multiplyQuaternionsFlat(dst, dstOffset, src0, srcOffset0, src1, srcOffset1) { - var x0 = src0[srcOffset0]; - var y0 = src0[srcOffset0 + 1]; - var z0 = src0[srcOffset0 + 2]; - var w0 = src0[srcOffset0 + 3]; - var x1 = src1[srcOffset1]; - var y1 = src1[srcOffset1 + 1]; - var z1 = src1[srcOffset1 + 2]; - var w1 = src1[srcOffset1 + 3]; - dst[dstOffset] = x0 * w1 + w0 * x1 + y0 * z1 - z0 * y1; - dst[dstOffset + 1] = y0 * w1 + w0 * y1 + z0 * x1 - x0 * z1; - dst[dstOffset + 2] = z0 * w1 + w0 * z1 + x0 * y1 - y0 * x1; - dst[dstOffset + 3] = w0 * w1 - x0 * x1 - y0 * y1 - z0 * z1; - return dst; - } -}); -Object.defineProperties(Quaternion.prototype, { - x: { - get: function get() { - return this._x; - }, - set: function set(value) { - this._x = value; - - this._onChangeCallback(); - } - }, - y: { - get: function get() { - return this._y; - }, - set: function set(value) { - this._y = value; - - this._onChangeCallback(); - } - }, - z: { - get: function get() { - return this._z; - }, - set: function set(value) { - this._z = value; - - this._onChangeCallback(); - } - }, - w: { - get: function get() { - return this._w; - }, - set: function set(value) { - this._w = value; - - this._onChangeCallback(); - } - } -}); -Object.assign(Quaternion.prototype, { - isQuaternion: true, - set: function set(x, y, z, w) { - this._x = x; - this._y = y; - this._z = z; - this._w = w; - - this._onChangeCallback(); - - return this; - }, - clone: function clone() { - return new this.constructor(this._x, this._y, this._z, this._w); - }, - copy: function copy(quaternion) { - this._x = quaternion.x; - this._y = quaternion.y; - this._z = quaternion.z; - this._w = quaternion.w; - - this._onChangeCallback(); - - return this; - }, - setFromEuler: function setFromEuler(euler, update) { - if (!(euler && euler.isEuler)) { - throw new Error('THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.'); - } - - var x = euler._x; - var y = euler._y; - var z = euler._z; - var order = euler.order; // http://www.mathworks.com/matlabcentral/fileexchange/ - // 20696-function-to-convert-between-dcm-euler-angles-quaternions-and-euler-vectors/ - // content/SpinCalc.m - - var cos = Math.cos; - var sin = Math.sin; - var c1 = cos(x / 2); - var c2 = cos(y / 2); - var c3 = cos(z / 2); - var s1 = sin(x / 2); - var s2 = sin(y / 2); - var s3 = sin(z / 2); - - switch (order) { - case 'XYZ': - this._x = s1 * c2 * c3 + c1 * s2 * s3; - this._y = c1 * s2 * c3 - s1 * c2 * s3; - this._z = c1 * c2 * s3 + s1 * s2 * c3; - this._w = c1 * c2 * c3 - s1 * s2 * s3; - break; - - case 'YXZ': - this._x = s1 * c2 * c3 + c1 * s2 * s3; - this._y = c1 * s2 * c3 - s1 * c2 * s3; - this._z = c1 * c2 * s3 - s1 * s2 * c3; - this._w = c1 * c2 * c3 + s1 * s2 * s3; - break; - - case 'ZXY': - this._x = s1 * c2 * c3 - c1 * s2 * s3; - this._y = c1 * s2 * c3 + s1 * c2 * s3; - this._z = c1 * c2 * s3 + s1 * s2 * c3; - this._w = c1 * c2 * c3 - s1 * s2 * s3; - break; - - case 'ZYX': - this._x = s1 * c2 * c3 - c1 * s2 * s3; - this._y = c1 * s2 * c3 + s1 * c2 * s3; - this._z = c1 * c2 * s3 - s1 * s2 * c3; - this._w = c1 * c2 * c3 + s1 * s2 * s3; - break; - - case 'YZX': - this._x = s1 * c2 * c3 + c1 * s2 * s3; - this._y = c1 * s2 * c3 + s1 * c2 * s3; - this._z = c1 * c2 * s3 - s1 * s2 * c3; - this._w = c1 * c2 * c3 - s1 * s2 * s3; - break; - - case 'XZY': - this._x = s1 * c2 * c3 - c1 * s2 * s3; - this._y = c1 * s2 * c3 - s1 * c2 * s3; - this._z = c1 * c2 * s3 + s1 * s2 * c3; - this._w = c1 * c2 * c3 + s1 * s2 * s3; - break; - - default: - console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: ".concat(order)); - } - - if (update !== false) this._onChangeCallback(); - return this; - }, - setFromAxisAngle: function setFromAxisAngle(axis, angle) { - // http://www.euclideanspace.com/maths/geometry/rotations/conversions/angleToQuaternion/index.htm - // assumes axis is normalized - var halfAngle = angle / 2; - var s = Math.sin(halfAngle); - this._x = axis.x * s; - this._y = axis.y * s; - this._z = axis.z * s; - this._w = Math.cos(halfAngle); - - this._onChangeCallback(); - - return this; - }, - setFromRotationMatrix: function setFromRotationMatrix(m) { - // http://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToQuaternion/index.htm - // assumes the upper 3x3 of m is a pure rotation matrix (i.e, unscaled) - var te = m.elements; - var m11 = te[0]; - var m12 = te[4]; - var m13 = te[8]; - var m21 = te[1]; - var m22 = te[5]; - var m23 = te[9]; - var m31 = te[2]; - var m32 = te[6]; - var m33 = te[10]; - var trace = m11 + m22 + m33; - - if (trace > 0) { - var s = 0.5 / Math.sqrt(trace + 1.0); - this._w = 0.25 / s; - this._x = (m32 - m23) * s; - this._y = (m13 - m31) * s; - this._z = (m21 - m12) * s; - } else if (m11 > m22 && m11 > m33) { - var _s = 2.0 * Math.sqrt(1.0 + m11 - m22 - m33); - - this._w = (m32 - m23) / _s; - this._x = 0.25 * _s; - this._y = (m12 + m21) / _s; - this._z = (m13 + m31) / _s; - } else if (m22 > m33) { - var _s2 = 2.0 * Math.sqrt(1.0 + m22 - m11 - m33); - - this._w = (m13 - m31) / _s2; - this._x = (m12 + m21) / _s2; - this._y = 0.25 * _s2; - this._z = (m23 + m32) / _s2; - } else { - var _s3 = 2.0 * Math.sqrt(1.0 + m33 - m11 - m22); - - this._w = (m21 - m12) / _s3; - this._x = (m13 + m31) / _s3; - this._y = (m23 + m32) / _s3; - this._z = 0.25 * _s3; - } - - this._onChangeCallback(); - - return this; - }, - setFromUnitVectors: function setFromUnitVectors(vFrom, vTo) { - // assumes direction vectors vFrom and vTo are normalized - var EPS = 0.000001; - var r = vFrom.dot(vTo) + 1; - - if (r < EPS) { - r = 0; - - if (Math.abs(vFrom.x) > Math.abs(vFrom.z)) { - this._x = -vFrom.y; - this._y = vFrom.x; - this._z = 0; - this._w = r; - } else { - this._x = 0; - this._y = -vFrom.z; - this._z = vFrom.y; - this._w = r; - } - } else { - // crossVectors( vFrom, vTo ); // inlined to avoid cyclic dependency on Vector3 - this._x = vFrom.y * vTo.z - vFrom.z * vTo.y; - this._y = vFrom.z * vTo.x - vFrom.x * vTo.z; - this._z = vFrom.x * vTo.y - vFrom.y * vTo.x; - this._w = r; - } - - return this.normalize(); - }, - angleTo: function angleTo(q) { - return 2 * Math.acos(Math.abs(MathUtils.clamp(this.dot(q), -1, 1))); - }, - rotateTowards: function rotateTowards(q, step) { - var angle = this.angleTo(q); - if (angle === 0) return this; - var t = Math.min(1, step / angle); - this.slerp(q, t); - return this; - }, - inverse: function inverse() { - // quaternion is assumed to have unit length - return this.conjugate(); - }, - conjugate: function conjugate() { - this._x *= -1; - this._y *= -1; - this._z *= -1; - - this._onChangeCallback(); - - return this; - }, - dot: function dot(v) { - return this._x * v._x + this._y * v._y + this._z * v._z + this._w * v._w; - }, - lengthSq: function lengthSq() { - return this._x * this._x + this._y * this._y + this._z * this._z + this._w * this._w; - }, - length: function length() { - return Math.sqrt(this._x * this._x + this._y * this._y + this._z * this._z + this._w * this._w); - }, - normalize: function normalize() { - var l = this.length(); - - if (l === 0) { - this._x = 0; - this._y = 0; - this._z = 0; - this._w = 1; - } else { - l = 1 / l; - this._x = this._x * l; - this._y = this._y * l; - this._z = this._z * l; - this._w = this._w * l; - } - - this._onChangeCallback(); - - return this; - }, - multiply: function multiply(q, p) { - if (p !== undefined) { - console.warn('THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead.'); - return this.multiplyQuaternions(q, p); - } - - return this.multiplyQuaternions(this, q); - }, - premultiply: function premultiply(q) { - return this.multiplyQuaternions(q, this); - }, - multiplyQuaternions: function multiplyQuaternions(a, b) { - // from http://www.euclideanspace.com/maths/algebra/realNormedAlgebra/quaternions/code/index.htm - var qax = a._x; - var qay = a._y; - var qaz = a._z; - var qaw = a._w; - var qbx = b._x; - var qby = b._y; - var qbz = b._z; - var qbw = b._w; - this._x = qax * qbw + qaw * qbx + qay * qbz - qaz * qby; - this._y = qay * qbw + qaw * qby + qaz * qbx - qax * qbz; - this._z = qaz * qbw + qaw * qbz + qax * qby - qay * qbx; - this._w = qaw * qbw - qax * qbx - qay * qby - qaz * qbz; - - this._onChangeCallback(); - - return this; - }, - slerp: function slerp(qb, t) { - if (t === 0) return this; - if (t === 1) return this.copy(qb); - var x = this._x; - var y = this._y; - var z = this._z; - var w = this._w; // http://www.euclideanspace.com/maths/algebra/realNormedAlgebra/quaternions/slerp/ - - var cosHalfTheta = w * qb._w + x * qb._x + y * qb._y + z * qb._z; - - if (cosHalfTheta < 0) { - this._w = -qb._w; - this._x = -qb._x; - this._y = -qb._y; - this._z = -qb._z; - cosHalfTheta = -cosHalfTheta; - } else { - this.copy(qb); - } - - if (cosHalfTheta >= 1.0) { - this._w = w; - this._x = x; - this._y = y; - this._z = z; - return this; - } - - var sqrSinHalfTheta = 1.0 - cosHalfTheta * cosHalfTheta; - - if (sqrSinHalfTheta <= Number.EPSILON) { - var s = 1 - t; - this._w = s * w + t * this._w; - this._x = s * x + t * this._x; - this._y = s * y + t * this._y; - this._z = s * z + t * this._z; - this.normalize(); - - this._onChangeCallback(); - - return this; - } - - var sinHalfTheta = Math.sqrt(sqrSinHalfTheta); - var halfTheta = Math.atan2(sinHalfTheta, cosHalfTheta); - var ratioA = Math.sin((1 - t) * halfTheta) / sinHalfTheta; - var ratioB = Math.sin(t * halfTheta) / sinHalfTheta; - this._w = w * ratioA + this._w * ratioB; - this._x = x * ratioA + this._x * ratioB; - this._y = y * ratioA + this._y * ratioB; - this._z = z * ratioA + this._z * ratioB; - - this._onChangeCallback(); - - return this; - }, - equals: function equals(quaternion) { - return quaternion._x === this._x && quaternion._y === this._y && quaternion._z === this._z && quaternion._w === this._w; - }, - fromArray: function fromArray(array, offset) { - if (offset === undefined) offset = 0; - this._x = array[offset]; - this._y = array[offset + 1]; - this._z = array[offset + 2]; - this._w = array[offset + 3]; - - this._onChangeCallback(); - - return this; - }, - toArray: function toArray(array, offset) { - if (array === undefined) array = []; - if (offset === undefined) offset = 0; - array[offset] = this._x; - array[offset + 1] = this._y; - array[offset + 2] = this._z; - array[offset + 3] = this._w; - return array; - }, - fromBufferAttribute: function fromBufferAttribute(attribute, index) { - this._x = attribute.getX(index); - this._y = attribute.getY(index); - this._z = attribute.getZ(index); - this._w = attribute.getW(index); - return this; - }, - _onChange: function _onChange(callback) { - this._onChangeCallback = callback; - return this; - }, - _onChangeCallback: function _onChangeCallback() {} -}); - -/** - * @author mrdoob / http://mrdoob.com/ - * @author kile / http://kile.stravaganza.org/ - * @author philogb / http://blog.thejit.org/ - * @author mikael emtinger / http://gomo.se/ - * @author egraether / http://egraether.com/ - * @author WestLangley / http://github.com/WestLangley - */ - -var _vector = new Vector3(); - -var _quaternion = new Quaternion(); - -function Vector3() { - var x = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; - var y = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; - var z = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0; - this.x = x; - this.y = y; - this.z = z; -} - -Object.assign(Vector3.prototype, { - isVector3: true, - set: function set(x, y, z) { - this.x = x; - this.y = y; - this.z = z; - return this; - }, - setScalar: function setScalar(scalar) { - this.x = scalar; - this.y = scalar; - this.z = scalar; - return this; - }, - setX: function setX(x) { - this.x = x; - return this; - }, - setY: function setY(y) { - this.y = y; - return this; - }, - setZ: function setZ(z) { - this.z = z; - return this; - }, - setComponent: function setComponent(index, value) { - switch (index) { - case 0: - this.x = value; - break; - - case 1: - this.y = value; - break; - - case 2: - this.z = value; - break; - - default: - throw new Error("index is out of range: ".concat(index)); - } - - return this; - }, - getComponent: function getComponent(index) { - switch (index) { - case 0: - return this.x; - - case 1: - return this.y; - - case 2: - return this.z; - - default: - throw new Error("index is out of range: ".concat(index)); - } - }, - clone: function clone() { - return new this.constructor(this.x, this.y, this.z); - }, - copy: function copy(v) { - this.x = v.x; - this.y = v.y; - this.z = v.z; - return this; - }, - add: function add(v, w) { - if (w !== undefined) { - console.warn('THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead.'); - return this.addVectors(v, w); - } - - this.x += v.x; - this.y += v.y; - this.z += v.z; - return this; - }, - addScalar: function addScalar(s) { - this.x += s; - this.y += s; - this.z += s; - return this; - }, - addVectors: function addVectors(a, b) { - this.x = a.x + b.x; - this.y = a.y + b.y; - this.z = a.z + b.z; - return this; - }, - addScaledVector: function addScaledVector(v, s) { - this.x += v.x * s; - this.y += v.y * s; - this.z += v.z * s; - return this; - }, - sub: function sub(v, w) { - if (w !== undefined) { - console.warn('THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead.'); - return this.subVectors(v, w); - } - - this.x -= v.x; - this.y -= v.y; - this.z -= v.z; - return this; - }, - subScalar: function subScalar(s) { - this.x -= s; - this.y -= s; - this.z -= s; - return this; - }, - subVectors: function subVectors(a, b) { - this.x = a.x - b.x; - this.y = a.y - b.y; - this.z = a.z - b.z; - return this; - }, - multiply: function multiply(v, w) { - if (w !== undefined) { - console.warn('THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead.'); - return this.multiplyVectors(v, w); - } - - this.x *= v.x; - this.y *= v.y; - this.z *= v.z; - return this; - }, - multiplyScalar: function multiplyScalar(scalar) { - this.x *= scalar; - this.y *= scalar; - this.z *= scalar; - return this; - }, - multiplyVectors: function multiplyVectors(a, b) { - this.x = a.x * b.x; - this.y = a.y * b.y; - this.z = a.z * b.z; - return this; - }, - applyEuler: function applyEuler(euler) { - if (!(euler && euler.isEuler)) { - console.error('THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order.'); - } - - return this.applyQuaternion(_quaternion.setFromEuler(euler)); - }, - applyAxisAngle: function applyAxisAngle(axis, angle) { - return this.applyQuaternion(_quaternion.setFromAxisAngle(axis, angle)); - }, - applyMatrix3: function applyMatrix3(m) { - var x = this.x; - var y = this.y; - var z = this.z; - var e = m.elements; - this.x = e[0] * x + e[3] * y + e[6] * z; - this.y = e[1] * x + e[4] * y + e[7] * z; - this.z = e[2] * x + e[5] * y + e[8] * z; - return this; - }, - applyNormalMatrix: function applyNormalMatrix(m) { - return this.applyMatrix3(m).normalize(); - }, - applyMatrix4: function applyMatrix4(m) { - var x = this.x; - var y = this.y; - var z = this.z; - var e = m.elements; - var w = 1 / (e[3] * x + e[7] * y + e[11] * z + e[15]); - this.x = (e[0] * x + e[4] * y + e[8] * z + e[12]) * w; - this.y = (e[1] * x + e[5] * y + e[9] * z + e[13]) * w; - this.z = (e[2] * x + e[6] * y + e[10] * z + e[14]) * w; - return this; - }, - applyQuaternion: function applyQuaternion(q) { - var x = this.x; - var y = this.y; - var z = this.z; - var qx = q.x; - var qy = q.y; - var qz = q.z; - var qw = q.w; // calculate quat * vector - - var ix = qw * x + qy * z - qz * y; - var iy = qw * y + qz * x - qx * z; - var iz = qw * z + qx * y - qy * x; - var iw = -qx * x - qy * y - qz * z; // calculate result * inverse quat - - this.x = ix * qw + iw * -qx + iy * -qz - iz * -qy; - this.y = iy * qw + iw * -qy + iz * -qx - ix * -qz; - this.z = iz * qw + iw * -qz + ix * -qy - iy * -qx; - return this; - }, - project: function project(camera) { - return this.applyMatrix4(camera.matrixWorldInverse).applyMatrix4(camera.projectionMatrix); - }, - unproject: function unproject(camera) { - return this.applyMatrix4(camera.projectionMatrixInverse).applyMatrix4(camera.matrixWorld); - }, - transformDirection: function transformDirection(m) { - // input: THREE.Matrix4 affine matrix - // vector interpreted as a direction - var x = this.x; - var y = this.y; - var z = this.z; - var e = m.elements; - this.x = e[0] * x + e[4] * y + e[8] * z; - this.y = e[1] * x + e[5] * y + e[9] * z; - this.z = e[2] * x + e[6] * y + e[10] * z; - return this.normalize(); - }, - divide: function divide(v) { - this.x /= v.x; - this.y /= v.y; - this.z /= v.z; - return this; - }, - divideScalar: function divideScalar(scalar) { - return this.multiplyScalar(1 / scalar); - }, - min: function min(v) { - this.x = Math.min(this.x, v.x); - this.y = Math.min(this.y, v.y); - this.z = Math.min(this.z, v.z); - return this; - }, - max: function max(v) { - this.x = Math.max(this.x, v.x); - this.y = Math.max(this.y, v.y); - this.z = Math.max(this.z, v.z); - return this; - }, - clamp: function clamp(min, max) { - // assumes min < max, componentwise - this.x = Math.max(min.x, Math.min(max.x, this.x)); - this.y = Math.max(min.y, Math.min(max.y, this.y)); - this.z = Math.max(min.z, Math.min(max.z, this.z)); - return this; - }, - clampScalar: function clampScalar(minVal, maxVal) { - this.x = Math.max(minVal, Math.min(maxVal, this.x)); - this.y = Math.max(minVal, Math.min(maxVal, this.y)); - this.z = Math.max(minVal, Math.min(maxVal, this.z)); - return this; - }, - clampLength: function clampLength(min, max) { - var length = this.length(); - return this.divideScalar(length || 1).multiplyScalar(Math.max(min, Math.min(max, length))); - }, - floor: function floor() { - this.x = Math.floor(this.x); - this.y = Math.floor(this.y); - this.z = Math.floor(this.z); - return this; - }, - ceil: function ceil() { - this.x = Math.ceil(this.x); - this.y = Math.ceil(this.y); - this.z = Math.ceil(this.z); - return this; - }, - round: function round() { - this.x = Math.round(this.x); - this.y = Math.round(this.y); - this.z = Math.round(this.z); - return this; - }, - roundToZero: function roundToZero() { - this.x = this.x < 0 ? Math.ceil(this.x) : Math.floor(this.x); - this.y = this.y < 0 ? Math.ceil(this.y) : Math.floor(this.y); - this.z = this.z < 0 ? Math.ceil(this.z) : Math.floor(this.z); - return this; - }, - negate: function negate() { - this.x = -this.x; - this.y = -this.y; - this.z = -this.z; - return this; - }, - dot: function dot(v) { - return this.x * v.x + this.y * v.y + this.z * v.z; - }, - // TODO lengthSquared? - lengthSq: function lengthSq() { - return this.x * this.x + this.y * this.y + this.z * this.z; - }, - length: function length() { - return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z); - }, - manhattanLength: function manhattanLength() { - return Math.abs(this.x) + Math.abs(this.y) + Math.abs(this.z); - }, - normalize: function normalize() { - return this.divideScalar(this.length() || 1); - }, - setLength: function setLength(length) { - return this.normalize().multiplyScalar(length); - }, - lerp: function lerp(v, alpha) { - this.x += (v.x - this.x) * alpha; - this.y += (v.y - this.y) * alpha; - this.z += (v.z - this.z) * alpha; - return this; - }, - lerpVectors: function lerpVectors(v1, v2, alpha) { - this.x = v1.x + (v2.x - v1.x) * alpha; - this.y = v1.y + (v2.y - v1.y) * alpha; - this.z = v1.z + (v2.z - v1.z) * alpha; - return this; - }, - cross: function cross(v, w) { - if (w !== undefined) { - console.warn('THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead.'); - return this.crossVectors(v, w); - } - - return this.crossVectors(this, v); - }, - crossVectors: function crossVectors(a, b) { - var ax = a.x; - var ay = a.y; - var az = a.z; - var bx = b.x; - var by = b.y; - var bz = b.z; - this.x = ay * bz - az * by; - this.y = az * bx - ax * bz; - this.z = ax * by - ay * bx; - return this; - }, - projectOnVector: function projectOnVector(v) { - var denominator = v.lengthSq(); - if (denominator === 0) return this.set(0, 0, 0); - var scalar = v.dot(this) / denominator; - return this.copy(v).multiplyScalar(scalar); - }, - projectOnPlane: function projectOnPlane(planeNormal) { - _vector.copy(this).projectOnVector(planeNormal); - - return this.sub(_vector); - }, - reflect: function reflect(normal) { - // reflect incident vector off plane orthogonal to normal - // normal is assumed to have unit length - return this.sub(_vector.copy(normal).multiplyScalar(2 * this.dot(normal))); - }, - angleTo: function angleTo(v) { - var denominator = Math.sqrt(this.lengthSq() * v.lengthSq()); - if (denominator === 0) return Math.PI / 2; - var theta = this.dot(v) / denominator; // clamp, to handle numerical problems - - return Math.acos(MathUtils.clamp(theta, -1, 1)); - }, - distanceTo: function distanceTo(v) { - return Math.sqrt(this.distanceToSquared(v)); - }, - distanceToSquared: function distanceToSquared(v) { - var dx = this.x - v.x; - var dy = this.y - v.y; - var dz = this.z - v.z; - return dx * dx + dy * dy + dz * dz; - }, - manhattanDistanceTo: function manhattanDistanceTo(v) { - return Math.abs(this.x - v.x) + Math.abs(this.y - v.y) + Math.abs(this.z - v.z); - }, - setFromSpherical: function setFromSpherical(s) { - return this.setFromSphericalCoords(s.radius, s.phi, s.theta); - }, - setFromSphericalCoords: function setFromSphericalCoords(radius, phi, theta) { - var sinPhiRadius = Math.sin(phi) * radius; - this.x = sinPhiRadius * Math.sin(theta); - this.y = Math.cos(phi) * radius; - this.z = sinPhiRadius * Math.cos(theta); - return this; - }, - setFromCylindrical: function setFromCylindrical(c) { - return this.setFromCylindricalCoords(c.radius, c.theta, c.y); - }, - setFromCylindricalCoords: function setFromCylindricalCoords(radius, theta, y) { - this.x = radius * Math.sin(theta); - this.y = y; - this.z = radius * Math.cos(theta); - return this; - }, - setFromMatrixPosition: function setFromMatrixPosition(m) { - var e = m.elements; - this.x = e[12]; - this.y = e[13]; - this.z = e[14]; - return this; - }, - setFromMatrixScale: function setFromMatrixScale(m) { - var sx = this.setFromMatrixColumn(m, 0).length(); - var sy = this.setFromMatrixColumn(m, 1).length(); - var sz = this.setFromMatrixColumn(m, 2).length(); - this.x = sx; - this.y = sy; - this.z = sz; - return this; - }, - setFromMatrixColumn: function setFromMatrixColumn(m, index) { - return this.fromArray(m.elements, index * 4); - }, - setFromMatrix3Column: function setFromMatrix3Column(m, index) { - return this.fromArray(m.elements, index * 3); - }, - equals: function equals(v) { - return v.x === this.x && v.y === this.y && v.z === this.z; - }, - fromArray: function fromArray(array, offset) { - if (offset === undefined) offset = 0; - this.x = array[offset]; - this.y = array[offset + 1]; - this.z = array[offset + 2]; - return this; - }, - toArray: function toArray(array, offset) { - if (array === undefined) array = []; - if (offset === undefined) offset = 0; - array[offset] = this.x; - array[offset + 1] = this.y; - array[offset + 2] = this.z; - return array; - }, - fromBufferAttribute: function fromBufferAttribute(attribute, index, offset) { - if (offset !== undefined) { - console.warn('THREE.Vector3: offset has been removed from .fromBufferAttribute().'); - } - - this.x = attribute.getX(index); - this.y = attribute.getY(index); - this.z = attribute.getZ(index); - return this; - }, - random: function random() { - this.x = Math.random(); - this.y = Math.random(); - this.z = Math.random(); - return this; - } -}); - -var _v1 = new Vector3(); - -var _m1 = new Matrix4(); - -var _zero = new Vector3(0, 0, 0); - -var _one = new Vector3(1, 1, 1); - -var _x = new Vector3(); - -var _y = new Vector3(); - -var _z = new Vector3(); -/** - * @author mrdoob / http://mrdoob.com/ - * @author supereggbert / http://www.paulbrunt.co.uk/ - * @author philogb / http://blog.thejit.org/ - * @author jordi_ros / http://plattsoft.com - * @author D1plo1d / http://github.com/D1plo1d - * @author alteredq / http://alteredqualia.com/ - * @author mikael emtinger / http://gomo.se/ - * @author timknip / http://www.floorplanner.com/ - * @author bhouston / http://clara.io - * @author WestLangley / http://github.com/WestLangley - */ - - -function Matrix4() { - this.elements = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]; - - if (arguments.length > 0) { - console.error('THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.'); - } -} - -Object.assign(Matrix4.prototype, { - isMatrix4: true, - set: function set(n11, n12, n13, n14, n21, n22, n23, n24, n31, n32, n33, n34, n41, n42, n43, n44) { - var te = this.elements; - te[0] = n11; - te[4] = n12; - te[8] = n13; - te[12] = n14; - te[1] = n21; - te[5] = n22; - te[9] = n23; - te[13] = n24; - te[2] = n31; - te[6] = n32; - te[10] = n33; - te[14] = n34; - te[3] = n41; - te[7] = n42; - te[11] = n43; - te[15] = n44; - return this; - }, - identity: function identity() { - this.set(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); - return this; - }, - clone: function clone() { - return new Matrix4().fromArray(this.elements); - }, - copy: function copy(m) { - var te = this.elements; - var me = m.elements; - te[0] = me[0]; - te[1] = me[1]; - te[2] = me[2]; - te[3] = me[3]; - te[4] = me[4]; - te[5] = me[5]; - te[6] = me[6]; - te[7] = me[7]; - te[8] = me[8]; - te[9] = me[9]; - te[10] = me[10]; - te[11] = me[11]; - te[12] = me[12]; - te[13] = me[13]; - te[14] = me[14]; - te[15] = me[15]; - return this; - }, - copyPosition: function copyPosition(m) { - var te = this.elements; - var me = m.elements; - te[12] = me[12]; - te[13] = me[13]; - te[14] = me[14]; - return this; - }, - extractBasis: function extractBasis(xAxis, yAxis, zAxis) { - xAxis.setFromMatrixColumn(this, 0); - yAxis.setFromMatrixColumn(this, 1); - zAxis.setFromMatrixColumn(this, 2); - return this; - }, - makeBasis: function makeBasis(xAxis, yAxis, zAxis) { - this.set(xAxis.x, yAxis.x, zAxis.x, 0, xAxis.y, yAxis.y, zAxis.y, 0, xAxis.z, yAxis.z, zAxis.z, 0, 0, 0, 0, 1); - return this; - }, - extractRotation: function extractRotation(m) { - // this method does not support reflection matrices - var te = this.elements; - var me = m.elements; - - var scaleX = 1 / _v1.setFromMatrixColumn(m, 0).length(); - - var scaleY = 1 / _v1.setFromMatrixColumn(m, 1).length(); - - var scaleZ = 1 / _v1.setFromMatrixColumn(m, 2).length(); - - te[0] = me[0] * scaleX; - te[1] = me[1] * scaleX; - te[2] = me[2] * scaleX; - te[3] = 0; - te[4] = me[4] * scaleY; - te[5] = me[5] * scaleY; - te[6] = me[6] * scaleY; - te[7] = 0; - te[8] = me[8] * scaleZ; - te[9] = me[9] * scaleZ; - te[10] = me[10] * scaleZ; - te[11] = 0; - te[12] = 0; - te[13] = 0; - te[14] = 0; - te[15] = 1; - return this; - }, - makeRotationFromEuler: function makeRotationFromEuler(euler) { - if (!(euler && euler.isEuler)) { - console.error('THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.'); - } - - var te = this.elements; - var x = euler.x; - var y = euler.y; - var z = euler.z; - var a = Math.cos(x); - var b = Math.sin(x); - var c = Math.cos(y); - var d = Math.sin(y); - var e = Math.cos(z); - var f = Math.sin(z); - - if (euler.order === 'XYZ') { - var ae = a * e; - var af = a * f; - var be = b * e; - var bf = b * f; - te[0] = c * e; - te[4] = -c * f; - te[8] = d; - te[1] = af + be * d; - te[5] = ae - bf * d; - te[9] = -b * c; - te[2] = bf - ae * d; - te[6] = be + af * d; - te[10] = a * c; - } else if (euler.order === 'YXZ') { - var ce = c * e; - var cf = c * f; - var de = d * e; - var df = d * f; - te[0] = ce + df * b; - te[4] = de * b - cf; - te[8] = a * d; - te[1] = a * f; - te[5] = a * e; - te[9] = -b; - te[2] = cf * b - de; - te[6] = df + ce * b; - te[10] = a * c; - } else if (euler.order === 'ZXY') { - var _ce = c * e; - - var _cf = c * f; - - var _de = d * e; - - var _df = d * f; - - te[0] = _ce - _df * b; - te[4] = -a * f; - te[8] = _de + _cf * b; - te[1] = _cf + _de * b; - te[5] = a * e; - te[9] = _df - _ce * b; - te[2] = -a * d; - te[6] = b; - te[10] = a * c; - } else if (euler.order === 'ZYX') { - var _ae = a * e; - - var _af = a * f; - - var _be = b * e; - - var _bf = b * f; - - te[0] = c * e; - te[4] = _be * d - _af; - te[8] = _ae * d + _bf; - te[1] = c * f; - te[5] = _bf * d + _ae; - te[9] = _af * d - _be; - te[2] = -d; - te[6] = b * c; - te[10] = a * c; - } else if (euler.order === 'YZX') { - var ac = a * c; - var ad = a * d; - var bc = b * c; - var bd = b * d; - te[0] = c * e; - te[4] = bd - ac * f; - te[8] = bc * f + ad; - te[1] = f; - te[5] = a * e; - te[9] = -b * e; - te[2] = -d * e; - te[6] = ad * f + bc; - te[10] = ac - bd * f; - } else if (euler.order === 'XZY') { - var _ac = a * c; - - var _ad = a * d; - - var _bc = b * c; - - var _bd = b * d; - - te[0] = c * e; - te[4] = -f; - te[8] = d * e; - te[1] = _ac * f + _bd; - te[5] = a * e; - te[9] = _ad * f - _bc; - te[2] = _bc * f - _ad; - te[6] = b * e; - te[10] = _bd * f + _ac; - } // bottom row - - - te[3] = 0; - te[7] = 0; - te[11] = 0; // last column - - te[12] = 0; - te[13] = 0; - te[14] = 0; - te[15] = 1; - return this; - }, - makeRotationFromQuaternion: function makeRotationFromQuaternion(q) { - return this.compose(_zero, q, _one); - }, - lookAt: function lookAt(eye, target, up) { - var te = this.elements; - - _z.subVectors(eye, target); - - if (_z.lengthSq() === 0) { - // eye and target are in the same position - _z.z = 1; - } - - _z.normalize(); - - _x.crossVectors(up, _z); - - if (_x.lengthSq() === 0) { - // up and z are parallel - if (Math.abs(up.z) === 1) { - _z.x += 0.0001; - } else { - _z.z += 0.0001; - } - - _z.normalize(); - - _x.crossVectors(up, _z); - } - - _x.normalize(); - - _y.crossVectors(_z, _x); - - te[0] = _x.x; - te[4] = _y.x; - te[8] = _z.x; - te[1] = _x.y; - te[5] = _y.y; - te[9] = _z.y; - te[2] = _x.z; - te[6] = _y.z; - te[10] = _z.z; - return this; - }, - multiply: function multiply(m, n) { - if (n !== undefined) { - console.warn('THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead.'); - return this.multiplyMatrices(m, n); - } - - return this.multiplyMatrices(this, m); - }, - premultiply: function premultiply(m) { - return this.multiplyMatrices(m, this); - }, - multiplyMatrices: function multiplyMatrices(a, b) { - var ae = a.elements; - var be = b.elements; - var te = this.elements; - var a11 = ae[0]; - var a12 = ae[4]; - var a13 = ae[8]; - var a14 = ae[12]; - var a21 = ae[1]; - var a22 = ae[5]; - var a23 = ae[9]; - var a24 = ae[13]; - var a31 = ae[2]; - var a32 = ae[6]; - var a33 = ae[10]; - var a34 = ae[14]; - var a41 = ae[3]; - var a42 = ae[7]; - var a43 = ae[11]; - var a44 = ae[15]; - var b11 = be[0]; - var b12 = be[4]; - var b13 = be[8]; - var b14 = be[12]; - var b21 = be[1]; - var b22 = be[5]; - var b23 = be[9]; - var b24 = be[13]; - var b31 = be[2]; - var b32 = be[6]; - var b33 = be[10]; - var b34 = be[14]; - var b41 = be[3]; - var b42 = be[7]; - var b43 = be[11]; - var b44 = be[15]; - te[0] = a11 * b11 + a12 * b21 + a13 * b31 + a14 * b41; - te[4] = a11 * b12 + a12 * b22 + a13 * b32 + a14 * b42; - te[8] = a11 * b13 + a12 * b23 + a13 * b33 + a14 * b43; - te[12] = a11 * b14 + a12 * b24 + a13 * b34 + a14 * b44; - te[1] = a21 * b11 + a22 * b21 + a23 * b31 + a24 * b41; - te[5] = a21 * b12 + a22 * b22 + a23 * b32 + a24 * b42; - te[9] = a21 * b13 + a22 * b23 + a23 * b33 + a24 * b43; - te[13] = a21 * b14 + a22 * b24 + a23 * b34 + a24 * b44; - te[2] = a31 * b11 + a32 * b21 + a33 * b31 + a34 * b41; - te[6] = a31 * b12 + a32 * b22 + a33 * b32 + a34 * b42; - te[10] = a31 * b13 + a32 * b23 + a33 * b33 + a34 * b43; - te[14] = a31 * b14 + a32 * b24 + a33 * b34 + a34 * b44; - te[3] = a41 * b11 + a42 * b21 + a43 * b31 + a44 * b41; - te[7] = a41 * b12 + a42 * b22 + a43 * b32 + a44 * b42; - te[11] = a41 * b13 + a42 * b23 + a43 * b33 + a44 * b43; - te[15] = a41 * b14 + a42 * b24 + a43 * b34 + a44 * b44; - return this; - }, - multiplyScalar: function multiplyScalar(s) { - var te = this.elements; - te[0] *= s; - te[4] *= s; - te[8] *= s; - te[12] *= s; - te[1] *= s; - te[5] *= s; - te[9] *= s; - te[13] *= s; - te[2] *= s; - te[6] *= s; - te[10] *= s; - te[14] *= s; - te[3] *= s; - te[7] *= s; - te[11] *= s; - te[15] *= s; - return this; - }, - determinant: function determinant() { - var te = this.elements; - var n11 = te[0]; - var n12 = te[4]; - var n13 = te[8]; - var n14 = te[12]; - var n21 = te[1]; - var n22 = te[5]; - var n23 = te[9]; - var n24 = te[13]; - var n31 = te[2]; - var n32 = te[6]; - var n33 = te[10]; - var n34 = te[14]; - var n41 = te[3]; - var n42 = te[7]; - var n43 = te[11]; - var n44 = te[15]; // TODO: make this more efficient - // ( based on http://www.euclideanspace.com/maths/algebra/matrix/functions/inverse/fourD/index.htm ) - - return n41 * (+n14 * n23 * n32 - n13 * n24 * n32 - n14 * n22 * n33 + n12 * n24 * n33 + n13 * n22 * n34 - n12 * n23 * n34) + n42 * (+n11 * n23 * n34 - n11 * n24 * n33 + n14 * n21 * n33 - n13 * n21 * n34 + n13 * n24 * n31 - n14 * n23 * n31) + n43 * (+n11 * n24 * n32 - n11 * n22 * n34 - n14 * n21 * n32 + n12 * n21 * n34 + n14 * n22 * n31 - n12 * n24 * n31) + n44 * (-n13 * n22 * n31 - n11 * n23 * n32 + n11 * n22 * n33 + n13 * n21 * n32 - n12 * n21 * n33 + n12 * n23 * n31); - }, - transpose: function transpose() { - var te = this.elements; - var tmp; - tmp = te[1]; - te[1] = te[4]; - te[4] = tmp; - tmp = te[2]; - te[2] = te[8]; - te[8] = tmp; - tmp = te[6]; - te[6] = te[9]; - te[9] = tmp; - tmp = te[3]; - te[3] = te[12]; - te[12] = tmp; - tmp = te[7]; - te[7] = te[13]; - te[13] = tmp; - tmp = te[11]; - te[11] = te[14]; - te[14] = tmp; - return this; - }, - setPosition: function setPosition(x, y, z) { - var te = this.elements; - - if (x.isVector3) { - te[12] = x.x; - te[13] = x.y; - te[14] = x.z; - } else { - te[12] = x; - te[13] = y; - te[14] = z; - } - - return this; - }, - getInverse: function getInverse(m, throwOnDegenerate) { - if (throwOnDegenerate !== undefined) { - console.warn('THREE.Matrix4: .getInverse() can no longer be configured to throw on degenerate.'); - } // based on http://www.euclideanspace.com/maths/algebra/matrix/functions/inverse/fourD/index.htm - - - var te = this.elements; - var me = m.elements; - var n11 = me[0]; - var n21 = me[1]; - var n31 = me[2]; - var n41 = me[3]; - var n12 = me[4]; - var n22 = me[5]; - var n32 = me[6]; - var n42 = me[7]; - var n13 = me[8]; - var n23 = me[9]; - var n33 = me[10]; - var n43 = me[11]; - var n14 = me[12]; - var n24 = me[13]; - var n34 = me[14]; - var n44 = me[15]; - var t11 = n23 * n34 * n42 - n24 * n33 * n42 + n24 * n32 * n43 - n22 * n34 * n43 - n23 * n32 * n44 + n22 * n33 * n44; - var t12 = n14 * n33 * n42 - n13 * n34 * n42 - n14 * n32 * n43 + n12 * n34 * n43 + n13 * n32 * n44 - n12 * n33 * n44; - var t13 = n13 * n24 * n42 - n14 * n23 * n42 + n14 * n22 * n43 - n12 * n24 * n43 - n13 * n22 * n44 + n12 * n23 * n44; - var t14 = n14 * n23 * n32 - n13 * n24 * n32 - n14 * n22 * n33 + n12 * n24 * n33 + n13 * n22 * n34 - n12 * n23 * n34; - var det = n11 * t11 + n21 * t12 + n31 * t13 + n41 * t14; - if (det === 0) return this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - var detInv = 1 / det; - te[0] = t11 * detInv; - te[1] = (n24 * n33 * n41 - n23 * n34 * n41 - n24 * n31 * n43 + n21 * n34 * n43 + n23 * n31 * n44 - n21 * n33 * n44) * detInv; - te[2] = (n22 * n34 * n41 - n24 * n32 * n41 + n24 * n31 * n42 - n21 * n34 * n42 - n22 * n31 * n44 + n21 * n32 * n44) * detInv; - te[3] = (n23 * n32 * n41 - n22 * n33 * n41 - n23 * n31 * n42 + n21 * n33 * n42 + n22 * n31 * n43 - n21 * n32 * n43) * detInv; - te[4] = t12 * detInv; - te[5] = (n13 * n34 * n41 - n14 * n33 * n41 + n14 * n31 * n43 - n11 * n34 * n43 - n13 * n31 * n44 + n11 * n33 * n44) * detInv; - te[6] = (n14 * n32 * n41 - n12 * n34 * n41 - n14 * n31 * n42 + n11 * n34 * n42 + n12 * n31 * n44 - n11 * n32 * n44) * detInv; - te[7] = (n12 * n33 * n41 - n13 * n32 * n41 + n13 * n31 * n42 - n11 * n33 * n42 - n12 * n31 * n43 + n11 * n32 * n43) * detInv; - te[8] = t13 * detInv; - te[9] = (n14 * n23 * n41 - n13 * n24 * n41 - n14 * n21 * n43 + n11 * n24 * n43 + n13 * n21 * n44 - n11 * n23 * n44) * detInv; - te[10] = (n12 * n24 * n41 - n14 * n22 * n41 + n14 * n21 * n42 - n11 * n24 * n42 - n12 * n21 * n44 + n11 * n22 * n44) * detInv; - te[11] = (n13 * n22 * n41 - n12 * n23 * n41 - n13 * n21 * n42 + n11 * n23 * n42 + n12 * n21 * n43 - n11 * n22 * n43) * detInv; - te[12] = t14 * detInv; - te[13] = (n13 * n24 * n31 - n14 * n23 * n31 + n14 * n21 * n33 - n11 * n24 * n33 - n13 * n21 * n34 + n11 * n23 * n34) * detInv; - te[14] = (n14 * n22 * n31 - n12 * n24 * n31 - n14 * n21 * n32 + n11 * n24 * n32 + n12 * n21 * n34 - n11 * n22 * n34) * detInv; - te[15] = (n12 * n23 * n31 - n13 * n22 * n31 + n13 * n21 * n32 - n11 * n23 * n32 - n12 * n21 * n33 + n11 * n22 * n33) * detInv; - return this; - }, - scale: function scale(v) { - var te = this.elements; - var x = v.x; - var y = v.y; - var z = v.z; - te[0] *= x; - te[4] *= y; - te[8] *= z; - te[1] *= x; - te[5] *= y; - te[9] *= z; - te[2] *= x; - te[6] *= y; - te[10] *= z; - te[3] *= x; - te[7] *= y; - te[11] *= z; - return this; - }, - getMaxScaleOnAxis: function getMaxScaleOnAxis() { - var te = this.elements; - var scaleXSq = te[0] * te[0] + te[1] * te[1] + te[2] * te[2]; - var scaleYSq = te[4] * te[4] + te[5] * te[5] + te[6] * te[6]; - var scaleZSq = te[8] * te[8] + te[9] * te[9] + te[10] * te[10]; - return Math.sqrt(Math.max(scaleXSq, scaleYSq, scaleZSq)); - }, - makeTranslation: function makeTranslation(x, y, z) { - this.set(1, 0, 0, x, 0, 1, 0, y, 0, 0, 1, z, 0, 0, 0, 1); - return this; - }, - makeRotationX: function makeRotationX(theta) { - var c = Math.cos(theta); - var s = Math.sin(theta); - this.set(1, 0, 0, 0, 0, c, -s, 0, 0, s, c, 0, 0, 0, 0, 1); - return this; - }, - makeRotationY: function makeRotationY(theta) { - var c = Math.cos(theta); - var s = Math.sin(theta); - this.set(c, 0, s, 0, 0, 1, 0, 0, -s, 0, c, 0, 0, 0, 0, 1); - return this; - }, - makeRotationZ: function makeRotationZ(theta) { - var c = Math.cos(theta); - var s = Math.sin(theta); - this.set(c, -s, 0, 0, s, c, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); - return this; - }, - makeRotationAxis: function makeRotationAxis(axis, angle) { - // Based on http://www.gamedev.net/reference/articles/article1199.asp - var c = Math.cos(angle); - var s = Math.sin(angle); - var t = 1 - c; - var x = axis.x; - var y = axis.y; - var z = axis.z; - var tx = t * x; - var ty = t * y; - this.set(tx * x + c, tx * y - s * z, tx * z + s * y, 0, tx * y + s * z, ty * y + c, ty * z - s * x, 0, tx * z - s * y, ty * z + s * x, t * z * z + c, 0, 0, 0, 0, 1); - return this; - }, - makeScale: function makeScale(x, y, z) { - this.set(x, 0, 0, 0, 0, y, 0, 0, 0, 0, z, 0, 0, 0, 0, 1); - return this; - }, - makeShear: function makeShear(x, y, z) { - this.set(1, y, z, 0, x, 1, z, 0, x, y, 1, 0, 0, 0, 0, 1); - return this; - }, - compose: function compose(position, quaternion, scale) { - var te = this.elements; - var x = quaternion._x; - var y = quaternion._y; - var z = quaternion._z; - var w = quaternion._w; - var x2 = x + x; - var y2 = y + y; - var z2 = z + z; - var xx = x * x2; - var xy = x * y2; - var xz = x * z2; - var yy = y * y2; - var yz = y * z2; - var zz = z * z2; - var wx = w * x2; - var wy = w * y2; - var wz = w * z2; - var sx = scale.x; - var sy = scale.y; - var sz = scale.z; - te[0] = (1 - (yy + zz)) * sx; - te[1] = (xy + wz) * sx; - te[2] = (xz - wy) * sx; - te[3] = 0; - te[4] = (xy - wz) * sy; - te[5] = (1 - (xx + zz)) * sy; - te[6] = (yz + wx) * sy; - te[7] = 0; - te[8] = (xz + wy) * sz; - te[9] = (yz - wx) * sz; - te[10] = (1 - (xx + yy)) * sz; - te[11] = 0; - te[12] = position.x; - te[13] = position.y; - te[14] = position.z; - te[15] = 1; - return this; - }, - decompose: function decompose(position, quaternion, scale) { - var te = this.elements; - - var sx = _v1.set(te[0], te[1], te[2]).length(); - - var sy = _v1.set(te[4], te[5], te[6]).length(); - - var sz = _v1.set(te[8], te[9], te[10]).length(); // if determine is negative, we need to invert one scale - - - var det = this.determinant(); - if (det < 0) sx = -sx; - position.x = te[12]; - position.y = te[13]; - position.z = te[14]; // scale the rotation part - - _m1.copy(this); - - var invSX = 1 / sx; - var invSY = 1 / sy; - var invSZ = 1 / sz; - _m1.elements[0] *= invSX; - _m1.elements[1] *= invSX; - _m1.elements[2] *= invSX; - _m1.elements[4] *= invSY; - _m1.elements[5] *= invSY; - _m1.elements[6] *= invSY; - _m1.elements[8] *= invSZ; - _m1.elements[9] *= invSZ; - _m1.elements[10] *= invSZ; - quaternion.setFromRotationMatrix(_m1); - scale.x = sx; - scale.y = sy; - scale.z = sz; - return this; - }, - makePerspective: function makePerspective(left, right, top, bottom, near, far) { - if (far === undefined) { - console.warn('THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.'); - } - - var te = this.elements; - var x = 2 * near / (right - left); - var y = 2 * near / (top - bottom); - var a = (right + left) / (right - left); - var b = (top + bottom) / (top - bottom); - var c = -(far + near) / (far - near); - var d = -2 * far * near / (far - near); - te[0] = x; - te[4] = 0; - te[8] = a; - te[12] = 0; - te[1] = 0; - te[5] = y; - te[9] = b; - te[13] = 0; - te[2] = 0; - te[6] = 0; - te[10] = c; - te[14] = d; - te[3] = 0; - te[7] = 0; - te[11] = -1; - te[15] = 0; - return this; - }, - makeOrthographic: function makeOrthographic(left, right, top, bottom, near, far) { - var te = this.elements; - var w = 1.0 / (right - left); - var h = 1.0 / (top - bottom); - var p = 1.0 / (far - near); - var x = (right + left) * w; - var y = (top + bottom) * h; - var z = (far + near) * p; - te[0] = 2 * w; - te[4] = 0; - te[8] = 0; - te[12] = -x; - te[1] = 0; - te[5] = 2 * h; - te[9] = 0; - te[13] = -y; - te[2] = 0; - te[6] = 0; - te[10] = -2 * p; - te[14] = -z; - te[3] = 0; - te[7] = 0; - te[11] = 0; - te[15] = 1; - return this; - }, - equals: function equals(matrix) { - var te = this.elements; - var me = matrix.elements; - - for (var i = 0; i < 16; i++) { - if (te[i] !== me[i]) return false; - } - - return true; - }, - fromArray: function fromArray(array, offset) { - if (offset === undefined) offset = 0; - - for (var i = 0; i < 16; i++) { - this.elements[i] = array[i + offset]; - } - - return this; - }, - toArray: function toArray(array, offset) { - if (array === undefined) array = []; - if (offset === undefined) offset = 0; - var te = this.elements; - array[offset] = te[0]; - array[offset + 1] = te[1]; - array[offset + 2] = te[2]; - array[offset + 3] = te[3]; - array[offset + 4] = te[4]; - array[offset + 5] = te[5]; - array[offset + 6] = te[6]; - array[offset + 7] = te[7]; - array[offset + 8] = te[8]; - array[offset + 9] = te[9]; - array[offset + 10] = te[10]; - array[offset + 11] = te[11]; - array[offset + 12] = te[12]; - array[offset + 13] = te[13]; - array[offset + 14] = te[14]; - array[offset + 15] = te[15]; - return array; - } -}); - -/** - * @author mrdoob / http://mrdoob.com/ - * @author WestLangley / http://github.com/WestLangley - * @author bhouston / http://clara.io - */ - -var _matrix = new Matrix4(); - -var _quaternion$1 = new Quaternion(); - -function Euler() { - var x = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; - var y = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; - var z = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0; - var order = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : Euler.DefaultOrder; - this._x = x; - this._y = y; - this._z = z; - this._order = order; -} - -Euler.RotationOrders = ['XYZ', 'YZX', 'ZXY', 'XZY', 'YXZ', 'ZYX']; -Euler.DefaultOrder = 'XYZ'; -Object.defineProperties(Euler.prototype, { - x: { - get: function get() { - return this._x; - }, - set: function set(value) { - this._x = value; - - this._onChangeCallback(); - } - }, - y: { - get: function get() { - return this._y; - }, - set: function set(value) { - this._y = value; - - this._onChangeCallback(); - } - }, - z: { - get: function get() { - return this._z; - }, - set: function set(value) { - this._z = value; - - this._onChangeCallback(); - } - }, - order: { - get: function get() { - return this._order; - }, - set: function set(value) { - this._order = value; - - this._onChangeCallback(); - } - } -}); -Object.assign(Euler.prototype, { - isEuler: true, - set: function set(x, y, z, order) { - this._x = x; - this._y = y; - this._z = z; - this._order = order || this._order; - - this._onChangeCallback(); - - return this; - }, - clone: function clone() { - return new this.constructor(this._x, this._y, this._z, this._order); - }, - copy: function copy(euler) { - this._x = euler._x; - this._y = euler._y; - this._z = euler._z; - this._order = euler._order; - - this._onChangeCallback(); - - return this; - }, - setFromRotationMatrix: function setFromRotationMatrix(m, order, update) { - var clamp = MathUtils.clamp; // assumes the upper 3x3 of m is a pure rotation matrix (i.e, unscaled) - - var te = m.elements; - var m11 = te[0]; - var m12 = te[4]; - var m13 = te[8]; - var m21 = te[1]; - var m22 = te[5]; - var m23 = te[9]; - var m31 = te[2]; - var m32 = te[6]; - var m33 = te[10]; - order = order || this._order; - - switch (order) { - case 'XYZ': - this._y = Math.asin(clamp(m13, -1, 1)); - - if (Math.abs(m13) < 0.9999999) { - this._x = Math.atan2(-m23, m33); - this._z = Math.atan2(-m12, m11); - } else { - this._x = Math.atan2(m32, m22); - this._z = 0; - } - - break; - - case 'YXZ': - this._x = Math.asin(-clamp(m23, -1, 1)); - - if (Math.abs(m23) < 0.9999999) { - this._y = Math.atan2(m13, m33); - this._z = Math.atan2(m21, m22); - } else { - this._y = Math.atan2(-m31, m11); - this._z = 0; - } - - break; - - case 'ZXY': - this._x = Math.asin(clamp(m32, -1, 1)); - - if (Math.abs(m32) < 0.9999999) { - this._y = Math.atan2(-m31, m33); - this._z = Math.atan2(-m12, m22); - } else { - this._y = 0; - this._z = Math.atan2(m21, m11); - } - - break; - - case 'ZYX': - this._y = Math.asin(-clamp(m31, -1, 1)); - - if (Math.abs(m31) < 0.9999999) { - this._x = Math.atan2(m32, m33); - this._z = Math.atan2(m21, m11); - } else { - this._x = 0; - this._z = Math.atan2(-m12, m22); - } - - break; - - case 'YZX': - this._z = Math.asin(clamp(m21, -1, 1)); - - if (Math.abs(m21) < 0.9999999) { - this._x = Math.atan2(-m23, m22); - this._y = Math.atan2(-m31, m11); - } else { - this._x = 0; - this._y = Math.atan2(m13, m33); - } - - break; - - case 'XZY': - this._z = Math.asin(-clamp(m12, -1, 1)); - - if (Math.abs(m12) < 0.9999999) { - this._x = Math.atan2(m32, m22); - this._y = Math.atan2(m13, m11); - } else { - this._x = Math.atan2(-m23, m33); - this._y = 0; - } - - break; - - default: - console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: ".concat(order)); - } - - this._order = order; - if (update !== false) this._onChangeCallback(); - return this; - }, - setFromQuaternion: function setFromQuaternion(q, order, update) { - _matrix.makeRotationFromQuaternion(q); - - return this.setFromRotationMatrix(_matrix, order, update); - }, - setFromVector3: function setFromVector3(v, order) { - return this.set(v.x, v.y, v.z, order || this._order); - }, - reorder: function reorder(newOrder) { - // WARNING: this discards revolution information -bhouston - _quaternion$1.setFromEuler(this); - - return this.setFromQuaternion(_quaternion$1, newOrder); - }, - equals: function equals(euler) { - return euler._x === this._x && euler._y === this._y && euler._z === this._z && euler._order === this._order; - }, - fromArray: function fromArray(array) { - this._x = array[0]; - this._y = array[1]; - this._z = array[2]; - if (array[3] !== undefined) this._order = array[3]; - - this._onChangeCallback(); - - return this; - }, - toArray: function toArray(array, offset) { - if (array === undefined) array = []; - if (offset === undefined) offset = 0; - array[offset] = this._x; - array[offset + 1] = this._y; - array[offset + 2] = this._z; - array[offset + 3] = this._order; - return array; - }, - toVector3: function toVector3(optionalResult) { - if (optionalResult) { - return optionalResult.set(this._x, this._y, this._z); - } - - return new Vector3(this._x, this._y, this._z); - }, - _onChange: function _onChange(callback) { - this._onChangeCallback = callback; - return this; - }, - _onChangeCallback: function _onChangeCallback() {} -}); - -/** - * @author mrdoob / http://mrdoob.com/ - * @author philogb / http://blog.thejit.org/ - * @author egraether / http://egraether.com/ - * @author zz85 / http://www.lab4games.net/zz85/blog - */ -function Vector2() { - var x = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; - var y = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; - this.x = x; - this.y = y; -} - -Object.defineProperties(Vector2.prototype, { - width: { - get: function get() { - return this.x; - }, - set: function set(value) { - this.x = value; - } - }, - height: { - get: function get() { - return this.y; - }, - set: function set(value) { - this.y = value; - } - } -}); -Object.assign(Vector2.prototype, { - isVector2: true, - set: function set(x, y) { - this.x = x; - this.y = y; - return this; - }, - setScalar: function setScalar(scalar) { - this.x = scalar; - this.y = scalar; - return this; - }, - setX: function setX(x) { - this.x = x; - return this; - }, - setY: function setY(y) { - this.y = y; - return this; - }, - setComponent: function setComponent(index, value) { - switch (index) { - case 0: - this.x = value; - break; - - case 1: - this.y = value; - break; - - default: - throw new Error("index is out of range: ".concat(index)); - } - - return this; - }, - getComponent: function getComponent(index) { - switch (index) { - case 0: - return this.x; - - case 1: - return this.y; - - default: - throw new Error("index is out of range: ".concat(index)); - } - }, - clone: function clone() { - return new this.constructor(this.x, this.y); - }, - copy: function copy(v) { - this.x = v.x; - this.y = v.y; - return this; - }, - add: function add(v, w) { - if (w !== undefined) { - console.warn('THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead.'); - return this.addVectors(v, w); - } - - this.x += v.x; - this.y += v.y; - return this; - }, - addScalar: function addScalar(s) { - this.x += s; - this.y += s; - return this; - }, - addVectors: function addVectors(a, b) { - this.x = a.x + b.x; - this.y = a.y + b.y; - return this; - }, - addScaledVector: function addScaledVector(v, s) { - this.x += v.x * s; - this.y += v.y * s; - return this; - }, - sub: function sub(v, w) { - if (w !== undefined) { - console.warn('THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead.'); - return this.subVectors(v, w); - } - - this.x -= v.x; - this.y -= v.y; - return this; - }, - subScalar: function subScalar(s) { - this.x -= s; - this.y -= s; - return this; - }, - subVectors: function subVectors(a, b) { - this.x = a.x - b.x; - this.y = a.y - b.y; - return this; - }, - multiply: function multiply(v) { - this.x *= v.x; - this.y *= v.y; - return this; - }, - multiplyScalar: function multiplyScalar(scalar) { - this.x *= scalar; - this.y *= scalar; - return this; - }, - divide: function divide(v) { - this.x /= v.x; - this.y /= v.y; - return this; - }, - divideScalar: function divideScalar(scalar) { - return this.multiplyScalar(1 / scalar); - }, - applyMatrix3: function applyMatrix3(m) { - var x = this.x; - var y = this.y; - var e = m.elements; - this.x = e[0] * x + e[3] * y + e[6]; - this.y = e[1] * x + e[4] * y + e[7]; - return this; - }, - min: function min(v) { - this.x = Math.min(this.x, v.x); - this.y = Math.min(this.y, v.y); - return this; - }, - max: function max(v) { - this.x = Math.max(this.x, v.x); - this.y = Math.max(this.y, v.y); - return this; - }, - clamp: function clamp(min, max) { - // assumes min < max, componentwise - this.x = Math.max(min.x, Math.min(max.x, this.x)); - this.y = Math.max(min.y, Math.min(max.y, this.y)); - return this; - }, - clampScalar: function clampScalar(minVal, maxVal) { - this.x = Math.max(minVal, Math.min(maxVal, this.x)); - this.y = Math.max(minVal, Math.min(maxVal, this.y)); - return this; - }, - clampLength: function clampLength(min, max) { - var length = this.length(); - return this.divideScalar(length || 1).multiplyScalar(Math.max(min, Math.min(max, length))); - }, - floor: function floor() { - this.x = Math.floor(this.x); - this.y = Math.floor(this.y); - return this; - }, - ceil: function ceil() { - this.x = Math.ceil(this.x); - this.y = Math.ceil(this.y); - return this; - }, - round: function round() { - this.x = Math.round(this.x); - this.y = Math.round(this.y); - return this; - }, - roundToZero: function roundToZero() { - this.x = this.x < 0 ? Math.ceil(this.x) : Math.floor(this.x); - this.y = this.y < 0 ? Math.ceil(this.y) : Math.floor(this.y); - return this; - }, - negate: function negate() { - this.x = -this.x; - this.y = -this.y; - return this; - }, - dot: function dot(v) { - return this.x * v.x + this.y * v.y; - }, - cross: function cross(v) { - return this.x * v.y - this.y * v.x; - }, - lengthSq: function lengthSq() { - return this.x * this.x + this.y * this.y; - }, - length: function length() { - return Math.sqrt(this.x * this.x + this.y * this.y); - }, - manhattanLength: function manhattanLength() { - return Math.abs(this.x) + Math.abs(this.y); - }, - normalize: function normalize() { - return this.divideScalar(this.length() || 1); - }, - angle: function angle() { - // computes the angle in radians with respect to the positive x-axis - var angle1 = Math.atan2(-this.y, -this.x) + Math.PI; - return angle1; - }, - distanceTo: function distanceTo(v) { - return Math.sqrt(this.distanceToSquared(v)); - }, - distanceToSquared: function distanceToSquared(v) { - var dx = this.x - v.x; - var dy = this.y - v.y; - return dx * dx + dy * dy; - }, - manhattanDistanceTo: function manhattanDistanceTo(v) { - return Math.abs(this.x - v.x) + Math.abs(this.y - v.y); - }, - setLength: function setLength(length) { - return this.normalize().multiplyScalar(length); - }, - lerp: function lerp(v, alpha) { - this.x += (v.x - this.x) * alpha; - this.y += (v.y - this.y) * alpha; - return this; - }, - lerpVectors: function lerpVectors(v1, v2, alpha) { - this.x = v1.x + (v2.x - v1.x) * alpha; - this.y = v1.y + (v2.y - v1.y) * alpha; - return this; - }, - equals: function equals(v) { - return v.x === this.x && v.y === this.y; - }, - fromArray: function fromArray(array, offset) { - if (offset === undefined) offset = 0; - this.x = array[offset]; - this.y = array[offset + 1]; - return this; - }, - toArray: function toArray(array, offset) { - if (array === undefined) array = []; - if (offset === undefined) offset = 0; - array[offset] = this.x; - array[offset + 1] = this.y; - return array; - }, - fromBufferAttribute: function fromBufferAttribute(attribute, index, offset) { - if (offset !== undefined) { - console.warn('THREE.Vector2: offset has been removed from .fromBufferAttribute().'); - } - - this.x = attribute.getX(index); - this.y = attribute.getY(index); - return this; - }, - rotateAround: function rotateAround(center, angle) { - var c = Math.cos(angle); - var s = Math.sin(angle); - var x = this.x - center.x; - var y = this.y - center.y; - this.x = x * c - y * s + center.x; - this.y = x * s + y * c + center.y; - return this; - }, - random: function random() { - this.x = Math.random(); - this.y = Math.random(); - return this; - } -}); - -var constant = function(x){ - return function(){ - return x; - } -}; - -function linear(a, d) { - return function(t) { - return a + t * d; - }; -} - -function exponential(a, b, y) { - return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function(t) { - return Math.pow(a + t * b, y); - }; -} - -function gamma(y) { - return (y = +y) === 1 ? nogamma : function(a, b) { - return b - a ? exponential(a, b, y) : constant(isNaN(a) ? b : a); - }; -} - -function nogamma(a, b) { - var d = b - a; - return d ? linear(a, d) : constant(isNaN(a) ? b : a); -} - -function define(constructor, factory, prototype) { - constructor.prototype = factory.prototype = prototype; - prototype.constructor = constructor; -} - -function extend(parent, definition) { - var prototype = Object.create(parent.prototype); - for (var key in definition) prototype[key] = definition[key]; - return prototype; -} - -function Color() {} - -var darker = 0.7; -var brighter = 1 / darker; - -var reI = "\\s*([+-]?\\d+)\\s*", - reN = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*", - reP = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*", - reHex = /^#([0-9a-f]{3,8})$/, - reRgbInteger = new RegExp("^rgb\\(" + [reI, reI, reI] + "\\)$"), - reRgbPercent = new RegExp("^rgb\\(" + [reP, reP, reP] + "\\)$"), - reRgbaInteger = new RegExp("^rgba\\(" + [reI, reI, reI, reN] + "\\)$"), - reRgbaPercent = new RegExp("^rgba\\(" + [reP, reP, reP, reN] + "\\)$"), - reHslPercent = new RegExp("^hsl\\(" + [reN, reP, reP] + "\\)$"), - reHslaPercent = new RegExp("^hsla\\(" + [reN, reP, reP, reN] + "\\)$"); - -var named = { - aliceblue: 0xf0f8ff, - antiquewhite: 0xfaebd7, - aqua: 0x00ffff, - aquamarine: 0x7fffd4, - azure: 0xf0ffff, - beige: 0xf5f5dc, - bisque: 0xffe4c4, - black: 0x000000, - blanchedalmond: 0xffebcd, - blue: 0x0000ff, - blueviolet: 0x8a2be2, - brown: 0xa52a2a, - burlywood: 0xdeb887, - cadetblue: 0x5f9ea0, - chartreuse: 0x7fff00, - chocolate: 0xd2691e, - coral: 0xff7f50, - cornflowerblue: 0x6495ed, - cornsilk: 0xfff8dc, - crimson: 0xdc143c, - cyan: 0x00ffff, - darkblue: 0x00008b, - darkcyan: 0x008b8b, - darkgoldenrod: 0xb8860b, - darkgray: 0xa9a9a9, - darkgreen: 0x006400, - darkgrey: 0xa9a9a9, - darkkhaki: 0xbdb76b, - darkmagenta: 0x8b008b, - darkolivegreen: 0x556b2f, - darkorange: 0xff8c00, - darkorchid: 0x9932cc, - darkred: 0x8b0000, - darksalmon: 0xe9967a, - darkseagreen: 0x8fbc8f, - darkslateblue: 0x483d8b, - darkslategray: 0x2f4f4f, - darkslategrey: 0x2f4f4f, - darkturquoise: 0x00ced1, - darkviolet: 0x9400d3, - deeppink: 0xff1493, - deepskyblue: 0x00bfff, - dimgray: 0x696969, - dimgrey: 0x696969, - dodgerblue: 0x1e90ff, - firebrick: 0xb22222, - floralwhite: 0xfffaf0, - forestgreen: 0x228b22, - fuchsia: 0xff00ff, - gainsboro: 0xdcdcdc, - ghostwhite: 0xf8f8ff, - gold: 0xffd700, - goldenrod: 0xdaa520, - gray: 0x808080, - green: 0x008000, - greenyellow: 0xadff2f, - grey: 0x808080, - honeydew: 0xf0fff0, - hotpink: 0xff69b4, - indianred: 0xcd5c5c, - indigo: 0x4b0082, - ivory: 0xfffff0, - khaki: 0xf0e68c, - lavender: 0xe6e6fa, - lavenderblush: 0xfff0f5, - lawngreen: 0x7cfc00, - lemonchiffon: 0xfffacd, - lightblue: 0xadd8e6, - lightcoral: 0xf08080, - lightcyan: 0xe0ffff, - lightgoldenrodyellow: 0xfafad2, - lightgray: 0xd3d3d3, - lightgreen: 0x90ee90, - lightgrey: 0xd3d3d3, - lightpink: 0xffb6c1, - lightsalmon: 0xffa07a, - lightseagreen: 0x20b2aa, - lightskyblue: 0x87cefa, - lightslategray: 0x778899, - lightslategrey: 0x778899, - lightsteelblue: 0xb0c4de, - lightyellow: 0xffffe0, - lime: 0x00ff00, - limegreen: 0x32cd32, - linen: 0xfaf0e6, - magenta: 0xff00ff, - maroon: 0x800000, - mediumaquamarine: 0x66cdaa, - mediumblue: 0x0000cd, - mediumorchid: 0xba55d3, - mediumpurple: 0x9370db, - mediumseagreen: 0x3cb371, - mediumslateblue: 0x7b68ee, - mediumspringgreen: 0x00fa9a, - mediumturquoise: 0x48d1cc, - mediumvioletred: 0xc71585, - midnightblue: 0x191970, - mintcream: 0xf5fffa, - mistyrose: 0xffe4e1, - moccasin: 0xffe4b5, - navajowhite: 0xffdead, - navy: 0x000080, - oldlace: 0xfdf5e6, - olive: 0x808000, - olivedrab: 0x6b8e23, - orange: 0xffa500, - orangered: 0xff4500, - orchid: 0xda70d6, - palegoldenrod: 0xeee8aa, - palegreen: 0x98fb98, - paleturquoise: 0xafeeee, - palevioletred: 0xdb7093, - papayawhip: 0xffefd5, - peachpuff: 0xffdab9, - peru: 0xcd853f, - pink: 0xffc0cb, - plum: 0xdda0dd, - powderblue: 0xb0e0e6, - purple: 0x800080, - rebeccapurple: 0x663399, - red: 0xff0000, - rosybrown: 0xbc8f8f, - royalblue: 0x4169e1, - saddlebrown: 0x8b4513, - salmon: 0xfa8072, - sandybrown: 0xf4a460, - seagreen: 0x2e8b57, - seashell: 0xfff5ee, - sienna: 0xa0522d, - silver: 0xc0c0c0, - skyblue: 0x87ceeb, - slateblue: 0x6a5acd, - slategray: 0x708090, - slategrey: 0x708090, - snow: 0xfffafa, - springgreen: 0x00ff7f, - steelblue: 0x4682b4, - tan: 0xd2b48c, - teal: 0x008080, - thistle: 0xd8bfd8, - tomato: 0xff6347, - turquoise: 0x40e0d0, - violet: 0xee82ee, - wheat: 0xf5deb3, - white: 0xffffff, - whitesmoke: 0xf5f5f5, - yellow: 0xffff00, - yellowgreen: 0x9acd32 -}; - -define(Color, color, { - copy: function(channels) { - return Object.assign(new this.constructor, this, channels); - }, - displayable: function() { - return this.rgb().displayable(); - }, - hex: color_formatHex, // Deprecated! Use color.formatHex. - formatHex: color_formatHex, - formatHsl: color_formatHsl, - formatRgb: color_formatRgb, - toString: color_formatRgb -}); - -function color_formatHex() { - return this.rgb().formatHex(); -} - -function color_formatHsl() { - return hslConvert(this).formatHsl(); -} - -function color_formatRgb() { - return this.rgb().formatRgb(); -} - -function color(format) { - var m, l; - format = (format + "").trim().toLowerCase(); - return (m = reHex.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) // #ff0000 - : l === 3 ? new Rgb((m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1) // #f00 - : l === 8 ? rgba(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000 - : l === 4 ? rgba((m >> 12 & 0xf) | (m >> 8 & 0xf0), (m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), (((m & 0xf) << 4) | (m & 0xf)) / 0xff) // #f000 - : null) // invalid hex - : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0) - : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%) - : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1) - : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1) - : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%) - : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1) - : named.hasOwnProperty(format) ? rgbn(named[format]) // eslint-disable-line no-prototype-builtins - : format === "transparent" ? new Rgb(NaN, NaN, NaN, 0) - : null; -} - -function rgbn(n) { - return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1); -} - -function rgba(r, g, b, a) { - if (a <= 0) r = g = b = NaN; - return new Rgb(r, g, b, a); -} - -function rgbConvert(o) { - if (!(o instanceof Color)) o = color(o); - if (!o) return new Rgb; - o = o.rgb(); - return new Rgb(o.r, o.g, o.b, o.opacity); -} - -function rgb(r, g, b, opacity) { - return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity); -} - -function Rgb(r, g, b, opacity) { - this.r = +r; - this.g = +g; - this.b = +b; - this.opacity = +opacity; -} - -define(Rgb, rgb, extend(Color, { - brighter: function(k) { - k = k == null ? brighter : Math.pow(brighter, k); - return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity); - }, - darker: function(k) { - k = k == null ? darker : Math.pow(darker, k); - return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity); - }, - rgb: function() { - return this; - }, - displayable: function() { - return (-0.5 <= this.r && this.r < 255.5) - && (-0.5 <= this.g && this.g < 255.5) - && (-0.5 <= this.b && this.b < 255.5) - && (0 <= this.opacity && this.opacity <= 1); - }, - hex: rgb_formatHex, // Deprecated! Use color.formatHex. - formatHex: rgb_formatHex, - formatRgb: rgb_formatRgb, - toString: rgb_formatRgb -})); - -function rgb_formatHex() { - return "#" + hex(this.r) + hex(this.g) + hex(this.b); -} - -function rgb_formatRgb() { - var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a)); - return (a === 1 ? "rgb(" : "rgba(") - + Math.max(0, Math.min(255, Math.round(this.r) || 0)) + ", " - + Math.max(0, Math.min(255, Math.round(this.g) || 0)) + ", " - + Math.max(0, Math.min(255, Math.round(this.b) || 0)) - + (a === 1 ? ")" : ", " + a + ")"); -} - -function hex(value) { - value = Math.max(0, Math.min(255, Math.round(value) || 0)); - return (value < 16 ? "0" : "") + value.toString(16); -} - -function hsla(h, s, l, a) { - if (a <= 0) h = s = l = NaN; - else if (l <= 0 || l >= 1) h = s = NaN; - else if (s <= 0) h = NaN; - return new Hsl(h, s, l, a); -} - -function hslConvert(o) { - if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity); - if (!(o instanceof Color)) o = color(o); - if (!o) return new Hsl; - if (o instanceof Hsl) return o; - o = o.rgb(); - var r = o.r / 255, - g = o.g / 255, - b = o.b / 255, - min = Math.min(r, g, b), - max = Math.max(r, g, b), - h = NaN, - s = max - min, - l = (max + min) / 2; - if (s) { - if (r === max) h = (g - b) / s + (g < b) * 6; - else if (g === max) h = (b - r) / s + 2; - else h = (r - g) / s + 4; - s /= l < 0.5 ? max + min : 2 - max - min; - h *= 60; - } else { - s = l > 0 && l < 1 ? 0 : h; - } - return new Hsl(h, s, l, o.opacity); -} - -function hsl(h, s, l, opacity) { - return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity); -} - -function Hsl(h, s, l, opacity) { - this.h = +h; - this.s = +s; - this.l = +l; - this.opacity = +opacity; -} - -define(Hsl, hsl, extend(Color, { - brighter: function(k) { - k = k == null ? brighter : Math.pow(brighter, k); - return new Hsl(this.h, this.s, this.l * k, this.opacity); - }, - darker: function(k) { - k = k == null ? darker : Math.pow(darker, k); - return new Hsl(this.h, this.s, this.l * k, this.opacity); - }, - rgb: function() { - var h = this.h % 360 + (this.h < 0) * 360, - s = isNaN(h) || isNaN(this.s) ? 0 : this.s, - l = this.l, - m2 = l + (l < 0.5 ? l : 1 - l) * s, - m1 = 2 * l - m2; - return new Rgb( - hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2), - hsl2rgb(h, m1, m2), - hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2), - this.opacity - ); - }, - displayable: function() { - return (0 <= this.s && this.s <= 1 || isNaN(this.s)) - && (0 <= this.l && this.l <= 1) - && (0 <= this.opacity && this.opacity <= 1); - }, - formatHsl: function() { - var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a)); - return (a === 1 ? "hsl(" : "hsla(") - + (this.h || 0) + ", " - + (this.s || 0) * 100 + "%, " - + (this.l || 0) * 100 + "%" - + (a === 1 ? ")" : ", " + a + ")"); - } -})); - -/* From FvD 13.37, CSS Color Module Level 3 */ -function hsl2rgb(h, m1, m2) { - return (h < 60 ? m1 + (m2 - m1) * h / 60 - : h < 180 ? m2 - : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60 - : m1) * 255; -} - -var interpolateRgb = (function rgbGamma(y) { - var color = gamma(y); - - function rgb$1(start, end) { - var r = color((start = rgb(start)).r, (end = rgb(end)).r), - g = color(start.g, end.g), - b = color(start.b, end.b), - opacity = nogamma(start.opacity, end.opacity); - return function(t) { - start.r = r(t); - start.g = g(t); - start.b = b(t); - start.opacity = opacity(t); - return start + ""; - }; - } - - rgb$1.gamma = rgbGamma; - - return rgb$1; -})(1); - -/** - * @param keyframesValue "255,255,0,50" 表示rgba - * @return rgba(255, 255, 0, 0.5) - */ -/** - * @param hex "#fbafff" 表示16进制 - * @return rgba(251,175,255,1) - */ -function transformHexToRgba(hex) { - hex = hex.replace('#', '0x'); - var colorNum = Number(hex); - var r = (colorNum >>> 24); - var g = (colorNum >>> 16) & 0x00ff; - var b = (colorNum >>> 8) & 0x0000ff; - var a = colorNum & 0x000000ff; - return "rgba(" + r + "," + g + "," + b + "," + a / 255.0 + ")"; -} -/** - * @param hex "#fbafff" 表示16进制 - * @return { r: 251, g: 175, b: 255, a: 100 } - */ -function transformHexToRgbaObj(hex) { - hex = hex.replace('#', '0x'); - var colorNum = Number(hex); - var r = (colorNum >>> 24); - var g = (colorNum >>> 16) & 0x00ff; - var b = (colorNum >>> 8) & 0x0000ff; - var a = (colorNum & 0x000000ff) / 255.0 * 100; - return { r: r, g: g, b: b, a: a }; -} -/** rgba(0, 233, 250, 0.9448125164992826) - * @param rgba rgba(251, 175, 255, 0.5) - * @return { r: 251, g: 175, b: 255, a: 100 } - */ -function transformRgbaToRgbaObj(rgba) { - var match = rgba.match(/rgba?\((\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*([\d\.]+))?\s*\)/); - if (!match) - return { r: 0, g: 0, b: 0, a: 0 }; - var _a = [Number(match[1]), Number(match[2]), Number(match[3]), Number(match[4])], r = _a[0], g = _a[1], b = _a[2], a = _a[3]; - return { r: r, g: g, b: b, a: isNaN(a) ? 100 : a * 100 }; -} - -var InterpolateColor = /** @class */ (function () { - function InterpolateColor(beginValue, endValue) { - this.startColor = transformHexToRgba(beginValue); - this.endColor = transformHexToRgba(endValue); - this.interpolator = new interpolateRgb(this.startColor, this.endColor); - } - InterpolateColor.prototype.value = function (time) { - var value = this.interpolator(time); - return transformRgbaToRgbaObj(value); - }; - return InterpolateColor; -}()); - -/** - * Bezier Curves formulas obtained from - * http://en.wikipedia.org/wiki/Bézier_curve - */ -function CubicBezierP0(t, p) { - var k = 1 - t; - return k * k * k * p; -} -function CubicBezierP1(t, p) { - var k = 1 - t; - return 3 * k * k * t * p; -} -function CubicBezierP2(t, p) { - return 3 * (1 - t) * t * t * p; -} -function CubicBezierP3(t, p) { - return t * t * t * p; -} -function CubicBezier(t, p0, p1, p2, p3) { - return (CubicBezierP0(t, p0) - + CubicBezierP1(t, p1) - + CubicBezierP2(t, p2) - + CubicBezierP3(t, p3)); -} -var Bezier = /** @class */ (function () { - function Bezier(c1, c2, c3, c4) { - this.c1 = 0.0; - this.c2 = 0.0; - this.c3 = 0.0; - this.c4 = 0.0; - this.c1 = c1; - this.c2 = c2; - this.c3 = c3; - this.c4 = c4; - } - Bezier.prototype.evaluate = function (t) { - return CubicBezier(t, this.c1, this.c2, this.c3, this.c4); - }; - return Bezier; -}()); - -var InterpolateBezier = /** @class */ (function () { - function InterpolateBezier(startValue, endValue) { - this.startValue = startValue; - this.endValue = endValue; - var inter = endValue - startValue; - var c1 = this.startValue; - var c2 = this.startValue + (inter) * 0.25; - var c3 = this.startValue + (inter) * 0.75; - var c4 = this.endValue; - this.interpolator = new Bezier(c1, c2, c3, c4); - } - InterpolateBezier.prototype.value = function (time) { - return this.interpolator.evaluate(time); - }; - return InterpolateBezier; -}()); - -/** - * Abstract base class of interpolants over parametric samples. - * - * The parameter domain is one dimensional, typically the time or a path - * along a curve defined by the data. - * - * The sample values can have any dimensionality and derived classes may - * apply special interpretations to the data. - * - * This class provides the interval seek in a Template Method, deferring - * the actual interpolation to derived classes. - * - * Time complexity is O(1) for linear access crossing at most two points - * and O(log N) for random access, where N is the number of positions. - * - * References: - * - * http://www.oodesign.com/template-method-pattern.html - * - * @author tschw - */ -function Interpolant(parameterPositions, sampleValues, sampleSize, resultBuffer) { - this.parameterPositions = parameterPositions; - this._cachedIndex = 0; - this.resultBuffer = resultBuffer !== undefined ? resultBuffer : new sampleValues.constructor(sampleSize); - this.sampleValues = sampleValues; - this.valueSize = sampleSize; -} - -Object.assign(Interpolant.prototype, { - evaluate: function evaluate(t) { - var pp = this.parameterPositions; - var i1 = this._cachedIndex; - var t1 = pp[i1]; - var t0 = pp[i1 - 1]; - - validate_interval: { - seek: { - var right; - - linear_scan: { - // - See http://jsperf.com/comparison-to-undefined/3 - // - slower code: - // - - // - if ( t >= t1 || t1 === undefined ) { - forward_scan: if (!(t < t1)) { - for (var giveUpAt = i1 + 2;;) { - if (t1 === undefined) { - if (t < t0) break forward_scan; // after end - - i1 = pp.length; - this._cachedIndex = i1; - return this.afterEnd_(i1 - 1, t, t0); - } - - if (i1 === giveUpAt) break; // this loop - - t0 = t1; - t1 = pp[++i1]; - - if (t < t1) { - // we have arrived at the sought interval - break seek; - } - } // prepare binary search on the right side of the index - - - right = pp.length; - break linear_scan; - } // - slower code: - // - if ( t < t0 || t0 === undefined ) { - - - if (!(t >= t0)) { - // looping? - var t1global = pp[1]; - - if (t < t1global) { - i1 = 2; // + 1, using the scan for the details - - t0 = t1global; - } // linear reverse scan - - - for (var _giveUpAt = i1 - 2;;) { - if (t0 === undefined) { - // before start - this._cachedIndex = 0; - return this.beforeStart_(0, t, t1); - } - - if (i1 === _giveUpAt) break; // this loop - - t1 = t0; - t0 = pp[--i1 - 1]; - - if (t >= t0) { - // we have arrived at the sought interval - break seek; - } - } // prepare binary search on the left side of the index - - - right = i1; - i1 = 0; - break linear_scan; - } // the interval is valid - - - break validate_interval; - } // linear scan - // binary search - - - while (i1 < right) { - var mid = i1 + right >>> 1; - - if (t < pp[mid]) { - right = mid; - } else { - i1 = mid + 1; - } - } - - t1 = pp[i1]; - t0 = pp[i1 - 1]; // check boundary cases, again - - if (t0 === undefined) { - this._cachedIndex = 0; - return this.beforeStart_(0, t, t1); - } - - if (t1 === undefined) { - i1 = pp.length; - this._cachedIndex = i1; - return this.afterEnd_(i1 - 1, t0, t); - } - } // seek - - - this._cachedIndex = i1; - this.intervalChanged_(i1, t0, t1); - } // validate_interval - - - return this.interpolate_(i1, t0, t, t1); - }, - settings: null, - // optional, subclass-specific settings structure - // Note: The indirection allows central control of many interpolants. - // --- Protected interface - DefaultSettings_: {}, - getSettings_: function getSettings_() { - return this.settings || this.DefaultSettings_; - }, - copySampleValue_: function copySampleValue_(index) { - // copies a sample value to the result buffer - var result = this.resultBuffer; - var values = this.sampleValues; - var stride = this.valueSize; - var offset = index * stride; - - for (var i = 0; i !== stride; ++i) { - result[i] = values[offset + i]; - } - - return result; - }, - // Template methods for derived classes: - interpolate_: function interpolate_() - /* i1, t0, t, t1 */ - { - throw new Error('call to abstract method'); // implementations shall return this.resultBuffer - }, - intervalChanged_: function intervalChanged_() - /* i1, t0, t1 */ - {// empty - } -}); // DECLARE ALIAS AFTER assign prototype - -Object.assign(Interpolant.prototype, { - // ( 0, t, t0 ), returns this.resultBuffer - beforeStart_: Interpolant.prototype.copySampleValue_, - // ( N-1, tN-1, t ), returns this.resultBuffer - afterEnd_: Interpolant.prototype.copySampleValue_ -}); - -/** - * @author tschw - */ - -function LinearInterpolant(parameterPositions, sampleValues, sampleSize, resultBuffer) { - Interpolant.call(this, parameterPositions, sampleValues, sampleSize, resultBuffer); -} - -LinearInterpolant.prototype = Object.assign(Object.create(Interpolant.prototype), { - constructor: LinearInterpolant, - interpolate_: function interpolate_(i1, t0, t, t1) { - var result = this.resultBuffer; - var values = this.sampleValues; - var stride = this.valueSize; - var offset1 = i1 * stride; - var offset0 = offset1 - stride; - var weight1 = (t - t0) / (t1 - t0); - var weight0 = 1 - weight1; - - for (var i = 0; i !== stride; ++i) { - result[i] = values[offset0 + i] * weight0 + values[offset1 + i] * weight1; - } - - return result; - } -}); - -var InterpolateLinear = /** @class */ (function () { - function InterpolateLinear(startValue, endValue) { - this.startValue = startValue; - this.endValue = endValue; - var times = [0, 1]; - var values = [startValue, endValue]; - var valueSize = values.length / times.length; - this.interpolator = new LinearInterpolant(times, values, valueSize); - } - InterpolateLinear.prototype.value = function (time) { - var value = this.interpolator.evaluate(time); - return value[0]; - }; - return InterpolateLinear; -}()); - -// 插值类型 -var InterpolationType; -(function (InterpolationType) { - InterpolationType[InterpolationType["Linear"] = 0] = "Linear"; - InterpolationType[InterpolationType["Bezier"] = 1] = "Bezier"; -})(InterpolationType || (InterpolationType = {})); -// 关键帧动画类型 -var KeyframeMode; -(function (KeyframeMode) { - KeyframeMode[KeyframeMode["Continuous"] = 0] = "Continuous"; - KeyframeMode[KeyframeMode["Discontinuous"] = 1] = "Discontinuous"; -})(KeyframeMode || (KeyframeMode = {})); -// 关键帧外插模式 (曲线在第一个关键帧之前和最后一个关键帧之后的延伸方式) -var ExtrapolationMode; -(function (ExtrapolationMode) { - ExtrapolationMode[ExtrapolationMode["Constant"] = 0] = "Constant"; - ExtrapolationMode[ExtrapolationMode["Linear"] = 1] = "Linear"; -})(ExtrapolationMode || (ExtrapolationMode = {})); -// 默认的插值类型 -var DEFAULT_EASING = InterpolationType.Linear; -// 默认的关键帧 -var DEFAULT_KEYFRAME = [0, 0, InterpolationType.Linear]; -// 默认的外插模式 -var DEFAULT_EXTRAPOLATION_MODE = ExtrapolationMode.Linear; -var AnimationClipState; -(function (AnimationClipState) { - AnimationClipState[AnimationClipState["Stopped"] = 0] = "Stopped"; - AnimationClipState[AnimationClipState["Playing"] = 1] = "Playing"; - AnimationClipState[AnimationClipState["Paused"] = 2] = "Paused"; -})(AnimationClipState || (AnimationClipState = {})); -var AnimationClipType; -(function (AnimationClipType) { - AnimationClipType[AnimationClipType["Component"] = 0] = "Component"; - AnimationClipType[AnimationClipType["GlTF"] = 1] = "GlTF"; -})(AnimationClipType || (AnimationClipType = {})); -var ValueType; -(function (ValueType) { - ValueType[ValueType["Num"] = 0] = "Num"; - ValueType[ValueType["Hex"] = 1] = "Hex"; - ValueType[ValueType["Mat3f"] = 2] = "Mat3f"; - ValueType[ValueType["Quaternion"] = 3] = "Quaternion"; -})(ValueType || (ValueType = {})); -var PropertyValueType; -(function (PropertyValueType) { - PropertyValueType[PropertyValueType["number"] = 0] = "number"; - PropertyValueType[PropertyValueType["string"] = 1] = "string"; - PropertyValueType[PropertyValueType["quaternion"] = 2] = "quaternion"; -})(PropertyValueType || (PropertyValueType = {})); - -var InterpolateMat3f = /** @class */ (function () { - function InterpolateMat3f(startValue, endValue, interpolationType) { - var _this = this; - this.startValues = startValue.split(',').map(parseFloat); - this.endValues = endValue.split(',').map(parseFloat); - this.interpolators = this.startValues.map(function (v1, index) { - if (interpolationType === InterpolationType.Bezier) { - return new InterpolateLinear(v1, _this.endValues[index]); - } - return new InterpolateBezier(v1, _this.endValues[index]); - }); - } - InterpolateMat3f.prototype.value = function (time) { - var values = this.interpolators.map(function (interpolator) { return interpolator.value(time); }); - return values.join(','); - }; - return InterpolateMat3f; -}()); - -var Keyframe = /** @class */ (function () { - function Keyframe(keyFrameArray) { - var _a = keyFrameArray || DEFAULT_KEYFRAME, time = _a[0], value = _a[1], interpolationType = _a[2]; - this.time = time; - this.value = value; - this.interpolationType = interpolationType; - } - Keyframe.prototype.getTime = function () { - return this.time; - }; - Keyframe.prototype.getValue = function () { - return this.value; - }; - Keyframe.prototype.getType = function () { - return this.interpolationType; - }; - return Keyframe; -}()); - -/** - * 欧拉角旋转 转 四元数 - * @param x - * @param y - * @param z - */ -function eulerToQuaternion(x, y, z) { - var degToAngle = Math.PI / 180; - var v3 = new Euler(x * degToAngle, y * degToAngle, z * degToAngle); - var quat = new Quaternion(); - quat.setFromEuler(v3); - var rotation = { - x: quat.x, - y: quat.y, - z: quat.z, - w: quat.w, - }; - return rotation; -} -/** 渐变方法 **/ -var GradientType; -(function (GradientType) { - GradientType[GradientType["LINEAR"] = 1] = "LINEAR"; - GradientType[GradientType["EASE_IN"] = 2] = "EASE_IN"; - GradientType[GradientType["EASE_OUT"] = 3] = "EASE_OUT"; - GradientType[GradientType["EASE_IN_OUT"] = 4] = "EASE_IN_OUT"; -})(GradientType || (GradientType = {})); - -var KeyframeTrack = /** @class */ (function () { - function KeyframeTrack(propertyTrack, duration) { - var propertyPath = propertyTrack.propertyPath, keyframes = propertyTrack.keyframes, _a = propertyTrack.valueType, valueType = _a === void 0 ? ValueType.Num : _a; - this.initPropertyPath(propertyPath); - this.initKeyframes(keyframes); - this.valueType = valueType; - this.duration = duration; - this.extrapolationMode = DEFAULT_EXTRAPOLATION_MODE; - this.cacheValueMap = {}; - this.cacheInterpolatorMap = {}; - } - // "1/BasicTransform/position/x" => name, entityId, componentType, attributePath - KeyframeTrack.prototype.initPropertyPath = function (propertyPath) { - var _a = propertyPath.split('/'), entityId = _a[0], componentType = _a[1], attributePath = _a.slice(2); - this.name = propertyPath; - this.entityId = entityId; - this.componentType = componentType; - this.attributePath = attributePath.join('.'); - }; - KeyframeTrack.prototype.initKeyframes = function (keyframes) { - this.keyframes = keyframes.sort(function (a, b) { - var _a = [a[0], b[0]], time1 = _a[0], time2 = _a[1]; - return time1 - time2; - }).map(function (keyframe) { return new Keyframe(keyframe); }); // 根据时间对关键帧排序 - this.firstKeyframe = this.keyframes[0]; // 第一个关键帧 - this.finallyKeyframe = this.keyframes[this.keyframes.length - 1]; // 最后一个关键帧 - }; - KeyframeTrack.prototype.getValueAt = function (deltaTime) { - // 1. 边界条件判断 - if (isNaN(deltaTime)) - return; - if (deltaTime <= 0) - return this.transformValueByType(this.firstKeyframe.getValue()); - if (deltaTime >= this.duration) - return this.finallyKeyframe.getValue(); // 边界条件 -> 时间大于总时长 (可能吗?) - // 2. 从cache里面找找看 - if (this.cacheValueMap[deltaTime]) - return this.cacheValueMap[deltaTime]; - // 3. 找到此时的时间在关键帧中所处的位置, 并计算参数 - var _a = this.calcParams(deltaTime), currentTime = _a[0], beginValue = _a[1], endValue = _a[2], duration = _a[3], interpolationType = _a[4]; - // 4. 计算插值 - var value = this.getInterpolationValue(currentTime, beginValue, endValue, duration, interpolationType); - // 5. 缓存 - this.cacheValueMap[deltaTime] = value; - return value; - }; - KeyframeTrack.prototype.getName = function () { - return this.name; - }; - KeyframeTrack.prototype.getComponentType = function () { - return this.componentType; - }; - KeyframeTrack.prototype.getAttributePath = function () { - return this.attributePath; - }; - KeyframeTrack.prototype.getValueType = function () { - return this.valueType; - }; - KeyframeTrack.prototype.transformValueByType = function (value) { - switch (this.valueType) { - case ValueType.Hex: - return transformHexToRgbaObj(value); - case ValueType.Quaternion: - return eulerToQuaternion(value.x, value.y, value.z); - default: - return value; - } - }; - KeyframeTrack.prototype.calcParams = function (deltaTime) { - switch (this.extrapolationMode) { - case ExtrapolationMode.Constant: - return this.calcParamsConstant(deltaTime); - case ExtrapolationMode.Linear: - return this.calcParamsLinear(deltaTime); - default: - return this.calcParamsLinear(deltaTime); - } - }; - // 计算 常量 关键帧外插模式时候的参数 (第一帧之前的帧跟第一帧一样, 最后一帧之后的帧和最后一帧一样, 如果前一个关键帧已经是最后一个关键帧,那么后一个关键帧也使用该帧) - KeyframeTrack.prototype.calcParamsConstant = function (deltaTime) { - var currentTime; - var beginValue; - var endValue; - var duration; - var interpolationType; - if (deltaTime <= this.firstKeyframe.getTime()) { // 2.1 处于第一个关键帧之前 - currentTime = deltaTime; - beginValue = this.firstKeyframe.getValue(); - endValue = this.firstKeyframe.getValue(); - duration = this.firstKeyframe.getTime(); - interpolationType = this.firstKeyframe.getType(); - } - else if (deltaTime >= this.finallyKeyframe.getTime()) { // 2.1 处于最后一个关键帧之后 - currentTime = deltaTime - this.finallyKeyframe.getTime(); - beginValue = this.finallyKeyframe.getValue(); - endValue = this.finallyKeyframe.getValue(); - duration = this.duration - this.finallyKeyframe.getTime(); - interpolationType = this.finallyKeyframe.getType(); - } - else { // 2.3 处于中间关键帧之间, 进行二分查找 - var _a = this.binarySearchKeyframe(deltaTime), beforeKeyframe = _a[0], afterKeyframe = _a[1]; - currentTime = deltaTime - beforeKeyframe.getTime(); - beginValue = beforeKeyframe.getValue(); - endValue = afterKeyframe.getValue(); - duration = afterKeyframe.getTime() - beforeKeyframe.getTime(); - interpolationType = afterKeyframe.getType(); - } - return [currentTime, beginValue, endValue, duration, interpolationType]; - }; - // 计算 线性 关键帧外插模式时候的参数 (第一帧之前的帧使用最后一帧, 最后一帧之后的帧使用第一帧) - KeyframeTrack.prototype.calcParamsLinear = function (deltaTime) { - var currentTime; - var beginValue; - var endValue; - var duration; - var interpolationType; - if (deltaTime <= this.firstKeyframe.getTime()) { // 2.1 处于第一个关键帧之前 - currentTime = deltaTime; - beginValue = this.firstKeyframe.getValue(); - endValue = this.firstKeyframe.getValue(); - duration = this.firstKeyframe.getTime(); - interpolationType = this.firstKeyframe.getType(); - } - else if (deltaTime >= this.finallyKeyframe.getTime()) { // 2.1 处于最后一个关键帧之后 - currentTime = deltaTime - this.finallyKeyframe.getTime(); - beginValue = this.finallyKeyframe.getValue(); - endValue = this.finallyKeyframe.getValue(); - duration = this.duration - this.finallyKeyframe.getTime(); - interpolationType = this.finallyKeyframe.getType(); - } - else { // 2.3 处于中间关键帧之间 - var _a = this.binarySearchKeyframe(deltaTime), beforeKeyframe = _a[0], afterKeyframe = _a[1]; - currentTime = deltaTime - beforeKeyframe.getTime(); - beginValue = beforeKeyframe.getValue(); - endValue = afterKeyframe.getValue(); - duration = afterKeyframe.getTime() - beforeKeyframe.getTime(); - interpolationType = afterKeyframe.getType(); - } - return [currentTime, beginValue, endValue, duration, interpolationType]; - }; - // 二分法查找前后帧 - KeyframeTrack.prototype.binarySearchKeyframe = function (deltaTime) { - var keyframes = this.keyframes; - var left = 0; - var right = keyframes.length - 1; - while (left <= right) { - var mid = left + Math.floor((right - left) / 2); - var currentFrame = keyframes[mid]; - if (deltaTime < currentFrame.getTime()) { // 如果 deltaTime < 当前的时间, 则查找前半部分 - right = mid; - } - else if (deltaTime > currentFrame.getTime()) { // 如果 deltaTime > 当前的时间, 则查找后半部分 - left = mid; - } - else { // 正好时间是相等的 - return [keyframes[mid], keyframes[mid]]; - } - if (right - left === 1) { // 找到前后帧 - return [keyframes[left], keyframes[right]]; - } - } - return [keyframes[left], keyframes[right]]; - }; - KeyframeTrack.prototype.getInterpolationType = function (beforeKeyframe, afterKeyframe) { - if (!afterKeyframe) - return beforeKeyframe.getType(); - return afterKeyframe.getType(); - }; - KeyframeTrack.prototype.getInterpolationValue = function (deltaTime, beginValue, endValue, duration, interpolationType) { - var interpolator = this.getInterpolator(beginValue, endValue, duration, interpolationType); - var time = isNaN(deltaTime / duration) ? 0 : deltaTime / duration; - var value = interpolator.value(time); - return value; - }; - KeyframeTrack.prototype.getInterpolator = function (beginValue, endValue, duration, interpolationType) { - var key = "key-" + beginValue + "-" + endValue + "-" + duration; - if (this.cacheInterpolatorMap[key]) { - return this.cacheInterpolatorMap[key]; - } - var interpolator; - switch (this.valueType) { - case ValueType.Hex: - interpolator = new InterpolateColor(beginValue, endValue); - break; - case ValueType.Mat3f: - interpolator = new InterpolateMat3f(beginValue, endValue, interpolationType); - break; - default: - switch (interpolationType) { - case InterpolationType.Bezier: - interpolator = new InterpolateBezier(beginValue, endValue); - break; - case InterpolationType.Linear: - default: - interpolator = new InterpolateLinear(beginValue, endValue); - break; - } - } - this.cacheInterpolatorMap[key] = interpolator; - return interpolator; - }; - return KeyframeTrack; -}()); - -var Animation = /** @class */ (function () { - function Animation(config) { - this.propertyTracks = []; - this.init(config); - } - Animation.prototype.init = function (config) { - var _this = this; - this.duration = config.duration; - this.propertyTracks = config.propertyTracks; - // 1. 根据 propertyTracks 数组生成对应的 KeyframeTrack数组 - this.keyframeTracks = this.propertyTracks.map(function (propertyTrack) { return new KeyframeTrack(propertyTrack, _this.duration); }); - }; - // 根据current time(µs microsecond 微秒)获取插值 - Animation.prototype.getValueAtTime = function (time) { - var deltaTime = time % this.duration; - return this.getValueAtDeltaTime(deltaTime); - }; - // 根据delta time(µs microsecond 微秒)获取插值 - Animation.prototype.getValueAtDeltaTime = function (deltaTime) { - var values = this.keyframeTracks.map(function (keyframeTrack) { return ({ - componentType: keyframeTrack.getComponentType(), - propertyPath: keyframeTrack.getAttributePath(), - valueType: keyframeTrack.getValueType(), - value: keyframeTrack.getValueAt(deltaTime), - }); }); - return values; - }; - // 根据progress(百分比)获取插值 - Animation.prototype.getValueAtProgress = function (progress) { - var deltaTime = this.duration * progress; - return this.getValueAtDeltaTime(deltaTime); - }; - return Animation; -}()); - -// eslint-disable-next-line @typescript-eslint/no-unused-vars -function patchComponent(component, _propertyPath, _valueType) { - Object.defineProperties(component, { - getComponentInstance: { - value: function (componentType, propertyPath) { - switch (componentType) { - case light.MeshRenderer3DComponent.componentType: { - var index = propertyPath.split('.')[0]; - return component.getPrimitiveMaterial(Number(index)).asPbrMaterial(); - } - default: - return component; - } - }, - }, - setProperty: { - value: function (c, _, propertyPath, value, valueType) { - switch (valueType) { - case ValueType.Hex: { - var r = value.r, g = value.g, b = value.b, a = value.a; - c.base_color_factor_.set(0, parseFloat(r) / 255); - c.base_color_factor_.set(1, parseFloat(g) / 255); - c.base_color_factor_.set(2, parseFloat(b) / 255); - c.base_color_factor_.set(3, parseFloat(a) / 100); - break; - } - case ValueType.Mat3f: { - var _a = value.split(',').map(parseFloat), v1 = _a[0], v2 = _a[1], v3 = _a[2], v4 = _a[3], v5 = _a[4], v6 = _a[5], v7 = _a[6], v8 = _a[7], v9 = _a[8]; - var m1 = light.float3.create(v1, v2, v3); - var m2 = light.float3.create(v4, v5, v6); - var m3 = light.float3.create(v7, v8, v9); - c.base_color_uv_matrix_.set(0, m1); - c.base_color_uv_matrix_.set(1, m2); - c.base_color_uv_matrix_.set(2, m3); - break; - } - default: { - var component_1 = c; - var keyPath = propertyPath.split('.'); - var lastKeyIndex = keyPath.length - 1; - for (var i = 0; i < lastKeyIndex; i++) { - var key = keyPath[i]; - if (!(key in component_1)) { - component_1[key] = parseInt(key) !== parseInt(key) ? {} : []; - } - component_1 = component_1[key]; - } - component_1[keyPath[lastKeyIndex]] = value; - } - } - }, - }, - }); -} -var AnimationController = /** @class */ (function (_super) { - __extends(AnimationController, _super); - function AnimationController(entityId, entityManager, eventManager, scriptSystem) { - var _this = _super.call(this, entityId, entityManager, eventManager, scriptSystem) || this; - _this.cacheClipsProgress = []; - _this.resourceVersions = []; - _this.configure(); - return _this; - } - AnimationController.prototype.configure = function () { - console.log('AnimationBehavior ----> configure'); - // 0. 没有组件动画提前return - var animationClips = this.getAnimationControllerClips(); - var hasComponentAnimation = this.hasComponentAnimation(animationClips); - if (!hasComponentAnimation) - return; - // 1. 读取文件 - var resourceKey = this.getResourceKey(); - if (!resourceKey) - return; - var fileData = light.FileSystem.readTextFromResource(this.entityManager, resourceKey); - // 2. 获取关键帧信息 - var animationData = JSON.parse(fileData); - var clips = animationData.clips; - // 3. 初始化动画数组 - this.animationClips = clips.map(function (clip) { return new Animation(clip); }); - // 4. 缓存此时的动画组件播放状态 - this.backupResourceVersion(); - }; - AnimationController.prototype.backupResourceVersion = function () { - var animationClips = this.getAnimationControllerClips(); - var resourceVersions = []; - for (var i = 0; i < animationClips.size(); i++) { - resourceVersions[i] = animationClips.get(i).resourceVersion; - } - this.resourceVersions = resourceVersions; - }; - AnimationController.prototype.backupClipsProgress = function () { - var animationClips = this.getAnimationControllerClips(); - var cacheClipsProgress = []; - for (var i = 0; i < animationClips.size(); i++) { - cacheClipsProgress[i] = animationClips.get(i).progress; - } - this.cacheClipsProgress = cacheClipsProgress; - }; - AnimationController.prototype.getResourceKey = function () { - var animationClips = this.getAnimationControllerClips(); - if (animationClips.size() === 0) - return ''; - for (var i = 0; i < animationClips.size(); i++) { - if (animationClips.get(i).type === 0 /* Component */) { - return animationClips.get(i).resourceKey; - } - } - }; - AnimationController.prototype.getAnimationControllerClips = function () { - var animationControllerComp = this.getComponent(light.AnimationController); - var clips = animationControllerComp.clips; - return clips; - }; - AnimationController.prototype.getComponent = function (componentType, propertyPath, valueType) { - var component = this.entity.getComponent(componentType); - patchComponent(component); - return component; - }; - AnimationController.prototype.checkResourceVersion = function (animationClips) { - // 1. 还没有初始化 - if (!this.animationClips) { - this.configure(); - return; - } - // 2. 比较动画文件的版本号 - for (var i = 0; i < animationClips.size(); i++) { - var clip = animationClips.get(i); - var resourceVersion = clip.resourceVersion; - var prevResourceVersion = this.resourceVersions[i]; - if (prevResourceVersion !== resourceVersion) { - this.configure(); - return; - } - } - }; - AnimationController.prototype.hasComponentAnimation = function (animationClips) { - var hasAnim = false; - animationClips.forEach(function (clip) { - if (clip.type === 0 /* Component */) { - hasAnim = true; - } - }); - return hasAnim; - }; - // 每一帧会调用此方法, 单位为微秒microsecond - AnimationController.prototype.update = function () { - var _this = this; - var animationClips = this.getAnimationControllerClips(); - // 0. 没有组件动画提前return - var hasComponentAnimation = this.hasComponentAnimation(animationClips); - if (!hasComponentAnimation) - return; - // 1. 检查动画文件版本 是否需要重新读取动画文件 - this.checkResourceVersion(animationClips); - // 2. 点击动画组件时候播放 找到动画组件, 找到其中progress与上回不一致的, 注: progress其实是time, 并非百分比, 单位为微秒 - for (var i = 0; i < animationClips.size(); i++) { - var clip = animationClips.get(i); - var progress = clip.progress, clipIndex = clip.clipIndex, type = clip.type; - if (type === 1 /* GlTF */) - continue; - if (this.cacheClipsProgress[i] === progress) - continue; - if (!this.animationClips[clipIndex]) - continue; - // 2.1 根据progress更新组件 - var clipValues = this.animationClips[clipIndex].getValueAtTime(progress); - clipValues.forEach(function (clipValue) { - var componentType = clipValue.componentType, propertyPath = clipValue.propertyPath, value = clipValue.value, valueType = clipValue.valueType; - _this.updateComponent(componentType, propertyPath, value, valueType); - }); - } - // 3. 缓存此时的progress - this.backupClipsProgress(); - }; - AnimationController.prototype.updateComponent = function (componentType, propertyPath, value, valueType) { - var component = this.getComponent(componentType, propertyPath, valueType); - if (!component) - return; - var componentInstance = component.getComponentInstance(componentType, propertyPath); - switch (componentType) { - case light.BasicTransform.componentType: - case light.ScreenTransform.componentType: - this.updateTransformComponent(componentInstance, componentType, propertyPath, value, valueType, component); - break; - default: - component.setProperty(componentInstance, componentType, propertyPath, value, valueType); - break; - } - }; - AnimationController.prototype.updateTransformComponent = function (componentInstance, componentType, propertyPath, value, valueType, component) { - var pathArray = propertyPath.split('.'); - var lastPath = pathArray[pathArray.length - 1]; - if (propertyPath.indexOf('position') === 0) { - var componentPosition = componentInstance.position; - componentPosition[lastPath] = value; - componentInstance.SetPosition(componentPosition); - } - else if (propertyPath.indexOf('eEuler') === 0) { - if (!this.cacheEuler) { - this.cacheEuler = {}; - } - this.cacheEuler[propertyPath.split('.')[1]] = value; - if (this.cacheEuler.x !== undefined && this.cacheEuler.y !== undefined && this.cacheEuler.z !== undefined) { - var _a = this.cacheEuler, x = _a.x, y = _a.y, z = _a.z; - var rotation = eulerToQuaternion(x, y, z); - var componentRotation = componentInstance.rotation; - componentRotation.x = rotation.x; - componentRotation.y = rotation.y; - componentRotation.z = rotation.z; - componentRotation.w = rotation.w; - componentInstance.SetRotation(componentRotation); - this.cacheEuler = null; - } - } - else if (propertyPath.indexOf('scale') === 0) { - var componentScale = componentInstance.scale; - componentScale[lastPath] = value; - componentInstance.SetScale(componentScale); - } - else { - component.setProperty(componentInstance, componentType, propertyPath, value, valueType); - } - }; - AnimationController.prototype.destroy = function () { - this.animationClips = null; - this.cacheClipsProgress = null; - this.resourceVersions = null; - this.cacheEuler = null; - _super.prototype.destroy.call(this); - }; - return AnimationController; -}(BaseBehavior)); -light.on('start', function (entityManager, eventManager, scriptSystem) { - // 1. 从entity里面找到所有包含动画组件的entity - var entitiesWithAnimation = entityManager.entitiesWithComponents(light.AnimationController.componentType); - // 2. 对每个entity都注册一个 AnimationController - entitiesWithAnimation.forEach(function (entity) { - var idComponent = entity.getComponent(light.EntityIdentifier); - if (!idComponent) - return; - var AnimationBehavior = new AnimationController(idComponent.id, entityManager, eventManager, scriptSystem); - light.runtime.addBehavior(AnimationBehavior); - }); -}); - -var StartNode = /** @class */ (function (_super) { - __extends(StartNode, _super); - function StartNode() { - return _super !== null && _super.apply(this, arguments) || this; - } - StartNode.prototype.Run = function () { }; - StartNode.nodeType = 'code/Start'; - return StartNode; -}(EventNode)); -light.NodeContext.registerNode(StartNode); - -var LoopType; -(function (LoopType) { - LoopType["FIXED"] = "\u56FA\u5B9A\u6570\u5B57"; - LoopType["INFINITE"] = "\u65E0\u9650\u5FAA\u73AF"; -})(LoopType || (LoopType = {})); -var TimerNode = /** @class */ (function (_super) { - __extends(TimerNode, _super); - function TimerNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.duration = 1000000; - _this.repeatTimes = 1; - _this.times = 1; - _this._times = 1; - _this.startupTrigger = false; // 刚开始就触发一次 - _this.lastTime = 0; - _this.currentTimes = 0; - return _this; - } - TimerNode.prototype.Update = function () { }; - TimerNode.prototype.Run = function () { - if (this.startupTrigger && this.repeatTimes !== 0) { - this.currentTimes = this.currentTimes + 1; - this.Update(); - } - light.on('update', this.onLightUpdate.bind(this)); - }; - TimerNode.prototype.onLightUpdate = function (time) { - if ((time - this.lastTime) > this.duration - && (this.repeatTimes > this.currentTimes || this.loopType === LoopType.INFINITE)) { - this.Update(); - this.lastTime = time; - this.currentTimes = this.currentTimes + 1; - this.times = this.times + 1; - } - }; - TimerNode.nodeType = 'code/Timer'; - return TimerNode; -}(EventNode)); -light.NodeContext.registerNode(TimerNode); - -var MAX_FACE_NUMBER = 5; -var Queue = [ - light.Image, - light.PAGAsset, - light.HairColor, - light.PinchFace, - light.Liquefaction, - light.LiquefactionV6, - light.MakeupFaceV6, - light.MakeupLipsV6, - light.MakeupIrisV6, - light.Stretch, - light.LUTFilter, - light.GAN, - light.PostEffect, - light.MakeupFace, - light.MakeupLips, - light.MakeupIris, - light.MakeupEyeV6, - light.MakeupEyebrowV6, - light.Smooth, - light.Beauty, - light.BeautyBody, - light.CustomShader, - light.CustomGraph, - light.Tips, - light.CrazyFace, - light.Sticker3D, - light.Snapshot, - light.Particle, - light.ExpressionTransfer, -]; -var getRelateEntities = function (entityId, entityManager) { - var entities = []; - var entity = entityManager.getEntityById(entityId); - if (entity) { - var faceTrack = entity.getComponent(light.FaceTracking); - entities.push(entity); - if (faceTrack) { - if (faceTrack.duplicate_entity_id_) { // 新版 - for (var i = 0; i < faceTrack.duplicate_entity_id_.size(); i += 1) { - var id = faceTrack.duplicate_entity_id_.get(i); - var relateEntity = entityManager.getEntityById(id); - if (relateEntity === null || relateEntity === void 0 ? void 0 : relateEntity.transform) { - entities.push(relateEntity); - } - } - } - else { - var faceIds = new Array(MAX_FACE_NUMBER - 1).fill(0) // 兼容旧版 - .map(function (value, i) { return entityId + ((i + 1) * 10000); }); - faceIds.forEach(function (id) { - var relateEntity = entityManager.getEntityById(id); - if (relateEntity === null || relateEntity === void 0 ? void 0 : relateEntity.transform) { - entities.push(relateEntity); - } - }); - } - } - } - return entities; -}; -var showEntities = function (ids, entityManager) { - if (ids === void 0) { ids = []; } - ids.forEach(function (entityId) { - var entities = getRelateEntities(entityId, entityManager); // 获取人脸跟随的对象集 - entities.forEach(function (entity) { - var timeOffset = entity.getComponent(light.TimeOffset); - var timeContrl = entity.getComponent(light.TimeControl); - if (timeOffset) { - timeOffset.startOffset = light.getCurrentTime(); - } - if (timeContrl) { - timeContrl.reset(); - timeContrl.currentTime = 0; - } - var setTransform = true; - Queue.forEach(function (queueItem) { - var cmp = entity.getComponent(queueItem); - if (cmp) { - cmp.enabled = true; - setTransform = false; - } - }); - if (setTransform) { - [ - light.BasicTransform, - light.ScreenTransform, - ].forEach(function (item) { - var cmp = entity.getComponent(item); - if (cmp) { - cmp.objectEnabled = true; - cmp.enabled = true; - } - }); - } - }); - }); -}; -var hideEntities = function (ids, entityManager) { - if (ids === void 0) { ids = []; } - ids.forEach(function (entityId) { - getRelateEntities(entityId, entityManager).forEach(function (entity) { - var setTransform = true; - Queue.forEach(function (queueItem) { - var cmp = entity.getComponent(queueItem); - if (cmp) { - cmp.enabled = false; - setTransform = false; - } - }); - if (setTransform) { - [ - light.BasicTransform, - light.ScreenTransform, - ].forEach(function (item) { - var cmp = entity.getComponent(item); - if (cmp) { - cmp.objectEnabled = false; - cmp.enabled = false; - } - }); - } - }); - }); -}; -// 判断entity的component是否enable 如果为跟脸贴纸 还需要判断transform是否visible -var isEntityHide = function (id, entityManager) { - var cmpEnable = false; - var entity = entityManager.getEntityById(id); - if (entity) { - Queue.forEach(function (queueItem) { - var cmp = entity.getComponent(queueItem); - if (cmp) { - if (!cmp.enabled) { - return true; - } - cmpEnable = cmp.enabled; - } - }); - [light.BasicTransform, light.ScreenTransform].forEach(function (item) { - var cmp = entity.getComponent(item); - if (cmp) { - cmpEnable = cmp.objectEnabled && cmp.visible && cmpEnable; - } - }); - } - return !cmpEnable; -}; -var eventBus = {}; -var emitEvent = function (eventName) { - var args = []; - for (var _i = 1; _i < arguments.length; _i++) { - args[_i - 1] = arguments[_i]; - } - if (eventBus[eventName]) { - eventBus[eventName].forEach(function (f) { - f.apply(void 0, args); - }); - } -}; -var submitEvent = function (eventName, callback) { - if (!eventBus[eventName]) { - eventBus[eventName] = []; - } - eventBus[eventName].push(callback); -}; - -var ObjectQueueNode = /** @class */ (function (_super) { - __extends(ObjectQueueNode, _super); - function ObjectQueueNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.toShow = []; - _this.toHide = []; - _this.init = false; - _this.random = false; - _this.indexToDisplay = 0; - return _this; - } - ObjectQueueNode.prototype.Run = function () { - var _this = this; - var _a; - this.toShow = []; - this.toHide = []; - if (this.random) { - this.indexToDisplay = Math.floor(Math.random() * this.entityToDisplay.length); - } - (_a = this.entityToDisplay) === null || _a === void 0 ? void 0 : _a.forEach(function (entityId, i) { - var entity = _this.entityManager.getEntityById(entityId); - if (entity) { - if (i === _this.indexToDisplay % _this.entityToDisplay.length) { - _this.toShow.push(entityId); - } - else { - _this.toHide.push(entityId); - } - } - }); - this.indexToDisplay = this.indexToDisplay + 1; - showEntities(this.toShow, this.entityManager); - hideEntities(this.toHide, this.entityManager); - this.Next(); - }; - ObjectQueueNode.prototype.Next = function () { }; - ObjectQueueNode.nodeType = 'code/ObjectQueue'; - return ObjectQueueNode; -}(Node)); -light.NodeContext.registerNode(ObjectQueueNode); - -var SwitchObjectNode = /** @class */ (function (_super) { - __extends(SwitchObjectNode, _super); - function SwitchObjectNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.entityToDisplay = []; - _this.entityToHide = []; - _this.init = false; - return _this; - } - SwitchObjectNode.prototype.Run = function () { - showEntities(this.entityToDisplay, this.entityManager); - hideEntities(this.entityToHide, this.entityManager); - this.Next(); - }; - SwitchObjectNode.prototype.Next = function () { }; - SwitchObjectNode.nodeType = 'code/SwitchObject'; - return SwitchObjectNode; -}(Node)); -light.NodeContext.registerNode(SwitchObjectNode); - -var GestureNode = /** @class */ (function (_super) { - __extends(GestureNode, _super); - function GestureNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.times = 1; - _this.currentGesture = GestureAction$1.HEART; - return _this; - } - GestureNode.prototype.Run = function () { - this.actionEventName = actionNameToEvent(light.GestureAction[this.currentGesture]); - openAIFeature(["Hand_Gesture" /* HAND_GESTURE */], this.entityManager, this.eventManager); - light.on('update', this.onUpdate.bind(this)); - }; - GestureNode.prototype.onUpdate = function () { - var aiData = getAIClassData(["Hand_Gesture" /* HAND_GESTURE */], this.entityManager); - var expressions = aiData === null || aiData === void 0 ? void 0 : aiData[this.actionEventName]; - var hasGesture = expressions && expressions.length > 0; - if (this.lastState !== hasGesture) { - this.lastState = hasGesture; - if (hasGesture) { - this.Detected(); - this.times = this.times + 1; - } - else { - this.Lost(); - } - } - }; - GestureNode.prototype.Detected = function () { }; - GestureNode.prototype.Lost = function () { }; - GestureNode.nodeType = 'code/Gesture'; - return GestureNode; -}(EventNode)); -light.NodeContext.registerNode(GestureNode); - -var AIFeature; -(function (AIFeature) { - AIFeature["onSmile"] = "Smile"; - AIFeature["onKiss"] = "Pout"; -})(AIFeature || (AIFeature = {})); -var DefaultAIFeature = "Expression" /* EXPRESSION */; -var FaceEventNode = /** @class */ (function (_super) { - __extends(FaceEventNode, _super); - function FaceEventNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.faceAction = light.FaceAction.OpenMouth; - _this.times = 1; - return _this; - } - FaceEventNode.prototype.Run = function () { - this.actionEventName = actionNameToEvent(light.FaceAction[this.faceAction]); - var aifeature = AIFeature[this.actionEventName] ? AIFeature[this.actionEventName] : DefaultAIFeature; - openAIFeature([aifeature], this.entityManager, this.eventManager); - light.on('update', this.onUpdate.bind(this)); - }; - FaceEventNode.prototype.onUpdate = function () { - var aifeature = AIFeature[this.actionEventName] ? AIFeature[this.actionEventName] : DefaultAIFeature; - var data = getAIClassData([aifeature], this.entityManager); - var expressions = data === null || data === void 0 ? void 0 : data[this.actionEventName]; - var detected = expressions && expressions.length > 0; - if (detected) { - var trackId = expressions[0]; - var faceInfo = { - trackID: trackId, - expression: [this.faceAction], - }; - this.faceOutput = faceInfo; - if (trackId !== this.lastTrackId || detected !== this.lastState) { - console.log("FaceEventNode: onDetected: " + trackId); - this.onDetected(); - this.times = this.times + 1; - } - this.lastTrackId = trackId; - } - else if (this.lastState) { - this.lastTrackId = -1; - console.log('FaceEventNode: Lost'); - this.Lost(); - } - this.lastState = detected; - }; - FaceEventNode.prototype.onDetected = function () { }; - FaceEventNode.prototype.Lost = function () { }; - FaceEventNode.nodeType = 'code/FaceEvent'; - return FaceEventNode; -}(EventNode)); -light.NodeContext.registerNode(FaceEventNode); - -var MusicNode = /** @class */ (function (_super) { - __extends(MusicNode, _super); - function MusicNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.highlightOffset = 0; - _this.slowRhythmOffset = 0; - _this.drumOffset = 0; - _this.startValueOffset = 0; - _this.endValueOffset = 0; - _this.curMusicTime = -1; - return _this; - } - MusicNode.prototype.Run = function () { - light.on('RhythmEvent', this.onMusicData.bind(this)); - }; - MusicNode.prototype.onMusicData = function (params) { - if (params.rhythmInfos.HighlightValueTrail) { - for (var i = 0, size = params.rhythmInfos.HighlightValueTrail.length; i < size; i++) { - if (Math.abs(params.rhythmInfos.HighlightValueTrail[i].time + this.highlightOffset - params.elapseTime) - <= params.elapseTime - this.curMusicTime) { - this.onHighlightValueTrail(); - } - } - } - if (params.rhythmInfos.SlowRhythmTrail) { - for (var i = 0, size = params.rhythmInfos.SlowRhythmTrail.length; i < size; i++) { - if (Math.abs(params.rhythmInfos.SlowRhythmTrail[i].time + this.slowRhythmOffset - params.elapseTime) - <= params.elapseTime - this.curMusicTime) { - this.onSlowRhythmTrail(); - } - } - } - if (params.rhythmInfos.DrumTrail) { - for (var i = 0, size = params.rhythmInfos.DrumTrail.length; i < size; i++) { - if (Math.abs(params.rhythmInfos.DrumTrail[i].time + this.drumOffset - params.elapseTime) - <= params.elapseTime - this.curMusicTime) { - this.onDrumTrail(); - } - } - } - if (params.rhythmInfos.StartValueTrail) { - for (var i = 0, size = params.rhythmInfos.StartValueTrail.length; i < size; i++) { - if (params.rhythmInfos.StartValueTrail[i].index === 0) { - if (Math.abs(params.rhythmInfos.StartValueTrail[i].time + this.startValueOffset - params.elapseTime) - <= params.elapseTime - this.curMusicTime) { - this.onStartValueTrail(); - } - } - else { - if (Math.abs(params.rhythmInfos.StartValueTrail[i].time + this.endValueOffset - params.elapseTime) - <= params.elapseTime - this.curMusicTime) { - this.onEndValueTrail(); - } - } - } - } - this.curMusicTime = params.elapseTime; - }; - MusicNode.prototype.onStartValueTrail = function () { }; - MusicNode.prototype.onEndValueTrail = function () { }; - MusicNode.prototype.onHighlightValueTrail = function () { }; - MusicNode.prototype.onSlowRhythmTrail = function () { }; - MusicNode.prototype.onDrumTrail = function () { }; - MusicNode.nodeType = 'code/music'; - return MusicNode; -}(EventNode)); -light.NodeContext.registerNode(MusicNode); - -var AnimationNode = /** @class */ (function (_super) { - __extends(AnimationNode, _super); - function AnimationNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.loopCount = 0; - _this.progress = 0; - _this.isPlayTogether = false; - _this.onUpdate = function () { - if (_this.loopCount < 0) { - return; - } - var entity = _this.entityManager.getEntityById(_this.entityId); - var controller = entity.getComponent(light.AnimationController); - var timeCtrls = entity.getComponent(light.TimeControlList); - if (timeCtrls) { - controller.clips.forEach(function (clip, index) { - if (_this.clipIndex === index && clip.state === 1 /* Playing */) { - if (timeCtrls.timeControlArray.get(index).currentTime >= (_this.loopCount + 1) * clip.duration) { - clip.state = 2 /* Paused */; - clip.progress = clip.duration; - _this.detachEvent(); - _this.Finish(); - } - } - }); - } - else { - controller.clips.forEach(function (clip, index) { - if (_this.clipIndex === index && clip.state === 1 /* Playing */) { - if ((light.getCurrentTime() - clip.startTime) >= (_this.loopCount + 1) * clip.duration) { - clip.state = 2 /* Paused */; - clip.progress = clip.duration; - _this.detachEvent(); - _this.Finish(); - } - } - }); - } - }; - return _this; - } - AnimationNode.prototype.Play = function () { - var _this = this; - var entity = this.entityManager.getEntityById(this.entityId); - var controller = entity.getComponent(light.AnimationController); - var timeCtrls = entity.getComponent(light.TimeControlList); - if (timeCtrls) { - controller.clips.forEach(function (clip, index) { - if (_this.clipIndex === index) { - clip.state = 1 /* Playing */; - timeCtrls.timeControlArray.get(index).pause = false; - timeCtrls.timeControlArray.get(index).loopCount = _this.loopCount; - timeCtrls.timeControlArray.get(index).currentTime = _this.progress; - clip.progress = 1; - } - else if (!_this.isPlayTogether) { - clip.state = 0 /* Stopped */; - timeCtrls.timeControlArray.get(index).pause = true; - } - }); - } - else { - controller.clips.forEach(function (clip, index) { - if (_this.clipIndex === index) { - clip.state = 1 /* Playing */; - clip.progress = _this.progress; - clip.startTime = light.getCurrentTime() - clip.progress; - } - else if (!_this.isPlayTogether) { - clip.state = 0 /* Stopped */; - } - }); - } - this.detachEvent(); - light.on('update', this.onUpdate); - this.Next(); - }; - AnimationNode.prototype.Pause = function () { - var _this = this; - var entity = this.entityManager.getEntityById(this.entityId); - var controller = entity.getComponent(light.AnimationController); - var timeCtrls = entity.getComponent(light.TimeControlList); - controller.clips.forEach(function (clip, index) { - if (_this.clipIndex === index) { - clip.state = 2 /* Paused */; - if (timeCtrls) { - timeCtrls.timeControlArray.get(index).pause = true; - } - } - }); - this.detachEvent(); - this.Next(); - }; - AnimationNode.prototype.Stop = function () { - var _this = this; - var entity = this.entityManager.getEntityById(this.entityId); - var controller = entity.getComponent(light.AnimationController); - var timeCtrls = entity.getComponent(light.TimeControlList); - controller.clips.forEach(function (clip, index) { - if (_this.clipIndex === index) { - clip.state = 0 /* Stopped */; - if (timeCtrls) { - timeCtrls.timeControlArray.get(index).pause = true; - timeCtrls.timeControlArray.get(index).currentTime = 0; - // clip.progress != timeCtrl.currentTime 触发刷新 - clip.progress = 1; - } - } - }); - this.detachEvent(); - this.Next(); - }; - AnimationNode.prototype.Next = function () { }; - AnimationNode.prototype.Finish = function () { }; - AnimationNode.prototype.detachEvent = function () { - light.removeListener('update', this.onUpdate); - }; - AnimationNode.nodeType = 'code/AnimationNode'; - return AnimationNode; -}(Node)); -light.NodeContext.registerNode(AnimationNode); - -var PreloadNode = /** @class */ (function (_super) { - __extends(PreloadNode, _super); - function PreloadNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.preloadEntity = []; - return _this; - } - PreloadNode.prototype.setup = function () { - var _this = this; - if (this.preloadEntity && this.preloadEntity.length > 0) { - this.preloadEntity.forEach(function (entityId) { - entityId !== 0 && light.PreloadUtils.SetPreloadPolicy(_this.entityManager, entityId); - }); - } - }; - PreloadNode.prototype.Run = function () { - var _this = this; - if (this.preloadEntity && this.preloadEntity.length > 0) { - this.preloadEntity.forEach(function (entityId) { - entityId !== 0 && light.PreloadUtils.PreloadEntity(_this.entityManager, entityId); - }); - } - this.Next(); - }; - PreloadNode.prototype.Next = function () { }; - PreloadNode.nodeType = 'code/Preload'; - return PreloadNode; -}(Node)); -light.NodeContext.registerNode(PreloadNode); - -var FreeMemoryNode = /** @class */ (function (_super) { - __extends(FreeMemoryNode, _super); - function FreeMemoryNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.freeMemoryEntity = []; - return _this; - } - FreeMemoryNode.prototype.Run = function () { - var _this = this; - this.freeMemoryEntity.forEach(function (entityId) { - light.PreloadUtils.FreeEntityMemory(_this.entityManager, entityId); - }); - this.Next(); - }; - FreeMemoryNode.prototype.Next = function () { }; - FreeMemoryNode.nodeType = 'code/FreeMemory'; - return FreeMemoryNode; -}(Node)); -light.NodeContext.registerNode(FreeMemoryNode); - -var LoopType$1; -(function (LoopType) { - LoopType["FIXED"] = "\u56FA\u5B9A\u6570\u5B57"; - LoopType["INFINITE"] = "\u65E0\u9650\u5FAA\u73AF"; -})(LoopType$1 || (LoopType$1 = {})); -var QueueNode = /** @class */ (function (_super) { - __extends(QueueNode, _super); - function QueueNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.indexToDisplay = 0; - _this.indexToHide = 0; - _this.repeatTimes = 1; - _this.init = false; - _this.toShow = []; - _this.toHide = []; - return _this; - } - QueueNode.prototype.Run = function () { - this.toShow = []; - this.toHide = []; - var _a = this, entityToDisplay = _a.entityToDisplay, entityToHide = _a.entityToHide, repeatTimes = _a.repeatTimes; - if (entityToDisplay.length) { - if (this.indexToDisplay < entityToDisplay.length * repeatTimes || this.loopType === LoopType$1.INFINITE) { - var entityId = entityToDisplay[this.indexToDisplay % entityToDisplay.length]; - var entity = this.entityManager.getEntityById(entityId); - if (entity) { - this.toShow.push(entityId); - this.indexToDisplay += 1; - } - } - } - if (entityToHide.length) { - if (this.indexToHide < entityToHide.length * repeatTimes || this.loopType === LoopType$1.INFINITE) { - var entityId = entityToHide[this.indexToHide % entityToHide.length]; - var entity = this.entityManager.getEntityById(entityId); - if (entity) { - this.toHide.push(entityId); - this.indexToHide += 1; - } - } - } - showEntities(this.toShow, this.entityManager); - hideEntities(this.toHide, this.entityManager); - this.Next(); - }; - QueueNode.prototype.Next = function () { }; - QueueNode.nodeType = 'code/Queue'; - return QueueNode; -}(Node)); -light.NodeContext.registerNode(QueueNode); - -var AccumulationNumberNode = /** @class */ (function (_super) { - __extends(AccumulationNumberNode, _super); - function AccumulationNumberNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.Value = 0; - return _this; - } - AccumulationNumberNode.prototype.Run = function () { - if (this.current === undefined) { - this.current = this.from; - this.Value = this.current; - this.Next(); - } - else { - if (this.current + this.step > this.to) { - return; - } - this.current += this.step; - this.Value = this.current; - this.Next(); - } - }; - AccumulationNumberNode.prototype.Next = function () { }; - AccumulationNumberNode.nodeType = 'code/accumulationNumber'; - return AccumulationNumberNode; -}(Node)); -light.NodeContext.registerNode(AccumulationNumberNode); - -var MAX_AGE = 66; -// 年龄判断 -var AgeNode = /** @class */ (function (_super) { - __extends(AgeNode, _super); - function AgeNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.ageRange = []; - _this.MAX_AGE = 66; - _this.lastAgeInfo = {}; - return _this; - } - AgeNode.prototype.Run = function () { - var faceInput = this.faceInput; - if (!(faceInput === null || faceInput === void 0 ? void 0 : faceInput.age)) { - return; - } - // 上次的人脸而且年龄相同,不重复触发 - if (this.lastAgeInfo[faceInput.trackID] === faceInput.age) { - return; - } - this.ageOutput = faceInput; - if (this.ageRange.length === 0) { - this.Next(); - } - else { - var funName = ''; - var age = faceInput.age; - this.ageRange.sort(function (a, b) { return a - b; }); - var start = 0; - for (var i = 0, size = this.ageRange.length; i < size; i++) { - if (this.ageRange[i] === start) { - continue; - } - if (age < this.ageRange[i]) { - funName = start + "_" + this.ageRange[i]; - if (!this[funName]) { - this[funName] = function () { }; - } - this[funName](); - return; - } - start = this.ageRange[i]; - } - if (start < MAX_AGE && start <= age && age < MAX_AGE) { - funName = start + "_" + MAX_AGE; - if (!this[funName]) { - this[funName] = function () { }; - } - this[funName](); - } - } - }; - AgeNode.prototype.Next = function () { }; - AgeNode.nodeType = 'code/Age'; - return AgeNode; -}(Node)); -light.NodeContext.registerNode(AgeNode); - -var AgeEventNode = /** @class */ (function (_super) { - __extends(AgeEventNode, _super); - function AgeEventNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.lastAgeInfo = {}; - _this.customEvents = []; - _this.MAX_AGE = 66; - _this.AI_FETURE = [ - "Age" /* AGE */, - ]; - return _this; - } - AgeEventNode.prototype.Run = function () { - openAIFeature(this.AI_FETURE, this.entityManager, this.eventManager); - light.on('update', this.onUpdate.bind(this)); - }; - AgeEventNode.prototype.onUpdate = function () { - var _this = this; - var data = getAIClassData(this.AI_FETURE, this.entityManager); - var ageDatas = data === null || data === void 0 ? void 0 : data.onAge; - var detected = ageDatas && ageDatas.length > 0; - if (detected) { - var sortedTraceIDList_1 = ageDatas.map(function (ageRange) { return ageRange[0]; }).sort(function (a, b) { return a - b; }); - ageDatas.forEach(function (ageRange) { - // AI会缓存人脸点位 输出的index会递增 比如[3,4,5] 实质上应该为[0,1,2] - var trackID = sortedTraceIDList_1.indexOf(ageRange[0]); - var age = ageRange[1]; - if (!_this.lastAgeInfo[trackID] || _this.lastAgeInfo[trackID] !== age) { - _this.ageOutput = { - trackID: trackID, - age: age, - }; - _this.ageNumberOutput = age; - _this.trackIndexOutput = trackID; - var start_1 = 0; - var invoke_1 = false; - if (_this.ageRange.length > 0) { - _this.ageRange.forEach(function (_age) { - if (invoke_1) { - return; - } - if (age < _age) { - if (!_this[start_1 + "_" + _age]) { - _this[start_1 + "_" + _age] = function () { }; - } - _this[start_1 + "_" + _age](); - invoke_1 = true; - } - start_1 = _age; - }); - if (!invoke_1 && age <= _this.MAX_AGE) { - if (!_this[start_1 + "_" + _this.MAX_AGE]) { - _this[start_1 + "_" + _this.MAX_AGE] = function () { }; - } - _this[start_1 + "_" + _this.MAX_AGE](); - } - } - else { - if (!_this['Next']) { - _this['Next'] = function () { }; - } - _this['Next'](); - } - } - _this.lastAgeInfo[trackID] = age; - }); - } - }; - AgeEventNode.nodeType = 'code/AgeEvent'; - return AgeEventNode; -}(EventNode)); -light.NodeContext.registerNode(AgeEventNode); - -var AndNode = /** @class */ (function (_super) { - __extends(AndNode, _super); - function AndNode() { - return _super !== null && _super.apply(this, arguments) || this; - } - AndNode.prototype.Run = function () { - if (this.A && this.B) { - this.True(); - } - else { - this.False(); - } - }; - AndNode.prototype.True = function () { }; - AndNode.prototype.False = function () { }; - AndNode.nodeType = 'code/And'; - return AndNode; -}(Node)); -light.NodeContext.registerNode(AndNode); - -var CompareNode = /** @class */ (function (_super) { - __extends(CompareNode, _super); - function CompareNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.A = 0; - _this.B = 0; - return _this; - } - CompareNode.prototype.Run = function () { - if (this.A == this.B) { - this.Equal(); - } - else if (this.A > this.B) { - this.Bigger(); - } - else { - this.Smaller(); - } - }; - CompareNode.prototype.Equal = function () { }; - CompareNode.prototype.Bigger = function () { }; - CompareNode.prototype.Smaller = function () { }; - CompareNode.nodeType = 'code/compare'; - return CompareNode; -}(Node)); -light.NodeContext.registerNode(CompareNode); - -var ConstNumberNode = /** @class */ (function (_super) { - __extends(ConstNumberNode, _super); - function ConstNumberNode() { - return _super !== null && _super.apply(this, arguments) || this; - } - ConstNumberNode.prototype.Process = function () { - this.Value = this._value; - }; - ConstNumberNode.nodeType = 'code/constNumber'; - return ConstNumberNode; -}(DataProcessNode)); -light.NodeContext.registerNode(ConstNumberNode); - -var CorrelationNode = /** @class */ (function (_super) { - __extends(CorrelationNode, _super); - function CorrelationNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.faceIndex = -1; - return _this; - } - CorrelationNode.prototype.Run = function () { - var _this = this; - this.entityToDisplay.forEach(function (entityId) { - getRelateEntities(entityId, _this.entityManager).forEach(function (entity) { - if (entity) { - var component = entity.getComponent(light.FaceTracking); - if (component) { - var index = new light.VectorInt(); - index.add(_this.faceIndex); - component.faceIndex = index; - } - } - }); - }); - this.Next(); - }; - CorrelationNode.prototype.Next = function () { }; - CorrelationNode.nodeType = 'code/Correlation'; - return CorrelationNode; -}(Node)); -light.NodeContext.registerNode(CorrelationNode); - -var DelayNode = /** @class */ (function (_super) { - __extends(DelayNode, _super); - function DelayNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.duration = 1000000; - return _this; - } - DelayNode.prototype.Run = function () { - var _this = this; - var currentTime = light.getCurrentTime(); - var invoked = false; - light.on('update', function (time) { - if (time - currentTime >= _this.duration && !invoked) { - invoked = true; - _this.Next(); - } - }); - }; - DelayNode.prototype.Next = function () { }; - DelayNode.nodeType = 'code/Delay'; - return DelayNode; -}(Node)); -light.NodeContext.registerNode(DelayNode); - -var FaceNode = /** @class */ (function (_super) { - __extends(FaceNode, _super); - function FaceNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.times = 1; - _this.AI_FEATURE = [ - "Expression" /* EXPRESSION */, - "Age" /* AGE */, - "Gender" /* GENDER */, - "Smile" /* SMILE */, - "Pout" /* POUT */, - ]; - return _this; - } - FaceNode.prototype.Run = function () { - this.actionEventName = actionNameToEvent(light.FaceAction[light.FaceAction.FaceDetected]); - openAIFeature(this.AI_FEATURE, this.entityManager, this.eventManager); - light.on('update', this.onUpdate.bind(this)); - }; - FaceNode.prototype.onUpdate = function () { - var _this = this; - var data = getAIClassData(this.AI_FEATURE, this.entityManager); - var expressions = data === null || data === void 0 ? void 0 : data[this.actionEventName]; - var detected = expressions && expressions.length > 0; - if (detected) { - var faces = this.getAllFaceInfo(data); - faces.forEach(function (face) { - _this.faceOutput = face; - _this.onNext(); - }); - this.times += 1; - var trackId = expressions[0]; - if (detected !== this.lastState) { - console.log("FaceNode: onDetected: " + trackId); - this.onDetected(); - } - } - else { - this.onNoFace(); - if (this.lastState) { - console.log('FaceNode: Lost'); - this.Lost(); - } - } - this.lastState = detected; - }; - FaceNode.prototype.onNext = function () { }; - FaceNode.prototype.onNoFace = function () { }; - FaceNode.prototype.Lost = function () { }; - FaceNode.prototype.onDetected = function () { }; - FaceNode.prototype.getAllFaceInfo = function (params) { - if (params === void 0) { params = {}; } - var keys = Object.keys(params); - var allFaceInfo = []; // 人脸数据总集 - var _loop_1 = function (i, size) { - console.log("expression_Key:::" + keys[i]); - switch (keys[i]) { - case 'onAge': { - var ageInfo_1 = params.onAge; // [[1, 29], [2, 24]] - if (ageInfo_1) { - var _loop_2 = function (j, ageCount) { - // 先找trackID,找得到就更新age,找不到就新增一个 - var exist = allFaceInfo.find(function (info) { return info.trackID === ageInfo_1[j][0]; }); - if (exist) { - exist.age = ageInfo_1[j][1]; - } - else { - var faceInfo = { - trackID: ageInfo_1[j][0], - age: ageInfo_1[j][1], - }; - allFaceInfo.push(faceInfo); - } - }; - for (var j = 0, ageCount = ageInfo_1.length; j < ageCount; j++) { - _loop_2(j, ageCount); - } - } - break; - } - case 'onMale': { - var maleInfo_1 = params.onMale; // [1,2,3] - if (maleInfo_1) { - var _loop_3 = function (j, maleCount) { - var exist = allFaceInfo.find(function (info) { return info.trackID === maleInfo_1[j]; }); - if (exist) { - exist.gender = 0; - } - else { - var faceInfo = { - trackID: maleInfo_1[j], - gender: 0, - faceIndex: allFaceInfo.length, - }; - allFaceInfo.push(faceInfo); - } - }; - for (var j = 0, maleCount = maleInfo_1.length; j < maleCount; j++) { - _loop_3(j, maleCount); - } - } - break; - } - case 'onFemale': { - var femaleInfo_1 = params.onFemale; // [4,5,6] - if (femaleInfo_1) { - var _loop_4 = function (j, femaleCount) { - var exist = allFaceInfo.find(function (info) { return info.trackID === femaleInfo_1[j]; }); - if (exist) { - exist.gender = 1; - } - else { - var faceInfo = { - trackID: femaleInfo_1[j], - gender: 1, - faceIndex: allFaceInfo.length, - }; - allFaceInfo.push(faceInfo); - } - }; - for (var j = 0, femaleCount = femaleInfo_1.length; j < femaleCount; j++) { - _loop_4(j, femaleCount); - } - } - break; - } - case 'onFacedetected': - case 'onOpenmouth': - case 'onBlinkeyebrow': - case 'onBlinkeye': - case 'onShakehead': - case 'onKiss': - case 'onBlinklefteye': - case 'onBlinkrighteye': - case 'onNod': - case 'onSmile': - case 'onMouthoccluded': - case 'onLefteyeoccluded': - case 'onRighteyeoccluded': - case 'onDoubleeyeoccluded': { - var expressionInfo_1 = params[keys[i]]; - if (expressionInfo_1) { - var _loop_5 = function (j, count) { - var exist = allFaceInfo.find(function (info) { return info.trackID === expressionInfo_1[j]; }); - if (exist) { - if (!exist.expression) { - exist.expression = []; - } - exist.expression.push(keys[i]); - } - else { - var faceInfo = { - trackID: expressionInfo_1[j], - faceIndex: allFaceInfo.length, - expression: [keys[i]], - }; - allFaceInfo.push(faceInfo); - } - }; - for (var j = 0, count = expressionInfo_1.length; j < count; j++) { - _loop_5(j, count); - } - } - break; - } - } - }; - for (var i = 0, size = keys.length; i < size; i++) { - _loop_1(i); - } - return allFaceInfo; - }; - FaceNode.nodeType = 'code/Face'; - return FaceNode; -}(EventNode)); -light.NodeContext.registerNode(FaceNode); - -var AIFeature$1; -(function (AIFeature) { - AIFeature["onSmile"] = "Smile"; - AIFeature["onKiss"] = "Pout"; -})(AIFeature$1 || (AIFeature$1 = {})); -var DefaultAIFeature$1 = "Expression" /* EXPRESSION */; -var FaceActionNode = /** @class */ (function (_super) { - __extends(FaceActionNode, _super); - function FaceActionNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.lastExpressionInfo = {}; - return _this; - } - FaceActionNode.prototype.onDetected = function () { }; - FaceActionNode.prototype.Lost = function () { }; - FaceActionNode.prototype.Run = function () { - var _a, _b; - this.actionEventName = actionNameToEvent(light.FaceAction[this.faceAction]); - if (((_a = this.faceInput) === null || _a === void 0 ? void 0 : _a.expression) && ((_b = this.faceInput) === null || _b === void 0 ? void 0 : _b.expression.indexOf(this.actionEventName)) > -1) { - this.faceOutput = this.faceInput; - this.onDetected(); - } - light.on('update', this.onUpdate.bind(this)); - }; - FaceActionNode.prototype.onUpdate = function () { - var aifeature = AIFeature$1[this.actionEventName] ? AIFeature$1[this.actionEventName] : DefaultAIFeature$1; - var data = getAIClassData([aifeature], this.entityManager); - var expressions = data === null || data === void 0 ? void 0 : data[this.actionEventName]; - var detected = expressions && expressions.length > 0; - if (!detected && this.lastState) { - this.Lost(); - } - this.lastState = detected; - }; - FaceActionNode.nodeType = 'code/FaceAction'; - return FaceActionNode; -}(Node)); -light.NodeContext.registerNode(FaceActionNode); - -var GenderNode = /** @class */ (function (_super) { - __extends(GenderNode, _super); - function GenderNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.lastGenderInfo = {}; - return _this; - } - GenderNode.prototype.Run = function () { - if (!this.faceInput) { - return; - } - this.faceOutput = this.faceInput; - if (this.faceInput.gender === 0) { - console.log('this.faceInput.gender:male'); - if (!this.lastGenderInfo[this.faceInput.trackID]) { - this.onMale(); - } - } - else if (this.faceInput.gender === 1) { - console.log('this.faceInput.gender:Female'); - if (!this.lastGenderInfo[this.faceInput.trackID]) { - this.onFemale(); - } - } - this.lastGenderInfo[this.faceInput.trackID] = this.faceInput.gender; - }; - GenderNode.prototype.onMale = function () { }; - GenderNode.prototype.onFemale = function () { }; - GenderNode.nodeType = 'code/Gender'; - return GenderNode; -}(Node)); -light.NodeContext.registerNode(GenderNode); - -var GenderEventNode = /** @class */ (function (_super) { - __extends(GenderEventNode, _super); - function GenderEventNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.lastMaleInfo = {}; - _this.lastFemaleInfo = {}; - _this.times = 1; - return _this; - } - GenderEventNode.prototype.Run = function () { - openAIFeature(["Gender" /* GENDER */], this.entityManager, this.eventManager); - light.on('update', this.onUpdate.bind(this)); - }; - GenderEventNode.prototype.onUpdate = function () { - var _this = this; - var data = getAIClassData(["Gender" /* GENDER */], this.entityManager); - if (data['onMale']) { - if (!this.lastMaleInfo[data['onMale'].join(',')]) { - data['onMale'].forEach(function (id) { - _this.genderOutput = { - trackID: id, - gender: 0, - }; - _this.onMale(); - _this.times += 1; - }); - this.lastMaleInfo[data['onMale'].join(',')] = true; - } - } - if (data['onFemale']) { - if (!this.lastFemaleInfo[data['onFemale'].join(',')]) { - data['onFemale'].forEach(function (id) { - _this.genderOutput = { - trackID: id, - gender: 1, - }; - _this.onFemale(); - _this.times += 1; - }); - this.lastFemaleInfo[data['onFemale'].join(',')] = true; - } - } - }; - GenderEventNode.prototype.onMale = function () { }; - GenderEventNode.prototype.onFemale = function () { }; - GenderEventNode.nodeType = 'code/GenderEvent'; - return GenderEventNode; -}(EventNode)); -light.NodeContext.registerNode(GenderEventNode); - -var GradientType$1; -(function (GradientType) { - GradientType[GradientType["LINEAR"] = 1] = "LINEAR"; - GradientType[GradientType["EASE_IN"] = 2] = "EASE_IN"; - GradientType[GradientType["EASE_OUT"] = 3] = "EASE_OUT"; - GradientType[GradientType["EASE_IN_OUT"] = 4] = "EASE_IN_OUT"; - GradientType[GradientType["SIN"] = 5] = "SIN"; - GradientType[GradientType["COS"] = 6] = "COS"; -})(GradientType$1 || (GradientType$1 = {})); -var GradientNode = /** @class */ (function (_super) { - __extends(GradientNode, _super); - function GradientNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.currentTime = 0; - _this.timeStart = -1; - // 是否 bind update listener - _this.isBind = false; - /* - 是否调用过 Finish 接口。设置该标志位,处理预览面板进度条快速拖动的情况 - 比如,该node设置1~3秒中进行渐变,用户将预览进度条从2秒直接拖到5秒 - 2秒时,未调用 Finish 接口,isFinished 为false - 5秒时,增加 Finish 接口 的调用,确保预览面板显示正确 - */ - _this.isFinished = false; - /* - 是否需要重置。设置该标志位,处理多次 run 的情况 - 比如,定时触发 + 渐变。 - 定时周期为1秒,渐变周期为3秒 - */ - _this.isNeedReset = false; - return _this; - } - GradientNode.prototype.onUpdate = function (time) { - // currentTime为初始值0时,更新timeStart - if (this.currentTime === undefined || this.isNeedReset) { - this.timeStart = time; - this.isNeedReset = false; - } - this.currentTime = time; - if (this.isFinished && this.currentTime >= this.timeStart + this.duration) { - return; - } - this.isFinished = false; - if (time / 1000 - this.timeStart / 1000 <= this.duration / 1000) { - var current = (this.currentTime - this.timeStart) / 1000; - var start = this.from; - var range = this.to - this.from; - var duration = this.duration / 1000; - var handler = {}; - handler[GradientType$1.LINEAR] = this.linear; - handler[GradientType$1.EASE_IN] = this.easeInQuad; - handler[GradientType$1.EASE_OUT] = this.easeOutQuad; - handler[GradientType$1.EASE_IN_OUT] = this.easeInOutQuad; - handler[GradientType$1.SIN] = this.sin; - handler[GradientType$1.COS] = this.cos; - this.CurrentValue = handler[this.gradientType](current, start, range, duration); - } - else if (time < this.timeStart) { - this.CurrentValue = this.from; - } - else { - this.CurrentValue = this.to; - this.Finish(); - this.isFinished = true; - } - this.Next(); - }; - GradientNode.prototype.Run = function () { - if (this.to === this.from || this.duration === 0) { // 校验输入值 - return; - } - this.isNeedReset = true; - if (this.isBind) { - return; - } - this.isBind = true; - light.on('update', this.onUpdate.bind(this)); - }; - GradientNode.prototype.Next = function () { }; - GradientNode.prototype.easeInOutQuad = function (currentTime, startValue, rangeValue, duration) { - currentTime /= duration / 2; - if (currentTime < 1) - return rangeValue / 2 * currentTime * currentTime + startValue; - currentTime -= 1; - return -rangeValue / 2 * (currentTime * (currentTime - 2) - 1) + startValue; - }; - GradientNode.prototype.easeOutQuad = function (currentTime, startValue, rangeValue, duration) { - currentTime /= duration; - return -rangeValue * currentTime * (currentTime - 2) + startValue; - }; - GradientNode.prototype.easeInQuad = function (currentTime, startValue, rangeValue, duration) { - currentTime /= duration; - return rangeValue * currentTime * currentTime + startValue; - }; - GradientNode.prototype.linear = function (currentTime, startValue, rangeValue, duration) { - return rangeValue * currentTime / duration + startValue; - }; - GradientNode.prototype.sin = function (currentTime, startValue, rangeValue, duration) { - return Math.sin(2 * Math.PI * currentTime / duration) * rangeValue + startValue; - }; - GradientNode.prototype.cos = function (currentTime, startValue, rangeValue, duration) { - return Math.cos(2 * Math.PI * currentTime / duration) * rangeValue + startValue; - }; - GradientNode.prototype.Finish = function () { }; - GradientNode.nodeType = 'code/Gradient'; - return GradientNode; -}(Node)); -light.NodeContext.registerNode(GradientNode); - -var IfNode = /** @class */ (function (_super) { - __extends(IfNode, _super); - function IfNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this._dep = false; - return _this; - } - Object.defineProperty(IfNode.prototype, "dep", { - get: function () { - return this._dep; - }, - set: function (v) { - this._dep = v; - }, - enumerable: false, - configurable: true - }); - IfNode.prototype.Run = function () { - if (this.dep) { - this.True(); - } - else { - this.False(); - } - }; - IfNode.prototype.True = function () { }; - IfNode.prototype.False = function () { }; - IfNode.nodeType = 'code/if'; - return IfNode; -}(Node)); -light.NodeContext.registerNode(IfNode); - -var InvertNode = /** @class */ (function (_super) { - __extends(InvertNode, _super); - function InvertNode() { - return _super !== null && _super.apply(this, arguments) || this; - } - InvertNode.prototype.Run = function () { - if (!this.A) { - this.True(); - } - else { - this.False(); - } - }; - InvertNode.prototype.True = function () { }; - InvertNode.prototype.False = function () { }; - InvertNode.nodeType = 'code/Invert'; - return InvertNode; -}(Node)); -light.NodeContext.registerNode(InvertNode); - -var LutNode = /** @class */ (function (_super) { - __extends(LutNode, _super); - function LutNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.strengthInput = -1; - return _this; - } - LutNode.prototype.Run = function () { - showEntities([this.lutEntityId], this.entityManager); - var entity = this.entityManager.getEntityById(this.lutEntityId); - var lut = entity.getComponent(light.LUTFilter); - if (lut) { - lut.intensity = this.strengthInput >= 0 ? this.strengthInput : this.strength; - } - this.Next(); - }; - LutNode.prototype.Next = function () { }; - LutNode.nodeType = 'code/Lut'; - return LutNode; -}(Node)); -light.NodeContext.registerNode(LutNode); - -var OrNode = /** @class */ (function (_super) { - __extends(OrNode, _super); - function OrNode() { - return _super !== null && _super.apply(this, arguments) || this; - } - OrNode.prototype.Run = function () { - if (this.A || this.B) { - this.True(); - } - else { - this.False(); - } - }; - OrNode.prototype.True = function () { }; - OrNode.prototype.False = function () { }; - OrNode.nodeType = 'code/Or'; - return OrNode; -}(Node)); -light.NodeContext.registerNode(OrNode); - -var BranchMode; -(function (BranchMode) { - BranchMode[BranchMode["Queue"] = 1] = "Queue"; - BranchMode[BranchMode["Random"] = 2] = "Random"; -})(BranchMode || (BranchMode = {})); -var QueueBranchNode = /** @class */ (function (_super) { - __extends(QueueBranchNode, _super); - function QueueBranchNode() { - var _this = _super.call(this) || this; - _this.currentIndex = 0; - _this.branchMode = BranchMode.Queue; - _this.randomStart = false; - if (_this.randomStart && _this.branchMode === BranchMode.Queue) { - _this.currentIndex = Math.floor(Math.random() * 10); - } - return _this; - } - QueueBranchNode.prototype.Run = function () { - var Limit = 5; - var max = 0; - for (var i = 0; i < Limit; i++) { - if (this["Next" + i]) { - max = max + 1; - } - else { - break; - } - } - if (this.branchMode === BranchMode.Queue) { - this["Next" + this.currentIndex % max](); - this.currentIndex = this.currentIndex + 1; - } - else { - this["Next" + Math.floor(Math.random() * max)](); - } - }; - QueueBranchNode.nodeType = 'code/queueBranch'; - return QueueBranchNode; -}(Node)); -light.NodeContext.registerNode(QueueBranchNode); - -var RandomNode = /** @class */ (function (_super) { - __extends(RandomNode, _super); - function RandomNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.toShow = []; - _this.toHide = []; - _this.init = false; - return _this; - } - RandomNode.prototype.Run = function () { - this.toShow = []; - this.toHide = []; - if (this.entityToDisplay.length) { - var entityId = this.entityToDisplay[Math.floor(Math.random() * this.entityToDisplay.length)]; - var entity = this.entityManager.getEntityById(entityId); - if (entity) { - this.toShow.push(entityId); - } - } - if (this.entityToHide.length) { - var entityId = this.entityToHide[Math.floor(Math.random() * this.entityToHide.length)]; - this.toHide.push(entityId); - } - showEntities(this.toShow, this.entityManager); - hideEntities(this.toHide, this.entityManager); - this.Next(); - }; - RandomNode.prototype.Next = function () { }; - RandomNode.nodeType = 'code/Random'; - return RandomNode; -}(Node)); -light.NodeContext.registerNode(RandomNode); - -var RandomNumberNode = /** @class */ (function (_super) { - __extends(RandomNumberNode, _super); - function RandomNumberNode() { - var _this = _super.call(this) || this; - _this.isInteger = false; - _this.setValue(); - return _this; - } - RandomNumberNode.prototype.setValue = function () { - if (this.isInteger) { - return Math.round(Math.round(this.from) + (Math.random() * (this.to - this.from))); - } - return this.from + (Math.random() * (this.to - this.from)); - }; - RandomNumberNode.prototype.Run = function () { - this.Value = this.setValue(); - this.Next(); - }; - RandomNumberNode.prototype.Next = function () { }; - RandomNumberNode.nodeType = 'code/randomNumber'; - return RandomNumberNode; -}(Node)); -light.NodeContext.registerNode(RandomNumberNode); - -var SumNode = /** @class */ (function (_super) { - __extends(SumNode, _super); - function SumNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.A = 0; - _this.B = 0; - return _this; - } - SumNode.prototype.Run = function () { - this.Sum = this.A + this.B; - this.Diff = this.A - this.B; - this.Multiply = this.A * this.B; - this.Divide = this.B === 0 ? 0 : this.A / this.B; - this.Complement = this.A % this.B; - this.Next(); - }; - SumNode.prototype.Next = function () { - }; - SumNode.nodeType = 'code/Sum'; - return SumNode; -}(Node)); -light.NodeContext.registerNode(SumNode); - -var TransformNode = /** @class */ (function (_super) { - __extends(TransformNode, _super); - function TransformNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.xInput = 0; - _this.yInput = 0; - _this.wInput = 0; - _this.hInput = 0; - _this.rotationInput = 0; - _this.scalexInput = 1; - _this.scaleyInput = 1; - _this.accumulation = true; - return _this; - } - TransformNode.prototype.Run = function () { - if (!this.entityId) { - this.Next(); - return; - } - var entity = this.entityManager.getEntityById(this.entityId); - var cmp = entity.getComponent(light.ScreenTransform); - cmp.offset.bottom = this.accumulation ? (cmp.offset.bottom - this.hInput / 2) - : (this.hInput || cmp.offset.bottom); - cmp.offset.top = this.accumulation ? (cmp.offset.top + this.hInput / 2) - : (this.hInput || cmp.offset.top); - cmp.offset.left = this.accumulation ? (cmp.offset.left - this.wInput / 2) - : (this.wInput || cmp.offset.left); - cmp.offset.right = this.accumulation ? (cmp.offset.right + this.wInput / 2) - : (this.wInput || cmp.offset.right); - cmp.anchor.left = this.accumulation ? (cmp.anchor.left + this.xInput) - : (this.xInput || cmp.anchor.left); - cmp.anchor.right = this.accumulation ? (cmp.anchor.right + this.xInput) - : (this.xInput || cmp.anchor.right); - cmp.anchor.top = this.accumulation ? (cmp.anchor.top + this.yInput) - : (this.yInput || cmp.anchor.top); - cmp.anchor.bottom = this.accumulation ? (cmp.anchor.bottom + this.yInput) - : (this.yInput || cmp.anchor.bottom); - var _a = cmp.rotation, x = _a.x, y = _a.y, z = _a.z, w = _a.w; - var euler = new Euler(x, y, z); - var quater = new Quaternion(x, y, z, w); - euler.setFromQuaternion(quater); - euler.z = this.accumulation ? euler.z + this.rotationInput / 180 * Math.PI - : (this.rotationInput / 180 * Math.PI || euler.z); - quater.setFromEuler(euler); - cmp.rotation.x = quater.x; - cmp.rotation.y = quater.y; - cmp.rotation.z = quater.z; - cmp.rotation.w = quater.w; - var xSymbol = cmp.scale.x / Math.abs(cmp.scale.x); - var ySymbol = cmp.scale.y / Math.abs(cmp.scale.y); - cmp.scale.x = xSymbol * this.scalexInput + (this.accumulation ? cmp.scale.x : 0); - cmp.scale.y = ySymbol * this.scaleyInput + (this.accumulation ? cmp.scale.y : 0); - this.Next(); - }; - TransformNode.prototype.Next = function () { - }; - TransformNode.nodeType = 'code/Transform'; - return TransformNode; -}(Node)); -light.NodeContext.registerNode(TransformNode); - -var TransformNode$1 = /** @class */ (function (_super) { - __extends(TransformNode, _super); - function TransformNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.X = 0; - _this.Y = 0; - _this.Z = 0; - _this.xInput = 0; - _this.yInput = 0; - _this.zInput = 0; - _this.rotateX = 0; - _this.rotateY = 0; - _this.rotateZ = 0; - _this.rotateXInput = 0; - _this.rotateYInput = 0; - _this.rotateZInput = 0; - _this.scaleX = 0; - _this.scaleY = 0; - _this.scaleZ = 0; - _this.scaleXInput = 0; - _this.scaleYInput = 0; - _this.scaleZInput = 0; - return _this; - } - TransformNode.prototype.Run = function () { - var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z; - if (!this.entityId) { - this.Next(); - return; - } - var entity = this.entityManager.getEntityById(this.entityId); - var cmp = entity.getComponent(light.BasicTransform); - if (cmp) { - var vec3 = new light.Vec3((_c = (_b = (_a = this.xInput) !== null && _a !== void 0 ? _a : this.X) !== null && _b !== void 0 ? _b : cmp.position.x) !== null && _c !== void 0 ? _c : 0, (_f = (_e = (_d = this.yInput) !== null && _d !== void 0 ? _d : this.Y) !== null && _e !== void 0 ? _e : cmp.position.y) !== null && _f !== void 0 ? _f : 0, (_j = (_h = (_g = this.zInput) !== null && _g !== void 0 ? _g : this.Z) !== null && _h !== void 0 ? _h : cmp.position.z) !== null && _j !== void 0 ? _j : 0); - var svec3 = new light.Vec3((_m = (_l = (_k = this.scaleXInput) !== null && _k !== void 0 ? _k : this.scaleX) !== null && _l !== void 0 ? _l : cmp.scale.x) !== null && _m !== void 0 ? _m : 0, (_q = (_p = (_o = this.scaleYInput) !== null && _o !== void 0 ? _o : this.scaleY) !== null && _p !== void 0 ? _p : cmp.scale.y) !== null && _q !== void 0 ? _q : 0, (_t = (_s = (_r = this.scaleZInput) !== null && _r !== void 0 ? _r : this.scaleZ) !== null && _s !== void 0 ? _s : cmp.scale.z) !== null && _t !== void 0 ? _t : 0); - var _0 = cmp.rotation, x = _0.x, y = _0.y, z = _0.z, w = _0.w; - var valueX = (_v = (_u = this.rotateXInput) !== null && _u !== void 0 ? _u : this.rotateX) !== null && _v !== void 0 ? _v : x; - var valueY = (_x = (_w = this.rotateYInput) !== null && _w !== void 0 ? _w : this.rotateY) !== null && _x !== void 0 ? _x : y; - var valueZ = (_z = (_y = this.rotateZInput) !== null && _y !== void 0 ? _y : this.rotateZ) !== null && _z !== void 0 ? _z : z; - valueX = valueX / 180 * Math.PI; - valueY = valueY / 180 * Math.PI; - valueZ = valueZ / 180 * Math.PI; - var euler = new Euler(x, y, z); - var quater = new Quaternion(x, y, z, w); - euler.setFromQuaternion(quater); - euler.x = valueX; - euler.y = valueY; - euler.z = valueZ; - quater.setFromEuler(euler); - cmp.SetRotation(new light.Quat(quater.w, quater.x, quater.y, quater.z)); - cmp.SetScale(svec3); - cmp.SetPosition(vec3); - this.Next(); - } - }; - TransformNode.prototype.Next = function () { - }; - TransformNode.nodeType = 'code/Transform3D'; - return TransformNode; -}(Node)); -light.NodeContext.registerNode(TransformNode$1); - -var LoopType$2; -(function (LoopType) { - LoopType["FIXED"] = "\u56FA\u5B9A\u6570\u5B57"; - LoopType["INFINITE"] = "\u65E0\u9650\u5FAA\u73AF"; -})(LoopType$2 || (LoopType$2 = {})); -var UpdateNode = /** @class */ (function (_super) { - __extends(UpdateNode, _super); - function UpdateNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.repeatTimes = 1; - _this.frame = 1; - _this.currentFrame = 0; - _this.startupTrigger = false; // 刚开始就触发一次 - _this.currentTimes = 0; - return _this; - } - UpdateNode.prototype.Run = function () { - if (this.startupTrigger && this.repeatTimes !== 0) { - this.Update(); - this.currentTimes = this.currentTimes + 1; - } - light.on('update', this.onFrameUpdate.bind(this)); - }; - UpdateNode.prototype.onFrameUpdate = function () { - if (this.currentFrame !== 0) { - var trigger = (this.currentFrame % this.frame) === 0; - var infinite = this.loopType === LoopType$2.INFINITE; - var eligible = this.repeatTimes > this.currentTimes; - if (infinite || eligible) { - if (trigger) { - this.Update(); - this.currentTimes = this.currentTimes + 1; - } - } - } - this.currentFrame += 1; - }; - UpdateNode.prototype.Update = function () { }; - UpdateNode.nodeType = 'code/Update'; - return UpdateNode; -}(EventNode)); -light.NodeContext.registerNode(UpdateNode); - -var LoopType$3; -(function (LoopType) { - LoopType["FIXED"] = "\u56FA\u5B9A\u6570\u5B57"; - LoopType["INFINITE"] = "\u65E0\u9650\u5FAA\u73AF"; -})(LoopType$3 || (LoopType$3 = {})); -var TimesNode = /** @class */ (function (_super) { - __extends(TimesNode, _super); - function TimesNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.total = 2; - _this.times = 1; - _this.repeat = 1; - return _this; - } - TimesNode.prototype.Run = function () { - var repeat = this.loopType === LoopType$3.INFINITE ? Infinity : this.repeat; - if (this.times > this.total * repeat) { - return; - } - var index = (this.times - 1) % this.total; - if (!this["Next" + (index + 1)]) { - this["Next" + (index + 1)] = function () { }; - } - this["Next" + (index + 1)](); - this.times = this.times + 1; - }; - TimesNode.nodeType = 'code/times'; - return TimesNode; -}(Node)); -light.NodeContext.registerNode(TimesNode); - -var LoopType$4; -(function (LoopType) { - LoopType["FIXED"] = "\u56FA\u5B9A\u6570\u5B57"; - LoopType["INFINITE"] = "\u65E0\u9650\u5FAA\u73AF"; -})(LoopType$4 || (LoopType$4 = {})); -var play = /** @class */ (function (_super) { - __extends(play, _super); - function play() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.init = false; - _this.keepLastFrame = false; - _this.playtimes = 1; - return _this; - } - play.prototype.Run = function () { - var _this = this; - var entity = this.entityManager.getEntityById(this.entityId); - if (entity) { - showEntities([this.entityId], this.entityManager); - if (this.loopType === LoopType$4.INFINITE) { - return; - } - var timeOffset = entity.getComponent(light.TimeOffset); - var timeContrl = entity.getComponent(light.TimeControl); - var timeContrlList = entity.getComponent(light.TimeControlList); - if (timeOffset) { - if (timeContrlList === null || timeContrlList === void 0 ? void 0 : timeContrlList.timeControlArray) { - for (var i = 0; i < timeContrlList.timeControlArray.size(); i++) { - timeContrlList.timeControlArray.get(i).reset(); - timeContrlList.timeControlArray.get(i).currentTime = 0; - } - } - else if (timeContrl) { - timeContrl.reset(); - timeContrl.currentTime = 0; - } - else { - timeOffset.startOffset = light.getCurrentTime(); - } - timeOffset.loopCount = this.playtimes - 1; - timeOffset.visibleWhileOverTime = this.keepLastFrame; - var currentTime = light.getCurrentTime(); - var endTime_1 = currentTime + (timeOffset.duration - * (this.loopType === LoopType$4.INFINITE ? Infinity : this.playtimes)); - var invoked_1 = false; - light.on('update', function (time) { - if (time > endTime_1 && !invoked_1) { - invoked_1 = true; - _this.Finish(); - } - }); - } - } - this.Next(); - }; - play.prototype.Pause = function () { - var entity = this.entityManager.getEntityById(this.entityId); - if (entity) { - var timeOffset = entity.getComponent(light.TimeOffset); - var timeContrl = entity.getComponent(light.TimeControl); - if (timeContrl) { - timeContrl.pause = true; - timeContrl.loopCount = 0; - timeContrl.visibleWhileOverTime = true; - } - if (timeOffset) { - timeOffset.loopCount = 0; - timeOffset.visibleWhileOverTime = true; - } - } - }; - play.prototype.Next = function () { }; - play.prototype.Finish = function () { }; - play.nodeType = 'code/play'; - return play; -}(Node)); -light.NodeContext.registerNode(play); - -var SnapshotNode = /** @class */ (function (_super) { - __extends(SnapshotNode, _super); - function SnapshotNode() { - return _super !== null && _super.apply(this, arguments) || this; - } - SnapshotNode.prototype.Run = function () { - var _this = this; - showEntities([this.entityId], this.entityManager); - light.once('update', function () { - hideEntities([_this.entityId], _this.entityManager); - }); - this.Next(); - }; - SnapshotNode.prototype.Next = function () { }; - SnapshotNode.nodeType = 'code/Snapshot'; - return SnapshotNode; -}(Node)); -light.NodeContext.registerNode(SnapshotNode); - -var TransformNode$2 = /** @class */ (function (_super) { - __extends(TransformNode, _super); - function TransformNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.entities = []; - _this.duration = 1000000; - return _this; - } - TransformNode.prototype.Run = function () { - var _this = this; - if (this.entities.length < 2) { - return; - } - var originCoor = {}; - this.entities.forEach(function (entityId) { - var entity = _this.entityManager.getEntityById(entityId); - if (entity) { - var cmp = entity.getComponent(light.ScreenTransform); - if (cmp) { - originCoor[entityId] = { - left: cmp.anchor.left, - right: cmp.anchor.right, - top: cmp.anchor.top, - bottom: cmp.anchor.bottom, - }; - } - } - }); - if (Object.keys(originCoor).length < 2) { - return; - } - this.entities.forEach(function (entityId, i) { - var from = _this.entityManager.getEntityById(entityId); - var targetId = _this.entities[i + 1] || _this.entities[0]; - var pos = ['left', 'right', 'top', 'bottom']; - var invoke = (new Array(pos.length)).fill(false); - var timeStart = (new Array(pos.length)).fill(light.getCurrentTime()); - light.on('update', function (time) { - if (invoke.every(function (i) { return i == true; })) { - return; - } - pos.forEach(function (pos, idx) { - var currentTime = light.getCurrentTime(); - var transform = from.getComponent(light.ScreenTransform); - if (timeStart[idx] === -1 || invoke[idx]) { - return; - } - if (time - timeStart[idx] <= _this.duration) { - if (transform) { - var value = _this.linear((currentTime - timeStart[idx]) / 1000, originCoor[entityId][pos], originCoor[targetId][pos] - originCoor[entityId][pos], _this.duration / 1000); - transform.anchor[pos] = value; - } - currentTime = time; - } - else { - if (transform) { - transform.anchor[pos] = originCoor[targetId][pos]; - } - timeStart[idx] = -1; - invoke[idx] = true; - } - }); - }); - }); - this.Next(); - }; - TransformNode.prototype.linear = function (currentTime, startValue, changeValue, duration) { - return changeValue * currentTime / duration + startValue; - }; - TransformNode.prototype.Next = function () { - }; - TransformNode.nodeType = 'code/Translate'; - return TransformNode; -}(Node)); -light.NodeContext.registerNode(TransformNode$2); - -var LotteryNode = /** @class */ (function (_super) { - __extends(LotteryNode, _super); - function LotteryNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.from = 0; - _this.to = 1; - _this.repeat = false; - _this.n = 2; - _this.isInteger = false; - return _this; - } - LotteryNode.prototype.Run = function () { - var _a = this, n = _a.n, repeat = _a.repeat, from = _a.from, to = _a.to; - var result = []; - if (to - from + 1 >= n) { // 判断区间内是否可以产生n个不重复的值 - if (repeat) { - while (result.length !== n) { - result.push(this.generateRandom(from, to)); - } - } - else { - while ((new Set(result)).size !== n) { - result.push(this.generateRandom(from, to)); - } - result = Array.from((new Set(result))); - } - } - else { - while (result.length !== n) { - result.push(this.generateRandom(from, to)); - } - } - for (var i = 0; i < n; i++) { - this["number" + (i + 1)] = result[i]; - } - this.Next(); - }; - LotteryNode.prototype.generateRandom = function (from, to) { - if (this.isInteger) { - return Math.round(Math.round(from) + (Math.random() * (to - from))); - } - return from + (Math.random() * (to - from)); - }; - LotteryNode.prototype.Next = function () { }; - LotteryNode.nodeType = 'code/Lottery'; - return LotteryNode; -}(Node)); -light.NodeContext.registerNode(LotteryNode); - -var IfNode$1 = /** @class */ (function (_super) { - __extends(IfNode, _super); - function IfNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.time1 = -1; - _this.time2 = -1; - _this.gap = 1000000; - return _this; - } - IfNode.prototype.Event1 = function () { - this.time1 = light.getCurrentTime(); - if (this.time2 !== -1 && Math.abs(this.time1 - this.time2) <= this.gap) { - this.Next(); - } - }; - IfNode.prototype.Event2 = function () { - this.time2 = light.getCurrentTime(); - if (this.time1 !== -1 && Math.abs(this.time1 - this.time2) <= this.gap) { - this.Next(); - } - }; - IfNode.prototype.Next = function () { }; - IfNode.nodeType = 'code/Merge'; - return IfNode; -}(Node)); -light.NodeContext.registerNode(IfNode$1); - -var LotteryNode$1 = /** @class */ (function (_super) { - __extends(LotteryNode, _super); - function LotteryNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.from = 0; - _this.to = 1; - _this.duration = 1000000; // 编辑器里以微秒处理 - _this.progress = -1; - return _this; - } - LotteryNode.prototype.Run = function () { - var _this = this; - var entity = this.entityManager.getEntityById(this.entityId); - if (!entity) - return; - var face = entity.getComponent(light.CrazyFace); - if (!face) - return; - if (this.progress !== -1) { - face.progress = this.progress; - showEntities([this.entityId], this.entityManager); - this.Next(); - } - else { - var timeStart_1 = light.getCurrentTime(); - var invoked_1 = false; - var resetInitialValue_1 = false; - light.on('update', function (time) { - var currentTime = light.getCurrentTime(); - if (timeStart_1 === -1 || invoked_1) { - return; - } - if (!resetInitialValue_1) { - resetInitialValue_1 = true; - face.progress = _this.from; - showEntities([_this.entityId], _this.entityManager); - } - if (time - timeStart_1 <= _this.duration) { - face.progress = _this.linear((currentTime - timeStart_1) / 1000, _this.from, _this.to - _this.from, _this.duration / 1000); - } - else { - _this.Next(); - invoked_1 = true; - timeStart_1 = -1; - } - }); - } - }; - LotteryNode.prototype.linear = function (currentTime, startValue, changeValue, duration) { - return changeValue * currentTime / duration + startValue; - }; - LotteryNode.prototype.Next = function () { }; - LotteryNode.nodeType = 'code/Fusion'; - return LotteryNode; -}(Node)); -light.NodeContext.registerNode(LotteryNode$1); - -var Status; -(function (Status) { - Status[Status["Detected"] = 1] = "Detected"; - Status[Status["Lost"] = 2] = "Lost"; - Status[Status["UNINITIALIZED"] = 3] = "UNINITIALIZED"; -})(Status || (Status = {})); -var PointNode = /** @class */ (function (_super) { - __extends(PointNode, _super); - function PointNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.pitchMin = 0; - _this.pitchMax = 1; - _this.yawMin = 0; - _this.yawMax = 1; - _this.rollMin = 0; - _this.rollMax = 1; - _this.x1 = 0; - _this.x2 = 1; - _this.y1 = 0; - _this.y2 = 1; - _this.ratio = 1.2; // 丢失的比例 - _this.status = {}; - _this.init = false; - _this.minWidth = 0.8; - _this.minHeight = 0.8; - return _this; - } - PointNode.prototype.Run = function () { - if (this.init) { - for (var id in this.status) { - this.status[id] = Status.UNINITIALIZED; - } - return; - } - this.init = true; - openAIFeature([ - "Face_Point" /* FACE_POINT */, - ], this.entityManager, this.eventManager); - light.on('update', this.update.bind(this)); - }; - PointNode.prototype.getMinValue = function (value) { - if (value > 0) { - return value / this.ratio; - } - return value * this.ratio; - }; - PointNode.prototype.getMaxValue = function (value) { - if (value > 0) { - return value * this.ratio; - } - return value / this.ratio; - }; - PointNode.prototype.update = function () { - var _this = this; - var datas = getAIPointData("Face_Point" /* FACE_POINT */, this.entityManager); - var _loop_1 = function (i) { - var data = datas[i]; - var id_ = data.id_, roll_ = data.roll_, pitch_ = data.pitch_, canvas_width_ = data.canvas_width_, canvas_height_ = data.canvas_height_, yaw_ = data.yaw_, point_array_ = data.point_array_; - var minX; - var maxX; - var minY; - var maxY; - if (point_array_ === null || point_array_ === void 0 ? void 0 : point_array_.length) { - var xs = []; - var ys = []; - for (var i_1 = 0; i_1 < point_array_.length; i_1++) { - if (i_1 % 2 === 0) { - xs.push(point_array_[i_1]); - } - else { - ys.push((point_array_[i_1])); - } - } - minX = Math.min.apply(Math, xs); - maxX = Math.max.apply(Math, xs); - minY = Math.min.apply(Math, ys); - maxY = Math.max.apply(Math, ys); - } - if (this_1.status[id_] === undefined) { - this_1.status[id_] = Status.UNINITIALIZED; - } - var isDetect = function () { return _this.isBetween(roll_, _this.rollMin, _this.rollMax) - && _this.isBetween(yaw_, _this.yawMin, _this.yawMax) - && _this.isBetween(pitch_, _this.pitchMin, _this.pitchMax) - && _this.isBetween(minX, _this.x1 * canvas_width_, _this.x2 * canvas_width_) - && _this.isBetween(maxX, _this.x1 * canvas_width_, _this.x2 * canvas_width_) - && _this.isBetween(minY, _this.y1 * canvas_height_, _this.y2 * canvas_height_) - && _this.isBetween(maxY, _this.y1 * canvas_height_, _this.y2 * canvas_height_) - && isVaildFace(); }; - var isLost = function () { return !_this.isBetween(roll_, _this.getMinValue(_this.rollMin), _this.getMaxValue(_this.rollMax)) - || !_this.isBetween(yaw_, _this.getMinValue(_this.yawMin), _this.getMaxValue(_this.yawMax)) - || !_this.isBetween(pitch_, _this.getMinValue(_this.pitchMin), _this.getMaxValue(_this.pitchMax)) - || !_this.isBetween(minX, _this.getMinValue(_this.x1 * canvas_width_), _this.getMaxValue(_this.x2 * canvas_width_)) - || !_this.isBetween(maxX, _this.getMinValue(_this.x1 * canvas_width_), _this.getMaxValue(_this.x2 * canvas_width_)) - || !_this.isBetween(minY, _this.getMinValue(_this.y1 * canvas_height_), _this.getMaxValue(_this.y2 * canvas_height_)) - || !_this.isBetween(maxY, _this.getMinValue(_this.y1 * canvas_height_), _this.getMaxValue(_this.y2 * canvas_height_)) - || !isVaildFace(); }; - var isVaildFace = function () { return (maxX - minX) > (_this.minWidth * canvas_width_) - && (maxY - minY) > (_this.minHeight * canvas_height_); }; - if (this_1.status[id_] === Status.UNINITIALIZED) { - if (isDetect()) { - this_1.faceId = id_; - this_1.faceIndex = i; - this_1.status[id_] = Status.Detected; - this_1.Detected(); - } - else if (isLost()) { - this_1.faceId = id_; - this_1.faceIndex = i; - this_1.status[id_] = Status.Lost; - this_1.Lost(); - } - } - else if (this_1.status[id_] === Status.Lost) { // 初始化或丢失之后处理 - if (isDetect()) { - this_1.faceId = id_; - this_1.faceIndex = i; - this_1.status[id_] = Status.Detected; - this_1.Detected(); - } - } - else if (this_1.status[id_] === Status.Detected) { // 检测到时处理 - if (isLost()) { - this_1.faceId = id_; - this_1.faceIndex = i; - this_1.status[id_] = Status.Lost; - this_1.Lost(); - } - } - }; - var this_1 = this; - for (var i = 0; i < datas.length; i++) { - _loop_1(i); - } - }; - PointNode.prototype.isBetween = function (v, min, max) { - if (min <= v && v <= max) { - return true; - } - return false; - }; - PointNode.prototype.Detected = function () { }; - PointNode.prototype.Lost = function () { }; - PointNode.nodeType = 'code/Point'; - return PointNode; -}(Node)); -light.NodeContext.registerNode(PointNode); - -/** - * JSON.Parse safely - */ -function jsonParse(obj, defaultValue) { - try { - return JSON.parse(obj); - } - catch (err) { - console.error("json parse error:", err, obj); - return defaultValue || null; - } -} - -var PostEffectNode = /** @class */ (function (_super) { - __extends(PostEffectNode, _super); - function PostEffectNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.strengthInput = 0; - _this.starMaxScaleInput = 0; - _this.starMinScaleInput = 0; - _this.starScalePeriodInput = 0; - _this.maxCornersInput = 0; - _this.minDistanceInput = 0; - _this.highLightThresholdInput = 0; - _this.minFeatureDistanceInput = 0; - _this.maxFeatureDetectNumInput = 0; - _this.fastThresholdInput = 10; - _this.starScaleRateInput = 0; - _this.probabilityLowInput = 0; - _this.probabilityHighInput = 1; - _this.grayThresholdInput = 0; - _this.stabilityFactorInput = 0; - _this.maxKiraNumInput = 0; - _this.seedNumInput = 0; - _this.fastPointNumInput = 0; - _this.filePathsInput = []; - _this.colorPathInput = ''; - _this.colorNumInput = 1; - _this.brightnessInput = 0; - _this.kiraBrightnessInput = 1.0; - _this.contrastInput = 0; - _this.hueInput = 0; - _this.highlightsInput = 0; - _this.sharpnessInput = 0; - _this.shadowsInput = 0; - _this.saturationInput = 0; - _this.temperatureInput = 0; - _this.scaleFrequencyInput = 10; - _this.minAlphaInput = 0; - _this.maxAlphaInput = 0; - return _this; - } - PostEffectNode.prototype.Run = function () { - showEntities([this.entityId], this.entityManager); - var entity = this.entityManager.getEntityById(this.entityId); - var postEffect = entity.getComponent(light.PostEffect); - if (postEffect) { - if (postEffect.getEffectJson()) { - var json = jsonParse(postEffect.getEffectJson()); - if (!json) { - return; - } - json.effectStrength = this.strengthInput > 0 ? this.strengthInput : json.effectStrength; - json.starMaxScale = this.starMaxScaleInput > 0 ? this.starMaxScaleInput : json.starMaxScale; - json.starMinScale = this.starMinScaleInput > 0 ? this.starMinScaleInput : json.starMinScale; - json.starScalePeriod = this.starScalePeriodInput > 0 ? this.starScalePeriodInput : json.starScalePeriod; - // eslint-disable-next-line max-len - json.highLightThreshold = this.highLightThresholdInput > 0 ? this.highLightThresholdInput : json.highLightThreshold; - // eslint-disable-next-line max-len - json.maxFeatureDetectNum = this.maxFeatureDetectNumInput > 0 ? this.maxFeatureDetectNumInput : json.maxFeatureDetectNum; - // eslint-disable-next-line max-len - json.minFeatureDistance = this.minFeatureDistanceInput > 0 ? this.minFeatureDistanceInput : json.minFeatureDistance; - json.starScaleRate = this.starScaleRateInput > 0 ? this.starScaleRateInput : json.starScaleRate; - json.probabilityHigh = this.probabilityHighInput > 1 ? this.probabilityHighInput : json.probabilityHigh; - json.probabilityLow = this.probabilityLowInput > 0 ? this.probabilityLowInput : json.probabilityLow; - json.kiraBrightness = this.kiraBrightnessInput > 0.1 ? this.kiraBrightnessInput : json.kiraBrightness; - json.scaleFrequency = this.scaleFrequencyInput > 10 ? this.scaleFrequencyInput : json.scaleFrequency; - json.grayThreshold = this.grayThresholdInput > 0 ? this.grayThresholdInput : json.grayThreshold; - json.stabilityFactor = this.stabilityFactorInput > 0 ? this.stabilityFactorInput : json.stabilityFactor; - json.minAlpha = this.minAlphaInput > 0 ? this.minAlphaInput : json.minAlpha; - json.maxAlpha = this.maxAlphaInput > 0 ? this.maxAlphaInput : json.maxAlpha; - json.colorPath = this.colorPathInput; - json.colorNum = this.colorNumInput > 1 ? this.colorNumInput : json.colorNum; - json.maxCorners = this.maxCornersInput > 0 ? this.maxCornersInput : json.maxCorners; - json.maxKiraNum = this.maxKiraNumInput > 0 ? this.maxKiraNumInput : json.maxKiraNum; - json.seedNum = this.seedNumInput > 0 ? this.seedNumInput : json.seedNum; - json.fastPointNum = this.fastPointNumInput > 0 ? this.fastPointNumInput : json.fastPointNum; - json.fastThreshold = this.fastThresholdInput > 10 ? this.fastThresholdInput : json.fastThreshold; - json.minDistance = this.minDistanceInput > 0 ? this.minDistanceInput : json.minDistance; - json.brightness = this.brightnessInput > 0 ? this.brightnessInput : json.brightness; - json.contrast = this.contrastInput > 0 ? this.contrastInput : json.contrast; - json.hue = this.hueInput > 0 ? this.hueInput : json.hue; - json.highlights = this.highlightsInput > 0 ? this.highlightsInput : json.highlights; - json.sharpness = this.sharpnessInput > 0 ? this.sharpnessInput : json.sharpness; - json.shadows = this.shadowsInput > 0 ? this.shadowsInput : json.shadows; - json.saturation = this.saturationInput > 0 ? this.saturationInput : json.saturation; - json.temperature = this.temperatureInput > 0 ? this.temperatureInput : json.temperature; - json.filePaths = this.filePathsInput.length > 0 ? this.filePathsInput : json.filePaths; - postEffect.setEffectJson(JSON.stringify(json)); - } - } - this.Next(); - }; - PostEffectNode.prototype.Next = function () { }; - PostEffectNode.nodeType = 'code/PostEffect'; - return PostEffectNode; -}(Node)); -light.NodeContext.registerNode(PostEffectNode); - -var ParticleNode = /** @class */ (function (_super) { - __extends(ParticleNode, _super); - function ParticleNode() { - return _super !== null && _super.apply(this, arguments) || this; - } - ParticleNode.prototype.Run = function () { - var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z; - if (!this.entityId) - return; - var entity = this.entityManager.getEntityById(this.entityId); - showEntities([this.entityId], this.entityManager); - if (entity) { - var particle = entity.getComponent(light.ParticleEffect); - if (particle) { - var vec3 = new light.Vec3((_c = (_b = (_a = this.xInput) !== null && _a !== void 0 ? _a : this.x) !== null && _b !== void 0 ? _b : particle.emitterLength.x) !== null && _c !== void 0 ? _c : 0, (_f = (_e = (_d = this.yInput) !== null && _d !== void 0 ? _d : this.y) !== null && _e !== void 0 ? _e : particle.emitterLength.y) !== null && _f !== void 0 ? _f : 0, (_j = (_h = (_g = this.zInput) !== null && _g !== void 0 ? _g : this.z) !== null && _h !== void 0 ? _h : particle.emitterLength.z) !== null && _j !== void 0 ? _j : 0); - var dvec3 = new light.Vec3((_m = (_l = (_k = this.directionXInput) !== null && _k !== void 0 ? _k : this.directionX) !== null && _l !== void 0 ? _l : particle.emissionVector.x) !== null && _m !== void 0 ? _m : 0, (_q = (_p = (_o = this.directionYInput) !== null && _o !== void 0 ? _o : this.directionY) !== null && _p !== void 0 ? _p : particle.emissionVector.y) !== null && _q !== void 0 ? _q : 0, (_t = (_s = (_r = this.directionZInput) !== null && _r !== void 0 ? _r : this.directionZ) !== null && _s !== void 0 ? _s : particle.emissionVector.z) !== null && _t !== void 0 ? _t : 0); - particle.emitterLength = vec3; - particle.emissionVector = dvec3; - particle.speed = (_w = (_v = (_u = this.speedInput) !== null && _u !== void 0 ? _u : this.speed) !== null && _v !== void 0 ? _v : particle.speed) !== null && _w !== void 0 ? _w : 0.1; - particle.maxParticles = (_z = (_y = (_x = this.maxInput) !== null && _x !== void 0 ? _x : this.max) !== null && _y !== void 0 ? _y : particle.maxParticles) !== null && _z !== void 0 ? _z : 0; - particle.speedRandom = false; - particle.emissionVectorRandom = false; - particle.updateComponentData = true; - } - } - this.Next(); - }; - ParticleNode.prototype.Next = function () { }; - ParticleNode.nodeType = 'code/Particle'; - return ParticleNode; -}(Node)); -light.NodeContext.registerNode(ParticleNode); - -var ThrottleNode = /** @class */ (function (_super) { - __extends(ThrottleNode, _super); - function ThrottleNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.value = 1000000; - _this.triggerTime = -1; // 上一次触发时间 - return _this; - } - ThrottleNode.prototype.Next = function () { }; - ThrottleNode.prototype.Run = function () { - if (this.triggerTime < 0 // 首次触发及间隔超过 - || (this.triggerTime >= 0 && (this.triggerTime + this.value < light.getCurrentTime()))) { - this.triggerTime = light.getCurrentTime(); - this.Next(); - } - }; - ThrottleNode.nodeType = 'code/throttle'; - return ThrottleNode; -}(Node)); -light.NodeContext.registerNode(ThrottleNode); - -var UserMaterialNode = /** @class */ (function (_super) { - __extends(UserMaterialNode, _super); - function UserMaterialNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.lastpaths = []; - return _this; - } - UserMaterialNode.prototype.Run = function () { - var _this = this; - light.on('update', function () { - var entity = _this.entityManager.getEntityById(_this.entityId); - if (entity) { - var cmp = entity.getComponent(light.UserMaterial); - if (cmp) { - var clipData = cmp.getClipDataPaths(); - if ((clipData === null || clipData === void 0 ? void 0 : clipData.size) && clipData.size()) { - var paths = []; - for (var i = 0; i < clipData.size(); i++) { - paths.push(clipData.get(i)); - } - if (paths.length !== _this.lastpaths.length || !paths.every(function (path, i) { return path === _this.lastpaths[i]; })) { - if (_this.lastpaths.length === 0) { - _this.Next(); - } - else { - _this.Change(); - } - _this.lastpaths = paths; - } - } - } - } - }); - }; - UserMaterialNode.prototype.Next = function () { }; - UserMaterialNode.prototype.Change = function () { }; - UserMaterialNode.nodeType = 'code/userMaterial'; - return UserMaterialNode; -}(EventNode)); -light.NodeContext.registerNode(UserMaterialNode); - -var TouchEventNode = /** @class */ (function (_super) { - __extends(TouchEventNode, _super); - function TouchEventNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.init = false; - return _this; - } - TouchEventNode.prototype.Run = function () { - var _this = this; - if (!this.init) { - this.init = true; - light.on('TouchEvent', function () { - _this.Next(); - }); - } - }; - TouchEventNode.prototype.Next = function () { }; - TouchEventNode.nodeType = 'code/touchEvent'; - return TouchEventNode; -}(EventNode)); -light.NodeContext.registerNode(TouchEventNode); - -var PointNode$1 = /** @class */ (function (_super) { - __extends(PointNode, _super); - function PointNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.detected = false; - return _this; - } - PointNode.prototype.transform = function (value, max) { - var rangeMin = -1; - var rangeMax = 1; - var range = rangeMax - rangeMin; - return ((range * value / max) + rangeMin); - }; - PointNode.prototype.Run = function () { - var _this = this; - openAIFeature(["Hand_Gesture" /* HAND_GESTURE */], this.entityManager, this.eventManager); - light.on('update', function () { - var handPointdatas = getAIPointData("Hand_Point" /* HAND_POINT */, _this.entityManager); - var firstHand = handPointdatas === null || handPointdatas === void 0 ? void 0 : handPointdatas[0]; - if (firstHand) { - _this.detected = true; - var canvas_width_ = firstHand.canvas_width_; - var canvas_height_ = firstHand.canvas_height_; - var points = firstHand.point_array_; - var xs = points.filter(function (point, index) { return (index % 2 === 0); }); - var ys = points.filter(function (point, index) { return (index % 2 === 1); }); - var minX = Math.min.apply(Math, xs); - var maxX = Math.max.apply(Math, xs); - var minY = Math.min.apply(Math, ys); - var maxY = Math.max.apply(Math, ys); - _this.horizonX1 = _this.transform(minX, canvas_width_); - _this.horizonX2 = _this.transform(maxX, canvas_width_); - _this.horizonMiddle = _this.transform((minX + maxX) / 2, canvas_width_); - _this.verticalY1 = _this.transform(minY, canvas_height_); - _this.verticalY2 = _this.transform(maxY, canvas_height_); - _this.verticalMiddle = _this.transform((minY + maxY) / 2, canvas_height_); - _this.screenWidth = canvas_width_; - _this.screenHeight = canvas_height_; - _this.Detect(); - } - else { - _this.detected = false; - _this.Lost(); - } - }); - }; - PointNode.prototype.Detect = function () { }; - PointNode.prototype.Lost = function () { }; - PointNode.nodeType = 'code/handpoint'; - return PointNode; -}(Node)); -light.NodeContext.registerNode(PointNode$1); - -var OpenMouthRatioNode = /** @class */ (function (_super) { - __extends(OpenMouthRatioNode, _super); - function OpenMouthRatioNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.Value = 1.0; - _this.init = false; - _this.ratio = 1.0; - _this.nose_x = -1; - _this.nose_y = -1; - _this.mouse_up_x = -1; - _this.mouse_up_y = -1; - _this.mouse_down_x = -1; - _this.mouse_down_y = -1; - _this.originDis = -1; - _this.currentDis = -1; - return _this; - } - OpenMouthRatioNode.prototype.Run = function () { - if (!this.init) { - this.init = true; - light.on('update', this.update.bind(this)); - } - }; - OpenMouthRatioNode.prototype.update = function () { - var datas = getAIPointData("Face_Point" /* FACE_POINT */, this.entityManager); - if (datas.length > 0) { - var person = datas[0]; - this.nose_x = person.point_array_[128] / person.canvas_width_ * 2 - 1; - this.nose_y = -(person.point_array_[129] / person.canvas_height_ * 2 - 1); - this.mouse_up_x = person.point_array_[170] / person.canvas_width_ * 2 - 1; - this.mouse_up_y = -(person.point_array_[171] / person.canvas_height_ * 2 - 1); - this.mouse_down_x = person.point_array_[138] / person.canvas_width_ * 2 - 1; - this.mouse_down_y = -(person.point_array_[139] / person.canvas_height_ * 2 - 1); - this.currentDis = this.calcDis(this.mouse_up_x, this.mouse_up_y, this.mouse_down_x, this.mouse_down_y); - if (this.originDis === -1) { - this.originDis = this.currentDis; - } - this.ratio = this.currentDis / this.originDis; - this.ratio = Math.max(this.ratio, 1) * this.inputRatio; - } - else { - this.ratio = 1.0; - } - this.Value = this.ratio; - this.Next(); - }; - OpenMouthRatioNode.prototype.calcDis = function (sx, sy, fx, fy) { - return Math.sqrt((sx - fx) * (sx - fx) + (sy - fy) * (sy - fy)); - }; - OpenMouthRatioNode.prototype.Next = function () { - }; - OpenMouthRatioNode.nodeType = 'code/OpenMouthRatio'; - return OpenMouthRatioNode; -}(Node)); -light.NodeContext.registerNode(OpenMouthRatioNode); - -var StateEventNode = /** @class */ (function (_super) { - __extends(StateEventNode, _super); - function StateEventNode() { - var _this = _super.call(this) || this; - _this.total = 3; - _this.repeat = 1; - _this.currentIndex = 0; - return _this; - } - StateEventNode.prototype.Run1 = function () { - this.triggerEvent(0); - }; - StateEventNode.prototype.Run2 = function () { - this.triggerEvent(1); - }; - StateEventNode.prototype.Run3 = function () { - this.triggerEvent(2); - }; - StateEventNode.prototype.Run4 = function () { - this.triggerEvent(3); - }; - StateEventNode.prototype.Run5 = function () { - this.triggerEvent(4); - }; - StateEventNode.prototype.Run6 = function () { - this.triggerEvent(5); - }; - StateEventNode.prototype.Run7 = function () { - this.triggerEvent(6); - }; - StateEventNode.prototype.Run8 = function () { - this.triggerEvent(7); - }; - StateEventNode.prototype.Run9 = function () { - this.triggerEvent(8); - }; - StateEventNode.prototype.Run10 = function () { - this.triggerEvent(9); - }; - StateEventNode.prototype.triggerEvent = function (index) { - var currentIndex = 0; - if (this.repeat < 0) { - currentIndex = this.currentIndex % this.total; - } - else if (this.repeat > 0) { - if (this.currentIndex < this.total * this.repeat) { - currentIndex = this.currentIndex % this.total; - } - else { - currentIndex = this.currentIndex; - } - } - else { - currentIndex = -1; - } - if (currentIndex === index) { - if (this["Next" + (currentIndex + 1)]) { - this["Next" + (currentIndex + 1)](); - } - this.currentIndex = this.currentIndex + 1; - } - }; - StateEventNode.nodeType = 'code/stateEvent'; - return StateEventNode; -}(Node)); -light.NodeContext.registerNode(StateEventNode); - -var ParallelNode = /** @class */ (function (_super) { - __extends(ParallelNode, _super); - function ParallelNode() { - return _super !== null && _super.apply(this, arguments) || this; - } - ParallelNode.prototype.Event1 = function () { - this.Next(); - }; - ParallelNode.prototype.Event2 = function () { - this.Next(); - }; - ParallelNode.prototype.Event3 = function () { - this.Next(); - }; - ParallelNode.prototype.Event4 = function () { - this.Next(); - }; - ParallelNode.prototype.Event5 = function () { - this.Next(); - }; - ParallelNode.prototype.Next = function () { }; - ParallelNode.nodeType = 'code/Parallel'; - return ParallelNode; -}(Node)); -light.NodeContext.registerNode(ParallelNode); - -var Interaction; -(function (Interaction) { - Interaction["CLICK"] = "\u70B9\u51FB"; - Interaction["DCLICK"] = "\u53CC\u51FB"; - Interaction["LCLICK"] = "\u957F\u6309"; - Interaction["HAND"] = "\u624B\u51FA\u73B0"; - Interaction["FINGER"] = "\u98DF\u6307\u6307\u5C16\u51FA\u73B0"; - Interaction["FACE"] = "\u5168\u8138\u51FA\u73B0"; - Interaction["NOSE"] = "\u9F3B\u5B50\u51FA\u73B0"; - Interaction["MOUSE"] = "\u5634\u5DF4\u51FA\u73B0"; - Interaction["LEFTEYE"] = "\u5DE6\u773C\u51FA\u73B0"; - Interaction["RIGHTEYE"] = "\u53F3\u773C\u51FA\u73B0"; -})(Interaction || (Interaction = {})); -var LongClickTime = 500; // 长按阈值时间 -var DoubleClickTime = 300; // 双击阈值时间 -var HEIGHT = 1280; // 画布标准高 -var sampleNumber = 20; // 采样数量 -var ScreenEventNode = /** @class */ (function (_super) { - __extends(ScreenEventNode, _super); - function ScreenEventNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.isDetected = false; - _this.count = 0; - _this.times = 0; - _this.longPressedState = { - longPressedDownTime: undefined, - longPressedTriggered: false, - }; - _this.lastTwoTimePressedTime = []; // 记录最近两次按下的时间 用来判读是否为双击 - // AI点位 - _this.facePoint = Array.from({ length: 90 }, function (v, k) { return k; }); - _this.nosePoint = [56, 57, 58, 59, 60, 61, 62, 64]; - _this.mousePoint = [65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82]; - _this.leftEyePoint = [35, 36, 37, 38, 39, 40, 41, 42, 43, 44]; - _this.rightEyePoint = [45, 46, 47, 48, 49, 50, 51, 52, 53, 54]; - _this.handPoint = Array.from({ length: 32 }, function (v, k) { return k; }); - _this.onePoint = [15, 16, 17]; - return _this; - } - ScreenEventNode.prototype.onDetected = function () { }; - ScreenEventNode.prototype.Lost = function () { }; - ScreenEventNode.prototype.Run = function () { - var _this = this; - switch (this.interactionType) { - case Interaction.CLICK: - case Interaction.DCLICK: - case Interaction.LCLICK: - light.on('TouchEvent', function (event) { - _this.onReceive(event); - }); - break; - case Interaction.FACE: - case Interaction.MOUSE: - case Interaction.NOSE: - case Interaction.LEFTEYE: - case Interaction.RIGHTEYE: - openAIFeature(["Face_Point" /* FACE_POINT */], this.entityManager, this.eventManager); - break; - case Interaction.HAND: - case Interaction.FINGER: - openAIFeature(["Hand_Point" /* HAND_POINT */], this.entityManager, this.eventManager); - break; - } - light.on('RenderWillStartEvent', function (event) { - _this.onReceive(event); - }); - light.on('update', this.onUpdate.bind(this)); - }; - ScreenEventNode.prototype.onUpdate = function (currentTime) { - // 在onUpdate中 处理长按事件 - if (this.interactionType === Interaction.LCLICK) { - this.processLongClickEvent(currentTime); - return; - } - var aiData = []; - switch (this.interactionType) { - case Interaction.HAND: - case Interaction.FINGER: - aiData = getAIPointData("Hand_Point" /* HAND_POINT */, this.entityManager); - break; - case Interaction.FACE: - case Interaction.MOUSE: - case Interaction.NOSE: - case Interaction.LEFTEYE: - case Interaction.RIGHTEYE: - aiData = getAIPointData("Face_Point" /* FACE_POINT */, this.entityManager); - break; - } - var rects = []; - if (!aiData && aiData.length === 0) { - this.onLost(); - return; - } - for (var _i = 0, aiData_1 = aiData; _i < aiData_1.length; _i++) { - var data = aiData_1[_i]; - var AIDataRect = this.getAIDataRect(this.interactionType, data); - rects.push(AIDataRect); - } - if (rects.length > 0) { - var triggered = this.isInConstrainRects(rects, this.entityRect); - this.onTriggered(triggered); - } - }; - ScreenEventNode.prototype.getAIDataRect = function (actionEventName, data) { - var canvas_width_ = data.canvas_width_, canvas_height_ = data.canvas_height_, point_array_ = data.point_array_; - var minX; - var maxX; - var minY; - var maxY; - if (point_array_ === null || point_array_ === void 0 ? void 0 : point_array_.length) { - var xs = []; - var ys = []; - var points = []; - switch (actionEventName) { - case Interaction.FACE: - points = this.facePoint; - break; - case Interaction.MOUSE: - points = this.mousePoint; - break; - case Interaction.NOSE: - points = this.nosePoint; - break; - case Interaction.LEFTEYE: - points = this.leftEyePoint; - break; - case Interaction.RIGHTEYE: - points = this.rightEyePoint; - break; - case Interaction.HAND: - points = this.handPoint; - break; - case Interaction.FINGER: - points = this.onePoint; - break; - } - var beganIndex = points[0] * 2; - var length = (points[0] + points.length) * 2; - for (var i = beganIndex; i < length; i++) { - if (i % 2 === 0) { - xs.push(point_array_[i]); - } - else { - ys.push((point_array_[i])); - } - } - minX = Math.min.apply(Math, xs) / canvas_width_; - maxX = Math.max.apply(Math, xs) / canvas_width_; - minY = Math.min.apply(Math, ys) / canvas_height_; - maxY = Math.max.apply(Math, ys) / canvas_height_; - // 对于一个点 看做面积为1的矩形 - if (minX === maxX) { - maxX = minX + 1; - } - if (minY === maxY) { - maxY = minY + 1; - } - } - return { left: minX, top: minY, right: maxX, bottom: maxY }; - }; - ScreenEventNode.prototype.onReceive = function (event) { - switch (event.type()) { - case 'RenderWillStartEvent': - this.entityRect = this.getEntityRect(this.entity); - break; - case 'TouchEvent': { - var clickState = this.getClickEventType(event); - this.touchEventInfo = { - point: { - x: event.getX(), - y: event.getY(), - }, - downTime: event.getDownTime(), - eventTime: event.getEventTime(), - }; - this.onTouchEventProcess(clickState, this.touchEventInfo); - break; - } - } - }; - ScreenEventNode.prototype.onTriggered = function (isTriggered, time) { - if (isTriggered) { - if (!this.isDetected) { - this.times = 0; - } - this.times = time || 0; - this.isDetected = true; - this.count += 1; - this.onDetected(); - } - else { - this.onLost(); - } - }; - ScreenEventNode.prototype.onLost = function () { - if (this.isDetected) { - this.Lost(); - } - this.isDetected = false; - }; - ScreenEventNode.prototype.onTouchEventProcess = function (clickState, event) { - if ((clickState === null || clickState === void 0 ? void 0 : clickState.clickType) && clickState.clickType === this.interactionType - && clickState.triggered === true && event) { - var ratio = this.getRatio(); - if (this.isInConstrainRotationRect({ x: event.point.x / ratio / HEIGHT, y: event.point.y / HEIGHT }, this.entityRect)) { - this.onTriggered(true, event.eventTime - event.downTime); - } - else { - this.onLost(); - } - } - else { - this.times = 0; - this.onLost(); - } - }; - ScreenEventNode.prototype.getClickEventType = function (event) { - var clickState = { - clickType: undefined, - triggered: false, - }; - if (event && event.type() === 'TouchEvent') { - var downTime = event.getDownTime(); - var eventTime = event.getEventTime(); - if (event.getAction() === 0) { // press - this.currentPressedTime = downTime; - this.pushPressedTimeStack(this.currentPressedTime); - if (this.lastTwoTimePressedTime.length === 2 - && downTime - this.lastTwoTimePressedTime[0] < DoubleClickTime) { - clickState.clickType = Interaction.DCLICK; - } - else { - clickState.clickType = Interaction.CLICK; - } - clickState.triggered = true; - } - else if (event.getAction() === 1) { // release - if (this.currentPressedTime && eventTime - downTime > LongClickTime) { - this.times = eventTime - downTime; - } - this.currentPressedTime = undefined; - this.longPressedState = { - longPressedDownTime: undefined, - longPressedTriggered: false, - }; - clickState.triggered = false; - } - } - return clickState; - }; - // 根据 update 的 currentTime 判断是否为长按 - ScreenEventNode.prototype.processLongClickEvent = function (currentTime) { - if (this.interactionType === Interaction.LCLICK && this.currentPressedTime - && !this.longPressedState.longPressedTriggered) { - if (!this.longPressedState.longPressedDownTime) { - this.longPressedState.longPressedDownTime = currentTime; - } - if ((currentTime - this.longPressedState.longPressedDownTime) / 1000 >= LongClickTime) { - this.longPressedState.longPressedTriggered = true; - var clickState = { - clickType: Interaction.LCLICK, - triggered: true, - }; - this.onTouchEventProcess(clickState, this.touchEventInfo); - } - } - }; - ScreenEventNode.prototype.pushPressedTimeStack = function (time) { - if (this.lastTwoTimePressedTime.length === 2) { - this.lastTwoTimePressedTime.splice(0, 1); - } - this.lastTwoTimePressedTime.push(time); - }; - ScreenEventNode.prototype.getRatio = function () { - var devWidth = light.DeviceUtils.GetSurfaceWidth(this.entityManager); - var devHeight = light.DeviceUtils.GetSurfaceHeight(this.entityManager); - return devWidth / devHeight; - }; - ScreenEventNode.prototype.getEntityRect = function (entityId) { - var entity = this.entityManager.getEntityById(entityId); - var transform = entity.getComponent(light.ScreenTransform); - if (isEntityHide(entityId, this.entityManager)) { - return undefined; - } - var transformArray = this.getParentTransforms(transform); - transformArray.splice(0, 1); // 删除自己 - var pSize; - if (transformArray.length > 0) { - pSize = this.getParentSize(transform, transformArray); - } - if (!pSize) { - return undefined; - } - var size = this.getSizeFromTransform(transform, pSize); - var position = this.getPositionFromTransform(transform, pSize); - var angle = this.get2DRotationFromTransform(transform); - var local = { x: position.x + pSize.width / 2, y: -position.y + pSize.height / 2 }; - var originPoint = { x: local.x - size.width / 2, y: local.y - size.height / 2 }; - var transformOrigin = { - x: ((transform.pivot.x * size.width) / 2 + local.x) / pSize.width, - y: ((-transform.pivot.y * size.height) / 2 + local.y) / pSize.height, - }; - var rect = { - left: originPoint.x / pSize.width, - top: originPoint.y / pSize.height, - right: (originPoint.x + size.width) / pSize.width, - bottom: (originPoint.y + size.height) / pSize.height, - }; - return { rect: rect, transformOrigin: transformOrigin, angle: angle }; - }; - ScreenEventNode.prototype.getParentSize = function (transform, transformArray) { - var ratio = this.getRatio(); - var parentSize = { width: ratio * HEIGHT, height: HEIGHT }; - for (var i = transformArray.length - 1; i >= 0; i--) { - parentSize = this.getSizeFromTransform(transformArray[i], parentSize); - } - return parentSize; - }; - ScreenEventNode.prototype.getParentTransforms = function (transform) { - var result = [transform]; - if (!this.entityManager.valid(transform.parent)) { - return [transform]; - } - var parent = this.entityManager.get(transform.parent); - var parentTransform = parent.getComponent(light.ScreenTransform); - if (parentTransform !== null) { - result = result.concat(this.getParentTransforms(parentTransform)); - } - else { - return [transform]; - } - return result; - }; - ScreenEventNode.prototype.getSizeFromTransform = function (transform, parentSize) { - var width = (transform.anchor.right - transform.anchor.left) / 2 * parentSize.width - + (transform.offset.right - transform.offset.left); - var height = (transform.anchor.top - transform.anchor.bottom) / 2 * parentSize.height - + (transform.offset.top - transform.offset.bottom); - return { width: width, height: height }; - }; - ScreenEventNode.prototype.getPositionFromTransform = function (transform, pSize) { - var left = transform.anchor.left * pSize.width / 2 + transform.offset.left; - var right = transform.anchor.right * pSize.width / 2 + transform.offset.right; - var top = transform.anchor.top * pSize.height / 2 + transform.offset.top; - var bottom = transform.anchor.bottom * pSize.height / 2 + transform.offset.bottom; - var position = { x: (right + left) / 2, y: (top + bottom) / 2 }; - position.x += (right - left) / 2 * transform.pivot.x; - position.y += (top - bottom) / 2 * transform.pivot.y; - return position; - }; - ScreenEventNode.prototype.get2DRotationFromTransform = function (transform) { - var _a = transform.rotation, x = _a.x, y = _a.y, z = _a.z, w = _a.w; - var euler = new Euler(); - var quat = new Quaternion(x, y, z, w); - euler.setFromQuaternion(quat); - return euler.z; - }; - ScreenEventNode.prototype.isInConstrainRect = function (point, rect) { - if (!rect) { - return false; - } - var x = point.x; - var y = point.y; - return x > rect.left && x < rect.right - && y > rect.top && y < rect.bottom; - }; - // 点击触发判定 - ScreenEventNode.prototype.isInConstrainRotationRect = function (point, rRect) { - if (!rRect) { - return false; - } - var transformOrigin = rRect.transformOrigin, angle = rRect.angle, rect = rRect.rect; - var revertPoint = this.rotateByPoint(point, transformOrigin, angle); - var x = revertPoint.x; - var y = revertPoint.y; - return x > rect.left && x < rect.right - && y > rect.top && y < rect.bottom; - }; - // AI触发判定 - ScreenEventNode.prototype.isInConstrainRects = function (originRect, rRect) { - var _this = this; - if (!rRect) { - return false; - } - var transformOrigin = rRect.transformOrigin, angle = rRect.angle, rect = rRect.rect; - // 性能提升(1):旋转角度小于10度 按照没有旋转处理 - var isSmallAngle = Math.abs(angle) < Math.PI / 18; - return originRect.some(function (oRect) { - var overlapRatio = 0; - if (isSmallAngle) { - if (_this.isRectIntersecting(oRect, rect)) { - overlapRatio = _this.getIntersectingAreaMaxPercent(oRect, rect); - } - } - else { - overlapRatio = _this.getRectArea(oRect) < _this.getRectArea(rect) - ? _this.getSampleOfRect(oRect, rect, transformOrigin, angle) - : _this.getSampleOfRect(rect, oRect, transformOrigin, -angle); - } - if (overlapRatio >= 0.2) { - return true; - } - }); - }; - // 性能提升(2):使用采样算法模拟碰撞面积 准确度降低 效率提高 - ScreenEventNode.prototype.getSampleOfRect = function (smallerRect, biggerRect, transformOrigin, angle) { - var _this = this; - var rectPoint = this.calculateAreaBySampleAlgorithm(smallerRect); - var rotateRectPoint = rectPoint.map(function (point) { return _this.rotateByPoint(point, transformOrigin, angle); }); - var number = 0; - rotateRectPoint.forEach(function (point) { - if (_this.isInConstrainRect(point, biggerRect)) { - number += 1; - } - }); - return number / rotateRectPoint.length; - }; - ScreenEventNode.prototype.calculateAreaBySampleAlgorithm = function (rect) { - var index = sampleNumber; - var points = []; - var widthStep = (rect.right - rect.left) / index; - var heightStep = (rect.bottom - rect.top) / index; - var startX = rect.left; - var startY = rect.top; - for (var i = 0; i < index; i++) { - for (var j = 0; j < index; j++) { - points.push({ x: startX + widthStep * i, y: startY + heightStep * j }); - } - } - return points; - }; - // 逆时针旋转角度为正 - ScreenEventNode.prototype.rotateByPoint = function (originPoint, pivot, rotation) { - var ratio = this.getRatio(); - var newOriginPointX = (originPoint.x - pivot.x) * Math.cos(rotation) - - (originPoint.y - pivot.y) / ratio * Math.sin(rotation) + pivot.x; - var newOriginPointY = (originPoint.x - pivot.x) * ratio * Math.sin(rotation) - + (originPoint.y - pivot.y) * Math.cos(rotation) + pivot.y; - return { x: newOriginPointX, y: newOriginPointY }; - }; - ScreenEventNode.prototype.isRectIntersecting = function (originRect, targetRect) { - return (Math.abs(targetRect.right + targetRect.left - originRect.right - originRect.left) - <= originRect.right - originRect.left + targetRect.right - targetRect.left) - && (Math.abs(targetRect.bottom + targetRect.top - originRect.bottom - originRect.top) - <= originRect.bottom - originRect.top + targetRect.bottom - targetRect.top); - }; - ScreenEventNode.prototype.getIntersectingAreaMaxPercent = function (originRect, targetRect) { - var IntersectingArea = this.getIntersectingArea(originRect, targetRect); - var originRectPercent = IntersectingArea / this.getRectArea(originRect); - var targetRectPercent = IntersectingArea / this.getRectArea(targetRect); - return Math.max(originRectPercent, targetRectPercent); - }; - ScreenEventNode.prototype.getIntersectingArea = function (originRect, targetRect) { - var left = Math.max(originRect.left, targetRect.left); - var top = Math.max(originRect.top, targetRect.top); - var right = Math.min(originRect.right, targetRect.right); - var bottom = Math.min(originRect.bottom, targetRect.bottom); - return this.getRectArea({ left: left, right: right, top: top, bottom: bottom }); - }; - ScreenEventNode.prototype.getRectArea = function (rect) { - return (rect.right - rect.left) * (rect.bottom - rect.top); - }; - ScreenEventNode.nodeType = 'code/ScreenEvent'; - return ScreenEventNode; -}(Node)); -light.NodeContext.registerNode(ScreenEventNode); - -var ViewPointEventNode = /** @class */ (function (_super) { - __extends(ViewPointEventNode, _super); - function ViewPointEventNode() { - return _super !== null && _super.apply(this, arguments) || this; - } - ViewPointEventNode.prototype.Run = function () { - openAIFeature(["View_Point" /* VIEW_POINT */], this.entityManager, this.eventManager); - light.on('update', this.onUpdate.bind(this)); - }; - ViewPointEventNode.prototype.onUpdate = function () { - // 获取视动点位 - var points = light.AIDataUtils.GetViewPoint(this.entityManager); - var screenX = points.get(0); - var screenY = points.get(1); - var screenWidth = light.DeviceUtils.GetSurfaceWidth(this.entityManager); - var screenHeight = light.DeviceUtils.GetSurfaceHeight(this.entityManager); - this.viewPointX = screenX / screenWidth; - this.viewPointY = screenY / screenHeight; - this.Next(); - }; - ViewPointEventNode.prototype.Next = function () { - }; - ViewPointEventNode.nodeType = 'code/ViewPointEvent'; - return ViewPointEventNode; -}(Node)); -light.NodeContext.registerNode(ViewPointEventNode); - -var _a; -var RegionType; -(function (RegionType) { - RegionType["RECT"] = "\u77E9\u5F62"; - RegionType["CIRCLE"] = "\u5706\u5F62"; -})(RegionType || (RegionType = {})); -function square(x) { - return x * x; -} -var checkInRegionFunctions = (_a = {}, - _a[RegionType.RECT] = function (x, y, x1, y1, x2, y2) { return x >= x1 && y >= y1 && x <= x2 && y <= y2; }, - _a[RegionType.CIRCLE] = function (x, y, x1, y1, x2, y2) { - var xRadius = Math.abs(x1 - x2) / 2; - var yRadius = Math.abs(y1 - y2) / 2; - var xCenter = (x1 + x2) / 2; - var yCenter = (y1 + y2) / 2; - return square(x - xCenter) / square(xRadius) + square(y - yCenter) / square(yRadius) <= 1; - }, - _a); -var RegionNode = /** @class */ (function (_super) { - __extends(RegionNode, _super); - function RegionNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.X = 0; - _this.Y = 0; - _this.x1 = 0; - _this.y1 = 0; - _this.x2 = 0; - _this.y2 = 0; - _this.regionType = RegionType.RECT; - return _this; - } - RegionNode.prototype.Run = function () { - var checkInRegion = checkInRegionFunctions[this.regionType]; - if (checkInRegion(this.X, this.Y, this.x1, this.y1, this.x2, this.y2)) { - this.InSide(); - } - else { - this.OutSide(); - } - }; - RegionNode.prototype.InSide = function () { - }; - RegionNode.prototype.OutSide = function () { - }; - RegionNode.nodeType = 'code/region'; - return RegionNode; -}(Node)); -light.NodeContext.registerNode(RegionNode); - -var ValueNode = /** @class */ (function (_super) { - __extends(ValueNode, _super); - function ValueNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.valueType = 'number'; - _this._numberValue = 2; - _this._stringValue = ''; - _this._colorValue = '#00000000'; - _this._boolValue = true; - _this._fileValue = ''; - _this._vector2Value = { x: 0, y: 0 }; - _this._vector3Value = { x: 1, y: 1, z: 0 }; - _this._vector4Value = { x: 0, y: 0, z: 0, w: 0 }; - _this._rectValue = { top: 0, right: 0, bottom: 0, left: 0 }; - _this._areaValue = { x: 0, y: 0, w: 0, h: 0 }; - return _this; - } - ValueNode.prototype.Process = function () { - this.numberValue = this._numberValue; - this.stringValue = this._stringValue; - this.colorValue = this._colorValue; - this.boolValue = this._boolValue; - this.fileValue = this._fileValue; - this.vector2Value = this._vector2Value; - this.vector3Value = this._vector3Value; - this.vector4Value = this._vector4Value; - this.rectValue = this._rectValue; - this.areaValue = this._areaValue; - }; - ValueNode.nodeType = 'code/value'; - return ValueNode; -}(DataProcessNode)); -light.NodeContext.registerNode(ValueNode); - -var CommonComponent = /** @class */ (function (_super) { - __extends(CommonComponent, _super); - function CommonComponent() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.entityId = null; - _this.componentProps = []; // 当前对象的组件的全量属性 - _this.componentType = null; - return _this; - } - CommonComponent.prototype.Run = function () { - var _this = this; - var _a; - if (this.entityId) { - var entity = this.entityManager.getEntityById(this.entityId); - var comp_1 = entity.getComponent(light[this.componentType]); - if (comp_1) { - if ((_a = this.componentProps) === null || _a === void 0 ? void 0 : _a.length) { - this.componentProps.forEach(function (prop) { - if (_this[prop] !== null && _this[prop] !== undefined) { - _this.assignProp(comp_1, prop); - } - }); - } - } - this.Next(); - } - }; - CommonComponent.prototype.Next = function () { }; - CommonComponent.prototype.assignProp = function (target, prop) { - if (!target[prop]) { - // todo studio上的属性与SDK不是完全一一对应的 有些属性会进行转化 比如ScreenTransform在ls上是eEuler position 但SDK是rotation和anchor/offset - return; - } - var isRectProps = function (props) { return typeof props.top !== 'undefined' - && typeof props.left !== 'undefined' - && typeof props.right !== 'undefined' - && typeof props.bottom !== 'undefined'; }; - var isV3Props = function (props) { return typeof props.x !== 'undefined' - && typeof props.y !== 'undefined' - && typeof props.z !== 'undefined'; }; - var isV2Props = function (props) { return typeof props.x !== 'undefined' - && typeof props.y !== 'undefined'; }; - if (isV3Props(this[prop])) { - target[prop].x = this[prop].x; - target[prop].y = this[prop].y; - target[prop].z = this[prop].z; - } - else if (isV2Props(this[prop])) { - target[prop].x = this[prop].x; - target[prop].y = this[prop].y; - } - else if (isRectProps(this[prop])) { - target[prop].right = this[prop].right; - target[prop].left = this[prop].left; - target[prop].top = this[prop].top; - target[prop].bottom = this[prop].bottom; - } - else { - target[prop] = this[prop]; - } - }; - CommonComponent.nodeType = 'code/commonComponent'; - return CommonComponent; -}(Node)); -light.NodeContext.registerNode(CommonComponent); - -var Rotation3DAnimation = /** @class */ (function (_super) { - __extends(Rotation3DAnimation, _super); - function Rotation3DAnimation() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this._entityId = null; - _this._stopRotation = false; - // 记录时间信息 - _this.lastTime = -1; - _this.startTime = -1; - _this.currentTimes = 0; - _this.isInit = false; - _this.isContinue = false; - _this.isFinish = false; - _this.onLightUpdate = function (time) { - if (_this.isFinish) { - return; - } - var _time = time / 1000000; - var onceSpinTime = _this.onceSpinTime ? _this.onceSpinTime : _this._onceSpinTime; - if (_this.isContinue) { - _this.startTime = _time - (_this.lastTime + _this.currentTimes * onceSpinTime); - _this.isContinue = false; - return; - } - if (_this.lastTime < 0) { - _this.lastTime = 0; - _this.startTime = _time; - _this.isInit = true; - return; - } - var durationTime = _time - _this.startTime; - if (durationTime <= 0) { - return; - } - _this.currentTimes = Math.floor(durationTime / onceSpinTime); - var spinTimes = _this.spinTimes ? _this.spinTimes : _this._spinTimes; - if (_this.currentTimes >= spinTimes) { - _this.detachEvent(); - _this.Stop(); - _this.isFinish = true; - return; - } - var currentTime = durationTime % onceSpinTime; - var standardOneStepTime = currentTime - _this.lastTime; - if (standardOneStepTime <= 0) { - _this.reset(); - } - else { - var oneStepTime = _this.getOneStepTime(currentTime / onceSpinTime, _this.lastTime / onceSpinTime); - var spinAngle = _this.spinAngle ? _this.spinAngle : _this._spinAngle; - var oneStepRadian = spinAngle / 180 * Math.PI; - _this.UpdateObject(oneStepTime * oneStepRadian); - } - _this.lastTime = currentTime; - }; - return _this; - } - Rotation3DAnimation.prototype.Start = function () { - light.on('update', this.onLightUpdate); - }; - Rotation3DAnimation.prototype.Stop = function () { - this.detachEvent(); - }; - Rotation3DAnimation.prototype.Continue = function () { - this.isContinue = true; - light.on('update', this.onLightUpdate); - }; - Rotation3DAnimation.prototype.Cancel = function () { - this.detachEvent(); - this.lastTime = -1; - this.startTime = -1; - this.currentTimes = 0; - this.isInit = false; - this.isContinue = false; - this.isFinish = false; - this.reset(); - }; - Rotation3DAnimation.prototype.UpdateObject = function (radian) { - if (this._entityId) { - var entity = this.entityManager.getEntityById(this._entityId); - var comp = entity.getComponent(light.BasicTransform); - if (comp) { - var transform = new Vector3(comp.position.x, comp.position.y, comp.position.z); - var scale = new Vector3(comp.scale.x, comp.scale.y, comp.scale.z); - var rotation = new Quaternion(comp.rotation.x, comp.rotation.y, comp.rotation.z, comp.rotation.w); - var matrix = new Matrix4(); - matrix.compose(transform, rotation, scale); - if (this.isInit) { - this.initMatrix = new Matrix4().copy(matrix); - this.isInit = false; - } - var spinPoint = this.spinPoint ? this.spinPoint : this._spinPoint; - var spinPointTransform = new Matrix4().setPosition(new Vector3(spinPoint.x, spinPoint.y, spinPoint.z)); - matrix.premultiply(new Matrix4().getInverse(spinPointTransform)); - var spinAxis = this.spinAxis ? this.spinAxis : this._spinAxis; - matrix.premultiply(new Matrix4().makeRotationAxis(new Vector3(spinAxis.x, spinAxis.y, spinAxis.z).normalize(), radian)); - matrix.premultiply(spinPointTransform); - matrix.decompose(transform, rotation, scale); - comp.SetPosition(new light.Vec3(transform.x, transform.y, transform.z)); - if (!this._stopRotation) { - comp.SetRotation(new light.Quat(rotation.w, rotation.x, rotation.y, rotation.z)); - } - comp.SetScale(new light.Vec3(scale.x, scale.y, scale.z)); - } - } - }; - Rotation3DAnimation.prototype.detachEvent = function () { - light.removeListener('update', this.onLightUpdate); - }; - Rotation3DAnimation.prototype.reset = function () { - if (this._entityId) { - var entity = this.entityManager.getEntityById(this._entityId); - var comp = entity.getComponent(light.BasicTransform); - if (comp && this.initMatrix) { - var transform = new Vector3(); - var scale = new Vector3(); - var rotation = new Quaternion(); - this.initMatrix.decompose(transform, rotation, scale); - comp.SetPosition(new light.Vec3(transform.x, transform.y, transform.z)); - comp.SetRotation(new light.Quat(rotation.w, rotation.x, rotation.y, rotation.z)); - comp.SetScale(new light.Vec3(scale.x, scale.y, scale.z)); - } - } - }; - Rotation3DAnimation.prototype.getOneStepTime = function (currentTimePercent, lastTimePercent) { - var oneStepTime = currentTimePercent - lastTimePercent; - if (this._smoothType === 1) { - oneStepTime = currentTimePercent * (2 - currentTimePercent) - lastTimePercent * (2 - lastTimePercent); - } - else if (this._smoothType === 2) { - oneStepTime = currentTimePercent * currentTimePercent - lastTimePercent * lastTimePercent; - } - else if (this._smoothType === 3) { - if (currentTimePercent < 0.5) { - oneStepTime = 2 * currentTimePercent * currentTimePercent - 2 * lastTimePercent * lastTimePercent; - } - else { - oneStepTime = 2 * currentTimePercent * (2 - currentTimePercent) - 2 * lastTimePercent * (2 - lastTimePercent); - } - } - return oneStepTime; - }; - Rotation3DAnimation.nodeType = 'code/rotation3D'; - return Rotation3DAnimation; -}(Node)); -light.NodeContext.registerNode(Rotation3DAnimation); - -var GlobalValue = /** @class */ (function (_super) { - __extends(GlobalValue, _super); - function GlobalValue() { - var _this = _super.call(this) || this; - submitEvent('globalValue', function (propertyName, value) { - if (_this._methodType === 1 && _this._propName === propertyName) { - _this.outValue = value; - } - }); - return _this; - } - GlobalValue.prototype.Run = function () { - this.outValue = this.inValue; - emitEvent('globalValue', this._propName, this.inValue); - this.Next(); - }; - GlobalValue.prototype.Next = function () { }; - GlobalValue.nodeType = 'code/globalValue'; - return GlobalValue; -}(Node)); -light.NodeContext.registerNode(GlobalValue); - -var CameraEventNode = /** @class */ (function (_super) { - __extends(CameraEventNode, _super); - function CameraEventNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.init = false; - return _this; - } - CameraEventNode.prototype.StartRecording = function () { }; - CameraEventNode.prototype.Run = function () { - var _this = this; - if (!this.init) { - this.init = true; - var recordingEventKey_1 = 'event.script.lightsdk.CameraStartRecord'; - light.on('UpdateInputEvent', function (params) { - var jsonData = params[recordingEventKey_1]; - if (jsonData !== undefined && jsonData !== null) { - _this.StartRecording(); - } - }); - } - }; - CameraEventNode.nodeType = 'code/CameraEvent'; - return CameraEventNode; -}(EventNode)); -light.NodeContext.registerNode(CameraEventNode); - -var EmotionScoreEventNode = /** @class */ (function (_super) { - __extends(EmotionScoreEventNode, _super); - function EmotionScoreEventNode() { - return _super !== null && _super.apply(this, arguments) || this; - } - EmotionScoreEventNode.prototype.Run = function () { - openAIFeature(["Emotion_Score" /* EMOTION_SCORE */], this.entityManager, this.eventManager); - light.on('update', this.onUpdate.bind(this)); - }; - EmotionScoreEventNode.prototype.Next = function () { }; - EmotionScoreEventNode.prototype.onUpdate = function () { - var _this = this; - var _a; - var aiDetectData = getAIDataFromAIDataCenter(["Emotion_Score" /* EMOTION_SCORE */], this.entityManager); - if ((aiDetectData === null || aiDetectData === void 0 ? void 0 : aiDetectData.length) > 0 && ((_a = aiDetectData[0]) === null || _a === void 0 ? void 0 : _a.length) > 0) { - var emotionDatas = aiDetectData[0]; - var sortedTraceIDList_1 = emotionDatas.map(function (motionData) { return motionData.traceID; }).sort(function (a, b) { return a - b; }); - emotionDatas.forEach(function (emotionData) { - _this.trackID = sortedTraceIDList_1.indexOf(emotionData.traceID); - _this.emotionDegreeValue = emotionData.detectParams[_this.emotionType][0]; - _this.Next(); - }); - } - }; - EmotionScoreEventNode.nodeType = 'code/EmotionScoreEvent'; - return EmotionScoreEventNode; -}(EventNode)); -light.NodeContext.registerNode(EmotionScoreEventNode); - -var ValueNode$1 = /** @class */ (function (_super) { - __extends(ValueNode, _super); - function ValueNode() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.valueType = 'number'; - _this.numberValue = 2; - _this.outValue = 2; - return _this; - } - ValueNode.prototype.Process = function () { - this.outValue = this.numberValue; - }; - ValueNode.nodeType = 'code/valueObserve'; - return ValueNode; -}(DataProcessNode)); -light.NodeContext.registerNode(ValueNode$1); - -if (typeof (globalThis) === 'undefined') { - this['globalThis'] = this; -} -globalThis.configure = light.configure; -globalThis.update = light.update; - -})(light); \ No newline at end of file diff --git a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/scripts/studio-extension.js b/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/scripts/studio-extension.js deleted file mode 100644 index 3f5bd4d1..00000000 --- a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/scripts/studio-extension.js +++ /dev/null @@ -1,21 +0,0 @@ - -/*** light-js-config - //@requireAbility -***/ -/** * light-js-config - //@requireAbility - ***/ -// studio 探针函数 -light.sendLightCommand = function (source, property, target, targetProperty, value) { - var _a, _b, _c, _d; - var assetE = (_c = (_b = (_a = target['entityManager']) === null || _a === void 0 ? void 0 : _a.entitiesWithComponents('ClientProxy')) === null || _b === void 0 ? void 0 : _b.get) === null || _c === void 0 ? void 0 : _c.call(_b, 0); - var p = assetE === null || assetE === void 0 ? void 0 : assetE.getClientProxyComponent(); - if (light.LightCommand) { - (_d = p === null || p === void 0 ? void 0 : p.commandQueue) === null || _d === void 0 ? void 0 : _d.sendClientCommand(new light.LightCommand("LiteGraphEvent\n" + JSON.stringify({ - type: 'LiteGraphEvent', - targetNodeId: target['id'] || '-1', - targetSlotName: targetProperty || '', - value: value, - }))); - } -}; diff --git a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/sh.png b/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/sh.png deleted file mode 100644 index 2b1efbd2..00000000 Binary files a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/sh.png and /dev/null differ diff --git a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/template.json b/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/template.json deleted file mode 100644 index 36f7da96..00000000 --- a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/template.json +++ /dev/null @@ -1,4256 +0,0 @@ -{ - "isFragment": false, - "componentLevel": 275, - "madeIn": "LightStudio", - "root": { - "name": "3D模板", - "id": 1, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "entityId": 1, - "componentID": 1001, - "type": "ScreenTransform", - "enabled": true, - "version": 4, - "level": 2, - "objectEnabled": true - }, - { - "componentID": 1002, - "entityId": 1, - "type": "ExtraSetting", - "enabled": true, - "version": 1, - "enableRotation": true, - "resetWhenStartRecord": true, - "defaultCameraPosition": 0, - "supportCameraPosition": 0, - "sync3dRenderEnable": false, - "needVoiceDecibel": false, - "needAutoBeauty": false, - "enableDowngradeAsset": true, - "level": 4, - "requireAbility": [] - }, - { - "coverTime": 1000000, - "entityId": 1, - "type": "PreferredCoverTime", - "version": 2, - "enabled": true, - "componentID": 1003, - "level": 1 - }, - { - "enabled": true, - "entityId": 1, - "renderTargetKey": "RenderTarget", - "type": "Camera", - "version": 3, - "componentID": 1004, - "level": 2 - }, - { - "type": "EntityIdentifier", - "name": "3D模板", - "id": 1, - "originID": 1, - "enabled": true - } - ], - "children": [ - { - "id": 173, - "name": "Camera3D", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "BasicTransform", - "position": { - "x": 0, - "y": 0, - "z": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "enabled": true, - "entityId": 173, - "componentID": 173001, - "level": 1 - }, - { - "clearColor": "#00000000", - "componentID": 173002, - "enabled": true, - "entityId": 173, - "far": 1000, - "fov": 60, - "fovType": "vertical", - "near": 0.01, - "projectionType": "perspective", - "size": 0.2, - "targetBufferFlags": "clearColor", - "type": "Camera3DComponent", - "renderTargetKey": "RenderTarget", - "version": 2, - "level": 230 - }, - { - "bloom": { - "enable": false, - "levels": 6, - "strength": 0.1 - }, - "colorGrading": { - "cdl": { - "offset": { - "x": 0, - "y": 0, - "z": 0 - }, - "power": { - "x": 1, - "y": 1, - "z": 1 - }, - "slope": { - "x": 1, - "y": 1, - "z": 1 - } - }, - "channelMixer": { - "outBlue": { - "x": 0, - "y": 0, - "z": 1 - }, - "outGreen": { - "x": 0, - "y": 1, - "z": 0 - }, - "outRed": { - "x": 1, - "y": 0, - "z": 0 - } - }, - "contrast": 1, - "enable": true, - "saturation": 1, - "shadowMidHighlights": { - "highlightsColor": "#FFFFFF00", - "highlightsWeight": 0, - "midtonesColor": "#FFFFFF00", - "midtonesWeight": 0, - "ranges": { - "w": 1, - "x": 0, - "y": 0.333, - "z": 0.55 - }, - "shadowsColor": "#FFFFFF00", - "shadowsWeight": 0 - }, - "toneMapping": 3, - "vibrance": 1, - "whiteBalance": { - "temperature": 1, - "tint": 0.3 - } - }, - "componentID": 173003, - "enable": true, - "enableDithering": false, - "enableFXAA": false, - "enableMSAA": false, - "enableSSAO": false, - "enabled": true, - "entityId": 173, - "type": "PostEffect3DComponent", - "version": 48, - "vignette": { - "color": "#000000FF", - "enable": false, - "feather": 0.5, - "midPoint": 0.5, - "roundness": 0.5 - }, - "level": 265 - }, - { - "type": "EntityIdentifier", - "name": "Camera3D", - "id": 173, - "originID": 173, - "enabled": true - } - ] - }, - { - "id": 181, - "name": "Lighting", - "children": [ - { - "id": 183, - "name": "Envmap", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "componentID": 183001, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "enabled": true, - "entityId": 183, - "objectEnabled": true, - "position": { - "x": 0, - "y": 0.6499999761581421, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "type": "BasicTransform", - "version": 25, - "level": 1 - }, - { - "componentID": 183002, - "enabled": true, - "entityId": 183, - "envRotation": 304, - "iblPath": "3a5d9d58-1984-4d6a-8fbc-5d6b8f730360", - "innerAngle": 30, - "intensity": 89.60000000000001, - "irradiancePath": "e567e442-bc0d-48d4-ad8f-c0cce5ad6f4e", - "lightColor": "#ffffffff", - "lightType": 5, - "outerAngle": 60, - "radius": 4, - "shadowConfig": { - "castShadows": true, - "shadowMapSize": 10 - }, - "skyBoxConfig": { - "enableSkyBox": false, - "skyBoxPath": "" - }, - "type": "Light3DComponent", - "version": 449, - "level": 275 - }, - { - "type": "EntityIdentifier", - "name": "Envmap", - "id": 183, - "originID": 183, - "enabled": true - } - ] - }, - { - "id": 185, - "name": "Light", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "componentID": 185001, - "eEuler": { - "x": -25, - "y": 20, - "z": -40 - }, - "enabled": true, - "entityId": 185, - "objectEnabled": true, - "position": { - "x": 0.15, - "y": 0.55, - "z": 0.15 - }, - "rotation": { - "x": -0.2582801735941516, - "y": 0.08640591477787642, - "z": -0.36415774424680475, - "w": 0.8906259075081142 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "type": "BasicTransform", - "version": 12, - "level": 1 - }, - { - "componentID": 185002, - "enabled": true, - "entityId": 185, - "envRotation": 0, - "iblPath": "ce38e1ba-9e13-42f2-a491-b750578ffa87", - "innerAngle": 30, - "intensity": 40, - "irradiancePath": "4903bd51-a2ec-4880-b9b9-3a624df646b4", - "lightColor": "#ffffffff", - "lightType": 1, - "outerAngle": 60, - "radius": 4, - "shadowConfig": { - "castShadows": false, - "shadowMapSize": 10 - }, - "skyBoxConfig": { - "enableSkyBox": false, - "skyBoxPath": "" - }, - "type": "Light3DComponent", - "version": 11, - "level": 275 - }, - { - "type": "EntityIdentifier", - "name": "Light", - "id": 185, - "originID": 185, - "enabled": true - } - ] - } - ], - "enabled": true, - "version": 0, - "components": [ - { - "type": "BasicTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "enabled": true, - "entityId": 181, - "componentID": 181001, - "level": 1 - }, - { - "type": "EntityIdentifier", - "name": "Lighting", - "id": 181, - "originID": 181, - "enabled": true - } - ] - }, - { - "id": 188, - "name": "3D人头", - "children": [ - { - "id": 233, - "name": "XiKuangYanJing33(prefab)", - "children": [ - { - "id": 236, - "name": "scenes", - "children": [ - { - "id": 238, - "name": "Scene", - "children": [ - { - "id": 240, - "name": "XiKuangYanJing.001", - "children": [], - "enabled": true, - "version": 0, - "forbid": false, - "components": [ - { - "componentID": 240001, - "enabled": true, - "entityId": 240, - "needReload": true, - "objectEnabled": true, - "paused": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "type": "BasicTransform", - "visible": true, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "level": 1 - }, - { - "componentID": 240002, - "enabled": true, - "entityId": 240, - "layers": 1, - "needReload": true, - "paused": false, - "type": "LayerSetComponent", - "level": 4 - }, - { - "componentID": 240003, - "enabled": true, - "entityId": 240, - "meshIndex": 0, - "meshName": "网格", - "needReload": true, - "paused": false, - "primitiveConfigs": [ - { - "castShadow": true, - "materialResourceKey": "2f59df0b-9304-4ec3-b731-f37c3f549944", - "meshResourceKey": "e4ef00fa-9790-46f4-bf19-0d5ee817f61a", - "primitiveIndex": 0, - "receiveShadow": true - } - ], - "skinned": false, - "type": "MeshRenderer3DComponent", - "version": 2, - "level": 4 - }, - { - "type": "EntityIdentifier", - "name": "XiKuangYanJing.001", - "id": 240, - "originID": 240, - "enabled": true - } - ] - }, - { - "id": 244, - "name": "jk", - "children": [], - "enabled": true, - "version": 0, - "forbid": false, - "components": [ - { - "componentID": 244001, - "enabled": true, - "entityId": 244, - "needReload": true, - "objectEnabled": true, - "paused": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "type": "BasicTransform", - "visible": true, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "level": 1 - }, - { - "componentID": 244002, - "enabled": true, - "entityId": 244, - "layers": 1, - "needReload": true, - "paused": false, - "type": "LayerSetComponent", - "level": 4 - }, - { - "componentID": 244003, - "enabled": true, - "entityId": 244, - "meshIndex": 1, - "meshName": "网格.001", - "needReload": true, - "paused": false, - "primitiveConfigs": [ - { - "castShadow": true, - "materialResourceKey": "470b7f69-b871-4c9f-9f8d-f0c1cf162321", - "meshResourceKey": "824f9a83-5343-4685-8b7c-eb0ffd6715c3", - "primitiveIndex": 0, - "receiveShadow": true - } - ], - "skinned": false, - "type": "MeshRenderer3DComponent", - "level": 4 - }, - { - "type": "EntityIdentifier", - "name": "jk", - "id": 244, - "originID": 244, - "enabled": true - } - ] - } - ], - "enabled": true, - "version": 0, - "forbid": false, - "components": [ - { - "componentID": 238001, - "enabled": true, - "entityId": 238, - "needReload": true, - "objectEnabled": true, - "paused": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1.0255081493992495, - "y": 1.0255081493992495, - "z": 1.0255081493992495 - }, - "type": "BasicTransform", - "visible": true, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "version": 2, - "level": 1 - }, - { - "type": "EntityIdentifier", - "name": "Scene", - "id": 238, - "originID": 238, - "enabled": true - } - ] - } - ], - "enabled": true, - "version": 0, - "forbid": false, - "components": [ - { - "componentID": 236001, - "enabled": true, - "entityId": 236, - "needReload": true, - "objectEnabled": true, - "paused": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "type": "BasicTransform", - "visible": true, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "level": 1 - }, - { - "type": "EntityIdentifier", - "name": "scenes", - "id": 236, - "originID": 236, - "enabled": true - } - ] - } - ], - "enabled": true, - "version": 0, - "forbid": true, - "components": [ - { - "componentID": 233001, - "enabled": true, - "entityId": 233, - "needReload": true, - "objectEnabled": true, - "paused": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "type": "BasicTransform", - "visible": true, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "level": 1 - }, - { - "componentID": 233002, - "enabled": true, - "entityId": 233, - "gltfResourceKey": "aeb43bf6-6044-4121-92da-a54ae6afb32d", - "needReload": true, - "paused": false, - "type": "GlbRenderComponent", - "level": 4 - }, - { - "type": "EntityIdentifier", - "name": "XiKuangYanJing33(prefab)", - "id": 233, - "originID": 233, - "enabled": true - } - ] - } - ], - "enabled": true, - "version": 0, - "components": [ - { - "type": "BasicTransform", - "position": { - "x": 0, - "y": 0.1, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "enabled": true, - "entityId": 188, - "componentID": 188001, - "level": 1 - }, - { - "use3DMMHead": 0, - "useCustom3DHead": false, - "custom3DHead": "", - "showUserHead": true, - "faceIndex": [ - 0 - ], - "type": "Face3DComponent", - "enabled": true, - "entityId": 188, - "componentID": 188002, - "level": 230 - }, - { - "type": "EntityIdentifier", - "name": "3D人头", - "id": 188, - "originID": 188, - "enabled": true - } - ] - }, - { - "id": 217, - "name": "音乐", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 217, - "componentID": 217001, - "level": 2 - }, - { - "audioSourceType": 1, - "componentID": 217002, - "enabled": true, - "entityId": 217, - "speed": 1, - "type": "AudioSource", - "version": 10, - "volume": 1, - "volumeEffects": [], - "level": 2, - "src": "c35b28e7-cd8e-4e94-a067-5d5a44e0527c" - }, - { - "componentID": 217003, - "duration": 16559999.999999998, - "enabled": true, - "endOffset": -2147483648, - "entityId": 217, - "loopCount": 0, - "startOffset": 0, - "type": "TimeOffset", - "version": 2, - "level": 1 - }, - { - "type": "EntityIdentifier", - "name": "音乐", - "id": 217, - "originID": 217, - "enabled": true - } - ] - }, - { - "id": 5, - "name": "2D画板", - "children": [ - { - "id": 4, - "name": "滤镜", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 4, - "componentID": 4001, - "level": 2 - }, - { - "componentID": 4002, - "enabled": true, - "entityId": 4, - "intensity": 0.6900000000000001, - "src": "bffa890c-da8a-46a8-8ab1-6dbc25b7c698", - "type": "LUTFilter", - "version": 12, - "level": 1 - }, - { - "startOffset": 0, - "duration": -2147483648, - "endOffset": 0, - "loopCount": -2147483648, - "type": "TimeOffset", - "enabled": true, - "entityId": 4, - "componentID": 4003, - "version": null, - "level": 1 - }, - { - "type": "EntityIdentifier", - "name": "滤镜", - "id": 4, - "originID": 4, - "enabled": true - } - ] - }, - { - "id": 8, - "name": "脸妆", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 8, - "componentID": 8001, - "level": 2 - }, - { - "componentID": 8002, - "enabled": true, - "entityId": 8, - "faceExchangeImageDisableFaceCrop": true, - "faceExchangeImageEnableOpacity": false, - "faceImage": "aef7f335-36c3-47cd-b0c1-7e264e4c7963", - "faceMask": "none", - "facePointsFile": "", - "facePointsOption": false, - "maskImage": "", - "type": "MakeupFaceV7", - "visMethod": 0, - "version": 2, - "level": 2, - "makeupFaceVersion": "v7" - }, - { - "alpha": 1, - "componentID": 8003, - "enabled": true, - "entityId": 8, - "mode": "multiply", - "type": "BlendMode", - "version": 2, - "level": 2 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "female", - "type": "FaceTracking", - "enabled": true, - "entityId": 8, - "componentID": 8004, - "level": 2 - }, - { - "type": "EntityIdentifier", - "name": "脸妆", - "id": 8, - "originID": 8, - "enabled": true - } - ] - }, - { - "id": 6, - "name": "美瞳", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 6, - "componentID": 6001, - "level": 2 - }, - { - "componentID": 6002, - "enabled": true, - "entityId": 6, - "irisImage": "72afdffe-899d-467d-ba31-8791f5ec919f", - "minVisibility": 0, - "type": "MakeupIrisV6", - "visMethod": 0, - "version": 2, - "level": 2 - }, - { - "alpha": 0.36, - "componentID": 6003, - "enabled": true, - "entityId": 6, - "mode": "normal", - "type": "BlendMode", - "version": 19, - "level": 2 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "female", - "type": "FaceTracking", - "enabled": true, - "entityId": 6, - "componentID": 6004, - "level": 2 - }, - { - "type": "EntityIdentifier", - "name": "美瞳", - "id": 6, - "originID": 6, - "enabled": true - } - ] - }, - { - "id": 11, - "name": "唇彩", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 11, - "componentID": 11001, - "level": 2 - }, - { - "closeMouseMask": "", - "componentID": 11002, - "enabled": true, - "entityId": 11, - "lipsColor": "", - "lipsImage": "966124fc-bafa-429c-96a6-72d64200f323", - "lipsImageCrop": "cropImage/zc_crop.png", - "lipsImageCropRect": { - "bottom": 1420, - "left": 622, - "right": 918, - "top": 1260 - }, - "lipsLut": "", - "lipsMask": "", - "lipsMaskCrop": "cropImage/zc_Mask_crop.png", - "lipsMaskCropRect": { - "bottom": 2047, - "left": 0, - "right": 1535, - "top": 0 - }, - "lipsMaskEnum": 0, - "lipsType": "Image", - "minVisibility": 0, - "openMouseMask": "", - "type": "MakeupLipsV6", - "visMethod": 0, - "version": 2, - "level": 2, - "lipsDetailType": "Default" - }, - { - "alpha": 0.62, - "componentID": 11003, - "enabled": true, - "entityId": 11, - "mode": "multiply", - "type": "BlendMode", - "version": 33, - "level": 2 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "female", - "type": "FaceTracking", - "enabled": true, - "entityId": 11, - "componentID": 11004, - "level": 2 - }, - { - "type": "EntityIdentifier", - "name": "唇彩", - "id": 11, - "originID": 11, - "enabled": true - } - ] - }, - { - "id": 10, - "name": "眼妆", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 10, - "componentID": 10001, - "level": 2 - }, - { - "componentID": 10002, - "cropRect": { - "bottom": 2048, - "left": 0, - "right": 1536, - "top": 0 - }, - "enabled": true, - "entityId": 10, - "eyeCropImageName": "0cd03468-511b-4ccf-94b4-456ce868544b", - "eyeImageName": "0cd03468-511b-4ccf-94b4-456ce868544b", - "minVisibility": 0, - "type": "MakeupEyeV6", - "visMethod": 0, - "version": 2, - "level": 2 - }, - { - "alpha": 0.72, - "componentID": 10003, - "enabled": true, - "entityId": 10, - "mode": "multiply", - "type": "BlendMode", - "version": 4, - "level": 2 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "female", - "type": "FaceTracking", - "enabled": true, - "entityId": 10, - "componentID": 10004, - "level": 2 - }, - { - "type": "EntityIdentifier", - "name": "眼妆", - "id": 10, - "originID": 10, - "enabled": true - } - ] - }, - { - "id": 12, - "name": "眼妆", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 12, - "componentID": 12001, - "level": 2 - }, - { - "componentID": 12002, - "cropRect": { - "bottom": 2048, - "left": 0, - "right": 1536, - "top": 0 - }, - "enabled": true, - "entityId": 12, - "eyeCropImageName": "03bb659f-6428-46c6-81b2-23a7b0c52d15", - "eyeImageName": "03bb659f-6428-46c6-81b2-23a7b0c52d15", - "minVisibility": 0, - "type": "MakeupEyeV6", - "visMethod": 0, - "version": 2, - "level": 2 - }, - { - "alpha": 0.85, - "componentID": 12003, - "enabled": true, - "entityId": 12, - "mode": "screen", - "type": "BlendMode", - "version": 21, - "level": 2 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "female", - "type": "FaceTracking", - "enabled": true, - "entityId": 12, - "componentID": 12004, - "level": 2 - }, - { - "type": "EntityIdentifier", - "name": "眼妆", - "id": 12, - "originID": 12, - "enabled": true - } - ] - }, - { - "id": 226, - "name": "前景贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "left": -0.6866708126036484, - "right": -0.6866708126036484, - "top": 0.1302909281716419, - "bottom": 0.1302909281716419 - }, - "offset": { - "left": -112.99906716417912, - "right": 112.99906716417912, - "top": 180, - "bottom": -180 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "objectEnabled": true, - "entityId": 226, - "componentID": 226001, - "type": "ScreenTransform", - "enabled": true, - "version": 349, - "level": 2 - }, - { - "componentID": 226002, - "enabled": true, - "entityId": 226, - "scaleMode": 2, - "src": "9f05727d-9cce-4fc1-86c8-3f1eada24a04", - "type": "Image", - "version": 5, - "level": 1 - }, - { - "alpha": 1, - "mode": "normal", - "type": "BlendMode", - "enabled": true, - "entityId": 226, - "componentID": 226003, - "level": 2 - }, - { - "startOffset": 0, - "duration": 3000000, - "endOffset": -2147483648, - "loopCount": -1, - "type": "TimeOffset", - "enabled": true, - "entityId": 226, - "componentID": 226004, - "version": 1, - "level": 1 - }, - { - "type": "EntityIdentifier", - "name": "前景贴纸", - "id": 226, - "originID": 226, - "enabled": true - } - ] - }, - { - "id": 7, - "name": "前景贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0.6063432835820892, - "right": 0.6063432835820892, - "top": -0.23514750466417894, - "bottom": -0.23514750466417894 - }, - "offset": { - "left": -142.00093283582086, - "right": 142.00093283582086, - "top": 210.9981343283582, - "bottom": -210.9981343283582 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 7, - "componentID": 7001, - "version": 249, - "level": 2 - }, - { - "componentID": 7002, - "enabled": true, - "entityId": 7, - "scaleMode": 2, - "src": "6af9b9fc-1c04-476f-b27b-ef0255876b6e", - "type": "Image", - "version": 3, - "level": 1 - }, - { - "alpha": 1, - "mode": "normal", - "type": "BlendMode", - "enabled": true, - "entityId": 7, - "componentID": 7003, - "level": 2 - }, - { - "startOffset": 0, - "duration": 3000000, - "endOffset": -2147483648, - "loopCount": -1, - "type": "TimeOffset", - "enabled": true, - "entityId": 7, - "componentID": 7004, - "version": null, - "level": 1 - }, - { - "type": "EntityIdentifier", - "name": "前景贴纸", - "id": 7, - "originID": 7, - "enabled": true - } - ] - }, - { - "id": 9, - "name": "前景贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0.19931592039800985, - "right": 0.19931592039800985, - "top": -0.7079640858208958, - "bottom": -0.7079640858208958 - }, - "offset": { - "left": -238.00373134328353, - "right": 238.00373134328353, - "top": 143.00373134328362, - "bottom": -143.00373134328362 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 9, - "componentID": 9001, - "version": 271, - "level": 2 - }, - { - "componentID": 9002, - "enabled": true, - "entityId": 9, - "scaleMode": 2, - "src": "727eabdc-a88c-4646-be64-b9b1b4eeb1bc", - "type": "Image", - "version": 3, - "level": 1 - }, - { - "alpha": 1, - "componentID": 9003, - "enabled": true, - "entityId": 9, - "mode": "screen", - "type": "BlendMode", - "version": 2, - "level": 2 - }, - { - "startOffset": 0, - "duration": 2250000, - "endOffset": -2147483648, - "loopCount": -1, - "type": "TimeOffset", - "enabled": true, - "entityId": 9, - "componentID": 9004, - "version": null, - "level": 1 - }, - { - "type": "EntityIdentifier", - "name": "前景贴纸", - "id": 9, - "originID": 9, - "enabled": true - } - ] - }, - { - "id": 13, - "name": "前景贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0.19143864013266998, - "right": 0.19143864013266998, - "top": -0.7152081389925374, - "bottom": -0.7152081389925374 - }, - "offset": { - "left": -237.99906716417908, - "right": 237.99906716417908, - "top": 142.99906716417908, - "bottom": -142.99906716417908 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 13, - "componentID": 13001, - "version": 318, - "level": 2 - }, - { - "componentID": 13002, - "enabled": true, - "entityId": 13, - "scaleMode": 2, - "src": "911ae251-ab63-42ae-b122-1e1418fb59cf", - "type": "Image", - "version": 3, - "level": 1 - }, - { - "alpha": 1, - "componentID": 13003, - "enabled": true, - "entityId": 13, - "mode": "screen", - "type": "BlendMode", - "version": 2, - "level": 2 - }, - { - "startOffset": 0, - "duration": 750000, - "endOffset": -2147483648, - "loopCount": -1, - "type": "TimeOffset", - "enabled": true, - "entityId": 13, - "componentID": 13004, - "version": null, - "level": 1 - }, - { - "type": "EntityIdentifier", - "name": "前景贴纸", - "id": 13, - "originID": 13, - "enabled": true - } - ] - }, - { - "id": 250, - "name": "流程管理", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 250, - "componentID": 250001, - "level": 2 - }, - { - "type": "EntityIdentifier", - "name": "流程管理", - "id": 250, - "originID": 250 - }, - { - "type": "Script", - "entityId": 250, - "scriptPath": "632b0f18-9284-4f54-a0c4-f19fcb376d1a", - "enabled": true, - "componentID": 99999 - } - ] - } - ], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "top": 1, - "bottom": -1, - "left": -1, - "right": 1 - }, - "offset": { - "top": 0, - "bottom": 0, - "left": 0, - "right": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 5, - "componentID": 5001, - "level": 2 - }, - { - "renderTargetKey": "RenderTarget", - "type": "Camera", - "enabled": true, - "entityId": 5, - "componentID": 5002, - "level": 2 - }, - { - "type": "EntityIdentifier", - "name": "2D画板", - "id": 5, - "originID": 5, - "enabled": true - } - ] - }, - { - "id": 24, - "name": "light.js", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "EntityIdentifier", - "name": "light.js", - "id": 24, - "originID": 24 - }, - { - "type": "Script", - "entityId": 24, - "scriptPath": "6113cd76-2a37-4e59-b086-062d17f5dbd7", - "enabled": true, - "componentID": 24001 - }, - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "interactive": false, - "enabled": true, - "entityId": 24, - "componentID": 24002 - } - ] - } - ] - }, - "inputSources": { - "3a5d9d58-1984-4d6a-8fbc-5d6b8f730360": { - "type": "EnvMap_KTX", - "commandMap": {}, - "key": "3a5d9d58-1984-4d6a-8fbc-5d6b8f730360", - "path": "Soft_4TubeBank_2BlackFlags_ibl.ktx", - "label": "Soft_4TubeBank_2BlackFlags_ibl.ktx", - "level": 2 - }, - "e567e442-bc0d-48d4-ad8f-c0cce5ad6f4e": { - "type": "EnvMap_SH", - "commandMap": {}, - "key": "e567e442-bc0d-48d4-ad8f-c0cce5ad6f4e", - "path": "lebombo_default/lebombo_default_irradiance.sh", - "label": "lebombo_default_irradiance.sh", - "level": 2 - }, - "aeb43bf6-6044-4121-92da-a54ae6afb32d": { - "type": "modelFile_gltf", - "commandMap": {}, - "replaceMismatch": false, - "key": "aeb43bf6-6044-4121-92da-a54ae6afb32d", - "path": "XiKuangYanJing33-gltf/XiKuangYanJing33.gltf", - "label": "XiKuangYanJing33.gltf", - "level": 2 - }, - "3dc27d57-26c4-4086-9ad8-10f1c999b17b": { - "type": "gltf_bin", - "commandMap": {}, - "key": "3dc27d57-26c4-4086-9ad8-10f1c999b17b", - "path": "XiKuangYanJing33-gltf/XiKuangYanJing33_data.bin", - "label": "XiKuangYanJing33_data.bin", - "level": 2 - }, - "99cb25ad-c641-4e16-946c-f646b5f5f780": { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "99cb25ad-c641-4e16-946c-f646b5f5f780", - "path": "XiKuangYanJing33-gltf/images/XiKuangYanJing33_img0.png", - "label": "XiKuangYanJing33_img0.png", - "actualSize": 246078, - "resolution": { - "height": 1024, - "width": 1024 - }, - "level": 2, - "width": 1024, - "height": 1024 - }, - "2f59df0b-9304-4ec3-b731-f37c3f549944": { - "type": "MaterialFileData", - "commandMap": {}, - "rawMaterialConfigJson": { - "ao_enable_texture_": false, - "ao_index_": 0, - "ao_sampling_channel_": "r", - "ao_strength_": 1, - "base_color_enable_texture_": false, - "base_color_factor_": [ - 0.09019607843137255, - 0.07058823529411765, - 0.06666666666666667, - 1 - ], - "base_color_index_": 0, - "base_color_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": true, - "uri_": "" - }, - "base_color_texture_premultiplied_": false, - "base_color_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "blending_": "opaque", - "clear_coat_enable_texture_": false, - "clear_coat_factor_": 0, - "clear_coat_index_": -1, - "clear_coat_normal_enable_texture_": false, - "clear_coat_normal_index_": -1, - "clear_coat_normal_scale_": 0, - "clear_coat_normal_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": false, - "uri_": "" - }, - "clear_coat_normal_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "clear_coat_roughness_enable_texture_": false, - "clear_coat_roughness_factor_": 0, - "clear_coat_roughness_index_": -1, - "clear_coat_roughness_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": false, - "uri_": "" - }, - "clear_coat_roughness_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "clear_coat_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": false, - "uri_": "" - }, - "clear_coat_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "color_write_": true, - "culling_mode_": "back", - "depth_culling_": true, - "depth_write_": true, - "double_side_": false, - "emissive_enable_texture_": false, - "emissive_enable_texture_color_multiply_": true, - "emissive_factor_": [ - 0, - 0, - 0, - 1, - 1 - ], - "emissive_index_": 0, - "emissive_strength_": 1, - "emissive_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": true, - "uri_": "" - }, - "emissive_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "flipUV_": false, - "metallic_factor_": 0.88, - "metallic_roughness_enable_texture_": false, - "metallic_roughness_index_": 0, - "metallic_roughness_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": false, - "uri_": "" - }, - "metallic_roughness_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "metallic_sampling_channel_": "b", - "normal_enable_g_reverse_": false, - "normal_enable_texture_": false, - "normal_index_": 0, - "normal_scale_": 1, - "normal_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": false, - "uri_": "" - }, - "normal_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "occlusion_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": false, - "uri_": "" - }, - "occlusion_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "roughness_factor_": 0.32, - "roughness_sampling_channel_": "g", - "shading_model_": "lit", - "specular_ambient_occlusion_": "simple", - "type_": "pbr", - "vertex_transform_": [ - 1, - 0, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 0, - 1 - ] - }, - "canEmit": true, - "materialType": "pbr", - "shader": { - "materialType": "pbr", - "baseColor": { - "value": "#171211ff", - "enableTexture": false, - "textureMapUri": "", - "texturePremultiplied": false, - "wrapModeU": "repeat", - "wrapModeV": "repeat", - "uvSet": 0 - }, - "metallicRoughnessAO": { - "enableTexture": false, - "textureMapUri": "", - "wrapModeU": "repeat", - "wrapModeV": "repeat", - "uvSet": 0, - "metallicFactor": 0.88, - "roughnessFactor": 0.32, - "metallicChannel": "b", - "roughnessChannel": "g", - "aoChannel": "r", - "aoStrength": 0 - }, - "normal": { - "enableTexture": false, - "textureMapUri": "", - "wrapModeU": "repeat", - "wrapModeV": "repeat", - "uvSet": 0, - "enableGReverse": false, - "scale": 1 - }, - "emissive": { - "value": "#000000ff", - "enableTexture": false, - "textureMapUri": "", - "wrapModeU": "repeat", - "wrapModeV": "repeat", - "uvSet": 0, - "enableTextureColorMultiply": true, - "strength": 1 - }, - "advance": { - "blending": "opaque", - "colorWrite": true, - "depthWrite": true, - "depthCulling": true, - "cullingMode": "back", - "doubleSide": false - } - }, - "lastType": "pbr", - "key": "2f59df0b-9304-4ec3-b731-f37c3f549944", - "path": "pbr.material", - "label": "pbr.material", - "level": 2 - }, - "470b7f69-b871-4c9f-9f8d-f0c1cf162321": { - "type": "MaterialFileData", - "commandMap": {}, - "rawMaterialConfigJson": { - "ao_enable_texture_": false, - "ao_index_": 0, - "ao_sampling_channel_": "r", - "ao_strength_": 1, - "base_color_enable_texture_": true, - "base_color_factor_": [ - 1, - 1, - 1, - 1 - ], - "base_color_index_": 0, - "base_color_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": true, - "uri_": "99cb25ad-c641-4e16-946c-f646b5f5f780" - }, - "base_color_texture_premultiplied_": false, - "base_color_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "blending_": "fade", - "clear_coat_enable_texture_": false, - "clear_coat_factor_": 0, - "clear_coat_index_": -1, - "clear_coat_normal_enable_texture_": false, - "clear_coat_normal_index_": -1, - "clear_coat_normal_scale_": 0, - "clear_coat_normal_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": false, - "uri_": "" - }, - "clear_coat_normal_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "clear_coat_roughness_enable_texture_": false, - "clear_coat_roughness_factor_": 0, - "clear_coat_roughness_index_": -1, - "clear_coat_roughness_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": false, - "uri_": "" - }, - "clear_coat_roughness_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "clear_coat_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": false, - "uri_": "" - }, - "clear_coat_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "color_write_": true, - "culling_mode_": "none", - "depth_culling_": true, - "depth_write_": true, - "double_side_": true, - "emissive_enable_texture_": false, - "emissive_enable_texture_color_multiply_": true, - "emissive_factor_": [ - 0, - 0, - 0, - 1, - 1 - ], - "emissive_index_": 0, - "emissive_strength_": 1, - "emissive_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": true, - "uri_": "" - }, - "emissive_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "flipUV_": false, - "metallic_factor_": 1, - "metallic_roughness_enable_texture_": false, - "metallic_roughness_index_": 0, - "metallic_roughness_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": false, - "uri_": "" - }, - "metallic_roughness_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "metallic_sampling_channel_": "b", - "normal_enable_g_reverse_": false, - "normal_enable_texture_": false, - "normal_index_": 0, - "normal_scale_": 1, - "normal_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": false, - "uri_": "" - }, - "normal_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "occlusion_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": false, - "uri_": "" - }, - "occlusion_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "roughness_factor_": 0.5, - "roughness_sampling_channel_": "g", - "shading_model_": "lit", - "specular_ambient_occlusion_": "simple", - "type_": "pbr", - "vertex_transform_": [ - 1, - 0, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 0, - 1 - ] - }, - "canEmit": true, - "materialType": "pbr", - "shader": { - "materialType": "pbr", - "baseColor": { - "value": "#ffffffff", - "enableTexture": true, - "textureMapUri": "99cb25ad-c641-4e16-946c-f646b5f5f780", - "texturePremultiplied": false, - "wrapModeU": "repeat", - "wrapModeV": "repeat", - "uvSet": 0 - }, - "metallicRoughnessAO": { - "enableTexture": false, - "textureMapUri": "", - "wrapModeU": "repeat", - "wrapModeV": "repeat", - "uvSet": 0, - "metallicFactor": 1, - "roughnessFactor": 0.5, - "metallicChannel": "b", - "roughnessChannel": "g", - "aoChannel": "r", - "aoStrength": 0 - }, - "normal": { - "enableTexture": false, - "textureMapUri": "", - "wrapModeU": "repeat", - "wrapModeV": "repeat", - "uvSet": 0, - "enableGReverse": false, - "scale": 1 - }, - "emissive": { - "value": "#000000ff", - "enableTexture": false, - "textureMapUri": "", - "wrapModeU": "repeat", - "wrapModeV": "repeat", - "uvSet": 0, - "enableTextureColorMultiply": true, - "strength": 1 - }, - "advance": { - "blending": "fade", - "colorWrite": true, - "depthWrite": true, - "depthCulling": true, - "cullingMode": "none", - "doubleSide": true - } - }, - "lastType": "pbr", - "key": "470b7f69-b871-4c9f-9f8d-f0c1cf162321", - "path": "XiKuangYanJing33-gltf/materials/Mat.Route666.material", - "label": "Mat.Route666.material", - "level": 2 - }, - "c35b28e7-cd8e-4e94-a067-5d5a44e0527c": { - "type": "AudioClipData", - "commandMap": {}, - "loopCount": -1, - "path": "bgm.mp3", - "timeRange": { - "startTime": 0, - "duration": 16560000 - }, - "rhythmPath": "", - "key": "c35b28e7-cd8e-4e94-a067-5d5a44e0527c" - }, - "6113cd76-2a37-4e59-b086-062d17f5dbd7": { - "type": "js", - "commandMap": {}, - "key": "6113cd76-2a37-4e59-b086-062d17f5dbd7", - "path": "scripts/light.js", - "label": "light.js", - "level": 2, - "requireAbilities": [] - }, - "632b0f18-9284-4f54-a0c4-f19fcb376d1a": { - "type": "js", - "commandMap": {}, - "key": "632b0f18-9284-4f54-a0c4-f19fcb376d1a", - "path": "scripts/250.flow.js", - "label": "250.flow.js", - "level": 2, - "requireAbilities": [] - }, - "RenderTarget": { - "type": "RenderTarget", - "commandMap": {}, - "inputColor": "#ffffffff", - "sizeType": 0, - "compatibilityMode": true, - "depthType": "DEPTH24", - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "NEAREST", - "minFilter": "NEAREST", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "width": 0, - "height": 0, - "key": "RenderTarget", - "path": "RenderTarget.rdt", - "label": "RenderTarget.rdt", - "inputKey": "DeviceCameraTexture", - "input": "DeviceCameraTexture", - "level": 2 - }, - "DeviceCameraTexture": { - "type": "TextureData", - "commandMap": {}, - "key": "DeviceCameraTexture", - "path": "DeviceCameraTexture.tex", - "label": "DeviceCameraTexture.tex", - "level": 2 - }, - "bffa890c-da8a-46a8-8ab1-6dbc25b7c698": { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "bffa890c-da8a-46a8-8ab1-6dbc25b7c698", - "path": "yujinxiang.png", - "label": "yujinxiang.png", - "actualSize": 219654, - "resolution": { - "height": 512, - "width": 512 - }, - "level": 2, - "width": 512, - "height": 512 - }, - "aef7f335-36c3-47cd-b0c1-7e264e4c7963": { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "aef7f335-36c3-47cd-b0c1-7e264e4c7963", - "path": "sh.png", - "label": "sh.png", - "actualSize": 262623, - "resolution": { - "height": 2048, - "width": 1536 - }, - "level": 2, - "width": 1536, - "height": 2048 - }, - "72afdffe-899d-467d-ba31-8791f5ec919f": { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "72afdffe-899d-467d-ba31-8791f5ec919f", - "path": "mt.png", - "label": "mt.png", - "actualSize": 4277, - "resolution": { - "height": 125, - "width": 125 - }, - "level": 2, - "width": 125, - "height": 125 - }, - "9f05727d-9cce-4fc1-86c8-3f1eada24a04": { - "type": "PAGFileData", - "commandMap": {}, - "loopCount": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "NEAREST", - "minFilter": "NEAREST", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "9f05727d-9cce-4fc1-86c8-3f1eada24a04", - "path": "flower-left.pag", - "label": "flower-left.pag", - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "duration": 3000000, - "resolution": { - "width": 226, - "height": 360 - }, - "frameRate": 12, - "hasAudio": false, - "level": 2, - "actualSize": 72880, - "timeStretchMode": 2, - "videoAmount": 1 - }, - "6af9b9fc-1c04-476f-b27b-ef0255876b6e": { - "type": "PAGFileData", - "commandMap": {}, - "loopCount": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "NEAREST", - "minFilter": "NEAREST", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "6af9b9fc-1c04-476f-b27b-ef0255876b6e", - "path": "flower-right.pag", - "label": "flower-right.pag", - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "duration": 3000000, - "resolution": { - "width": 284, - "height": 422 - }, - "frameRate": 12, - "hasAudio": false, - "level": 2, - "actualSize": 102627, - "timeStretchMode": 2, - "videoAmount": 1 - }, - "727eabdc-a88c-4646-be64-b9b1b4eeb1bc": { - "type": "PAGFileData", - "commandMap": {}, - "loopCount": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "NEAREST", - "minFilter": "NEAREST", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "727eabdc-a88c-4646-be64-b9b1b4eeb1bc", - "path": "holiday-1.pag", - "label": "holiday-1.pag", - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "duration": 2250000, - "resolution": { - "width": 476, - "height": 286 - }, - "frameRate": 12, - "hasAudio": false, - "level": 2, - "actualSize": 76664, - "timeStretchMode": 2, - "videoAmount": 1 - }, - "911ae251-ab63-42ae-b122-1e1418fb59cf": { - "type": "PAGFileData", - "commandMap": {}, - "loopCount": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "NEAREST", - "minFilter": "NEAREST", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "911ae251-ab63-42ae-b122-1e1418fb59cf", - "path": "holiday-2.pag", - "label": "holiday-2.pag", - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "duration": 750000, - "resolution": { - "width": 476, - "height": 286 - }, - "frameRate": 12, - "hasAudio": false, - "level": 2, - "actualSize": 50151, - "timeStretchMode": 2, - "videoAmount": 1 - }, - "d79b8d03-af71-45dc-bdd3-65193915d8aa": { - "type": "folder", - "commandMap": {}, - "key": "d79b8d03-af71-45dc-bdd3-65193915d8aa", - "label": "root", - "path": "./", - "level": 2 - }, - "da7a834a-522e-4ca3-b48f-d08a34cbb978": { - "type": "folder", - "commandMap": {}, - "key": "da7a834a-522e-4ca3-b48f-d08a34cbb978", - "label": "cropImage", - "path": "cropImage", - "level": 2 - }, - "e438de54-0598-4e51-931f-c242e41111fa": { - "type": "ImageData", - "commandMap": {}, - "key": "e438de54-0598-4e51-931f-c242e41111fa", - "label": "lp_crop.png", - "path": "cropImage/lp_crop.png", - "level": 2, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "actualSize": 37681, - "resolution": { - "height": 247, - "width": 634 - }, - "width": 634, - "height": 247 - }, - "4fff5871-6c29-4f8b-b66e-37ad3a84148b": { - "type": "ImageData", - "commandMap": {}, - "key": "4fff5871-6c29-4f8b-b66e-37ad3a84148b", - "label": "yj_crop.png", - "path": "cropImage/yj_crop.png", - "level": 2, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "actualSize": 146612, - "resolution": { - "height": 401, - "width": 892 - }, - "width": 892, - "height": 401 - }, - "69cd2b4b-643e-4987-8e5d-b7ed5445c296": { - "type": "ImageData", - "commandMap": {}, - "key": "69cd2b4b-643e-4987-8e5d-b7ed5445c296", - "label": "zc_crop.png", - "path": "cropImage/zc_crop.png", - "level": 2, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "actualSize": 16819, - "resolution": { - "height": 160, - "width": 296 - }, - "width": 296, - "height": 160 - }, - "254d41a9-5196-4a49-ac7e-0dfae430e879": { - "type": "ImageData", - "commandMap": {}, - "key": "254d41a9-5196-4a49-ac7e-0dfae430e879", - "label": "zc_Mask_crop.png", - "path": "cropImage/zc_Mask_crop.png", - "level": 2, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "actualSize": 22865, - "resolution": { - "height": 2047, - "width": 1535 - }, - "width": 1535, - "height": 2047 - }, - "8e62a1ef-5015-41db-824d-b84d4baca415": { - "type": "default", - "commandMap": {}, - "key": "8e62a1ef-5015-41db-824d-b84d4baca415", - "path": "imgui.ini", - "label": "imgui.ini", - "level": 2 - }, - "da64a8c1-6ce3-49b2-9799-5dc569cf2870": { - "type": "folder", - "commandMap": {}, - "key": "da64a8c1-6ce3-49b2-9799-5dc569cf2870", - "label": "lebombo_default", - "path": "lebombo_default", - "level": 2 - }, - "ba3d4e62-48c9-434c-9d03-2a820c5b2f81": { - "type": "EnvMap_KTX", - "commandMap": {}, - "key": "ba3d4e62-48c9-434c-9d03-2a820c5b2f81", - "path": "lebombo_default/lebombo_default_ibl.ktx", - "label": "lebombo_default_ibl.ktx", - "level": 2 - }, - "1774dc2f-2cfb-4cb3-a8df-5c48c7ad0f2f": { - "type": "EnvMap_KTX", - "commandMap": {}, - "key": "1774dc2f-2cfb-4cb3-a8df-5c48c7ad0f2f", - "path": "lebombo_default/lebombo_default_skybox.ktx", - "label": "lebombo_default_skybox.ktx", - "level": 2 - }, - "a816ef66-b4c7-4a49-a02f-a1e9fcdde03b": { - "type": "AudioClipData", - "commandMap": {}, - "loopCount": 0, - "key": "a816ef66-b4c7-4a49-a02f-a1e9fcdde03b", - "path": "lebombo_default/wuyihuahua.mp3", - "label": "wuyihuahua.mp3", - "timeRange": { - "startTime": 0, - "duration": 10344490 - }, - "duration": 10344490, - "level": 2, - "actualSize": 333335 - }, - "03bb659f-6428-46c6-81b2-23a7b0c52d15": { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "03bb659f-6428-46c6-81b2-23a7b0c52d15", - "path": "lp.png", - "label": "lp.png", - "actualSize": 18211, - "resolution": { - "height": 2048, - "width": 1536 - }, - "level": 2, - "width": 1536, - "height": 2048 - }, - "9f4e08cc-f0da-4aa5-93c5-fb23a4fdad0a": { - "type": "MaterialFileData", - "commandMap": {}, - "rawMaterialConfigJson": { - "ao_enable_texture_": false, - "ao_index_": 0, - "ao_sampling_channel_": "r", - "ao_strength_": 1, - "base_color_enable_texture_": false, - "base_color_factor_": [ - 1, - 1, - 1, - 1 - ], - "base_color_index_": 0, - "base_color_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": true, - "uri_": "" - }, - "base_color_texture_premultiplied_": false, - "base_color_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "blending_": "masked", - "clear_coat_enable_texture_": false, - "clear_coat_factor_": 0, - "clear_coat_index_": -1, - "clear_coat_normal_enable_texture_": false, - "clear_coat_normal_index_": -1, - "clear_coat_normal_scale_": 0, - "clear_coat_normal_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": false, - "uri_": "" - }, - "clear_coat_normal_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "clear_coat_roughness_enable_texture_": false, - "clear_coat_roughness_factor_": 0, - "clear_coat_roughness_index_": -1, - "clear_coat_roughness_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": false, - "uri_": "" - }, - "clear_coat_roughness_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "clear_coat_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": false, - "uri_": "" - }, - "clear_coat_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "color_write_": false, - "culling_mode_": "back", - "depth_culling_": true, - "depth_write_": true, - "double_side_": false, - "emissive_enable_texture_": false, - "emissive_enable_texture_color_multiply_": true, - "emissive_factor_": [ - 0, - 0, - 0, - 1, - 1 - ], - "emissive_index_": 0, - "emissive_strength_": 1, - "emissive_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": true, - "uri_": "" - }, - "emissive_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "flipUV_": false, - "metallic_factor_": 1, - "metallic_roughness_enable_texture_": false, - "metallic_roughness_index_": 0, - "metallic_roughness_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": false, - "uri_": "" - }, - "metallic_roughness_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "metallic_sampling_channel_": "b", - "normal_enable_g_reverse_": false, - "normal_enable_texture_": false, - "normal_index_": 0, - "normal_scale_": 1, - "normal_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": false, - "uri_": "" - }, - "normal_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "occlusion_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": false, - "uri_": "" - }, - "occlusion_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "roughness_factor_": 0, - "roughness_sampling_channel_": "g", - "shading_model_": "lit", - "specular_ambient_occlusion_": "simple", - "type_": "pbr", - "vertex_transform_": [ - 1, - 0, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 0, - 1 - ] - }, - "canEmit": true, - "materialType": "pbr", - "shader": { - "materialType": "pbr", - "baseColor": { - "value": "#ffffffff", - "enableTexture": false, - "textureMapUri": "", - "texturePremultiplied": false, - "wrapModeU": "repeat", - "wrapModeV": "repeat", - "uvSet": 0 - }, - "metallicRoughnessAO": { - "enableTexture": false, - "textureMapUri": "", - "wrapModeU": "repeat", - "wrapModeV": "repeat", - "uvSet": 0, - "metallicFactor": 1, - "roughnessFactor": 0, - "metallicChannel": "b", - "roughnessChannel": "g", - "aoChannel": "r", - "aoStrength": 0 - }, - "normal": { - "enableTexture": false, - "textureMapUri": "", - "wrapModeU": "repeat", - "wrapModeV": "repeat", - "uvSet": 0, - "enableGReverse": false, - "scale": 1 - }, - "emissive": { - "value": "#000000ff", - "enableTexture": false, - "textureMapUri": "", - "wrapModeU": "repeat", - "wrapModeV": "repeat", - "uvSet": 0, - "enableTextureColorMultiply": true, - "strength": 1 - }, - "advance": { - "blending": "masked", - "colorWrite": false, - "depthWrite": true, - "depthCulling": true, - "cullingMode": "back", - "doubleSide": false - } - }, - "lastType": "pbr", - "key": "9f4e08cc-f0da-4aa5-93c5-fb23a4fdad0a", - "path": "pbr_1.material", - "label": "pbr_1.material", - "level": 2 - }, - "RenderTarget1": { - "type": "RenderTarget", - "commandMap": {}, - "inputColor": "#ffffffff", - "sizeType": 0, - "compatibilityMode": true, - "depthType": "DEPTH24", - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "NEAREST", - "minFilter": "NEAREST", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "width": 0, - "height": 0, - "key": "RenderTarget1", - "path": "RenderTarget_camera_1.rdt", - "label": "RenderTarget_camera_1.rdt", - "inputKey": "", - "input": "", - "inputType": "RT_InputType_Texture", - "level": 2 - }, - "40cb7fb1-9775-467c-abf9-e6c2e8ceb1c4": { - "type": "folder", - "commandMap": {}, - "key": "40cb7fb1-9775-467c-abf9-e6c2e8ceb1c4", - "label": "scripts", - "path": "scripts", - "level": 2 - }, - "b2daeadb-127f-4c5a-940e-85475885294f": { - "type": "folder", - "commandMap": {}, - "key": "b2daeadb-127f-4c5a-940e-85475885294f", - "label": "XiKuangYanJing33-gltf", - "path": "XiKuangYanJing33-gltf", - "level": 2 - }, - "e770aa26-2616-44f7-b371-b0b9344f5262": { - "type": "folder", - "commandMap": {}, - "key": "e770aa26-2616-44f7-b371-b0b9344f5262", - "label": "images", - "path": "XiKuangYanJing33-gltf/images", - "level": 2 - }, - "229869d2-5162-4656-95a9-d4efca5d58da": { - "type": "folder", - "commandMap": {}, - "key": "229869d2-5162-4656-95a9-d4efca5d58da", - "label": "materials", - "path": "XiKuangYanJing33-gltf/materials", - "level": 2 - }, - "3e5c82fa-7cf5-42bf-b493-c665de1d0a25": { - "type": "MaterialFileData", - "commandMap": {}, - "rawMaterialConfigJson": { - "ao_enable_texture_": false, - "ao_index_": -1, - "ao_sampling_channel_": "r", - "ao_strength_": 1, - "base_color_enable_texture_": false, - "base_color_factor_": [ - 0.27028611302375793, - 0.27028611302375793, - 0.27028611302375793, - 1 - ], - "base_color_index_": -1, - "base_color_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": true, - "uri_": "" - }, - "base_color_texture_premultiplied_": false, - "base_color_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "blending_": "opaque", - "clear_coat_enable_texture_": false, - "clear_coat_factor_": 0, - "clear_coat_index_": -1, - "clear_coat_normal_enable_texture_": false, - "clear_coat_normal_index_": -1, - "clear_coat_normal_scale_": 0, - "clear_coat_normal_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": false, - "uri_": "" - }, - "clear_coat_normal_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "clear_coat_roughness_enable_texture_": false, - "clear_coat_roughness_factor_": 0, - "clear_coat_roughness_index_": -1, - "clear_coat_roughness_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": false, - "uri_": "" - }, - "clear_coat_roughness_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "clear_coat_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": false, - "uri_": "" - }, - "clear_coat_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "color_write_": true, - "culling_mode_": "back", - "depth_culling_": true, - "depth_write_": true, - "double_side_": true, - "emissive_enable_texture_": false, - "emissive_enable_texture_color_multiply_": true, - "emissive_factor_": [ - 0, - 0, - 0, - 1 - ], - "emissive_index_": -1, - "emissive_strength_": 1, - "emissive_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": true, - "uri_": "" - }, - "emissive_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "flipUV_": false, - "metallic_factor_": 0, - "metallic_roughness_enable_texture_": false, - "metallic_roughness_index_": -1, - "metallic_roughness_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": false, - "uri_": "" - }, - "metallic_roughness_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "metallic_sampling_channel_": "b", - "normal_enable_g_reverse_": false, - "normal_enable_texture_": false, - "normal_index_": -1, - "normal_scale_": 1, - "normal_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": false, - "uri_": "" - }, - "normal_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "occlusion_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": false, - "uri_": "" - }, - "occlusion_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "roughness_factor_": 1, - "roughness_sampling_channel_": "g", - "shading_model_": "lit", - "specular_ambient_occlusion_": "simple", - "type_": "pbr", - "vertex_transform_": [ - 1, - 0, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 0, - 1 - ] - }, - "canEmit": true, - "materialType": "pbr", - "shader": { - "materialType": "pbr", - "baseColor": { - "value": "#444444ff", - "enableTexture": false, - "textureMapUri": "", - "texturePremultiplied": false, - "wrapModeU": "repeat", - "wrapModeV": "repeat", - "uvSet": 0 - }, - "metallicRoughnessAO": { - "enableTexture": false, - "textureMapUri": "", - "wrapModeU": "repeat", - "wrapModeV": "repeat", - "uvSet": 0, - "metallicFactor": 0, - "roughnessFactor": 1, - "metallicChannel": "b", - "roughnessChannel": "g", - "aoChannel": "r", - "aoStrength": 0 - }, - "normal": { - "enableTexture": false, - "textureMapUri": "", - "wrapModeU": "repeat", - "wrapModeV": "repeat", - "uvSet": 0, - "enableGReverse": false, - "scale": 1 - }, - "emissive": { - "value": "#000000ff", - "enableTexture": false, - "textureMapUri": "", - "wrapModeU": "repeat", - "wrapModeV": "repeat", - "uvSet": 0, - "enableTextureColorMultiply": true, - "strength": 1 - }, - "advance": { - "blending": "opaque", - "colorWrite": true, - "depthWrite": true, - "depthCulling": true, - "cullingMode": "none", - "doubleSide": true - } - }, - "lastType": "pbr", - "key": "3e5c82fa-7cf5-42bf-b493-c665de1d0a25", - "path": "XiKuangYanJing33-gltf/materials/Mat.head.material", - "label": "Mat.head.material", - "level": 2 - }, - "73085e68-38e3-4d1a-954f-3ba5d865899d": { - "type": "folder", - "commandMap": {}, - "key": "73085e68-38e3-4d1a-954f-3ba5d865899d", - "label": "meshes", - "path": "XiKuangYanJing33-gltf/meshes", - "level": 2 - }, - "e4ef00fa-9790-46f4-bf19-0d5ee817f61a": { - "type": "mesh", - "commandMap": {}, - "key": "e4ef00fa-9790-46f4-bf19-0d5ee817f61a", - "path": "XiKuangYanJing33-gltf/meshes/0_0.mesh", - "label": "0_0.mesh", - "triangleCount": 8768, - "verticesCount": 5719, - "meshSize": "230.00 KB", - "blendShapes": 0, - "level": 2 - }, - "824f9a83-5343-4685-8b7c-eb0ffd6715c3": { - "type": "mesh", - "commandMap": {}, - "key": "824f9a83-5343-4685-8b7c-eb0ffd6715c3", - "path": "XiKuangYanJing33-gltf/meshes/1_0.mesh", - "label": "1_0.mesh", - "triangleCount": 109, - "verticesCount": 116, - "meshSize": "4.00 KB", - "blendShapes": 0, - "level": 2 - }, - "c2fb5c84-27d4-4925-af7c-7d3609eb6900": { - "type": "prefab", - "commandMap": {}, - "key": "c2fb5c84-27d4-4925-af7c-7d3609eb6900", - "path": "XiKuangYanJing33-gltf/XiKuangYanJing33.prefab", - "label": "XiKuangYanJing33.prefab", - "level": 2 - }, - "39edb8cb-7eb4-4b6e-a6ea-be96e095b542": { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "39edb8cb-7eb4-4b6e-a6ea-be96e095b542", - "path": "xrbd.png", - "label": "xrbd.png", - "actualSize": 146291, - "resolution": { - "height": 2048, - "width": 1536 - }, - "level": 2, - "width": 1536, - "height": 2048 - }, - "8ea45f32-0db3-4f94-8acb-0218ee7ac46c": { - "type": "default", - "commandMap": {}, - "key": "8ea45f32-0db3-4f94-8acb-0218ee7ac46c", - "label": "yanjing.2021-05-31-13-22-43-636Z.bak", - "path": "yanjing.2021-05-31-13-22-43-636Z.bak", - "level": 2 - }, - "8e2fb814-70f0-43d3-a487-bc2e07064a6b": { - "type": "default", - "commandMap": {}, - "key": "8e2fb814-70f0-43d3-a487-bc2e07064a6b", - "label": "yanjing.2023-04-18-10-45-42-458Z.bak", - "path": "yanjing.2023-04-18-10-45-42-458Z.bak", - "level": 2 - }, - "0cd03468-511b-4ccf-94b4-456ce868544b": { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "0cd03468-511b-4ccf-94b4-456ce868544b", - "path": "yj.png", - "label": "yj.png", - "actualSize": 69176, - "resolution": { - "height": 2048, - "width": 1536 - }, - "level": 2, - "width": 1536, - "height": 2048 - }, - "966124fc-bafa-429c-96a6-72d64200f323": { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "966124fc-bafa-429c-96a6-72d64200f323", - "path": "zc.png", - "label": "zc.png", - "actualSize": 12276, - "resolution": { - "height": 2048, - "width": 1536 - }, - "level": 2, - "width": 1536, - "height": 2048 - }, - "b857be09-858e-468c-b1b3-fde724b54eb2": { - "type": "js", - "commandMap": {}, - "key": "b857be09-858e-468c-b1b3-fde724b54eb2", - "label": "studio-extension.js", - "path": "scripts/studio-extension.js", - "level": 2 - } - }, - "preset": {}, - "properties": { - "layout": { - "width": 720, - "height": 1280 - }, - "boundsTrackerPlaceHolders": [], - "musicIDs": [], - "fonts": [], - "movieConfig": { - "sourceType": 2, - "minClipAssetCount": 1, - "maxClipAssetCount": 999, - "minImageDuration": 1000000, - "maxImageDuration": 10000000, - "minVideoDuration": 2000000, - "minFreezePointInterval": 0, - "preferredCoverTime": 1000000, - "originVolume": 1, - "cropEvents": [ - "SlowRhythmTrail" - ], - "imageCropSpace": 0, - "videoCropSpace": -1, - "disableEventsWhileTransition": true, - "useInternalRhythm": true, - "headProtectDuration": 0 - }, - "materialConfigs": [], - "resourceIDs": [] - }, - "needStudioLibScript": true -} \ No newline at end of file diff --git a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/template.png b/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/template.png deleted file mode 100644 index 54fe776e..00000000 Binary files a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/template.png and /dev/null differ diff --git a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/xrbd.png b/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/xrbd.png deleted file mode 100644 index 6e9593be..00000000 Binary files a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/xrbd.png and /dev/null differ diff --git a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/yanjing.2021-05-31-13-22-43-636Z.bak b/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/yanjing.2021-05-31-13-22-43-636Z.bak deleted file mode 100644 index 7eab87ca..00000000 --- a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/yanjing.2021-05-31-13-22-43-636Z.bak +++ /dev/null @@ -1,2361 +0,0 @@ -{ - "name": "yanjing", - "author": "db", - "category": 1, - "scene": { - "name": "3D模板", - "id": 1, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "entityId": 1, - "componentID": 1001, - "type": "ScreenTransform", - "enabled": true, - "version": 2 - }, - { - "coverTime": 1000000, - "entityId": 1, - "type": "PreferredCoverTime", - "version": 2, - "enabled": true, - "componentID": 1002 - }, - { - "enabled": true, - "entityId": 1, - "renderTargetKey": "RenderTarget", - "type": "Camera", - "version": 3, - "componentID": 1003 - } - ], - "children": [ - { - "id": 173, - "name": "Camera3D", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "BasicTransform", - "position": { - "x": 0, - "y": 0, - "z": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "enabled": true, - "entityId": 173, - "componentID": 173001 - }, - { - "clearColor": "#00000000", - "componentID": 173002, - "enabled": true, - "entityId": 173, - "far": 1000, - "fov": 60, - "fovType": "vertical", - "near": 0.01, - "projectionType": "perspective", - "size": 0.2, - "targetBufferFlags": "clearColor", - "type": "Camera3DComponent", - "renderTargetKey": "RenderTarget", - "version": 2 - }, - { - "bloom": { - "enable": false, - "levels": 6, - "strength": 0.1 - }, - "colorGrading": { - "cdl": { - "offset": { - "x": 0, - "y": 0, - "z": 0 - }, - "power": { - "x": 1, - "y": 1, - "z": 1 - }, - "slope": { - "x": 1, - "y": 1, - "z": 1 - } - }, - "channelMixer": { - "outBlue": { - "x": 0, - "y": 0, - "z": 1 - }, - "outGreen": { - "x": 0, - "y": 1, - "z": 0 - }, - "outRed": { - "x": 1, - "y": 0, - "z": 0 - } - }, - "contrast": 1, - "enable": true, - "saturation": 1, - "shadowMidHighlights": { - "highlightsColor": "#FFFFFF00", - "highlightsWeight": 0, - "midtonesColor": "#FFFFFF00", - "midtonesWeight": 0, - "ranges": { - "w": 1, - "x": 0, - "y": 0.333, - "z": 0.55 - }, - "shadowsColor": "#FFFFFF00", - "shadowsWeight": 0 - }, - "toneMapping": 3, - "vibrance": 1, - "whiteBalance": { - "temperature": 1, - "tint": 0.3 - } - }, - "componentID": 173003, - "enable": true, - "enableDithering": false, - "enableFXAA": false, - "enableMSAA": false, - "enableSSAO": false, - "enabled": true, - "entityId": 173, - "type": "PostEffect3DComponent", - "version": 48, - "vignette": { - "color": "#000000FF", - "enable": false, - "feather": 0.5, - "midPoint": 0.5, - "roundness": 0.5 - } - } - ] - }, - { - "id": 181, - "name": "Lighting", - "children": [ - { - "id": 183, - "name": "Envmap", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "componentID": 183001, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "enabled": true, - "entityId": 183, - "objectEnabled": true, - "position": { - "x": 0, - "y": 0.6499999761581421, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "type": "BasicTransform", - "version": 25 - }, - { - "componentID": 183002, - "enabled": true, - "entityId": 183, - "envRotation": 304, - "iblPath": "3a5d9d58-1984-4d6a-8fbc-5d6b8f730360", - "innerAngle": 30, - "intensity": 89.60000000000001, - "irradiancePath": "e567e442-bc0d-48d4-ad8f-c0cce5ad6f4e", - "lightColor": "#ffffffff", - "lightType": 5, - "outerAngle": 60, - "radius": 4, - "shadowConfig": { - "castShadows": true, - "shadowMapSize": 10 - }, - "skyBoxConfig": { - "enableSkyBox": false, - "skyBoxPath": "" - }, - "type": "Light3DComponent", - "version": 449 - } - ] - }, - { - "id": 185, - "name": "Light", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "componentID": 185001, - "eEuler": { - "x": -25, - "y": 20, - "z": -40 - }, - "enabled": true, - "entityId": 185, - "objectEnabled": true, - "position": { - "x": 0.15, - "y": 0.55, - "z": 0.15 - }, - "rotation": { - "x": -0.35355339059327373, - "y": 2.7755575615628914e-17, - "z": -0.7071067811865476, - "w": 0.6123724356957946 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "type": "BasicTransform", - "version": 12 - }, - { - "componentID": 185002, - "enabled": true, - "entityId": 185, - "envRotation": 0, - "iblPath": "ce38e1ba-9e13-42f2-a491-b750578ffa87", - "innerAngle": 30, - "intensity": 40, - "irradiancePath": "4903bd51-a2ec-4880-b9b9-3a624df646b4", - "lightColor": "#ffffffff", - "lightType": 1, - "outerAngle": 60, - "radius": 4, - "shadowConfig": { - "castShadows": false, - "shadowMapSize": 10 - }, - "skyBoxConfig": { - "enableSkyBox": false, - "skyBoxPath": "" - }, - "type": "Light3DComponent", - "version": 11 - } - ] - } - ], - "enabled": true, - "version": 0, - "components": [ - { - "type": "BasicTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "enabled": true, - "entityId": 181, - "componentID": 181001 - } - ] - }, - { - "id": 188, - "name": "3D人头", - "children": [ - { - "id": 233, - "name": "XiKuangYanJing33(prefab)", - "children": [ - { - "id": 236, - "name": "scenes", - "children": [ - { - "id": 238, - "name": "Scene", - "children": [ - { - "id": 240, - "name": "XiKuangYanJing.001", - "children": [], - "enabled": true, - "version": 0, - "forbid": false, - "components": [ - { - "componentID": 240001, - "enabled": true, - "entityId": 240, - "needReload": true, - "objectEnabled": true, - "paused": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "type": "BasicTransform", - "visible": true, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - } - }, - { - "componentID": 240002, - "enabled": true, - "entityId": 240, - "layers": 1, - "needReload": true, - "paused": false, - "type": "LayerSetComponent" - }, - { - "componentID": 240003, - "enabled": true, - "entityId": 240, - "meshIndex": 0, - "meshName": "网格", - "needReload": true, - "paused": false, - "primitiveConfigs": [ - { - "castShadow": true, - "materialResourceKey": "2f59df0b-9304-4ec3-b731-f37c3f549944", - "meshResourceKey": "e4ef00fa-9790-46f4-bf19-0d5ee817f61a", - "primitiveIndex": 0, - "receiveShadow": true - } - ], - "skinned": false, - "type": "MeshRenderer3DComponent", - "version": 2 - } - ] - }, - { - "id": 244, - "name": "jk", - "children": [], - "enabled": true, - "version": 0, - "forbid": false, - "components": [ - { - "componentID": 244001, - "enabled": true, - "entityId": 244, - "needReload": true, - "objectEnabled": true, - "paused": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "type": "BasicTransform", - "visible": true, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - } - }, - { - "componentID": 244002, - "enabled": true, - "entityId": 244, - "layers": 1, - "needReload": true, - "paused": false, - "type": "LayerSetComponent" - }, - { - "componentID": 244003, - "enabled": true, - "entityId": 244, - "meshIndex": 1, - "meshName": "网格.001", - "needReload": true, - "paused": false, - "primitiveConfigs": [ - { - "castShadow": true, - "materialResourceKey": "470b7f69-b871-4c9f-9f8d-f0c1cf162321", - "meshResourceKey": "824f9a83-5343-4685-8b7c-eb0ffd6715c3", - "primitiveIndex": 0, - "receiveShadow": true - } - ], - "skinned": false, - "type": "MeshRenderer3DComponent" - } - ] - } - ], - "enabled": true, - "version": 0, - "forbid": false, - "components": [ - { - "componentID": 238001, - "enabled": true, - "entityId": 238, - "needReload": true, - "objectEnabled": true, - "paused": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1.0255081493992495, - "y": 1.0255081493992495, - "z": 1.0255081493992495 - }, - "type": "BasicTransform", - "visible": true, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "version": 2 - } - ] - } - ], - "enabled": true, - "version": 0, - "forbid": false, - "components": [ - { - "componentID": 236001, - "enabled": true, - "entityId": 236, - "needReload": true, - "objectEnabled": true, - "paused": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "type": "BasicTransform", - "visible": true, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - } - } - ] - } - ], - "enabled": true, - "version": 0, - "forbid": true, - "components": [ - { - "componentID": 233001, - "enabled": true, - "entityId": 233, - "needReload": true, - "objectEnabled": true, - "paused": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "type": "BasicTransform", - "visible": true, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - } - }, - { - "componentID": 233002, - "enabled": true, - "entityId": 233, - "gltfResourceKey": "aeb43bf6-6044-4121-92da-a54ae6afb32d", - "needReload": true, - "paused": false, - "type": "GlbRenderComponent" - } - ] - } - ], - "enabled": true, - "version": 0, - "components": [ - { - "type": "BasicTransform", - "position": { - "x": 0, - "y": 0.1, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "enabled": true, - "entityId": 188, - "componentID": 188001 - }, - { - "use3DMMHead": 0, - "useCustom3DHead": false, - "custom3DHead": "", - "showUserHead": true, - "faceIndex": [ - 0 - ], - "type": "Face3DComponent", - "enabled": true, - "entityId": 188, - "componentID": 188002 - } - ] - }, - { - "id": 217, - "name": "音乐", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 217, - "componentID": 217001 - }, - { - "audioSourceType": 1, - "componentID": 217002, - "eAudioMeta": { - "rhythmPath": "", - "startTime": 0, - "duration": 16560000, - "enableRhythm": true - }, - "eAudioType": 1, - "eHasVolumeEffects": false, - "eKey": "audioSource", - "enabled": true, - "entityId": 217, - "speed": 1, - "type": "AudioSource", - "version": 10, - "volume": 1, - "volumeEffects": [ - { - "duration": 2000000, - "eAlignMode": 2, - "end": 1, - "endOffset": 0, - "interpolationType": 1, - "loopCount": -1, - "start": 1, - "startOffset": 0 - } - ], - "ePath": "c35b28e7-cd8e-4e94-a067-5d5a44e0527c" - }, - { - "componentID": 217003, - "duration": 16559999.999999998, - "eAlignMode": 2, - "enabled": true, - "endOffset": 0, - "entityId": 217, - "loopCount": 0, - "startOffset": 0, - "type": "TimeOffset", - "version": 2 - } - ] - }, - { - "id": 5, - "name": "2D画板", - "children": [ - { - "id": 4, - "name": "滤镜", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 4, - "componentID": 4001 - }, - { - "componentID": 4002, - "enabled": true, - "entityId": 4, - "intensity": 0.6900000000000001, - "src": "bffa890c-da8a-46a8-8ab1-6dbc25b7c698", - "type": "LUTFilter", - "version": 12 - }, - { - "eAlignMode": 0, - "startOffset": 0, - "duration": 2000000, - "endOffset": 0, - "loopCount": 0, - "type": "TimeOffset", - "enabled": true, - "entityId": 4, - "componentID": 4003, - "version": null - } - ] - }, - { - "id": 8, - "name": "脸妆", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 8, - "componentID": 8001 - }, - { - "componentID": 8002, - "enabled": true, - "entityId": 8, - "faceExchangeImageDisableFaceCrop": true, - "faceExchangeImageEnableOpacity": false, - "faceImage": "aef7f335-36c3-47cd-b0c1-7e264e4c7963", - "faceMask": "none", - "facePointsFile": "", - "facePointsOption": false, - "maskImage": "", - "type": "MakeupFaceV6", - "visMethod": 0, - "version": 2 - }, - { - "alpha": 1, - "componentID": 8003, - "enabled": true, - "entityId": 8, - "mode": "multiply", - "type": "BlendMode", - "version": 2 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "female", - "type": "FaceTracking", - "enabled": true, - "entityId": 8, - "componentID": 8004 - } - ] - }, - { - "id": 6, - "name": "美瞳", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 6, - "componentID": 6001 - }, - { - "componentID": 6002, - "enabled": true, - "entityId": 6, - "irisImage": "72afdffe-899d-467d-ba31-8791f5ec919f", - "minVisibility": 0, - "type": "MakeupIrisV6", - "visMethod": 0, - "version": 2 - }, - { - "alpha": 0.36, - "componentID": 6003, - "enabled": true, - "entityId": 6, - "mode": "normal", - "type": "BlendMode", - "version": 19 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "female", - "type": "FaceTracking", - "enabled": true, - "entityId": 6, - "componentID": 6004 - } - ] - }, - { - "id": 11, - "name": "唇彩", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 11, - "componentID": 11001 - }, - { - "closeMouseMask": "", - "componentID": 11002, - "enabled": true, - "entityId": 11, - "lipsColor": "", - "lipsImage": "966124fc-bafa-429c-96a6-72d64200f323", - "lipsImageCrop": "cropImage/zc_crop.png", - "lipsImageCropRect": { - "bottom": 1420, - "left": 622, - "right": 918, - "top": 1260 - }, - "lipsLut": "", - "lipsMask": "", - "lipsMaskCrop": "cropImage/zc_Mask_crop.png", - "lipsMaskCropRect": { - "bottom": 2047, - "left": 0, - "right": 1535, - "top": 0 - }, - "lipsMaskEnum": 0, - "lipsType": "Image", - "minVisibility": 0, - "openMouseMask": "", - "type": "MakeupLipsV6", - "visMethod": 0, - "version": 2 - }, - { - "alpha": 0.62, - "componentID": 11003, - "enabled": true, - "entityId": 11, - "mode": "multiply", - "type": "BlendMode", - "version": 33 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "female", - "type": "FaceTracking", - "enabled": true, - "entityId": 11, - "componentID": 11004 - } - ] - }, - { - "id": 10, - "name": "眼妆", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 10, - "componentID": 10001 - }, - { - "componentID": 10002, - "cropRect": { - "bottom": 110, - "left": 180, - "right": 200, - "top": 446 - }, - "enabled": true, - "entityId": 10, - "eyeCropImageName": "", - "eyeImageName": "0cd03468-511b-4ccf-94b4-456ce868544b", - "minVisibility": 0, - "type": "MakeupEyeV6", - "visMethod": 0, - "version": 2 - }, - { - "alpha": 0.72, - "componentID": 10003, - "enabled": true, - "entityId": 10, - "mode": "multiply", - "type": "BlendMode", - "version": 4 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "female", - "type": "FaceTracking", - "enabled": true, - "entityId": 10, - "componentID": 10004 - } - ] - }, - { - "id": 12, - "name": "眼妆", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 12, - "componentID": 12001 - }, - { - "componentID": 12002, - "cropRect": { - "bottom": 110, - "left": 180, - "right": 200, - "top": 446 - }, - "enabled": true, - "entityId": 12, - "eyeCropImageName": "", - "eyeImageName": "03bb659f-6428-46c6-81b2-23a7b0c52d15", - "minVisibility": 0, - "type": "MakeupEyeV6", - "visMethod": 0, - "version": 2 - }, - { - "alpha": 0.85, - "componentID": 12003, - "enabled": true, - "entityId": 12, - "mode": "screen", - "type": "BlendMode", - "version": 21 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "female", - "type": "FaceTracking", - "enabled": true, - "entityId": 12, - "componentID": 12004 - } - ] - }, - { - "id": 226, - "name": "前景贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "left": -0.6866708126036484, - "right": -0.6866708126036484, - "top": 0.1302909281716419, - "bottom": 0.1302909281716419 - }, - "offset": { - "left": -112.99906716417912, - "right": 112.99906716417912, - "top": 180, - "bottom": -180 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "objectEnabled": true, - "entityId": 226, - "componentID": 226001, - "type": "ScreenTransform", - "enabled": true, - "version": 349 - }, - { - "componentID": 226002, - "enabled": true, - "entityId": 226, - "scaleMode": 2, - "src": "9f05727d-9cce-4fc1-86c8-3f1eada24a04", - "type": "Image", - "version": 5 - }, - { - "alpha": 1, - "mode": "normal", - "type": "BlendMode", - "enabled": true, - "entityId": 226, - "componentID": 226003 - }, - { - "eAlignMode": 2, - "startOffset": 0, - "duration": 3000000, - "endOffset": 0, - "loopCount": -1, - "type": "TimeOffset", - "enabled": true, - "entityId": 226, - "componentID": 226004, - "version": 1 - } - ] - }, - { - "id": 7, - "name": "前景贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0.6063432835820892, - "right": 0.6063432835820892, - "top": -0.23514750466417894, - "bottom": -0.23514750466417894 - }, - "offset": { - "left": -142.00093283582086, - "right": 142.00093283582086, - "top": 210.9981343283582, - "bottom": -210.9981343283582 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 7, - "componentID": 7001, - "version": 249 - }, - { - "componentID": 7002, - "enabled": true, - "entityId": 7, - "scaleMode": 2, - "src": "6af9b9fc-1c04-476f-b27b-ef0255876b6e", - "type": "Image", - "version": 3 - }, - { - "alpha": 1, - "mode": "normal", - "type": "BlendMode", - "enabled": true, - "entityId": 7, - "componentID": 7003 - }, - { - "eAlignMode": 2, - "startOffset": 0, - "duration": 3000000, - "endOffset": 0, - "loopCount": -1, - "type": "TimeOffset", - "enabled": true, - "entityId": 7, - "componentID": 7004, - "version": null - } - ] - }, - { - "id": 9, - "name": "前景贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0.19931592039800985, - "right": 0.19931592039800985, - "top": -0.7079640858208958, - "bottom": -0.7079640858208958 - }, - "offset": { - "left": -238.00373134328353, - "right": 238.00373134328353, - "top": 143.00373134328362, - "bottom": -143.00373134328362 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 9, - "componentID": 9001, - "version": 271 - }, - { - "componentID": 9002, - "enabled": true, - "entityId": 9, - "scaleMode": 2, - "src": "727eabdc-a88c-4646-be64-b9b1b4eeb1bc", - "type": "Image", - "version": 3 - }, - { - "alpha": 1, - "componentID": 9003, - "enabled": true, - "entityId": 9, - "mode": "screen", - "type": "BlendMode", - "version": 2 - }, - { - "eAlignMode": 2, - "startOffset": 0, - "duration": 2250000, - "endOffset": 0, - "loopCount": -1, - "type": "TimeOffset", - "enabled": true, - "entityId": 9, - "componentID": 9004, - "version": null - } - ] - }, - { - "id": 13, - "name": "前景贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0.19143864013266998, - "right": 0.19143864013266998, - "top": -0.7152081389925374, - "bottom": -0.7152081389925374 - }, - "offset": { - "left": -237.99906716417908, - "right": 237.99906716417908, - "top": 142.99906716417908, - "bottom": -142.99906716417908 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 13, - "componentID": 13001, - "version": 318 - }, - { - "componentID": 13002, - "enabled": true, - "entityId": 13, - "scaleMode": 2, - "src": "911ae251-ab63-42ae-b122-1e1418fb59cf", - "type": "Image", - "version": 3 - }, - { - "alpha": 1, - "componentID": 13003, - "enabled": true, - "entityId": 13, - "mode": "screen", - "type": "BlendMode", - "version": 2 - }, - { - "eAlignMode": 2, - "startOffset": 0, - "duration": 750000, - "endOffset": 0, - "loopCount": -1, - "type": "TimeOffset", - "enabled": true, - "entityId": 13, - "componentID": 13004, - "version": null - } - ] - }, - { - "id": 250, - "name": "流程管理", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 250, - "componentID": 250001 - }, - { - "eGraphData": { - "graph": { - "last_node_id": 4, - "last_link_id": 3, - "nodes": [ - { - "id": 2, - "type": "code/SwitchObject", - "pos": { - "0": 295, - "1": 56, - "2": 0, - "3": 0, - "4": 0, - "5": 0, - "6": 0, - "7": 0, - "8": 0, - "9": 0 - }, - "size": { - "0": 300, - "1": 42 - }, - "flags": { - "_initSize": false - }, - "order": 1, - "mode": 0, - "inputs": [ - { - "name": "Run", - "type": -1, - "link": 1 - } - ], - "outputs": [ - { - "name": "Next", - "type": -1, - "links": null - } - ], - "properties": { - "entityToHide": [ - 13 - ] - } - }, - { - "id": 1, - "type": "code/Start", - "pos": { - "0": 11, - "1": 240, - "2": 0, - "3": 0, - "4": 0, - "5": 0, - "6": 0, - "7": 0, - "8": 0, - "9": 0 - }, - "size": { - "0": 200, - "1": 42 - }, - "flags": {}, - "order": 0, - "mode": 0, - "inputs": [], - "outputs": [ - { - "name": "Next", - "type": -1, - "links": [ - 1, - 2 - ] - } - ], - "properties": { - "started": false - } - }, - { - "id": 4, - "type": "code/SwitchObject", - "pos": { - "0": 557, - "1": 405, - "2": 0, - "3": 0, - "4": 0, - "5": 0, - "6": 0, - "7": 0, - "8": 0, - "9": 0 - }, - "size": { - "0": 300, - "1": 42 - }, - "flags": { - "_initSize": false - }, - "order": 3, - "mode": 0, - "inputs": [ - { - "name": "Run", - "type": -1, - "link": 3 - } - ], - "outputs": [ - { - "name": "Next", - "type": -1, - "links": null - } - ], - "properties": { - "entityToDisplay": [ - 13 - ] - } - }, - { - "id": 3, - "type": "code/play", - "pos": { - "0": 256, - "1": 405, - "2": 0, - "3": 0, - "4": 0, - "5": 0, - "6": 0, - "7": 0, - "8": 0, - "9": 0 - }, - "size": { - "0": 200, - "1": 42 - }, - "flags": { - "_initSize": false - }, - "order": 2, - "mode": 0, - "inputs": [ - { - "name": "Run", - "type": -1, - "link": 2 - } - ], - "outputs": [ - { - "name": "Next", - "type": -1, - "links": [ - 3 - ] - } - ], - "properties": { - "entityId": 9, - "playtimes": 1, - "keepLastFrame": false - } - } - ], - "links": [ - [ - 1, - 1, - 0, - 2, - 0, - -1 - ], - [ - 2, - 1, - 0, - 3, - 0, - -1 - ], - [ - 3, - 3, - 0, - 4, - 0, - -1 - ] - ], - "groups": [], - "config": {}, - "version": 0.4 - } - }, - "type": "FlowGraph", - "enabled": true, - "entityId": 250, - "componentID": 250002, - "customNodes": [], - "version": 27 - } - ] - } - ], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "top": 1, - "bottom": -1, - "left": -1, - "right": 1 - }, - "offset": { - "top": 0, - "bottom": 0, - "left": 0, - "right": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 5, - "componentID": 5001 - }, - { - "renderTargetKey": "RenderTarget", - "type": "Camera", - "enabled": true, - "entityId": 5, - "componentID": 5002 - } - ] - } - ] - }, - "resources": { - "items": [ - { - "key": "c35b28e7-cd8e-4e94-a067-5d5a44e0527c", - "type": "AudioClipData", - "path": "bgm.mp3", - "label": "bgm.mp3", - "timeRange": { - "startTime": 0, - "duration": 16561633 - }, - "loopCount": -1 - }, - { - "key": "DeviceCameraTexture", - "type": "TextureData", - "path": "DeviceCameraTexture.tex", - "label": "DeviceCameraTexture.tex" - }, - { - "key": "9f05727d-9cce-4fc1-86c8-3f1eada24a04", - "type": "PAGFileData", - "path": "flower-left.pag", - "label": "flower-left.pag", - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "loopCount": 0 - }, - { - "key": "6af9b9fc-1c04-476f-b27b-ef0255876b6e", - "type": "PAGFileData", - "path": "flower-right.pag", - "label": "flower-right.pag", - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "loopCount": 0 - }, - { - "key": "727eabdc-a88c-4646-be64-b9b1b4eeb1bc", - "type": "PAGFileData", - "path": "holiday-1.pag", - "label": "holiday-1.pag", - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "loopCount": 0 - }, - { - "key": "911ae251-ab63-42ae-b122-1e1418fb59cf", - "type": "PAGFileData", - "path": "holiday-2.pag", - "label": "holiday-2.pag", - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "loopCount": 0 - }, - { - "key": "8e62a1ef-5015-41db-824d-b84d4baca415", - "type": "default", - "path": "imgui.ini", - "label": "imgui.ini" - }, - { - "key": "ba3d4e62-48c9-434c-9d03-2a820c5b2f81", - "type": "EnvMap_KTX", - "path": "lebombo_default/lebombo_default_ibl.ktx", - "label": "lebombo_default_ibl.ktx" - }, - { - "key": "e567e442-bc0d-48d4-ad8f-c0cce5ad6f4e", - "type": "EnvMap_SH", - "path": "lebombo_default/lebombo_default_irradiance.sh", - "label": "lebombo_default_irradiance.sh" - }, - { - "key": "1774dc2f-2cfb-4cb3-a8df-5c48c7ad0f2f", - "type": "EnvMap_KTX", - "path": "lebombo_default/lebombo_default_skybox.ktx", - "label": "lebombo_default_skybox.ktx" - }, - { - "key": "a816ef66-b4c7-4a49-a02f-a1e9fcdde03b", - "type": "AudioClipData", - "path": "lebombo_default/五一花花.mp3", - "label": "五一花花.mp3", - "timeRange": { - "startTime": 0, - "duration": 10344490 - }, - "loopCount": 0 - }, - { - "key": "03bb659f-6428-46c6-81b2-23a7b0c52d15", - "type": "ImageData", - "path": "lp.png", - "label": "lp.png" - }, - { - "key": "72afdffe-899d-467d-ba31-8791f5ec919f", - "type": "ImageData", - "path": "mt.png", - "label": "mt.png" - }, - { - "key": "2f59df0b-9304-4ec3-b731-f37c3f549944", - "type": "MaterialFileData", - "path": "pbr.material", - "label": "pbr.material" - }, - { - "key": "9f4e08cc-f0da-4aa5-93c5-fb23a4fdad0a", - "type": "MaterialFileData", - "path": "pbr_1.material", - "label": "pbr_1.material" - }, - { - "key": "RenderTarget", - "type": "RenderTarget", - "path": "RenderTarget.rdt", - "label": "RenderTarget.rdt", - "inputKey": "DeviceCameraTexture" - }, - { - "key": "RenderTarget1", - "type": "RenderTarget", - "path": "RenderTarget_camera_1.rdt", - "label": "RenderTarget_camera_1.rdt", - "inputKey": "" - }, - { - "key": "632b0f18-9284-4f54-a0c4-f19fcb376d1a", - "type": "js", - "path": "scripts/250.flow.js", - "label": "250.flow.js" - }, - { - "key": "6113cd76-2a37-4e59-b086-062d17f5dbd7", - "type": "js", - "path": "scripts/light.js", - "label": "light.js" - }, - { - "key": "aef7f335-36c3-47cd-b0c1-7e264e4c7963", - "type": "ImageData", - "path": "sh.png", - "label": "sh.png" - }, - { - "key": "3a5d9d58-1984-4d6a-8fbc-5d6b8f730360", - "type": "EnvMap_KTX", - "path": "Soft_4TubeBank_2BlackFlags_ibl.ktx", - "label": "Soft_4TubeBank_2BlackFlags_ibl.ktx" - }, - { - "key": "99cb25ad-c641-4e16-946c-f646b5f5f780", - "type": "ImageData", - "path": "XiKuangYanJing33-gltf/images/XiKuangYanJing33_img0.png", - "label": "XiKuangYanJing33_img0.png" - }, - { - "key": "3e5c82fa-7cf5-42bf-b493-c665de1d0a25", - "type": "MaterialFileData", - "path": "XiKuangYanJing33-gltf/materials/Mat.head.material", - "label": "Mat.head.material" - }, - { - "key": "470b7f69-b871-4c9f-9f8d-f0c1cf162321", - "type": "MaterialFileData", - "path": "XiKuangYanJing33-gltf/materials/Mat.Route666.material", - "label": "Mat.Route666.material" - }, - { - "key": "e4ef00fa-9790-46f4-bf19-0d5ee817f61a", - "type": "mesh", - "path": "XiKuangYanJing33-gltf/meshes/0_0.mesh", - "label": "0_0.mesh" - }, - { - "key": "824f9a83-5343-4685-8b7c-eb0ffd6715c3", - "type": "mesh", - "path": "XiKuangYanJing33-gltf/meshes/1_0.mesh", - "label": "1_0.mesh" - }, - { - "key": "aeb43bf6-6044-4121-92da-a54ae6afb32d", - "type": "modelFile_gltf", - "path": "XiKuangYanJing33-gltf/XiKuangYanJing33.gltf", - "label": "XiKuangYanJing33.gltf" - }, - { - "key": "c2fb5c84-27d4-4925-af7c-7d3609eb6900", - "type": "prefab", - "path": "XiKuangYanJing33-gltf/XiKuangYanJing33.prefab", - "label": "XiKuangYanJing33.prefab" - }, - { - "key": "3dc27d57-26c4-4086-9ad8-10f1c999b17b", - "type": "gltf_bin", - "path": "XiKuangYanJing33-gltf/XiKuangYanJing33_data.bin", - "label": "XiKuangYanJing33_data.bin" - }, - { - "key": "39edb8cb-7eb4-4b6e-a6ea-be96e095b542", - "type": "ImageData", - "path": "xr bd.png", - "label": "xr bd.png" - }, - { - "key": "0cd03468-511b-4ccf-94b4-456ce868544b", - "type": "ImageData", - "path": "yj.png", - "label": "yj.png" - }, - { - "key": "966124fc-bafa-429c-96a6-72d64200f323", - "type": "ImageData", - "path": "zc.png", - "label": "zc.png" - }, - { - "key": "bffa890c-da8a-46a8-8ab1-6dbc25b7c698", - "type": "ImageData", - "path": "郁金香.png", - "label": "郁金香.png" - } - ] - }, - "cloudResourceData": [], - "componentLevel": 4, - "path": "/Users/cxz/Desktop/video_wuyihuahua/" -} \ No newline at end of file diff --git a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/yanjing.studio b/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/yanjing.studio deleted file mode 100644 index 82cf4059..00000000 --- a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/yanjing.studio +++ /dev/null @@ -1,4256 +0,0 @@ -{ - "name": "yanjing", - "author": "db", - "category": 1, - "scene": { - "name": "3D模板", - "id": 1, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "entityId": 1, - "componentID": 1001, - "type": "ScreenTransform", - "enabled": true, - "version": 4, - "level": 2 - }, - { - "componentID": 1002, - "entityId": 1, - "type": "ExtraSetting", - "enabled": true, - "version": 1, - "enableRotation": true, - "resetWhenStartRecord": true, - "defaultCameraPosition": 0, - "supportCameraPosition": 0, - "sync3dRenderEnable": false, - "needVoiceDecibel": false, - "needAutoBeauty": false, - "enableDowngradeAsset": true, - "level": 4 - }, - { - "coverTime": 1000000, - "entityId": 1, - "type": "PreferredCoverTime", - "version": 2, - "enabled": true, - "componentID": 1003, - "level": 1 - }, - { - "enabled": true, - "entityId": 1, - "renderTargetKey": "RenderTarget", - "type": "Camera", - "version": 3, - "componentID": 1004, - "level": 2 - } - ], - "children": [ - { - "id": 173, - "name": "Camera3D", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "BasicTransform", - "position": { - "x": 0, - "y": 0, - "z": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "enabled": true, - "entityId": 173, - "componentID": 173001, - "level": 1 - }, - { - "clearColor": "#00000000", - "componentID": 173002, - "enabled": true, - "entityId": 173, - "far": 1000, - "fov": 60, - "fovType": "vertical", - "near": 0.01, - "projectionType": "perspective", - "size": 0.2, - "targetBufferFlags": "clearColor", - "type": "Camera3DComponent", - "renderTargetKey": "RenderTarget", - "version": 2, - "level": 230 - }, - { - "bloom": { - "enable": false, - "levels": 6, - "strength": 0.1 - }, - "colorGrading": { - "cdl": { - "offset": { - "x": 0, - "y": 0, - "z": 0 - }, - "power": { - "x": 1, - "y": 1, - "z": 1 - }, - "slope": { - "x": 1, - "y": 1, - "z": 1 - } - }, - "channelMixer": { - "outBlue": { - "x": 0, - "y": 0, - "z": 1 - }, - "outGreen": { - "x": 0, - "y": 1, - "z": 0 - }, - "outRed": { - "x": 1, - "y": 0, - "z": 0 - } - }, - "contrast": 1, - "enable": true, - "saturation": 1, - "shadowMidHighlights": { - "highlightsColor": "#FFFFFF00", - "highlightsWeight": 0, - "midtonesColor": "#FFFFFF00", - "midtonesWeight": 0, - "ranges": { - "w": 1, - "x": 0, - "y": 0.333, - "z": 0.55 - }, - "shadowsColor": "#FFFFFF00", - "shadowsWeight": 0 - }, - "toneMapping": 3, - "vibrance": 1, - "whiteBalance": { - "temperature": 1, - "tint": 0.3 - } - }, - "componentID": 173003, - "enable": true, - "enableDithering": false, - "enableFXAA": false, - "enableMSAA": false, - "enableSSAO": false, - "enabled": true, - "entityId": 173, - "type": "PostEffect3DComponent", - "version": 48, - "vignette": { - "color": "#000000FF", - "enable": false, - "feather": 0.5, - "midPoint": 0.5, - "roundness": 0.5 - }, - "level": 265 - } - ] - }, - { - "id": 181, - "name": "Lighting", - "children": [ - { - "id": 183, - "name": "Envmap", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "componentID": 183001, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "enabled": true, - "entityId": 183, - "objectEnabled": true, - "position": { - "x": 0, - "y": 0.6499999761581421, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "type": "BasicTransform", - "version": 25, - "level": 1 - }, - { - "componentID": 183002, - "enabled": true, - "entityId": 183, - "envRotation": 304, - "iblPath": "3a5d9d58-1984-4d6a-8fbc-5d6b8f730360", - "innerAngle": 30, - "intensity": 89.60000000000001, - "irradiancePath": "e567e442-bc0d-48d4-ad8f-c0cce5ad6f4e", - "lightColor": "#ffffffff", - "lightType": 5, - "outerAngle": 60, - "radius": 4, - "shadowConfig": { - "castShadows": true, - "shadowMapSize": 10 - }, - "skyBoxConfig": { - "enableSkyBox": false, - "skyBoxPath": "" - }, - "type": "Light3DComponent", - "version": 449, - "level": 275 - } - ] - }, - { - "id": 185, - "name": "Light", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "componentID": 185001, - "eEuler": { - "x": -25, - "y": 20, - "z": -40 - }, - "enabled": true, - "entityId": 185, - "objectEnabled": true, - "position": { - "x": 0.15, - "y": 0.55, - "z": 0.15 - }, - "rotation": { - "x": -0.35355339059327373, - "y": 2.7755575615628914e-17, - "z": -0.7071067811865476, - "w": 0.6123724356957946 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "type": "BasicTransform", - "version": 12, - "level": 1 - }, - { - "componentID": 185002, - "enabled": true, - "entityId": 185, - "envRotation": 0, - "iblPath": "ce38e1ba-9e13-42f2-a491-b750578ffa87", - "innerAngle": 30, - "intensity": 40, - "irradiancePath": "4903bd51-a2ec-4880-b9b9-3a624df646b4", - "lightColor": "#ffffffff", - "lightType": 1, - "outerAngle": 60, - "radius": 4, - "shadowConfig": { - "castShadows": false, - "shadowMapSize": 10 - }, - "skyBoxConfig": { - "enableSkyBox": false, - "skyBoxPath": "" - }, - "type": "Light3DComponent", - "version": 11, - "level": 275 - } - ] - } - ], - "enabled": true, - "version": 0, - "components": [ - { - "type": "BasicTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "enabled": true, - "entityId": 181, - "componentID": 181001, - "level": 1 - } - ] - }, - { - "id": 188, - "name": "3D人头", - "children": [ - { - "id": 233, - "name": "XiKuangYanJing33(prefab)", - "children": [ - { - "id": 236, - "name": "scenes", - "children": [ - { - "id": 238, - "name": "Scene", - "children": [ - { - "id": 240, - "name": "XiKuangYanJing.001", - "children": [], - "enabled": true, - "version": 0, - "forbid": false, - "components": [ - { - "componentID": 240001, - "enabled": true, - "entityId": 240, - "needReload": true, - "objectEnabled": true, - "paused": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "type": "BasicTransform", - "visible": true, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "level": 1 - }, - { - "componentID": 240002, - "enabled": true, - "entityId": 240, - "layers": 1, - "needReload": true, - "paused": false, - "type": "LayerSetComponent", - "level": 4 - }, - { - "componentID": 240003, - "enabled": true, - "entityId": 240, - "meshIndex": 0, - "meshName": "网格", - "needReload": true, - "paused": false, - "primitiveConfigs": [ - { - "castShadow": true, - "materialResourceKey": "2f59df0b-9304-4ec3-b731-f37c3f549944", - "meshResourceKey": "e4ef00fa-9790-46f4-bf19-0d5ee817f61a", - "primitiveIndex": 0, - "receiveShadow": true - } - ], - "skinned": false, - "type": "MeshRenderer3DComponent", - "version": 2, - "level": 4 - } - ] - }, - { - "id": 244, - "name": "jk", - "children": [], - "enabled": true, - "version": 0, - "forbid": false, - "components": [ - { - "componentID": 244001, - "enabled": true, - "entityId": 244, - "needReload": true, - "objectEnabled": true, - "paused": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "type": "BasicTransform", - "visible": true, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "level": 1 - }, - { - "componentID": 244002, - "enabled": true, - "entityId": 244, - "layers": 1, - "needReload": true, - "paused": false, - "type": "LayerSetComponent", - "level": 4 - }, - { - "componentID": 244003, - "enabled": true, - "entityId": 244, - "meshIndex": 1, - "meshName": "网格.001", - "needReload": true, - "paused": false, - "primitiveConfigs": [ - { - "castShadow": true, - "materialResourceKey": "470b7f69-b871-4c9f-9f8d-f0c1cf162321", - "meshResourceKey": "824f9a83-5343-4685-8b7c-eb0ffd6715c3", - "primitiveIndex": 0, - "receiveShadow": true - } - ], - "skinned": false, - "type": "MeshRenderer3DComponent", - "level": 4 - } - ] - } - ], - "enabled": true, - "version": 0, - "forbid": false, - "components": [ - { - "componentID": 238001, - "enabled": true, - "entityId": 238, - "needReload": true, - "objectEnabled": true, - "paused": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1.0255081493992495, - "y": 1.0255081493992495, - "z": 1.0255081493992495 - }, - "type": "BasicTransform", - "visible": true, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "version": 2, - "level": 1 - } - ] - } - ], - "enabled": true, - "version": 0, - "forbid": false, - "components": [ - { - "componentID": 236001, - "enabled": true, - "entityId": 236, - "needReload": true, - "objectEnabled": true, - "paused": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "type": "BasicTransform", - "visible": true, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "level": 1 - } - ] - } - ], - "enabled": true, - "version": 0, - "forbid": true, - "components": [ - { - "componentID": 233001, - "enabled": true, - "entityId": 233, - "needReload": true, - "objectEnabled": true, - "paused": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "type": "BasicTransform", - "visible": true, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "level": 1 - }, - { - "componentID": 233002, - "enabled": true, - "entityId": 233, - "gltfResourceKey": "aeb43bf6-6044-4121-92da-a54ae6afb32d", - "needReload": true, - "paused": false, - "type": "GlbRenderComponent", - "level": 4 - } - ] - } - ], - "enabled": true, - "version": 0, - "components": [ - { - "type": "BasicTransform", - "position": { - "x": 0, - "y": 0.1, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "enabled": true, - "entityId": 188, - "componentID": 188001, - "level": 1 - }, - { - "use3DMMHead": 0, - "useCustom3DHead": false, - "custom3DHead": "", - "showUserHead": true, - "faceIndex": [ - 0 - ], - "type": "Face3DComponent", - "enabled": true, - "entityId": 188, - "componentID": 188002, - "level": 230 - } - ] - }, - { - "id": 217, - "name": "音乐", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 217, - "componentID": 217001, - "level": 2 - }, - { - "audioSourceType": 1, - "componentID": 217002, - "eAudioMeta": { - "rhythmPath": "", - "startTime": 0, - "duration": 16560000, - "enableRhythm": true - }, - "eAudioType": 1, - "eHasVolumeEffects": false, - "eKey": "audioSource", - "enabled": true, - "entityId": 217, - "speed": 1, - "type": "AudioSource", - "version": 10, - "volume": 1, - "volumeEffects": [ - { - "duration": 2000000, - "eAlignMode": 2, - "end": 1, - "endOffset": 0, - "interpolationType": 1, - "loopCount": -1, - "start": 1, - "startOffset": 0 - } - ], - "ePath": "c35b28e7-cd8e-4e94-a067-5d5a44e0527c", - "level": 2 - }, - { - "componentID": 217003, - "duration": 16559999.999999998, - "eAlignMode": 2, - "enabled": true, - "endOffset": 0, - "entityId": 217, - "loopCount": 0, - "startOffset": 0, - "type": "TimeOffset", - "version": 2, - "level": 1 - } - ] - }, - { - "id": 5, - "name": "2D画板", - "children": [ - { - "id": 4, - "name": "滤镜", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 4, - "componentID": 4001, - "level": 2 - }, - { - "componentID": 4002, - "enabled": true, - "entityId": 4, - "intensity": 0.6900000000000001, - "src": "bffa890c-da8a-46a8-8ab1-6dbc25b7c698", - "type": "LUTFilter", - "version": 12, - "level": 1 - }, - { - "eAlignMode": 0, - "startOffset": 0, - "duration": 2000000, - "endOffset": 0, - "loopCount": 0, - "type": "TimeOffset", - "enabled": true, - "entityId": 4, - "componentID": 4003, - "version": null, - "level": 1 - } - ] - }, - { - "id": 8, - "name": "脸妆", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 8, - "componentID": 8001, - "level": 2 - }, - { - "componentID": 8002, - "enabled": true, - "entityId": 8, - "faceExchangeImageDisableFaceCrop": true, - "faceExchangeImageEnableOpacity": false, - "faceImage": "aef7f335-36c3-47cd-b0c1-7e264e4c7963", - "faceMask": "none", - "facePointsFile": "", - "facePointsOption": false, - "maskImage": "", - "type": "MakeupFaceV6", - "visMethod": 0, - "version": 2, - "level": 2 - }, - { - "alpha": 1, - "componentID": 8003, - "enabled": true, - "entityId": 8, - "mode": "multiply", - "type": "BlendMode", - "version": 2, - "level": 2 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "female", - "type": "FaceTracking", - "enabled": true, - "entityId": 8, - "componentID": 8004, - "level": 2 - } - ] - }, - { - "id": 6, - "name": "美瞳", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 6, - "componentID": 6001, - "level": 2 - }, - { - "componentID": 6002, - "enabled": true, - "entityId": 6, - "irisImage": "72afdffe-899d-467d-ba31-8791f5ec919f", - "minVisibility": 0, - "type": "MakeupIrisV6", - "visMethod": 0, - "version": 2, - "level": 2 - }, - { - "alpha": 0.36, - "componentID": 6003, - "enabled": true, - "entityId": 6, - "mode": "normal", - "type": "BlendMode", - "version": 19, - "level": 2 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "female", - "type": "FaceTracking", - "enabled": true, - "entityId": 6, - "componentID": 6004, - "level": 2 - } - ] - }, - { - "id": 11, - "name": "唇彩", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 11, - "componentID": 11001, - "level": 2 - }, - { - "closeMouseMask": "", - "componentID": 11002, - "enabled": true, - "entityId": 11, - "lipsColor": "", - "lipsImage": "966124fc-bafa-429c-96a6-72d64200f323", - "lipsImageCrop": "cropImage/zc_crop.png", - "lipsImageCropRect": { - "bottom": 1420, - "left": 622, - "right": 918, - "top": 1260 - }, - "lipsLut": "", - "lipsMask": "", - "lipsMaskCrop": "cropImage/zc_Mask_crop.png", - "lipsMaskCropRect": { - "bottom": 2047, - "left": 0, - "right": 1535, - "top": 0 - }, - "lipsMaskEnum": 0, - "lipsType": "Image", - "minVisibility": 0, - "openMouseMask": "", - "type": "MakeupLipsV6", - "visMethod": 0, - "version": 2, - "level": 2 - }, - { - "alpha": 0.62, - "componentID": 11003, - "enabled": true, - "entityId": 11, - "mode": "multiply", - "type": "BlendMode", - "version": 33, - "level": 2 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "female", - "type": "FaceTracking", - "enabled": true, - "entityId": 11, - "componentID": 11004, - "level": 2 - } - ] - }, - { - "id": 10, - "name": "眼妆", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 10, - "componentID": 10001, - "level": 2 - }, - { - "componentID": 10002, - "cropRect": { - "bottom": 2048, - "left": 0, - "right": 1536, - "top": 0 - }, - "enabled": true, - "entityId": 10, - "eyeCropImageName": "0cd03468-511b-4ccf-94b4-456ce868544b", - "eyeImageName": "0cd03468-511b-4ccf-94b4-456ce868544b", - "minVisibility": 0, - "type": "MakeupEyeV6", - "visMethod": 0, - "version": 2, - "level": 2 - }, - { - "alpha": 0.72, - "componentID": 10003, - "enabled": true, - "entityId": 10, - "mode": "multiply", - "type": "BlendMode", - "version": 4, - "level": 2 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "female", - "type": "FaceTracking", - "enabled": true, - "entityId": 10, - "componentID": 10004, - "level": 2 - } - ] - }, - { - "id": 12, - "name": "眼妆", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 12, - "componentID": 12001, - "level": 2 - }, - { - "componentID": 12002, - "cropRect": { - "bottom": 2048, - "left": 0, - "right": 1536, - "top": 0 - }, - "enabled": true, - "entityId": 12, - "eyeCropImageName": "03bb659f-6428-46c6-81b2-23a7b0c52d15", - "eyeImageName": "03bb659f-6428-46c6-81b2-23a7b0c52d15", - "minVisibility": 0, - "type": "MakeupEyeV6", - "visMethod": 0, - "version": 2, - "level": 2 - }, - { - "alpha": 0.85, - "componentID": 12003, - "enabled": true, - "entityId": 12, - "mode": "screen", - "type": "BlendMode", - "version": 21, - "level": 2 - }, - { - "alignPoints": [ - 64 - ], - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "isRefine": true, - "isWaitFirstFrameDetect": false, - "isAllFrameFaceDetect": false, - "xAxisTrack": true, - "yAxisTrack": true, - "xAxisRotateTrack": true, - "yAxisRotateTrack": true, - "zAxisRotateTrack": true, - "xAxisScale": true, - "yAxisScale": true, - "genderBinding": "female", - "type": "FaceTracking", - "enabled": true, - "entityId": 12, - "componentID": 12004, - "level": 2 - } - ] - }, - { - "id": 226, - "name": "前景贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "left": -0.6866708126036484, - "right": -0.6866708126036484, - "top": 0.1302909281716419, - "bottom": 0.1302909281716419 - }, - "offset": { - "left": -112.99906716417912, - "right": 112.99906716417912, - "top": 180, - "bottom": -180 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "objectEnabled": true, - "entityId": 226, - "componentID": 226001, - "type": "ScreenTransform", - "enabled": true, - "version": 349, - "level": 2 - }, - { - "componentID": 226002, - "enabled": true, - "entityId": 226, - "scaleMode": 2, - "src": "9f05727d-9cce-4fc1-86c8-3f1eada24a04", - "type": "Image", - "version": 5, - "level": 1 - }, - { - "alpha": 1, - "mode": "normal", - "type": "BlendMode", - "enabled": true, - "entityId": 226, - "componentID": 226003, - "level": 2 - }, - { - "eAlignMode": 2, - "startOffset": 0, - "duration": 3000000, - "endOffset": 0, - "loopCount": -1, - "type": "TimeOffset", - "enabled": true, - "entityId": 226, - "componentID": 226004, - "version": 1, - "level": 1 - } - ] - }, - { - "id": 7, - "name": "前景贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0.6063432835820892, - "right": 0.6063432835820892, - "top": -0.23514750466417894, - "bottom": -0.23514750466417894 - }, - "offset": { - "left": -142.00093283582086, - "right": 142.00093283582086, - "top": 210.9981343283582, - "bottom": -210.9981343283582 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 7, - "componentID": 7001, - "version": 249, - "level": 2 - }, - { - "componentID": 7002, - "enabled": true, - "entityId": 7, - "scaleMode": 2, - "src": "6af9b9fc-1c04-476f-b27b-ef0255876b6e", - "type": "Image", - "version": 3, - "level": 1 - }, - { - "alpha": 1, - "mode": "normal", - "type": "BlendMode", - "enabled": true, - "entityId": 7, - "componentID": 7003, - "level": 2 - }, - { - "eAlignMode": 2, - "startOffset": 0, - "duration": 3000000, - "endOffset": 0, - "loopCount": -1, - "type": "TimeOffset", - "enabled": true, - "entityId": 7, - "componentID": 7004, - "version": null, - "level": 1 - } - ] - }, - { - "id": 9, - "name": "前景贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0.19931592039800985, - "right": 0.19931592039800985, - "top": -0.7079640858208958, - "bottom": -0.7079640858208958 - }, - "offset": { - "left": -238.00373134328353, - "right": 238.00373134328353, - "top": 143.00373134328362, - "bottom": -143.00373134328362 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 9, - "componentID": 9001, - "version": 271, - "level": 2 - }, - { - "componentID": 9002, - "enabled": true, - "entityId": 9, - "scaleMode": 2, - "src": "727eabdc-a88c-4646-be64-b9b1b4eeb1bc", - "type": "Image", - "version": 3, - "level": 1 - }, - { - "alpha": 1, - "componentID": 9003, - "enabled": true, - "entityId": 9, - "mode": "screen", - "type": "BlendMode", - "version": 2, - "level": 2 - }, - { - "eAlignMode": 2, - "startOffset": 0, - "duration": 2250000, - "endOffset": 0, - "loopCount": -1, - "type": "TimeOffset", - "enabled": true, - "entityId": 9, - "componentID": 9004, - "version": null, - "level": 1 - } - ] - }, - { - "id": 13, - "name": "前景贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0.19143864013266998, - "right": 0.19143864013266998, - "top": -0.7152081389925374, - "bottom": -0.7152081389925374 - }, - "offset": { - "left": -237.99906716417908, - "right": 237.99906716417908, - "top": 142.99906716417908, - "bottom": -142.99906716417908 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 13, - "componentID": 13001, - "version": 318, - "level": 2 - }, - { - "componentID": 13002, - "enabled": true, - "entityId": 13, - "scaleMode": 2, - "src": "911ae251-ab63-42ae-b122-1e1418fb59cf", - "type": "Image", - "version": 3, - "level": 1 - }, - { - "alpha": 1, - "componentID": 13003, - "enabled": true, - "entityId": 13, - "mode": "screen", - "type": "BlendMode", - "version": 2, - "level": 2 - }, - { - "eAlignMode": 2, - "startOffset": 0, - "duration": 750000, - "endOffset": 0, - "loopCount": -1, - "type": "TimeOffset", - "enabled": true, - "entityId": 13, - "componentID": 13004, - "version": null, - "level": 1 - } - ] - }, - { - "id": 250, - "name": "流程管理", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 250, - "componentID": 250001, - "level": 2 - }, - { - "eGraphData": { - "graph": { - "last_node_id": 4, - "last_link_id": 3, - "nodes": [ - { - "id": 2, - "type": "code/SwitchObject", - "pos": { - "0": 295, - "1": 56, - "2": 0, - "3": 0, - "4": 0, - "5": 0, - "6": 0, - "7": 0, - "8": 0, - "9": 0 - }, - "size": { - "0": 300, - "1": 42 - }, - "flags": { - "_initSize": false - }, - "order": 1, - "mode": 0, - "inputs": [ - { - "name": "Run", - "type": -1, - "link": 1 - } - ], - "outputs": [ - { - "name": "Next", - "type": -1, - "links": null - } - ], - "properties": { - "entityToHide": [ - 13 - ] - } - }, - { - "id": 1, - "type": "code/Start", - "pos": { - "0": 11, - "1": 240, - "2": 0, - "3": 0, - "4": 0, - "5": 0, - "6": 0, - "7": 0, - "8": 0, - "9": 0 - }, - "size": { - "0": 200, - "1": 42 - }, - "flags": {}, - "order": 0, - "mode": 0, - "inputs": [], - "outputs": [ - { - "name": "Next", - "type": -1, - "links": [ - 1, - 2 - ] - } - ], - "properties": { - "started": false - } - }, - { - "id": 4, - "type": "code/SwitchObject", - "pos": { - "0": 557, - "1": 405, - "2": 0, - "3": 0, - "4": 0, - "5": 0, - "6": 0, - "7": 0, - "8": 0, - "9": 0 - }, - "size": { - "0": 300, - "1": 42 - }, - "flags": { - "_initSize": false - }, - "order": 3, - "mode": 0, - "inputs": [ - { - "name": "Run", - "type": -1, - "link": 3 - } - ], - "outputs": [ - { - "name": "Next", - "type": -1, - "links": null - } - ], - "properties": { - "entityToDisplay": [ - 13 - ] - } - }, - { - "id": 3, - "type": "code/play", - "pos": { - "0": 256, - "1": 405, - "2": 0, - "3": 0, - "4": 0, - "5": 0, - "6": 0, - "7": 0, - "8": 0, - "9": 0 - }, - "size": { - "0": 200, - "1": 42 - }, - "flags": { - "_initSize": false - }, - "order": 2, - "mode": 0, - "inputs": [ - { - "name": "Run", - "type": -1, - "link": 2 - } - ], - "outputs": [ - { - "name": "Next", - "type": -1, - "links": [ - 3 - ] - } - ], - "properties": { - "entityId": 9, - "playtimes": 1, - "keepLastFrame": false - } - } - ], - "links": [ - [ - 1, - 1, - 0, - 2, - 0, - -1 - ], - [ - 2, - 1, - 0, - 3, - 0, - -1 - ], - [ - 3, - 3, - 0, - 4, - 0, - -1 - ] - ], - "groups": [], - "config": {}, - "version": 0.4 - } - }, - "type": "FlowGraph", - "enabled": true, - "entityId": 250, - "componentID": 250002, - "customNodes": [], - "version": 27, - "level": 2 - } - ] - } - ], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "top": 1, - "bottom": -1, - "left": -1, - "right": 1 - }, - "offset": { - "top": 0, - "bottom": 0, - "left": 0, - "right": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 5, - "componentID": 5001, - "level": 2 - }, - { - "renderTargetKey": "RenderTarget", - "type": "Camera", - "enabled": true, - "entityId": 5, - "componentID": 5002, - "level": 2 - } - ] - } - ] - }, - "resources": { - "items": [ - { - "type": "folder", - "commandMap": {}, - "key": "d79b8d03-af71-45dc-bdd3-65193915d8aa", - "label": "root", - "path": "./", - "level": 2 - }, - { - "type": "AudioClipData", - "commandMap": {}, - "loopCount": -1, - "key": "c35b28e7-cd8e-4e94-a067-5d5a44e0527c", - "path": "bgm.mp3", - "label": "bgm.mp3", - "timeRange": { - "startTime": 0, - "duration": 16561633 - }, - "duration": 10344490, - "level": 2, - "actualSize": 333335 - }, - { - "type": "folder", - "commandMap": {}, - "key": "da7a834a-522e-4ca3-b48f-d08a34cbb978", - "label": "cropImage", - "path": "cropImage", - "level": 2 - }, - { - "type": "ImageData", - "commandMap": {}, - "key": "e438de54-0598-4e51-931f-c242e41111fa", - "label": "lp_crop.png", - "path": "cropImage/lp_crop.png", - "level": 2, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "actualSize": 37681, - "resolution": { - "height": 247, - "width": 634 - }, - "width": 634, - "height": 247 - }, - { - "type": "ImageData", - "commandMap": {}, - "key": "4fff5871-6c29-4f8b-b66e-37ad3a84148b", - "label": "yj_crop.png", - "path": "cropImage/yj_crop.png", - "level": 2, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "actualSize": 146612, - "resolution": { - "height": 401, - "width": 892 - }, - "width": 892, - "height": 401 - }, - { - "type": "ImageData", - "commandMap": {}, - "key": "69cd2b4b-643e-4987-8e5d-b7ed5445c296", - "label": "zc_crop.png", - "path": "cropImage/zc_crop.png", - "level": 2, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "actualSize": 16819, - "resolution": { - "height": 160, - "width": 296 - }, - "width": 296, - "height": 160 - }, - { - "type": "ImageData", - "commandMap": {}, - "key": "254d41a9-5196-4a49-ac7e-0dfae430e879", - "label": "zc_Mask_crop.png", - "path": "cropImage/zc_Mask_crop.png", - "level": 2, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "actualSize": 22865, - "resolution": { - "height": 2047, - "width": 1535 - }, - "width": 1535, - "height": 2047 - }, - { - "type": "TextureData", - "commandMap": {}, - "key": "DeviceCameraTexture", - "path": "DeviceCameraTexture.tex", - "label": "DeviceCameraTexture.tex", - "level": 2 - }, - { - "type": "PAGFileData", - "commandMap": {}, - "loopCount": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "NEAREST", - "minFilter": "NEAREST", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "9f05727d-9cce-4fc1-86c8-3f1eada24a04", - "path": "flower-left.pag", - "label": "flower-left.pag", - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "duration": 3000000, - "resolution": { - "width": 226, - "height": 360 - }, - "frameRate": 12, - "hasAudio": false, - "level": 2, - "actualSize": 72880, - "timeStretchMode": 2, - "videoAmount": 1 - }, - { - "type": "PAGFileData", - "commandMap": {}, - "loopCount": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "NEAREST", - "minFilter": "NEAREST", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "6af9b9fc-1c04-476f-b27b-ef0255876b6e", - "path": "flower-right.pag", - "label": "flower-right.pag", - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "duration": 3000000, - "resolution": { - "width": 284, - "height": 422 - }, - "frameRate": 12, - "hasAudio": false, - "level": 2, - "actualSize": 102627, - "timeStretchMode": 2, - "videoAmount": 1 - }, - { - "type": "PAGFileData", - "commandMap": {}, - "loopCount": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "NEAREST", - "minFilter": "NEAREST", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "727eabdc-a88c-4646-be64-b9b1b4eeb1bc", - "path": "holiday-1.pag", - "label": "holiday-1.pag", - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "duration": 2250000, - "resolution": { - "width": 476, - "height": 286 - }, - "frameRate": 12, - "hasAudio": false, - "level": 2, - "actualSize": 76664, - "timeStretchMode": 2, - "videoAmount": 1 - }, - { - "type": "PAGFileData", - "commandMap": {}, - "loopCount": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "NEAREST", - "minFilter": "NEAREST", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "911ae251-ab63-42ae-b122-1e1418fb59cf", - "path": "holiday-2.pag", - "label": "holiday-2.pag", - "timeRange": { - "startTime": 0, - "duration": 0 - }, - "duration": 750000, - "resolution": { - "width": 476, - "height": 286 - }, - "frameRate": 12, - "hasAudio": false, - "level": 2, - "actualSize": 50151, - "timeStretchMode": 2, - "videoAmount": 1 - }, - { - "type": "default", - "commandMap": {}, - "key": "8e62a1ef-5015-41db-824d-b84d4baca415", - "path": "imgui.ini", - "label": "imgui.ini", - "level": 2 - }, - { - "type": "folder", - "commandMap": {}, - "key": "da64a8c1-6ce3-49b2-9799-5dc569cf2870", - "label": "lebombo_default", - "path": "lebombo_default", - "level": 2 - }, - { - "type": "EnvMap_KTX", - "commandMap": {}, - "key": "ba3d4e62-48c9-434c-9d03-2a820c5b2f81", - "path": "lebombo_default/lebombo_default_ibl.ktx", - "label": "lebombo_default_ibl.ktx", - "level": 2 - }, - { - "type": "EnvMap_SH", - "commandMap": {}, - "key": "e567e442-bc0d-48d4-ad8f-c0cce5ad6f4e", - "path": "lebombo_default/lebombo_default_irradiance.sh", - "label": "lebombo_default_irradiance.sh", - "level": 2 - }, - { - "type": "EnvMap_KTX", - "commandMap": {}, - "key": "1774dc2f-2cfb-4cb3-a8df-5c48c7ad0f2f", - "path": "lebombo_default/lebombo_default_skybox.ktx", - "label": "lebombo_default_skybox.ktx", - "level": 2 - }, - { - "type": "AudioClipData", - "commandMap": {}, - "loopCount": 0, - "key": "a816ef66-b4c7-4a49-a02f-a1e9fcdde03b", - "path": "lebombo_default/wuyihuahua.mp3", - "label": "wuyihuahua.mp3", - "timeRange": { - "startTime": 0, - "duration": 10344490 - }, - "duration": 10344490, - "level": 2, - "actualSize": 333335 - }, - { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "03bb659f-6428-46c6-81b2-23a7b0c52d15", - "path": "lp.png", - "label": "lp.png", - "actualSize": 18211, - "resolution": { - "height": 2048, - "width": 1536 - }, - "level": 2, - "width": 1536, - "height": 2048 - }, - { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "72afdffe-899d-467d-ba31-8791f5ec919f", - "path": "mt.png", - "label": "mt.png", - "actualSize": 4277, - "resolution": { - "height": 125, - "width": 125 - }, - "level": 2, - "width": 125, - "height": 125 - }, - { - "type": "MaterialFileData", - "commandMap": {}, - "rawMaterialConfigJson": { - "ao_enable_texture_": false, - "ao_index_": 0, - "ao_sampling_channel_": "r", - "ao_strength_": 1, - "base_color_enable_texture_": false, - "base_color_factor_": [ - 0.09019607843137255, - 0.07058823529411765, - 0.06666666666666667, - 1 - ], - "base_color_index_": 0, - "base_color_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": true, - "uri_": "" - }, - "base_color_texture_premultiplied_": false, - "base_color_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "blending_": "opaque", - "clear_coat_enable_texture_": false, - "clear_coat_factor_": 0, - "clear_coat_index_": -1, - "clear_coat_normal_enable_texture_": false, - "clear_coat_normal_index_": -1, - "clear_coat_normal_scale_": 0, - "clear_coat_normal_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": false, - "uri_": "" - }, - "clear_coat_normal_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "clear_coat_roughness_enable_texture_": false, - "clear_coat_roughness_factor_": 0, - "clear_coat_roughness_index_": -1, - "clear_coat_roughness_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": false, - "uri_": "" - }, - "clear_coat_roughness_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "clear_coat_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": false, - "uri_": "" - }, - "clear_coat_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "color_write_": true, - "culling_mode_": "back", - "depth_culling_": true, - "depth_write_": true, - "double_side_": false, - "emissive_enable_texture_": false, - "emissive_enable_texture_color_multiply_": true, - "emissive_factor_": [ - 0, - 0, - 0, - 1, - 1 - ], - "emissive_index_": 0, - "emissive_strength_": 1, - "emissive_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": true, - "uri_": "" - }, - "emissive_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "flipUV_": false, - "metallic_factor_": 0.88, - "metallic_roughness_enable_texture_": false, - "metallic_roughness_index_": 0, - "metallic_roughness_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": false, - "uri_": "" - }, - "metallic_roughness_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "metallic_sampling_channel_": "b", - "normal_enable_g_reverse_": false, - "normal_enable_texture_": false, - "normal_index_": 0, - "normal_scale_": 1, - "normal_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": false, - "uri_": "" - }, - "normal_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "occlusion_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": false, - "uri_": "" - }, - "occlusion_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "roughness_factor_": 0.32, - "roughness_sampling_channel_": "g", - "shading_model_": "lit", - "specular_ambient_occlusion_": "simple", - "type_": "pbr", - "vertex_transform_": [ - 1, - 0, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 0, - 1 - ] - }, - "canEmit": true, - "materialType": "pbr", - "shader": { - "materialType": "pbr", - "baseColor": { - "value": "#171211ff", - "enableTexture": false, - "textureMapUri": "", - "texturePremultiplied": false, - "wrapModeU": "repeat", - "wrapModeV": "repeat", - "uvSet": 0 - }, - "metallicRoughnessAO": { - "enableTexture": false, - "textureMapUri": "", - "wrapModeU": "repeat", - "wrapModeV": "repeat", - "uvSet": 0, - "metallicFactor": 0.88, - "roughnessFactor": 0.32, - "metallicChannel": "b", - "roughnessChannel": "g", - "aoChannel": "r", - "aoStrength": 0 - }, - "normal": { - "enableTexture": false, - "textureMapUri": "", - "wrapModeU": "repeat", - "wrapModeV": "repeat", - "uvSet": 0, - "enableGReverse": false, - "scale": 1 - }, - "emissive": { - "value": "#000000ff", - "enableTexture": false, - "textureMapUri": "", - "wrapModeU": "repeat", - "wrapModeV": "repeat", - "uvSet": 0, - "enableTextureColorMultiply": true, - "strength": 1 - }, - "advance": { - "blending": "opaque", - "colorWrite": true, - "depthWrite": true, - "depthCulling": true, - "cullingMode": "back", - "doubleSide": false - } - }, - "lastType": "pbr", - "key": "2f59df0b-9304-4ec3-b731-f37c3f549944", - "path": "pbr.material", - "label": "pbr.material", - "level": 2 - }, - { - "type": "MaterialFileData", - "commandMap": {}, - "rawMaterialConfigJson": { - "ao_enable_texture_": false, - "ao_index_": 0, - "ao_sampling_channel_": "r", - "ao_strength_": 1, - "base_color_enable_texture_": false, - "base_color_factor_": [ - 1, - 1, - 1, - 1 - ], - "base_color_index_": 0, - "base_color_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": true, - "uri_": "" - }, - "base_color_texture_premultiplied_": false, - "base_color_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "blending_": "masked", - "clear_coat_enable_texture_": false, - "clear_coat_factor_": 0, - "clear_coat_index_": -1, - "clear_coat_normal_enable_texture_": false, - "clear_coat_normal_index_": -1, - "clear_coat_normal_scale_": 0, - "clear_coat_normal_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": false, - "uri_": "" - }, - "clear_coat_normal_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "clear_coat_roughness_enable_texture_": false, - "clear_coat_roughness_factor_": 0, - "clear_coat_roughness_index_": -1, - "clear_coat_roughness_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": false, - "uri_": "" - }, - "clear_coat_roughness_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "clear_coat_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": false, - "uri_": "" - }, - "clear_coat_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "color_write_": false, - "culling_mode_": "back", - "depth_culling_": true, - "depth_write_": true, - "double_side_": false, - "emissive_enable_texture_": false, - "emissive_enable_texture_color_multiply_": true, - "emissive_factor_": [ - 0, - 0, - 0, - 1, - 1 - ], - "emissive_index_": 0, - "emissive_strength_": 1, - "emissive_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": true, - "uri_": "" - }, - "emissive_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "flipUV_": false, - "metallic_factor_": 1, - "metallic_roughness_enable_texture_": false, - "metallic_roughness_index_": 0, - "metallic_roughness_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": false, - "uri_": "" - }, - "metallic_roughness_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "metallic_sampling_channel_": "b", - "normal_enable_g_reverse_": false, - "normal_enable_texture_": false, - "normal_index_": 0, - "normal_scale_": 1, - "normal_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": false, - "uri_": "" - }, - "normal_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "occlusion_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": false, - "uri_": "" - }, - "occlusion_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "roughness_factor_": 0, - "roughness_sampling_channel_": "g", - "shading_model_": "lit", - "specular_ambient_occlusion_": "simple", - "type_": "pbr", - "vertex_transform_": [ - 1, - 0, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 0, - 1 - ] - }, - "canEmit": true, - "materialType": "pbr", - "shader": { - "materialType": "pbr", - "baseColor": { - "value": "#ffffffff", - "enableTexture": false, - "textureMapUri": "", - "texturePremultiplied": false, - "wrapModeU": "repeat", - "wrapModeV": "repeat", - "uvSet": 0 - }, - "metallicRoughnessAO": { - "enableTexture": false, - "textureMapUri": "", - "wrapModeU": "repeat", - "wrapModeV": "repeat", - "uvSet": 0, - "metallicFactor": 1, - "roughnessFactor": 0, - "metallicChannel": "b", - "roughnessChannel": "g", - "aoChannel": "r", - "aoStrength": 0 - }, - "normal": { - "enableTexture": false, - "textureMapUri": "", - "wrapModeU": "repeat", - "wrapModeV": "repeat", - "uvSet": 0, - "enableGReverse": false, - "scale": 1 - }, - "emissive": { - "value": "#000000ff", - "enableTexture": false, - "textureMapUri": "", - "wrapModeU": "repeat", - "wrapModeV": "repeat", - "uvSet": 0, - "enableTextureColorMultiply": true, - "strength": 1 - }, - "advance": { - "blending": "masked", - "colorWrite": false, - "depthWrite": true, - "depthCulling": true, - "cullingMode": "back", - "doubleSide": false - } - }, - "lastType": "pbr", - "key": "9f4e08cc-f0da-4aa5-93c5-fb23a4fdad0a", - "path": "pbr_1.material", - "label": "pbr_1.material", - "level": 2 - }, - { - "type": "RenderTarget", - "commandMap": {}, - "inputColor": "#ffffffff", - "sizeType": 0, - "compatibilityMode": true, - "depthType": "DEPTH24", - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "NEAREST", - "minFilter": "NEAREST", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "width": 0, - "height": 0, - "key": "RenderTarget", - "path": "RenderTarget.rdt", - "label": "RenderTarget.rdt", - "inputKey": "DeviceCameraTexture", - "input": "DeviceCameraTexture", - "level": 2 - }, - { - "type": "RenderTarget", - "commandMap": {}, - "inputColor": "#ffffffff", - "sizeType": 0, - "compatibilityMode": true, - "depthType": "DEPTH24", - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "NEAREST", - "minFilter": "NEAREST", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "width": 0, - "height": 0, - "key": "RenderTarget1", - "path": "RenderTarget_camera_1.rdt", - "label": "RenderTarget_camera_1.rdt", - "inputKey": "", - "input": "", - "inputType": "RT_InputType_Texture", - "level": 2 - }, - { - "type": "folder", - "commandMap": {}, - "key": "40cb7fb1-9775-467c-abf9-e6c2e8ceb1c4", - "label": "scripts", - "path": "scripts", - "level": 2 - }, - { - "type": "js", - "commandMap": {}, - "key": "632b0f18-9284-4f54-a0c4-f19fcb376d1a", - "path": "scripts/250.flow.js", - "label": "250.flow.js", - "level": 2, - "requireAbilities": [] - }, - { - "type": "js", - "commandMap": {}, - "key": "6113cd76-2a37-4e59-b086-062d17f5dbd7", - "path": "scripts/light.js", - "label": "light.js", - "level": 2, - "requireAbilities": [] - }, - { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "aef7f335-36c3-47cd-b0c1-7e264e4c7963", - "path": "sh.png", - "label": "sh.png", - "actualSize": 262623, - "resolution": { - "height": 2048, - "width": 1536 - }, - "level": 2, - "width": 1536, - "height": 2048 - }, - { - "type": "EnvMap_KTX", - "commandMap": {}, - "key": "3a5d9d58-1984-4d6a-8fbc-5d6b8f730360", - "path": "Soft_4TubeBank_2BlackFlags_ibl.ktx", - "label": "Soft_4TubeBank_2BlackFlags_ibl.ktx", - "level": 2 - }, - { - "type": "folder", - "commandMap": {}, - "key": "b2daeadb-127f-4c5a-940e-85475885294f", - "label": "XiKuangYanJing33-gltf", - "path": "XiKuangYanJing33-gltf", - "level": 2 - }, - { - "type": "folder", - "commandMap": {}, - "key": "e770aa26-2616-44f7-b371-b0b9344f5262", - "label": "images", - "path": "XiKuangYanJing33-gltf/images", - "level": 2 - }, - { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "99cb25ad-c641-4e16-946c-f646b5f5f780", - "path": "XiKuangYanJing33-gltf/images/XiKuangYanJing33_img0.png", - "label": "XiKuangYanJing33_img0.png", - "actualSize": 246078, - "resolution": { - "height": 1024, - "width": 1024 - }, - "level": 2, - "width": 1024, - "height": 1024 - }, - { - "type": "folder", - "commandMap": {}, - "key": "229869d2-5162-4656-95a9-d4efca5d58da", - "label": "materials", - "path": "XiKuangYanJing33-gltf/materials", - "level": 2 - }, - { - "type": "MaterialFileData", - "commandMap": {}, - "rawMaterialConfigJson": { - "ao_enable_texture_": false, - "ao_index_": -1, - "ao_sampling_channel_": "r", - "ao_strength_": 1, - "base_color_enable_texture_": false, - "base_color_factor_": [ - 0.27028611302375793, - 0.27028611302375793, - 0.27028611302375793, - 1 - ], - "base_color_index_": -1, - "base_color_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": true, - "uri_": "" - }, - "base_color_texture_premultiplied_": false, - "base_color_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "blending_": "opaque", - "clear_coat_enable_texture_": false, - "clear_coat_factor_": 0, - "clear_coat_index_": -1, - "clear_coat_normal_enable_texture_": false, - "clear_coat_normal_index_": -1, - "clear_coat_normal_scale_": 0, - "clear_coat_normal_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": false, - "uri_": "" - }, - "clear_coat_normal_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "clear_coat_roughness_enable_texture_": false, - "clear_coat_roughness_factor_": 0, - "clear_coat_roughness_index_": -1, - "clear_coat_roughness_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": false, - "uri_": "" - }, - "clear_coat_roughness_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "clear_coat_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": false, - "uri_": "" - }, - "clear_coat_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "color_write_": true, - "culling_mode_": "back", - "depth_culling_": true, - "depth_write_": true, - "double_side_": true, - "emissive_enable_texture_": false, - "emissive_enable_texture_color_multiply_": true, - "emissive_factor_": [ - 0, - 0, - 0, - 1 - ], - "emissive_index_": -1, - "emissive_strength_": 1, - "emissive_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": true, - "uri_": "" - }, - "emissive_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "flipUV_": false, - "metallic_factor_": 0, - "metallic_roughness_enable_texture_": false, - "metallic_roughness_index_": -1, - "metallic_roughness_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": false, - "uri_": "" - }, - "metallic_roughness_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "metallic_sampling_channel_": "b", - "normal_enable_g_reverse_": false, - "normal_enable_texture_": false, - "normal_index_": -1, - "normal_scale_": 1, - "normal_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": false, - "uri_": "" - }, - "normal_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "occlusion_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": false, - "uri_": "" - }, - "occlusion_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "roughness_factor_": 1, - "roughness_sampling_channel_": "g", - "shading_model_": "lit", - "specular_ambient_occlusion_": "simple", - "type_": "pbr", - "vertex_transform_": [ - 1, - 0, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 0, - 1 - ] - }, - "canEmit": true, - "materialType": "pbr", - "shader": { - "materialType": "pbr", - "baseColor": { - "value": "#444444ff", - "enableTexture": false, - "textureMapUri": "", - "texturePremultiplied": false, - "wrapModeU": "repeat", - "wrapModeV": "repeat", - "uvSet": 0 - }, - "metallicRoughnessAO": { - "enableTexture": false, - "textureMapUri": "", - "wrapModeU": "repeat", - "wrapModeV": "repeat", - "uvSet": 0, - "metallicFactor": 0, - "roughnessFactor": 1, - "metallicChannel": "b", - "roughnessChannel": "g", - "aoChannel": "r", - "aoStrength": 0 - }, - "normal": { - "enableTexture": false, - "textureMapUri": "", - "wrapModeU": "repeat", - "wrapModeV": "repeat", - "uvSet": 0, - "enableGReverse": false, - "scale": 1 - }, - "emissive": { - "value": "#000000ff", - "enableTexture": false, - "textureMapUri": "", - "wrapModeU": "repeat", - "wrapModeV": "repeat", - "uvSet": 0, - "enableTextureColorMultiply": true, - "strength": 1 - }, - "advance": { - "blending": "opaque", - "colorWrite": true, - "depthWrite": true, - "depthCulling": true, - "cullingMode": "none", - "doubleSide": true - } - }, - "lastType": "pbr", - "key": "3e5c82fa-7cf5-42bf-b493-c665de1d0a25", - "path": "XiKuangYanJing33-gltf/materials/Mat.head.material", - "label": "Mat.head.material", - "level": 2 - }, - { - "type": "MaterialFileData", - "commandMap": {}, - "rawMaterialConfigJson": { - "ao_enable_texture_": false, - "ao_index_": 0, - "ao_sampling_channel_": "r", - "ao_strength_": 1, - "base_color_enable_texture_": true, - "base_color_factor_": [ - 1, - 1, - 1, - 1 - ], - "base_color_index_": 0, - "base_color_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": true, - "uri_": "99cb25ad-c641-4e16-946c-f646b5f5f780" - }, - "base_color_texture_premultiplied_": false, - "base_color_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "blending_": "fade", - "clear_coat_enable_texture_": false, - "clear_coat_factor_": 0, - "clear_coat_index_": -1, - "clear_coat_normal_enable_texture_": false, - "clear_coat_normal_index_": -1, - "clear_coat_normal_scale_": 0, - "clear_coat_normal_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": false, - "uri_": "" - }, - "clear_coat_normal_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "clear_coat_roughness_enable_texture_": false, - "clear_coat_roughness_factor_": 0, - "clear_coat_roughness_index_": -1, - "clear_coat_roughness_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": false, - "uri_": "" - }, - "clear_coat_roughness_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "clear_coat_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": false, - "uri_": "" - }, - "clear_coat_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "color_write_": true, - "culling_mode_": "none", - "depth_culling_": true, - "depth_write_": true, - "double_side_": true, - "emissive_enable_texture_": false, - "emissive_enable_texture_color_multiply_": true, - "emissive_factor_": [ - 0, - 0, - 0, - 1, - 1 - ], - "emissive_index_": 0, - "emissive_strength_": 1, - "emissive_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": true, - "uri_": "" - }, - "emissive_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "flipUV_": false, - "metallic_factor_": 1, - "metallic_roughness_enable_texture_": false, - "metallic_roughness_index_": 0, - "metallic_roughness_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": false, - "uri_": "" - }, - "metallic_roughness_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "metallic_sampling_channel_": "b", - "normal_enable_g_reverse_": false, - "normal_enable_texture_": false, - "normal_index_": 0, - "normal_scale_": 1, - "normal_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": false, - "uri_": "" - }, - "normal_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "occlusion_texture_bind_": { - "sampler_": { - "compare_func": "le", - "compare_mode_": "none", - "mag_filter_": "linear", - "min_filter_": "linear_mipmap_linear", - "wrap_mode_r_": "repeat", - "wrap_mode_s_": "repeat", - "wrap_mode_t_": "repeat" - }, - "srgb_": false, - "uri_": "" - }, - "occlusion_uv_matrix_": [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "roughness_factor_": 0.5, - "roughness_sampling_channel_": "g", - "shading_model_": "lit", - "specular_ambient_occlusion_": "simple", - "type_": "pbr", - "vertex_transform_": [ - 1, - 0, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 0, - 1 - ] - }, - "canEmit": true, - "materialType": "pbr", - "shader": { - "materialType": "pbr", - "baseColor": { - "value": "#ffffffff", - "enableTexture": true, - "textureMapUri": "99cb25ad-c641-4e16-946c-f646b5f5f780", - "texturePremultiplied": false, - "wrapModeU": "repeat", - "wrapModeV": "repeat", - "uvSet": 0 - }, - "metallicRoughnessAO": { - "enableTexture": false, - "textureMapUri": "", - "wrapModeU": "repeat", - "wrapModeV": "repeat", - "uvSet": 0, - "metallicFactor": 1, - "roughnessFactor": 0.5, - "metallicChannel": "b", - "roughnessChannel": "g", - "aoChannel": "r", - "aoStrength": 0 - }, - "normal": { - "enableTexture": false, - "textureMapUri": "", - "wrapModeU": "repeat", - "wrapModeV": "repeat", - "uvSet": 0, - "enableGReverse": false, - "scale": 1 - }, - "emissive": { - "value": "#000000ff", - "enableTexture": false, - "textureMapUri": "", - "wrapModeU": "repeat", - "wrapModeV": "repeat", - "uvSet": 0, - "enableTextureColorMultiply": true, - "strength": 1 - }, - "advance": { - "blending": "fade", - "colorWrite": true, - "depthWrite": true, - "depthCulling": true, - "cullingMode": "none", - "doubleSide": true - } - }, - "lastType": "pbr", - "key": "470b7f69-b871-4c9f-9f8d-f0c1cf162321", - "path": "XiKuangYanJing33-gltf/materials/Mat.Route666.material", - "label": "Mat.Route666.material", - "level": 2 - }, - { - "type": "folder", - "commandMap": {}, - "key": "73085e68-38e3-4d1a-954f-3ba5d865899d", - "label": "meshes", - "path": "XiKuangYanJing33-gltf/meshes", - "level": 2 - }, - { - "type": "mesh", - "commandMap": {}, - "key": "e4ef00fa-9790-46f4-bf19-0d5ee817f61a", - "path": "XiKuangYanJing33-gltf/meshes/0_0.mesh", - "label": "0_0.mesh", - "triangleCount": 8768, - "verticesCount": 5719, - "meshSize": "230.00 KB", - "blendShapes": 0, - "level": 2 - }, - { - "type": "mesh", - "commandMap": {}, - "key": "824f9a83-5343-4685-8b7c-eb0ffd6715c3", - "path": "XiKuangYanJing33-gltf/meshes/1_0.mesh", - "label": "1_0.mesh", - "triangleCount": 109, - "verticesCount": 116, - "meshSize": "4.00 KB", - "blendShapes": 0, - "level": 2 - }, - { - "type": "modelFile_gltf", - "commandMap": {}, - "replaceMismatch": false, - "key": "aeb43bf6-6044-4121-92da-a54ae6afb32d", - "path": "XiKuangYanJing33-gltf/XiKuangYanJing33.gltf", - "label": "XiKuangYanJing33.gltf", - "level": 2 - }, - { - "type": "prefab", - "commandMap": {}, - "key": "c2fb5c84-27d4-4925-af7c-7d3609eb6900", - "path": "XiKuangYanJing33-gltf/XiKuangYanJing33.prefab", - "label": "XiKuangYanJing33.prefab", - "level": 2 - }, - { - "type": "gltf_bin", - "commandMap": {}, - "key": "3dc27d57-26c4-4086-9ad8-10f1c999b17b", - "path": "XiKuangYanJing33-gltf/XiKuangYanJing33_data.bin", - "label": "XiKuangYanJing33_data.bin", - "level": 2 - }, - { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "39edb8cb-7eb4-4b6e-a6ea-be96e095b542", - "path": "xrbd.png", - "label": "xrbd.png", - "actualSize": 146291, - "resolution": { - "height": 2048, - "width": 1536 - }, - "level": 2, - "width": 1536, - "height": 2048 - }, - { - "type": "default", - "commandMap": {}, - "key": "8ea45f32-0db3-4f94-8acb-0218ee7ac46c", - "label": "yanjing.2021-05-31-13-22-43-636Z.bak", - "path": "yanjing.2021-05-31-13-22-43-636Z.bak", - "level": 2 - }, - { - "type": "default", - "commandMap": {}, - "key": "8e2fb814-70f0-43d3-a487-bc2e07064a6b", - "label": "yanjing.2023-04-18-10-45-42-458Z.bak", - "path": "yanjing.2023-04-18-10-45-42-458Z.bak", - "level": 2 - }, - { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "0cd03468-511b-4ccf-94b4-456ce868544b", - "path": "yj.png", - "label": "yj.png", - "actualSize": 69176, - "resolution": { - "height": 2048, - "width": 1536 - }, - "level": 2, - "width": 1536, - "height": 2048 - }, - { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "bffa890c-da8a-46a8-8ab1-6dbc25b7c698", - "path": "yujinxiang.png", - "label": "yujinxiang.png", - "actualSize": 219654, - "resolution": { - "height": 512, - "width": 512 - }, - "level": 2, - "width": 512, - "height": 512 - }, - { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "966124fc-bafa-429c-96a6-72d64200f323", - "path": "zc.png", - "label": "zc.png", - "actualSize": 12276, - "resolution": { - "height": 2048, - "width": 1536 - }, - "level": 2, - "width": 1536, - "height": 2048 - }, - { - "type": "js", - "commandMap": {}, - "key": "b857be09-858e-468c-b1b3-fde724b54eb2", - "label": "studio-extension.js", - "path": "scripts/studio-extension.js", - "level": 2 - } - ] - }, - "cloudResourceData": [], - "componentLevel": 275, - "path": "/Users/brycezhang/workspace/xmagic/assets/MotionRes/3dMotionRes/video_zhixingmeigui/", - "publishStoreInfo": { - "material_id": "81n8g6vdiop38", - "material_name": "假日玫瑰", - "desc": "假日玫瑰", - "thumb": { - "thumb_URL": "https://effect-material-1251316161.cos.ap-nanjing.myqcloud.com/a48f43aa7c075c9eb1049a92b6cbcab3_4JzgJEOnvytJoc8z.png", - "thumb_height": 342, - "thumb_width": 342 - }, - "material_component_level": 240, - "platform": 3, - "type": 1, - "video_URL": "", - "thumb_list": [ - { - "thumb_URL": "https://effect-material-1251316161.cos.ap-nanjing.myqcloud.com/a48f43aa7c075c9eb1049a92b6cbcab3_4JzgJEOnvytJoc8z.png", - "thumb_height": 342, - "thumb_width": 342 - }, - { - "thumb_URL": "https://effect-material-1251316161.cos.ap-nanjing.myqcloud.com/a48f43aa7c075c9eb1049a92b6cbcab3_E9ML0OUoDvpSHxnA.png", - "thumb_height": 342, - "thumb_width": 342 - } - ], - "sdk_info": { - "version": "240", - "type": 1 - } - }, - "updateTime": "2023-04-18 18:45:46" -} \ No newline at end of file diff --git a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/yj.png b/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/yj.png deleted file mode 100644 index ac47333e..00000000 Binary files a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/yj.png and /dev/null differ diff --git a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/yujinxiang.png b/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/yujinxiang.png deleted file mode 100644 index 39d4db9e..00000000 Binary files a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/yujinxiang.png and /dev/null differ diff --git a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/zc.png b/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/zc.png deleted file mode 100644 index 895f73ff..00000000 Binary files a/application/App-UIKit/3dMotionRes.bundle/video_zhixingmeigui/zc.png and /dev/null differ diff --git a/application/App-UIKit/AppDelegate.swift b/application/App-UIKit/AppDelegate.swift deleted file mode 100644 index 6894a1f4..00000000 --- a/application/App-UIKit/AppDelegate.swift +++ /dev/null @@ -1,95 +0,0 @@ -// -// AppDelegate.swift -// App-UIKit -// -// Created by yukiwwwang on 2025/8/7. -// - -import UIKit -import TUICore -import RTCRoomEngine -import AtomicX - -#if canImport(TUICallKit_Swift) -import TUICallKit_Swift -#elseif canImport(TUICallKit) -import TUICallKit -#endif - -@main -class AppDelegate: UIResponder, UIApplicationDelegate { - func initKaraokeConfig() { - KaraokeConfig.shared.updateConfig(SDKAPPID: Int32(SDKAPPID), SECRETKEY: SECRETKEY) - } - - func application(_ application: UIApplication, - didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { - loadThemeConfiguration() - initKaraokeConfig() - - NotificationCenter.default.addObserver(self, - selector: #selector(configIfLoggedIn(_:)), - name: Notification.Name("TUILoginSuccessNotification"), - object: nil) - - TUIGlobalization.enableLanguageHook() - - return true - } - - private func loadThemeConfiguration() { - let success = ThemeConfigLoader.shared.loadFromMainBundle(fileName: "appConfig") - - if success { - let theme = ThemeStore.shared.currentTheme - } else { - ThemeStore.shared.setMode(.dark) - ThemeStore.shared.setPrimaryColor("1C66E5") - } - } - - // MARK: UISceneSession Lifecycle - - func application(_ application: UIApplication, - configurationForConnecting connectingSceneSession: UISceneSession, - options: UIScene.ConnectionOptions) -> UISceneConfiguration { - // Called when a new scene session is being created. - // Use this method to select a configuration to create the new scene with. - return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) - } - - func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) { - } - - func showMainViewController() { - let mainViewController = MainViewController() - let rootVC = AppNavigationController(rootViewController: mainViewController) - - if let keyWindow = SceneDelegate.getCurrentWindow() { - keyWindow.rootViewController = rootVC - keyWindow.makeKeyAndVisible() - } else { - debugPrint("window show MainViewController error") - } - } - - func showLoginViewController() { - let loginVC = LoginViewController() - let nav = AppNavigationController(rootViewController: loginVC) - if let keyWindow = SceneDelegate.getCurrentWindow() { - keyWindow.rootViewController = nav - keyWindow.makeKeyAndVisible() - } - else { - debugPrint("window error") - } - } - - @objc func configIfLoggedIn(_ notification: Notification) { - DispatchQueue.main.async { - TUICallKit.createInstance().enableFloatWindow(enable: SettingsConfig.share.floatWindow) - TUICallKit.createInstance().enableIncomingBanner(enable: SettingsConfig.share.enableIncomingBanner) - TUICallKit.createInstance().enableAITranscriber(enable: SettingsConfig.share.enableAITranscriber) - } - } -} diff --git a/application/App-UIKit/AppNavigationController.swift b/application/App-UIKit/AppNavigationController.swift deleted file mode 100644 index 39560aae..00000000 --- a/application/App-UIKit/AppNavigationController.swift +++ /dev/null @@ -1,29 +0,0 @@ -// -// AppNavigationController.swift -// App-UIKit -// -// Created by yukiwwwang on 2025/8/11. -// - -import UIKit - -class AppNavigationController: UINavigationController { - override init(rootViewController: UIViewController) { - super.init(rootViewController: rootViewController) - } - - required init?(coder aDecoder: NSCoder) { - fatalError("init(coder:) has not been implemented") - } - - override var supportedInterfaceOrientations: UIInterfaceOrientationMask { - guard let supportedInterfaceOrientations = - topViewController?.supportedInterfaceOrientations as? UIInterfaceOrientationMask - else { return .portrait } - return supportedInterfaceOrientations - } - override var shouldAutorotate: Bool { - guard let shouldAutorotate = topViewController?.shouldAutorotate else { return false } - return shouldAutorotate - } -} diff --git a/application/App-UIKit/Assets.xcassets/AppIcon.appiconset/Contents.json b/application/App-UIKit/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index d10e7913..00000000 --- a/application/App-UIKit/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "images" : [ - { - "filename" : "Icon-Notification@2x.png", - "idiom" : "iphone", - "scale" : "2x", - "size" : "20x20" - }, - { - "filename" : "Icon-Notification@3x.png", - "idiom" : "iphone", - "scale" : "3x", - "size" : "20x20" - }, - { - "filename" : "Icon-Small@2x.png", - "idiom" : "iphone", - "scale" : "2x", - "size" : "29x29" - }, - { - "filename" : "Icon-Small@3x.png", - "idiom" : "iphone", - "scale" : "3x", - "size" : "29x29" - }, - { - "filename" : "Icon-Small-40@2x.png", - "idiom" : "iphone", - "scale" : "2x", - "size" : "40x40" - }, - { - "filename" : "Icon-Small-40@3x.png", - "idiom" : "iphone", - "scale" : "3x", - "size" : "40x40" - }, - { - "filename" : "Icon-60@2x.png", - "idiom" : "iphone", - "scale" : "2x", - "size" : "60x60" - }, - { - "filename" : "Icon-60@3x.png", - "idiom" : "iphone", - "scale" : "3x", - "size" : "60x60" - }, - { - "filename" : "icon.png", - "idiom" : "ios-marketing", - "scale" : "1x", - "size" : "1024x1024" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/application/App-UIKit/Assets.xcassets/LaunchImage.imageset/Contents.json b/application/App-UIKit/Assets.xcassets/LaunchImage.imageset/Contents.json deleted file mode 100644 index 6cfc27a9..00000000 --- a/application/App-UIKit/Assets.xcassets/LaunchImage.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images" : [ - { - "filename" : "LaunchImage@2x 1.png", - "idiom" : "universal", - "scale" : "1x" - }, - { - "filename" : "LaunchImage@2x.png", - "idiom" : "universal", - "scale" : "2x" - }, - { - "filename" : "LaunchImage@3x.png", - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/application/App-UIKit/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x 1.png b/application/App-UIKit/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x 1.png deleted file mode 100644 index 35089ff5..00000000 Binary files a/application/App-UIKit/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x 1.png and /dev/null differ diff --git a/application/App-UIKit/Assets.xcassets/LaunchImage_en.imageset/Contents.json b/application/App-UIKit/Assets.xcassets/LaunchImage_en.imageset/Contents.json deleted file mode 100644 index 6ea25992..00000000 --- a/application/App-UIKit/Assets.xcassets/LaunchImage_en.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images" : [ - { - "filename" : "LaunchImage_en@2x 1.png", - "idiom" : "universal", - "scale" : "1x" - }, - { - "filename" : "LaunchImage_en@2x.png", - "idiom" : "universal", - "scale" : "2x" - }, - { - "filename" : "LaunchImage_en@3x.png", - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/application/App-UIKit/Assets.xcassets/LaunchImage_en.imageset/LaunchImage_en@2x 1.png b/application/App-UIKit/Assets.xcassets/LaunchImage_en.imageset/LaunchImage_en@2x 1.png deleted file mode 100644 index 5f93be83..00000000 Binary files a/application/App-UIKit/Assets.xcassets/LaunchImage_en.imageset/LaunchImage_en@2x 1.png and /dev/null differ diff --git a/application/App-UIKit/Assets.xcassets/back.imageset/Contents.json b/application/App-UIKit/Assets.xcassets/back.imageset/Contents.json deleted file mode 100644 index 40f1b49e..00000000 --- a/application/App-UIKit/Assets.xcassets/back.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images" : [ - { - "filename" : "tuiroom_back.png", - "idiom" : "universal", - "scale" : "1x" - }, - { - "filename" : "tuiroom_back@2x.png", - "idiom" : "universal", - "scale" : "2x" - }, - { - "filename" : "tuiroom_back@3x.png", - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/application/App-UIKit/Assets.xcassets/create_conference.imageset/Contents.json b/application/App-UIKit/Assets.xcassets/create_conference.imageset/Contents.json deleted file mode 100644 index 7a69a05e..00000000 --- a/application/App-UIKit/Assets.xcassets/create_conference.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images" : [ - { - "filename" : "create_conference.png", - "idiom" : "universal", - "scale" : "1x" - }, - { - "filename" : "create_conference@2x.png", - "idiom" : "universal", - "scale" : "2x" - }, - { - "filename" : "create_conference@3x.png", - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/application/App-UIKit/Assets.xcassets/create_conference.imageset/create_conference.png b/application/App-UIKit/Assets.xcassets/create_conference.imageset/create_conference.png deleted file mode 100644 index ecee7d49..00000000 Binary files a/application/App-UIKit/Assets.xcassets/create_conference.imageset/create_conference.png and /dev/null differ diff --git a/application/App-UIKit/Assets.xcassets/create_conference.imageset/create_conference@2x.png b/application/App-UIKit/Assets.xcassets/create_conference.imageset/create_conference@2x.png deleted file mode 100644 index ba6028fe..00000000 Binary files a/application/App-UIKit/Assets.xcassets/create_conference.imageset/create_conference@2x.png and /dev/null differ diff --git a/application/App-UIKit/Assets.xcassets/create_conference.imageset/create_conference@3x.png b/application/App-UIKit/Assets.xcassets/create_conference.imageset/create_conference@3x.png deleted file mode 100644 index c0e92dd4..00000000 Binary files a/application/App-UIKit/Assets.xcassets/create_conference.imageset/create_conference@3x.png and /dev/null differ diff --git a/application/App-UIKit/Assets.xcassets/debug.imageset/Contents.json b/application/App-UIKit/Assets.xcassets/debug.imageset/Contents.json deleted file mode 100644 index 3c867249..00000000 --- a/application/App-UIKit/Assets.xcassets/debug.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "scale" : "1x" - }, - { - "filename" : "debug.png", - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/application/App-UIKit/Assets.xcassets/debug.imageset/debug.png b/application/App-UIKit/Assets.xcassets/debug.imageset/debug.png deleted file mode 100644 index 3499c944..00000000 Binary files a/application/App-UIKit/Assets.xcassets/debug.imageset/debug.png and /dev/null differ diff --git a/application/App-UIKit/Assets.xcassets/default_avatar.imageset/Contents.json b/application/App-UIKit/Assets.xcassets/default_avatar.imageset/Contents.json deleted file mode 100644 index 4070610f..00000000 --- a/application/App-UIKit/Assets.xcassets/default_avatar.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images" : [ - { - "filename" : "default_avatar.png", - "idiom" : "universal", - "scale" : "1x" - }, - { - "filename" : "default_avatar@2x.png", - "idiom" : "universal", - "scale" : "2x" - }, - { - "filename" : "default_avatar@3x.png", - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/application/App-UIKit/Assets.xcassets/enter_conference.imageset/Contents.json b/application/App-UIKit/Assets.xcassets/enter_conference.imageset/Contents.json deleted file mode 100644 index 957451ed..00000000 --- a/application/App-UIKit/Assets.xcassets/enter_conference.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images" : [ - { - "filename" : "enter_conference.png", - "idiom" : "universal", - "scale" : "1x" - }, - { - "filename" : "enter_conference@2x.png", - "idiom" : "universal", - "scale" : "2x" - }, - { - "filename" : "enter_conference@3x.png", - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/application/App-UIKit/Assets.xcassets/enter_conference.imageset/enter_conference.png b/application/App-UIKit/Assets.xcassets/enter_conference.imageset/enter_conference.png deleted file mode 100644 index 0c75275c..00000000 Binary files a/application/App-UIKit/Assets.xcassets/enter_conference.imageset/enter_conference.png and /dev/null differ diff --git a/application/App-UIKit/Assets.xcassets/enter_conference.imageset/enter_conference@2x.png b/application/App-UIKit/Assets.xcassets/enter_conference.imageset/enter_conference@2x.png deleted file mode 100644 index b0b46770..00000000 Binary files a/application/App-UIKit/Assets.xcassets/enter_conference.imageset/enter_conference@2x.png and /dev/null differ diff --git a/application/App-UIKit/Assets.xcassets/enter_conference.imageset/enter_conference@3x.png b/application/App-UIKit/Assets.xcassets/enter_conference.imageset/enter_conference@3x.png deleted file mode 100644 index 7c399307..00000000 Binary files a/application/App-UIKit/Assets.xcassets/enter_conference.imageset/enter_conference@3x.png and /dev/null differ diff --git a/application/App-UIKit/Assets.xcassets/help_small.imageset/Contents.json b/application/App-UIKit/Assets.xcassets/help_small.imageset/Contents.json deleted file mode 100644 index eac027cd..00000000 --- a/application/App-UIKit/Assets.xcassets/help_small.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "scale" : "1x" - }, - { - "filename" : "livekit_ic_question_link.png", - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/application/App-UIKit/Assets.xcassets/leave_icon.imageset/Contents.json b/application/App-UIKit/Assets.xcassets/leave_icon.imageset/Contents.json deleted file mode 100644 index fe048f08..00000000 --- a/application/App-UIKit/Assets.xcassets/leave_icon.imageset/Contents.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "images" : [ - { - "filename" : "leave_icon.pdf", - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/application/App-UIKit/Assets.xcassets/leave_icon.imageset/leave_icon.pdf b/application/App-UIKit/Assets.xcassets/leave_icon.imageset/leave_icon.pdf deleted file mode 100644 index 8f2eb566..00000000 Binary files a/application/App-UIKit/Assets.xcassets/leave_icon.imageset/leave_icon.pdf and /dev/null differ diff --git a/application/App-UIKit/Assets.xcassets/liveList_normal.imageset/Contents.json b/application/App-UIKit/Assets.xcassets/liveList_normal.imageset/Contents.json deleted file mode 100644 index f3d72b6e..00000000 --- a/application/App-UIKit/Assets.xcassets/liveList_normal.imageset/Contents.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "images" : [ - { - "filename" : "liveList_normal.pdf", - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/application/App-UIKit/Assets.xcassets/liveList_normal.imageset/liveList_normal.pdf b/application/App-UIKit/Assets.xcassets/liveList_normal.imageset/liveList_normal.pdf deleted file mode 100644 index fe8b4414..00000000 Binary files a/application/App-UIKit/Assets.xcassets/liveList_normal.imageset/liveList_normal.pdf and /dev/null differ diff --git a/application/App-UIKit/Assets.xcassets/liveList_selected.imageset/Contents.json b/application/App-UIKit/Assets.xcassets/liveList_selected.imageset/Contents.json deleted file mode 100644 index ffdb8e4a..00000000 --- a/application/App-UIKit/Assets.xcassets/liveList_selected.imageset/Contents.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "images" : [ - { - "filename" : "liveList_selected.pdf", - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/application/App-UIKit/Assets.xcassets/liveList_selected.imageset/liveList_selected.pdf b/application/App-UIKit/Assets.xcassets/liveList_selected.imageset/liveList_selected.pdf deleted file mode 100644 index 417134f0..00000000 Binary files a/application/App-UIKit/Assets.xcassets/liveList_selected.imageset/liveList_selected.pdf and /dev/null differ diff --git a/application/App-UIKit/Assets.xcassets/livekit_ic_add.imageset/Contents.json b/application/App-UIKit/Assets.xcassets/livekit_ic_add.imageset/Contents.json deleted file mode 100644 index 39d89988..00000000 --- a/application/App-UIKit/Assets.xcassets/livekit_ic_add.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "filename" : "livekit_ic_add.png", - "idiom" : "universal", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/application/App-UIKit/Assets.xcassets/main_arrow.imageset/Contents.json b/application/App-UIKit/Assets.xcassets/main_arrow.imageset/Contents.json deleted file mode 100644 index 05ffc045..00000000 --- a/application/App-UIKit/Assets.xcassets/main_arrow.imageset/Contents.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "scale" : "1x" - }, - { - "filename" : "main_arrow@2x.png", - "idiom" : "universal", - "scale" : "2x" - }, - { - "filename" : "main_arrow@3x.png", - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/application/App-UIKit/Assets.xcassets/main_item_video_live.imageset/Contents.json b/application/App-UIKit/Assets.xcassets/main_item_video_live.imageset/Contents.json deleted file mode 100644 index 0d53d09f..00000000 --- a/application/App-UIKit/Assets.xcassets/main_item_video_live.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "scale" : "1x" - }, - { - "filename" : "main_item_video_live@2x.png", - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/application/App-UIKit/Assets.xcassets/main_item_video_live.imageset/main_item_video_live@2x.png b/application/App-UIKit/Assets.xcassets/main_item_video_live.imageset/main_item_video_live@2x.png deleted file mode 100644 index a8e1e43a..00000000 Binary files a/application/App-UIKit/Assets.xcassets/main_item_video_live.imageset/main_item_video_live@2x.png and /dev/null differ diff --git a/application/App-UIKit/Assets.xcassets/main_item_voice_room.imageset/Contents.json b/application/App-UIKit/Assets.xcassets/main_item_voice_room.imageset/Contents.json deleted file mode 100644 index abde007b..00000000 --- a/application/App-UIKit/Assets.xcassets/main_item_voice_room.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "scale" : "1x" - }, - { - "filename" : "main_item_voice_room@2x.png", - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/application/App-UIKit/Assets.xcassets/main_item_voice_room.imageset/main_item_voice_room@2x.png b/application/App-UIKit/Assets.xcassets/main_item_voice_room.imageset/main_item_voice_room@2x.png deleted file mode 100644 index 58caa4f0..00000000 Binary files a/application/App-UIKit/Assets.xcassets/main_item_voice_room.imageset/main_item_voice_room@2x.png and /dev/null differ diff --git a/application/App-UIKit/Assets.xcassets/main_live.imageset/Contents.json b/application/App-UIKit/Assets.xcassets/main_live.imageset/Contents.json deleted file mode 100644 index 41dd81b4..00000000 --- a/application/App-UIKit/Assets.xcassets/main_live.imageset/Contents.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "scale" : "1x" - }, - { - "filename" : "main_livekit@2x.png", - "idiom" : "universal", - "scale" : "2x" - }, - { - "filename" : "main_livekit@3x.png", - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/application/App-UIKit/Assets.xcassets/main_mine_nor.imageset/Contents.json b/application/App-UIKit/Assets.xcassets/main_mine_nor.imageset/Contents.json deleted file mode 100644 index 5ae54090..00000000 --- a/application/App-UIKit/Assets.xcassets/main_mine_nor.imageset/Contents.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "scale" : "1x" - }, - { - "filename" : "main_mine_nor@2x.png", - "idiom" : "universal", - "scale" : "2x" - }, - { - "filename" : "main_mine_nor@3x.png", - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/application/App-UIKit/Assets.xcassets/main_nav_logo.imageset/Contents.json b/application/App-UIKit/Assets.xcassets/main_nav_logo.imageset/Contents.json deleted file mode 100644 index 80198c86..00000000 --- a/application/App-UIKit/Assets.xcassets/main_nav_logo.imageset/Contents.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "images" : [ - { - "filename" : "main_nav_logo.png", - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/application/App-UIKit/Assets.xcassets/main_nav_logo.imageset/main_nav_logo.png b/application/App-UIKit/Assets.xcassets/main_nav_logo.imageset/main_nav_logo.png deleted file mode 100644 index c2413caf..00000000 Binary files a/application/App-UIKit/Assets.xcassets/main_nav_logo.imageset/main_nav_logo.png and /dev/null differ diff --git a/application/App-UIKit/Assets.xcassets/me_normal.imageset/Contents.json b/application/App-UIKit/Assets.xcassets/me_normal.imageset/Contents.json deleted file mode 100644 index e245adee..00000000 --- a/application/App-UIKit/Assets.xcassets/me_normal.imageset/Contents.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "images" : [ - { - "filename" : "me.pdf", - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/application/App-UIKit/Assets.xcassets/me_normal.imageset/me.pdf b/application/App-UIKit/Assets.xcassets/me_normal.imageset/me.pdf deleted file mode 100644 index c9b4b520..00000000 Binary files a/application/App-UIKit/Assets.xcassets/me_normal.imageset/me.pdf and /dev/null differ diff --git a/application/App-UIKit/Assets.xcassets/me_selected.imageset/Contents.json b/application/App-UIKit/Assets.xcassets/me_selected.imageset/Contents.json deleted file mode 100644 index 79e5b154..00000000 --- a/application/App-UIKit/Assets.xcassets/me_selected.imageset/Contents.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "images" : [ - { - "filename" : "me_selected.pdf", - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/application/App-UIKit/Assets.xcassets/me_selected.imageset/me_selected.pdf b/application/App-UIKit/Assets.xcassets/me_selected.imageset/me_selected.pdf deleted file mode 100644 index 679365d2..00000000 Binary files a/application/App-UIKit/Assets.xcassets/me_selected.imageset/me_selected.pdf and /dev/null differ diff --git a/application/App-UIKit/Assets.xcassets/mine_bg_icon.imageset/Contents.json b/application/App-UIKit/Assets.xcassets/mine_bg_icon.imageset/Contents.json deleted file mode 100644 index 2bcbdb25..00000000 --- a/application/App-UIKit/Assets.xcassets/mine_bg_icon.imageset/Contents.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "scale" : "1x" - }, - { - "filename" : "mine_bg_icon@2x.png", - "idiom" : "universal", - "scale" : "2x" - }, - { - "filename" : "mine_bg_icon@3x.png", - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/application/App-UIKit/Assets.xcassets/mine_log.imageset/Contents.json b/application/App-UIKit/Assets.xcassets/mine_log.imageset/Contents.json deleted file mode 100644 index e210710d..00000000 --- a/application/App-UIKit/Assets.xcassets/mine_log.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images" : [ - { - "filename" : "mine_log.png", - "idiom" : "universal", - "scale" : "1x" - }, - { - "filename" : "mine_log@2x.png", - "idiom" : "universal", - "scale" : "2x" - }, - { - "filename" : "mine_log@3x.png", - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/application/App-UIKit/Assets.xcassets/mine_log.imageset/mine_log.png b/application/App-UIKit/Assets.xcassets/mine_log.imageset/mine_log.png deleted file mode 100644 index 0ff94626..00000000 Binary files a/application/App-UIKit/Assets.xcassets/mine_log.imageset/mine_log.png and /dev/null differ diff --git a/application/App-UIKit/Assets.xcassets/mine_log.imageset/mine_log@2x.png b/application/App-UIKit/Assets.xcassets/mine_log.imageset/mine_log@2x.png deleted file mode 100644 index 0ff94626..00000000 Binary files a/application/App-UIKit/Assets.xcassets/mine_log.imageset/mine_log@2x.png and /dev/null differ diff --git a/application/App-UIKit/Assets.xcassets/mine_log.imageset/mine_log@3x.png b/application/App-UIKit/Assets.xcassets/mine_log.imageset/mine_log@3x.png deleted file mode 100644 index 0ff94626..00000000 Binary files a/application/App-UIKit/Assets.xcassets/mine_log.imageset/mine_log@3x.png and /dev/null differ diff --git a/application/App-UIKit/Assets.xcassets/mine_setting.imageset/Contents.json b/application/App-UIKit/Assets.xcassets/mine_setting.imageset/Contents.json deleted file mode 100644 index 18e7fd1f..00000000 --- a/application/App-UIKit/Assets.xcassets/mine_setting.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images" : [ - { - "filename" : "mine_settings.png", - "idiom" : "universal", - "scale" : "1x" - }, - { - "filename" : "mine_settings@2x.png", - "idiom" : "universal", - "scale" : "2x" - }, - { - "filename" : "mine_settings@3x.png", - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/application/App-UIKit/Assets.xcassets/mine_setting.imageset/mine_settings.png b/application/App-UIKit/Assets.xcassets/mine_setting.imageset/mine_settings.png deleted file mode 100644 index 9dff21d6..00000000 Binary files a/application/App-UIKit/Assets.xcassets/mine_setting.imageset/mine_settings.png and /dev/null differ diff --git a/application/App-UIKit/Assets.xcassets/mine_setting.imageset/mine_settings@2x.png b/application/App-UIKit/Assets.xcassets/mine_setting.imageset/mine_settings@2x.png deleted file mode 100644 index 9dff21d6..00000000 Binary files a/application/App-UIKit/Assets.xcassets/mine_setting.imageset/mine_settings@2x.png and /dev/null differ diff --git a/application/App-UIKit/Assets.xcassets/mine_setting.imageset/mine_settings@3x.png b/application/App-UIKit/Assets.xcassets/mine_setting.imageset/mine_settings@3x.png deleted file mode 100644 index 9dff21d6..00000000 Binary files a/application/App-UIKit/Assets.xcassets/mine_setting.imageset/mine_settings@3x.png and /dev/null differ diff --git a/application/App-UIKit/Assets.xcassets/placeholder_avatar.imageset/Contents.json b/application/App-UIKit/Assets.xcassets/placeholder_avatar.imageset/Contents.json deleted file mode 100644 index e336bed1..00000000 --- a/application/App-UIKit/Assets.xcassets/placeholder_avatar.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images" : [ - { - "filename" : "voiceroom_placeholder_avatar.png", - "idiom" : "universal", - "scale" : "1x" - }, - { - "filename" : "voiceroom_placeholder_avatar@2x.png", - "idiom" : "universal", - "scale" : "2x" - }, - { - "filename" : "voiceroom_placeholder_avatar@3x.png", - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/application/App-UIKit/Assets.xcassets/placeholder_avatar.imageset/voiceroom_placeholder_avatar.png b/application/App-UIKit/Assets.xcassets/placeholder_avatar.imageset/voiceroom_placeholder_avatar.png deleted file mode 100644 index 7efbff89..00000000 Binary files a/application/App-UIKit/Assets.xcassets/placeholder_avatar.imageset/voiceroom_placeholder_avatar.png and /dev/null differ diff --git a/application/App-UIKit/Assets.xcassets/placeholder_avatar.imageset/voiceroom_placeholder_avatar@2x.png b/application/App-UIKit/Assets.xcassets/placeholder_avatar.imageset/voiceroom_placeholder_avatar@2x.png deleted file mode 100644 index 12d7c675..00000000 Binary files a/application/App-UIKit/Assets.xcassets/placeholder_avatar.imageset/voiceroom_placeholder_avatar@2x.png and /dev/null differ diff --git a/application/App-UIKit/Assets.xcassets/placeholder_avatar.imageset/voiceroom_placeholder_avatar@3x.png b/application/App-UIKit/Assets.xcassets/placeholder_avatar.imageset/voiceroom_placeholder_avatar@3x.png deleted file mode 100644 index f3afc4c2..00000000 Binary files a/application/App-UIKit/Assets.xcassets/placeholder_avatar.imageset/voiceroom_placeholder_avatar@3x.png and /dev/null differ diff --git a/application/App-UIKit/Assets.xcassets/room_back_white.imageset/Contents.json b/application/App-UIKit/Assets.xcassets/room_back_white.imageset/Contents.json deleted file mode 100644 index 78091196..00000000 --- a/application/App-UIKit/Assets.xcassets/room_back_white.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images" : [ - { - "filename" : "roomBack.png", - "idiom" : "universal", - "scale" : "1x" - }, - { - "filename" : "roomBack@2x.png", - "idiom" : "universal", - "scale" : "2x" - }, - { - "filename" : "roomBack@3x.png", - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/application/App-UIKit/Assets.xcassets/room_back_white.imageset/roomBack.png b/application/App-UIKit/Assets.xcassets/room_back_white.imageset/roomBack.png deleted file mode 100644 index e9fd3f6d..00000000 Binary files a/application/App-UIKit/Assets.xcassets/room_back_white.imageset/roomBack.png and /dev/null differ diff --git a/application/App-UIKit/Assets.xcassets/room_back_white.imageset/roomBack@2x.png b/application/App-UIKit/Assets.xcassets/room_back_white.imageset/roomBack@2x.png deleted file mode 100644 index 8dc0ca30..00000000 Binary files a/application/App-UIKit/Assets.xcassets/room_back_white.imageset/roomBack@2x.png and /dev/null differ diff --git a/application/App-UIKit/Assets.xcassets/room_back_white.imageset/roomBack@3x.png b/application/App-UIKit/Assets.xcassets/room_back_white.imageset/roomBack@3x.png deleted file mode 100644 index 578ef1d4..00000000 Binary files a/application/App-UIKit/Assets.xcassets/room_back_white.imageset/roomBack@3x.png and /dev/null differ diff --git a/application/App-UIKit/Assets.xcassets/room_drop_down.imageset/Contents.json b/application/App-UIKit/Assets.xcassets/room_drop_down.imageset/Contents.json deleted file mode 100644 index d5a6e513..00000000 --- a/application/App-UIKit/Assets.xcassets/room_drop_down.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images" : [ - { - "filename" : "dropDown.png", - "idiom" : "universal", - "scale" : "1x" - }, - { - "filename" : "dropDown@2x.png", - "idiom" : "universal", - "scale" : "2x" - }, - { - "filename" : "dropDown@3x.png", - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/application/App-UIKit/Assets.xcassets/room_drop_down.imageset/dropDown.png b/application/App-UIKit/Assets.xcassets/room_drop_down.imageset/dropDown.png deleted file mode 100644 index df7d5917..00000000 Binary files a/application/App-UIKit/Assets.xcassets/room_drop_down.imageset/dropDown.png and /dev/null differ diff --git a/application/App-UIKit/Assets.xcassets/room_drop_down.imageset/dropDown@2x.png b/application/App-UIKit/Assets.xcassets/room_drop_down.imageset/dropDown@2x.png deleted file mode 100644 index 47761465..00000000 Binary files a/application/App-UIKit/Assets.xcassets/room_drop_down.imageset/dropDown@2x.png and /dev/null differ diff --git a/application/App-UIKit/Assets.xcassets/room_drop_down.imageset/dropDown@3x.png b/application/App-UIKit/Assets.xcassets/room_drop_down.imageset/dropDown@3x.png deleted file mode 100644 index 018218e8..00000000 Binary files a/application/App-UIKit/Assets.xcassets/room_drop_down.imageset/dropDown@3x.png and /dev/null differ diff --git a/application/App-UIKit/Assets.xcassets/schedule_conference.imageset/Contents.json b/application/App-UIKit/Assets.xcassets/schedule_conference.imageset/Contents.json deleted file mode 100644 index d2894473..00000000 --- a/application/App-UIKit/Assets.xcassets/schedule_conference.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images" : [ - { - "filename" : "schedule_conference.png", - "idiom" : "universal", - "scale" : "1x" - }, - { - "filename" : "schedule_conference@2x.png", - "idiom" : "universal", - "scale" : "2x" - }, - { - "filename" : "schedule_conference@3x.png", - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/application/App-UIKit/Assets.xcassets/schedule_conference.imageset/schedule_conference.png b/application/App-UIKit/Assets.xcassets/schedule_conference.imageset/schedule_conference.png deleted file mode 100644 index 5979eaa9..00000000 Binary files a/application/App-UIKit/Assets.xcassets/schedule_conference.imageset/schedule_conference.png and /dev/null differ diff --git a/application/App-UIKit/Assets.xcassets/schedule_conference.imageset/schedule_conference@2x.png b/application/App-UIKit/Assets.xcassets/schedule_conference.imageset/schedule_conference@2x.png deleted file mode 100644 index c563d930..00000000 Binary files a/application/App-UIKit/Assets.xcassets/schedule_conference.imageset/schedule_conference@2x.png and /dev/null differ diff --git a/application/App-UIKit/Assets.xcassets/schedule_conference.imageset/schedule_conference@3x.png b/application/App-UIKit/Assets.xcassets/schedule_conference.imageset/schedule_conference@3x.png deleted file mode 100644 index 0b8f560f..00000000 Binary files a/application/App-UIKit/Assets.xcassets/schedule_conference.imageset/schedule_conference@3x.png and /dev/null differ diff --git a/application/App-UIKit/Assets.xcassets/tencent_cloud.imageset/Contents.json b/application/App-UIKit/Assets.xcassets/tencent_cloud.imageset/Contents.json deleted file mode 100644 index 8e53b77c..00000000 --- a/application/App-UIKit/Assets.xcassets/tencent_cloud.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "filename" : "tencent_cloud.png", - "idiom" : "universal", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/application/App-UIKit/Assets.xcassets/tencent_cloud.imageset/tencent_cloud.png b/application/App-UIKit/Assets.xcassets/tencent_cloud.imageset/tencent_cloud.png deleted file mode 100644 index 987e283f..00000000 Binary files a/application/App-UIKit/Assets.xcassets/tencent_cloud.imageset/tencent_cloud.png and /dev/null differ diff --git a/application/App-UIKit/Base.lproj/Main.storyboard b/application/App-UIKit/Base.lproj/Main.storyboard deleted file mode 100644 index 25a76385..00000000 --- a/application/App-UIKit/Base.lproj/Main.storyboard +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/application/App-UIKit/Call/CallSettings/SettingsConfig.swift b/application/App-UIKit/Call/CallSettings/SettingsConfig.swift deleted file mode 100644 index a1d9abef..00000000 --- a/application/App-UIKit/Call/CallSettings/SettingsConfig.swift +++ /dev/null @@ -1,62 +0,0 @@ -// -// SettingsConfig.swift -// App-UIKit -// -// Created by yukiwwwang on 2025/8/13. -// - -import Foundation -import TUICore -import RTCRoomEngine - -#if canImport(TUICallKit_Swift) -import TUICallKit_Swift -#elseif canImport(TUICallKit) -import TUICallKit -#endif - -class SettingsConfig { - - static let share = SettingsConfig() - - var userId = "" - var avatar = "" - var name = "" - var ringUrl = "" - - var mute: Bool = false - var floatWindow: Bool = true - var enableVirtualBackground: Bool = true - var enableIncomingBanner: Bool = true - var enableAITranscriber: Bool = true - var intRoomId: UInt32 = 0 - var strRoomId: String = "" - var timeout: Int = 30 - var userData: String = "" - let pushInfo: TUIOfflinePushInfo = { - let pushInfo: TUIOfflinePushInfo = TUIOfflinePushInfo() - pushInfo.title = "NEW CALL" - pushInfo.desc = "You have a new call invitation!" - // iOS push type: if you want user VoIP, please modify type to TUICallIOSOfflinePushTypeVoIP - pushInfo.iOSPushType = .apns - pushInfo.ignoreIOSBadge = false - pushInfo.iOSSound = "phone_ringing.mp3" - pushInfo.androidSound = "phone_ringing" - // OPPO must set a ChannelID to receive push messages. This channelID needs to be the same as the console. - pushInfo.androidOPPOChannelID = "tuikit" - // FCM channel ID, you need change PrivateConstants.java and set "fcmPushChannelId" - pushInfo.androidFCMChannelID = "fcm_push_channel" - // VIVO message type: 0-push message, 1-System message(have a higher delivery rate) - pushInfo.androidVIVOClassification = 1 - // HuaWei message type: https://developer.huawei.com/consumer/cn/doc/development/HMSCore-Guides/message-classification-0000001149358835 - pushInfo.androidHuaWeiCategory = "IM" - return pushInfo - }() - var resolution: TUIVideoEncoderParamsResolution = ._1280_720 - var resolutionMode: TUIVideoEncoderParamsResolutionMode = .portrait - var rotation: TUIVideoRenderParamsRotation = ._0 - var fillMode: TUIVideoRenderParamsFillMode = .fill - var beautyLevel: Int = 6 - var is1VN: Bool = true - var screenOrientation: Int = 0 -} diff --git a/application/App-UIKit/Info.plist b/application/App-UIKit/Info.plist deleted file mode 100644 index 123e13bf..00000000 --- a/application/App-UIKit/Info.plist +++ /dev/null @@ -1,53 +0,0 @@ - - - - - CFBundleVersion - 1 - CFBundleShortVersionString - 1.0.0 - NSAppTransportSecurity - - NSAllowsArbitraryLoads - - - NSCameraUsageDescription - TUILiveKit需要访问你的相机权限,开启后录制的视频才会有画面 - NSMicrophoneUsageDescription - TUILiveKit需要访问您的麦克风权限,开启后录制的视频才会有声音 - NSPhotoLibraryUsageDescription - TUILiveKit需要访问你的相册 - UIApplicationSceneManifest - - UIApplicationSupportsMultipleScenes - - UISceneConfigurations - - UIWindowSceneSessionRoleApplication - - - UILaunchStoryboardName - LaunchScreen - UISceneConfigurationName - Default Configuration - UISceneDelegateClassName - $(PRODUCT_MODULE_NAME).SceneDelegate - UISceneStoryboardFile - Main - - - - - UIBackgroundModes - - audio - voip - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - - diff --git a/application/App-UIKit/LaunchScreen.storyboard b/application/App-UIKit/LaunchScreen.storyboard deleted file mode 100644 index 0694c46f..00000000 --- a/application/App-UIKit/LaunchScreen.storyboard +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/application/App-UIKit/Live/LiveViewController.swift b/application/App-UIKit/Live/LiveViewController.swift deleted file mode 100644 index 277a070f..00000000 --- a/application/App-UIKit/Live/LiveViewController.swift +++ /dev/null @@ -1,133 +0,0 @@ -// -// LiveViewController.swift -// App-UIKit -// -// Created by yukiwwwang on 2025/8/8. -// - -import UIKit -import TUICore - -class LiveViewController: UIViewController { - - private var menuItems: [LiveMainItemModel] = [] - - private let backButton: UIButton = { - let button = UIButton(type: .system) - button.setImage(UIImage(named: "back"), for: .normal) - button.tintColor = .black - return button - }() - - private lazy var collectionView: UICollectionView = { - let flowLayout = UICollectionViewFlowLayout() - flowLayout.sectionInset = UIEdgeInsets(top: 20.scale375Height(), left: 20.scale375(), bottom: 0, right: 20.scale375()) - flowLayout.minimumLineSpacing = 16.scale375Height() - flowLayout.minimumInteritemSpacing = 0 - let collectionView = UICollectionView(frame: .zero, collectionViewLayout: flowLayout) - collectionView.register(LiveMainCollectionCell.self, - forCellWithReuseIdentifier: LiveMainCollectionCell.CellID) - collectionView.backgroundColor = UIColor.clear - collectionView.delegate = self - collectionView.dataSource = self - collectionView.isScrollEnabled = true - collectionView.isPagingEnabled = true - return collectionView - }() - - override func viewDidLoad() { - super.viewDidLoad() - initMenuData() - setupNavigation() - constructViewHierarchy() - activateConstraints() - view.backgroundColor = .white - } - - override func viewWillAppear(_ animated: Bool) { - super.viewWillAppear(animated) - navigationController?.setNavigationBarHidden(false, animated: false) - } -} - -// MARK: - Private -extension LiveViewController { - - private func initMenuData() { - menuItems = [ - LiveMainItemModel(imageName: "main_item_video_live", title: .videoLiveTitle, content: .videoLiveDesc), - LiveMainItemModel(imageName: "main_item_voice_room", title: .voiceRoomTitle, content: .voiceRoomDesc), - ] - } - - private func constructViewHierarchy() { - view.addSubview(collectionView) - } - - private func activateConstraints() { - collectionView.snp.makeConstraints { make in - make.edges.equalToSuperview() - } - } - - private func setupNavigation() { - navigationItem.title = .liveTitle - navigationController?.navigationBar.titleTextAttributes = [ - .font: UIFont.systemFont(ofSize: 20, weight: .medium), - ] - navigationItem.leftBarButtonItem = UIBarButtonItem(customView: backButton) - backButton.addTarget(self, action: #selector(backButtonClick), for: .touchUpInside) - } - - @objc private func backButtonClick() { - navigationController?.popViewController(animated: true) - } -} - -// MARK: - UICollectionViewDataSource -extension LiveViewController: UICollectionViewDataSource { - - func collectionView(_ collectionView: UICollectionView, - numberOfItemsInSection section: Int) -> Int { - return menuItems.count - } - - func collectionView(_ collectionView: UICollectionView, - cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { - let cell = collectionView.dequeueReusableCell(withReuseIdentifier: LiveMainCollectionCell.CellID, - for: indexPath) as! LiveMainCollectionCell - cell.config(menuItems[indexPath.row]) - return cell - } - -} - -// MARK: - UICollectionViewDelegate -extension LiveViewController: UICollectionViewDelegateFlowLayout { - func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { - if indexPath.item == 0 { - let controller = VideoLiveViewController() - navigationController?.pushViewController(controller, animated: true) - } else if indexPath.item == 1 { - let controller = VoiceRoomViewController() - navigationController?.pushViewController(controller, animated: true) - } - } - - func collectionView(_ collectionView: UICollectionView, - layout collectionViewLayout: UICollectionViewLayout, - sizeForItemAt indexPath: IndexPath) -> CGSize { - return CGSize(width: 335.scale375(), height: 180.scale375Height()) - } -} - -// MARK: - Localized String -private extension String { - static let liveTitle = "live".localized - static let videoLiveTitle = "Video Live".localized - static let videoLiveDesc = "Create Interactive Video Live with Live API for a Seamless Streaming Experience.".localized - static let voiceRoomTitle = "Voice Room".localized - static let voiceRoomDesc = "Enable Interactive Voice Room with Live API for an Enhanced Communication Experience.".localized - static let KTVRoomTitle = "KTV".localized - static let KTVRoomDesc = "Enable Interactive KTV Room with Live API for an Enhanced Communication Experience.".localized -} diff --git a/application/App-UIKit/Live/Model/LiveMainItemModel.swift b/application/App-UIKit/Live/Model/LiveMainItemModel.swift deleted file mode 100644 index 91db140e..00000000 --- a/application/App-UIKit/Live/Model/LiveMainItemModel.swift +++ /dev/null @@ -1,23 +0,0 @@ -// -// MainItemModel.swift -// TUILiveKitApp -// -// Created by jack on 2024/10/8. -// - -import Foundation -import UIKit -import AtomicX - -struct LiveMainItemModel { - let imageName: String - let title: String - let content: String - - init(imageName: String, title: String, content: String) { - self.imageName = imageName - self.title = title - self.content = content - } - -} diff --git a/application/App-UIKit/Live/VideoLiveViewController.swift b/application/App-UIKit/Live/VideoLiveViewController.swift deleted file mode 100644 index 183c8acf..00000000 --- a/application/App-UIKit/Live/VideoLiveViewController.swift +++ /dev/null @@ -1,143 +0,0 @@ -// -// LiveListViewController.swift -// App-UIKit -// -// Created by chensshi on 2024/10/9. -// - -import UIKit -import AtomicXCore -import TUILiveKit -import AtomicX -import Combine - -class VideoLiveViewController: UIViewController { - private var currentStyle = LiveListViewStyle.doubleColumn - private var cancellables = Set() - - private lazy var goLiveButton = AtomicButton(variant: .filled, - colorType: .primary, - size: .large, - content: .iconLeading(text: .goLiveText, icon: UIImage(named: "livekit_ic_add"))) - - private lazy var liveListViewController = { - return TUILiveListViewController() - }() - - override func viewDidLoad() { - super.viewDidLoad() - setupNavigation() - constructViewHierarchy() - activateConstraints() - bindInteraction() - } - - - private func constructViewHierarchy() { - view.addSubview(goLiveButton) - - addChild(liveListViewController) - view.addSubview(liveListViewController.view) - view.bringSubviewToFront(goLiveButton) - } - - private func activateConstraints() { - liveListViewController.view.snp.makeConstraints { make in - make.edges.equalToSuperview() - } - goLiveButton.snp.makeConstraints { make in - make.bottom.equalTo(view.safeAreaLayoutGuide).offset(-15.scale375Height()) - make.centerX.equalToSuperview() - make.height.equalTo(48.scale375()) - make.width.equalTo(154.scale375()) - } - } - -} - -// MARK: - Private -extension VideoLiveViewController { - - private func setupNavigation() { - let appearance = UINavigationBarAppearance() - appearance.configureWithTransparentBackground() - appearance.backgroundColor = .clear - appearance.titleTextAttributes = [.foregroundColor: UIColor.white] - navigationItem.standardAppearance = appearance - navigationItem.scrollEdgeAppearance = appearance - - let backBtn = UIButton(type: .custom) - backBtn.setImage(UIImage(named: "back")?.rtlFlipped().withTintColor(.white), for: .normal) - backBtn.addTarget(self, action: #selector(backBtnClick), for: .touchUpInside) - backBtn.sizeToFit() - let backItem = UIBarButtonItem(customView: backBtn) - navigationItem.leftBarButtonItem = backItem - - let switchColumnBtn = UIButton(type: .custom) - switchColumnBtn.setImage(UIImage(named: "live_single_column_icon"), for: .normal) - switchColumnBtn.setImage(UIImage(named: "live_double_column_icon"), for: .selected) - switchColumnBtn.addTarget(self, action: #selector(swithColumnBtnClick), for: .touchUpInside) - switchColumnBtn.sizeToFit() - let switchItem = UIBarButtonItem(customView: switchColumnBtn) - switchItem.tintColor = .white - navigationItem.rightBarButtonItems = [switchItem] - - let titleView = AtomicLabel(.videoLiveTitle) { theme in - return LabelAppearance(textColor: theme.tokens.color.textColorPrimary, - backgroundColor: theme.tokens.color.clearColor, - font: theme.tokens.typography.Medium20, - cornerRadius: 0.0) - } - titleView.adjustsFontSizeToFitWidth = true - let width = titleView.sizeThatFits(CGSize(width: CGFloat.greatestFiniteMagnitude, - height: CGFloat.greatestFiniteMagnitude)).width - titleView.frame = CGRect(origin: CGPoint.zero, size: CGSize(width: width, height: 44)) - self.navigationItem.titleView = titleView - } - - private func bindInteraction() { - goLiveButton.addTarget(self, action: #selector(goLiveClick), for: .touchUpInside) - - ThemeStore.shared.$currentTheme - .receive(on: DispatchQueue.main) - .sink { [weak self] theme in - guard let self = self else { return } - self.applyAppearance(for: theme ) - } - .store(in: &cancellables) - } - - private func applyAppearance(for theme: Theme) { - view.backgroundColor = theme.tokens.color.bgColorTopBar - } - -} - -// MARK: - Actions -extension VideoLiveViewController { - @objc private func backBtnClick(sender: UIButton) { - if let nav = navigationController { - nav.popViewController(animated: true) - } else { - dismiss(animated: true) - } - } - - @objc private func swithColumnBtnClick(sender: UIButton) { - let newStyle: LiveListViewStyle = currentStyle == .doubleColumn ? .singleColumn : .doubleColumn - currentStyle = newStyle - liveListViewController.setColumnStyle(style: newStyle) - sender.isSelected = currentStyle == .singleColumn - goLiveButton.isHidden = currentStyle == .singleColumn - } - - @objc private func goLiveClick() { - let liveRoomId = LiveIdentityGenerator.shared.generateId(LoginStore.shared.state.value.loginUserInfo?.userID ?? "", type: .live) - VideoLiveKit.createInstance().startLive(roomId: liveRoomId) - } -} - -fileprivate extension String { - static let videoLiveTitle = "Video Live".localized - static let goLiveText = "Go Live".localized -} diff --git a/application/App-UIKit/Live/View/LiveMainCollectionCell.swift b/application/App-UIKit/Live/View/LiveMainCollectionCell.swift deleted file mode 100644 index 0d154ae4..00000000 --- a/application/App-UIKit/Live/View/LiveMainCollectionCell.swift +++ /dev/null @@ -1,89 +0,0 @@ -// -// LiveMainCollectionCell.swift -// App-UIKit -// -// Created by jack on 2024/10/8. -// - -import Foundation -import UIKit -import AtomicX - -class LiveMainCollectionCell: UICollectionViewCell { - - static let CellID: String = "LiveMainCollectionCell" - - private lazy var titleLabel: UILabel = { - let label = UILabel(frame: .zero) - label.textColor = .white - label.textAlignment = .left - label.font = ThemeStore.shared.typographyTokens.Bold20 - label.adjustsFontSizeToFitWidth = true - label.minimumScaleFactor = 0.5 - return label - }() - - private lazy var backgroundImageView: UIImageView = { - let imageView = UIImageView(frame: .zero) - imageView.contentMode = .scaleAspectFill - return imageView - }() - - private lazy var descLabel: UILabel = { - let label = UILabel(frame: .zero) - label.font = ThemeStore.shared.typographyTokens.Regular10 - label.textColor = .white.withAlphaComponent(0.75) - label.textAlignment = .left - label.numberOfLines = 0 - label.adjustsFontSizeToFitWidth = true - label.minimumScaleFactor = 0.8 - return label - }() - - private var isViewReady = false - override func didMoveToWindow() { - super.didMoveToWindow() - guard !isViewReady else { return } - constructViewHierarchy() - activateConstraints() - setupViewStyle() - isViewReady = true - } - - private func constructViewHierarchy() { - addSubview(backgroundImageView) - addSubview(titleLabel) - addSubview(descLabel) - } - - private func activateConstraints() { - backgroundImageView.snp.makeConstraints { make in - make.edges.equalToSuperview() - } - titleLabel.snp.makeConstraints { make in - make.leading.top.equalToSuperview().offset(20.scale375()) - make.height.equalTo(28.scale375Height()) - make.width.lessThanOrEqualTo(120.scale375()) - } - descLabel.snp.makeConstraints { make in - make.leading.equalTo(titleLabel) - make.top.equalTo(titleLabel.snp.bottom).offset(8.scale375Height()) - make.width.lessThanOrEqualTo(155.scale375()) - make.height.lessThanOrEqualTo(48.scale375Height()) - } - } - - private func setupViewStyle() { - layer.cornerRadius = 8.scale375() - layer.masksToBounds = true - } -} - -extension LiveMainCollectionCell { - - public func config(_ item: LiveMainItemModel) { - titleLabel.text = item.title - descLabel.text = item.content - backgroundImageView.image = UIImage(named: item.imageName) - } -} diff --git a/application/App-UIKit/Live/VoiceRoomViewController.swift b/application/App-UIKit/Live/VoiceRoomViewController.swift deleted file mode 100644 index 33e2ae03..00000000 --- a/application/App-UIKit/Live/VoiceRoomViewController.swift +++ /dev/null @@ -1,128 +0,0 @@ -// -// LiveListViewController.swift -// App-UIKit -// -// Created by chensshi on 2024/10/9. -// - -import UIKit -import TUICore -import TUILiveKit -import AtomicXCore -import AtomicX - -class VoiceRoomViewController: UIViewController { - - private lazy var goLiveButton = { - let button = AtomicButton(variant: .filled, - colorType: .primary, - size: .large, - content: .iconLeading(text: .goLiveText, icon: UIImage(named: "livekit_ic_add"))) - button.addTarget(self, action: #selector(goLiveClick), for: .touchUpInside) - return button - }() - - private lazy var liveListViewController = { - return TUILiveListViewController() - }() - - override func viewDidLoad() { - super.viewDidLoad() - setupNavigation() - constructViewHierarchy() - activateConstraints() - view.backgroundColor = .white - } - - - private func constructViewHierarchy() { - view.addSubview(goLiveButton) - - addChild(liveListViewController) - view.addSubview(liveListViewController.view) - view.bringSubviewToFront(goLiveButton) - } - - private func activateConstraints() { - liveListViewController.view.snp.makeConstraints { make in - make.edges.equalToSuperview() - } - goLiveButton.snp.makeConstraints { make in - make.bottom.equalTo(view.safeAreaLayoutGuide).offset(-15.scale375Height()) - make.centerX.equalToSuperview() - make.height.equalTo(48.scale375()) - make.width.equalTo(154.scale375()) - } - } - -} - -// MARK: - Private -extension VoiceRoomViewController { - - private func setupNavigation() { - let appearance = UINavigationBarAppearance() - appearance.configureWithTransparentBackground() - appearance.backgroundColor = .clear - navigationItem.standardAppearance = appearance - navigationItem.scrollEdgeAppearance = appearance - - let backBtn = UIButton(type: .custom) - backBtn.setImage(UIImage(named: "back"), for: .normal) - backBtn.addTarget(self, action: #selector(backBtnClick), for: .touchUpInside) - backBtn.sizeToFit() - let backItem = UIBarButtonItem(customView: backBtn) - navigationItem.leftBarButtonItem = backItem - - let helpButton = UIButton() - helpButton.setImage(UIImage(named: "help_small"), for: .normal) - helpButton.addTarget(self, action: #selector(helpClick), for: .touchUpInside) - helpButton.sizeToFit() - let helpItem = UIBarButtonItem(customView: helpButton) - helpItem.tintColor = .black - navigationItem.rightBarButtonItem = helpItem - - let titleView = AtomicLabel(.voiceRoomTitle) { theme in - return LabelAppearance(textColor: theme.tokens.color.textColorAntiPrimary, - backgroundColor: theme.tokens.color.clearColor, - font: theme.tokens.typography.Medium20, - cornerRadius: 0.0) - } - titleView.adjustsFontSizeToFitWidth = true - let width = titleView.sizeThatFits(CGSize(width: CGFloat.greatestFiniteMagnitude, - height: CGFloat.greatestFiniteMagnitude)).width - titleView.frame = CGRect(origin: CGPoint.zero, size: CGSize(width: width, height: 44)) - self.navigationItem.titleView = titleView - } - -} - -// MARK: - Actions -extension VoiceRoomViewController { - @objc private func backBtnClick(sender: UIButton) { - if let nav = navigationController { - nav.popViewController(animated: true) - } else { - dismiss(animated: true) - } - } - - @objc private func helpClick() { - if let url = URL(string: "https://cloud.tencent.com/document/product/647/105441") { - UIApplication.shared.open(url, options: [:], completionHandler: nil) - } - } - - @objc private func goLiveClick() { - let userId = LoginStore.shared.state.value.loginUserInfo?.userID ?? "" - let voiceRoomId = LiveIdentityGenerator.shared.generateId(userId, type: .voice) - let params = CreateRoomParams() - VoiceRoomKit.createInstance().createRoom(roomId: voiceRoomId, params: params) - } -} - - -fileprivate extension String { - static let voiceRoomTitle = "Voice Room".localized - static let goLiveText = "Go Live".localized -} diff --git a/application/App-UIKit/Login/LoginView.swift b/application/App-UIKit/Login/LoginView.swift deleted file mode 100644 index 09993978..00000000 --- a/application/App-UIKit/Login/LoginView.swift +++ /dev/null @@ -1,260 +0,0 @@ -// -// LoginView.swift -// App-UIKit -// -// Created by yukiwwwang on 2025/8/7. -// - -import SnapKit -import UIKit -import AtomicX -import RTCRoomEngine -import ImSDK_Plus -import TUICore - -protocol LoginViewDelegate: NSObjectProtocol { - func loginDelegate(userId: String) - func autoLoginSwitchChanged(isOn: Bool) -} - -class LoginView: UIView { - weak var delegate: LoginViewDelegate? - - private let logoContentView: UIView = { - let view = UIView(frame: .zero) - view.backgroundColor = UIColor.white - return view - }() - - private let tencentCloudImage: UIImageView = { - let imageView = UIImageView(image: UIImage(named: "tencent_cloud")) - return imageView - }() - - private let titleLabel: UILabel = { - let label = UILabel(frame: .zero) - label.font = UIFont.systemFont(ofSize: 32) - label.textColor = UIColor("333333") ?? .black - label.text = "Tencent Real-Time Communication".localized - label.numberOfLines = 0 - return label - }() - - private let userIdContentView: UIView = { - let view = UIView(frame: .zero) - view.backgroundColor = UIColor.white - view.layer.cornerRadius = 10 - view.layer.masksToBounds = true - view.layer.borderWidth = 1 - view.layer.borderColor = UIColor.gray.cgColor - return view - }() - - private let userIdTextLable: UILabel = { - let label = UILabel(frame: .zero) - label.font = UIFont.systemFont(ofSize: 20) - label.textColor = UIColor.black - label.text = "UserId" - return label - }() - - let userIdTextField: UITextField = { - let textField = UITextField(frame: .zero) - textField.backgroundColor = UIColor.white - textField.font = UIFont(name: "PingFangSC-Regular", size: 20) - textField.textColor = UIColor("333333") - textField.attributedPlaceholder = NSAttributedString(string: "userId") - return textField - }() - - private let autoLoginView: UIView = { - let view = UIView(frame: .zero) - return view - }() - - private let autoLoginTitleLabel: UILabel = { - let label = UILabel(frame: .zero) - label.textColor = .black - label.text = "Auto Login".localized - return label - }() - - private let autoLoginSwitch: UISwitch = { - let switcher = UISwitch(frame: .zero) - switcher.isOn = UserDefaults.standard.bool(forKey: "AutoLoginKey") - return switcher - }() - - private weak var currentTextField: UITextField? - private let loginBtn: UIButton = { - let btn = UIButton(type: .system) - btn.setTitleColor(.white, for: .normal) - btn.setTitle("Log In".localized, for: .normal) - btn.adjustsImageWhenHighlighted = false - btn.setBackgroundImage(UIColor("006EFF").trans2Image(), for: .normal) - btn.titleLabel?.font = UIFont(name: "PingFangSC-Medium", size: 20) - btn.layer.shadowColor = UIColor("006EFF").cgColor - btn.layer.shadowOffset = CGSize(width: 0, height: 6) - btn.layer.masksToBounds = true - btn.layer.cornerRadius = 10 - return btn - }() - - override func touchesBegan(_ touches: Set, with event: UIEvent?) { - super.touchesBegan(touches, with: event) - - if let current = currentTextField { - current.resignFirstResponder() - currentTextField = nil - } - UIView.animate(withDuration: 0.3) { - self.transform = .identity - } - } - - override init(frame: CGRect) { - super.init(frame: frame) - } - - required init?(coder: NSCoder) { - fatalError("init(coder:) has not been implemented") - } - - private var isViewReady = false - override func didMoveToWindow() { - super.didMoveToWindow() - guard !isViewReady else { - return - } - isViewReady = true - constructViewHierarchy() - activateConstraints() - bindInteraction() - } - - private func constructViewHierarchy() { - addSubview(logoContentView) - logoContentView.addSubview(tencentCloudImage) - logoContentView.addSubview(titleLabel) - addSubview(userIdContentView) - userIdContentView.addSubview(userIdTextLable) - userIdContentView.addSubview(userIdTextField) - addSubview(loginBtn) - addSubview(autoLoginView) - autoLoginView.addSubview(autoLoginTitleLabel) - autoLoginView.addSubview(autoLoginSwitch) - } - - private func activateConstraints() { - logoContentView.snp.makeConstraints { make in - make.top.equalToSuperview().offset(100.scale375Height()) - make.leading.equalToSuperview().offset(40.scale375Width()) - make.trailing.equalToSuperview().offset(-20.scale375Width()) - make.height.equalTo(100.scale375Height()) - } - tencentCloudImage.snp.makeConstraints { make in - make.centerY.equalToSuperview() - make.leading.equalToSuperview().offset(20.scale375Width()) - make.height.width.equalTo(80.scale375Width()) - } - - titleLabel.snp.makeConstraints { make in - make.centerY.equalTo(tencentCloudImage) - make.leading.equalTo(tencentCloudImage.snp.trailing).offset(10.scale375Width()) - make.trailing.equalToSuperview().offset(-20.scale375Width()) - } - - userIdContentView.snp.makeConstraints { make in - make.centerY.equalToSuperview() - make.leading.trailing.equalToSuperview().inset(20.scale375Width()) - make.height.equalTo(60.scale375Height()) - } - - userIdTextLable.snp.makeConstraints { make in - make.centerY.equalToSuperview() - make.leading.equalToSuperview().offset(20.scale375Width()) - } - - userIdTextField.snp.makeConstraints { make in - make.centerY.equalToSuperview() - make.leading.equalTo(userIdTextLable.snp.trailing).offset(20.scale375Width()) - make.trailing.equalToSuperview().offset(-20.scale375Width()) - } - - loginBtn.snp.makeConstraints { make in - make.top.equalTo(userIdContentView.snp.bottom).offset(40.scale375Height()) - make.leading.trailing.equalToSuperview().inset(20.scale375Width()) - make.height.equalTo(52.scale375Height()) - } - - autoLoginView.snp.makeConstraints { make in - make.trailing.equalToSuperview().offset(-20.scale375Width()) - make.top.equalTo(loginBtn.snp.bottom).offset(20.scale375Height()) - make.height.equalTo(44.scale375Height()) - make.width.greaterThanOrEqualTo(120.scale375Height()) - } - - autoLoginSwitch.snp.makeConstraints { make in - make.trailing.equalToSuperview().offset(-10.scale375Width()) - make.centerY.equalToSuperview() - } - - autoLoginTitleLabel.snp.makeConstraints { make in - make.trailing.equalTo(autoLoginSwitch.snp.leading).offset(-20.scale375Width()) - make.leading.centerY.equalToSuperview() - } - } - - private func bindInteraction() { - loginBtn.addTarget(self, action: #selector(loginBtnClick), for: .touchUpInside) - autoLoginSwitch.addTarget(self, action: #selector(onAutoLoginSwitchValueChanged), for: .valueChanged) - userIdTextField.delegate = self - } - - @objc private func loginBtnClick() { - if let current = currentTextField { - current.resignFirstResponder() - } - guard let userId = userIdTextField.text else { - return - } - delegate?.loginDelegate(userId: userId) - } - - @objc private func onAutoLoginSwitchValueChanged(_ switcher: UISwitch) { - delegate?.autoLoginSwitchChanged(isOn: switcher.isOn) - } -} - -extension LoginView: UITextFieldDelegate { - func textFieldDidBeginEditing(_ textField: UITextField) { - if let last = currentTextField { - last.resignFirstResponder() - } - currentTextField = textField - textField.becomeFirstResponder() - } - - func textFieldDidEndEditing(_ textField: UITextField) { - textField.resignFirstResponder() - currentTextField = nil - } - - func textFieldShouldReturn(_ textField: UITextField) -> Bool { - textField.resignFirstResponder() - return true - } - - func textField(_ textField: UITextField, - shouldChangeCharactersIn range: NSRange, - replacementString string: String) -> Bool { - if string.isEmpty { - return true - } - - let allowedCharacters = - CharacterSet(charactersIn: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_") - let characterSet = CharacterSet(charactersIn: string) - return allowedCharacters.isSuperset(of: characterSet) - } -} diff --git a/application/App-UIKit/Login/LoginViewController.swift b/application/App-UIKit/Login/LoginViewController.swift deleted file mode 100644 index d0652b1e..00000000 --- a/application/App-UIKit/Login/LoginViewController.swift +++ /dev/null @@ -1,144 +0,0 @@ -// -// LoginViewController.swift -// App-UIKit -// -// Created by yukiwwwang on 2025/8/7. -// - -import Foundation -import SnapKit -import TUICore -import RTCRoomEngine -import AtomicX -import TUICallKit_Swift -import AtomicXCore -import Combine - -class LoginViewController: UIViewController { - private let userIdKey = "UserIdKey" - private let autoLoginKey = "AutoLoginKey" - private let loading = UIActivityIndicatorView() - private let rootView = LoginView() - private var isTestEnvironment = false - private var nickName: String = "" - private var cancelableSet: Set = [] - - override func viewDidLayoutSubviews() { - super.viewDidLayoutSubviews() - } - - override func viewDidLoad() { - super.viewDidLoad() - view.backgroundColor = .white - navigationController?.navigationBar.barTintColor = .white - constructViewHierarchy() - activateConstraints() - rootView.delegate = self - autoLogin() - } - - private func constructViewHierarchy() { - view.addSubview(rootView) - } - - private func activateConstraints() { - rootView.snp.makeConstraints { make in - make.edges.equalToSuperview() - } - } - - private func login(userId: String) { - loading.startAnimating() - LoginStore.shared.login(sdkAppID: Int32(SDKAPPID), userID: userId, userSig: GenerateTestUserSig.genTestUserSig(identifier: userId)) { [weak self] result in - guard let self = self else { return } - loading.stopAnimating() - switch result { - case .success(): - UserDefaults.standard.set(userId, forKey: self.userIdKey) - LoginStore.shared.state.subscribe(StatePublisherSelector(keyPath: \LoginState.loginUserInfo)) - .receive(on: RunLoop.main) - .dropFirst() - .sink { [weak self] user in - guard let self = self, let user = user else { - self?.view.showAtomicToast(text: "Login failed, user is null") - if let self = self { - cancelableSet.forEach { $0.cancel() } - cancelableSet.removeAll() - } - return - } - nickName = user.nickname ?? "" - loginTUICore(userID: userId) - cancelableSet.forEach { $0.cancel() } - cancelableSet.removeAll() - } - .store(in: &cancelableSet) - case .failure(let err): - self.view.showAtomicToast(text: "Login failed, code: \(err.code), error: \(err.message)") - } - } - } - - private func loginTUICore(userID: String) { - // FIXME: 临时方案,这部分逻辑暂时还不可以删除,Callkit 依赖 TUICore 的 InitSdkSuccess 通知启动服务 - TUILogin.login(Int32(SDKAPPID), userID: userID, userSig: GenerateTestUserSig.genTestUserSig(identifier: userID)) { [weak self] in - guard let self = self else { return } - loginSuccess() - } fail: { [weak self] code, message in - guard let self = self else {return} - view.showAtomicToast(text: "Login failed, code: \(code), error: \(message ?? "")") - } - } - - private func autoLogin() { - if let userId = UserDefaults.standard.string(forKey: userIdKey), !userId.isEmpty { - rootView.userIdTextField.text = userId - // 只有在自动登录开关打开时才自动登录 - let isAutoLoginEnabled = UserDefaults.standard.bool(forKey: autoLoginKey) - if isAutoLoginEnabled { - login(userId: userId) - } - } else { - rootView.userIdTextField.text = UserDefaults.standard.string(forKey: userIdKey) - } - } -} - -extension LoginViewController: LoginViewDelegate { - - func autoLoginSwitchChanged(isOn: Bool) { - UserDefaults.standard.set(isOn, forKey: "AutoLoginKey") - } - - func loginDelegate(userId: String) { - login(userId: userId) - } -} - -extension LoginViewController: LanguageSelectViewControllerDelegate { - func onSelectLanguage(cellModel: LanguageSelectCellModel) { - let languageVC = LanguageSelectViewController() - languageVC.delegate = self - - if let nav = self.navigationController { - nav.pushViewController(languageVC, animated: true) - } else { - self.present(languageVC, animated: true, completion: nil) - } - } -} - -extension LoginViewController { - private func loginSuccess() { - let appDelegate = UIApplication.shared.delegate as? AppDelegate - if nickName.count == 0 { - let vc = RegisterViewController() - navigationController?.pushViewController(vc, animated: true) - } else { - self.view.showAtomicToast(text: "Logged In".localized) - DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) { - appDelegate?.showMainViewController() - } - } - } -} diff --git a/application/App-UIKit/Main/Model/MainItemModel.swift b/application/App-UIKit/Main/Model/MainItemModel.swift deleted file mode 100644 index 8b9a2ed9..00000000 --- a/application/App-UIKit/Main/Model/MainItemModel.swift +++ /dev/null @@ -1,40 +0,0 @@ -// -// MainItemModel.swift -// App-UIKit -// -// Created by yukiwwwang on 2025/8/7. -// -import Foundation -import UIKit -import AtomicX - -let imageWidth: CGFloat = 172 -let titleFontSize: CGFloat = 17 -let contentFontSize: CGFloat = 13 - -struct MainMenuItemModel { - let imageName: String - let title: String - let content: String - var unreadCount: UInt64 = 0 - let selectHandle: () -> Void - let gradientColors: [UIColor] - let isHotKit: Bool - var iconImage: UIImage? { - UIImage(named: imageName) - } - - init(imageName: String, - title: String, - content: String, - isHotKit: Bool = false, - gradientColors:[UIColor] = [], - selectHandle: @escaping () -> Void) { - self.imageName = imageName - self.title = title - self.content = content - self.isHotKit = isHotKit - self.selectHandle = selectHandle - self.gradientColors = gradientColors - } -} diff --git a/application/App-UIKit/Main/UI/MainCollectionCell.swift b/application/App-UIKit/Main/UI/MainCollectionCell.swift deleted file mode 100644 index 8c4e2d59..00000000 --- a/application/App-UIKit/Main/UI/MainCollectionCell.swift +++ /dev/null @@ -1,189 +0,0 @@ -// -// MainCollectionCell.swift -// App-UIKit -// -// Created by yukiwwwang on 2025/8/7. -// - -import UIKit -import Kingfisher -import AtomicX -import TUICore - -class MainCollectionCell: UICollectionViewCell { - private var gradientColors: [UIColor] = [] - - let containerView: UIView = { - let containerView = UIView() - containerView.layer.cornerRadius = 6 - containerView.layer.masksToBounds = true - containerView.backgroundColor = .white - return containerView - }() - - private let titleLabel: UILabel = { - let label = UILabel(frame: .zero) - label.textColor = UIColor("262B32") - label.textAlignment = .left - label.adjustsFontSizeToFitWidth = true - label.minimumScaleFactor = 0.5 - return label - }() - - private let iconImageView: UIImageView = { - let imageView = UIImageView(frame: .zero) - imageView.contentMode = .scaleAspectFit - return imageView - }() - - private let descLabel: UILabel = { - let label = UILabel(frame: .zero) - label.font = UIFont(name: "PingFangSC-Regular", size: convertPixel(w: 12)) - label.textColor = UIColor("626E84") - label.textAlignment = .left - label.numberOfLines = 0 - label.adjustsFontSizeToFitWidth = true - label.minimumScaleFactor = 0.8 - return label - }() - - private let uiComIconView: UIView = { - let view = UIView(frame: .zero) - view.backgroundColor = UIColor("73A1F0") - view.layer.cornerRadius = 2 - view.layer.masksToBounds = true - return view - }() - - private let uiComLabel: UILabel = { - let label = UILabel() - label.text = "" - label.textColor = .white - label.textAlignment = .center - return label - }() - - private let arrowImageView: UIImageView = { - let imageView = UIImageView(frame: .zero) - imageView.image = UIImage(named: "main_pusharrow") - imageView.contentMode = .scaleAspectFit - imageView.isHidden = true - return imageView - }() - - private let backgroundImageView: UIImageView = { - let imageView = UIImageView(frame: .zero) - imageView.contentMode = .scaleAspectFit - imageView.image = UIImage(named: "main_scenarios") - imageView.isHidden = true - return imageView - }() - - func constructViewHierarchy() { - contentView.addSubview(containerView) - containerView.addSubview(backgroundImageView) - containerView.addSubview(titleLabel) - containerView.addSubview(iconImageView) - uiComIconView.addSubview(uiComLabel) - containerView.addSubview(uiComIconView) - containerView.addSubview(arrowImageView) - containerView.addSubview(descLabel) - } - - private func activateConstraints() { - containerView.snp.makeConstraints { make in - make.top.left.equalToSuperview().offset(4.scale375Width()) - make.bottom.right.equalToSuperview().offset(-2.scale375Width()) - } - - backgroundImageView.snp.makeConstraints { make in - make.trailing.equalToSuperview() - make.top.equalToSuperview() - } - - iconImageView.snp.makeConstraints { make in - make.top.left.equalToSuperview().offset(16.scale375Width()) - make.width.height.equalTo(24.scale375Height()) - } - - titleLabel.snp.makeConstraints { make in - make.left.equalTo(iconImageView.snp.right).offset(2.scale375Width()) - make.right.equalTo(uiComIconView.snp.left).offset(-6.scale375Width()) - make.centerY.equalTo(iconImageView) - } - - arrowImageView.snp.makeConstraints { make in - make.centerY.equalTo(iconImageView) - make.right.equalToSuperview().offset(-16.scale375Width()) - make.size.equalTo(CGSize(width: 16.scale375Width(), height: 16.scale375Height())) - } - - uiComLabel.snp.makeConstraints { make in - make.top.bottom.equalToSuperview() - make.leading.trailing.equalToSuperview().inset(4.scale375Width()) - } - - uiComIconView.snp.makeConstraints { make in - make.left.equalTo(uiComLabel).offset(6.scale375Width()) - make.bottom.top.equalTo(uiComLabel) - make.centerY.equalTo(titleLabel) - } - - descLabel.snp.makeConstraints { make in - make.left.equalToSuperview().offset(14.scale375Width()) - make.right.equalToSuperview().offset(-14.scale375Width()) - make.top.equalTo(iconImageView.snp.bottom).offset(12.scale375Height()).priority(.high) - make.bottom.lessThanOrEqualToSuperview().offset(-14.scale375Height()) - } - - titleLabel.setContentCompressionResistancePriority(.defaultLow, for: .horizontal) - } - - override init(frame: CGRect) { - super.init(frame: frame) - constructViewHierarchy() - activateConstraints() - } - - required init?(coder: NSCoder) { - fatalError("init(coder:) has not been implemented") - } - - override func draw(_ rect: CGRect) { - super.draw(rect) - containerView.gradient(colors: gradientColors, isVertical: true) - } -} - -extension MainCollectionCell { - public func setupDefaultConfig(_ model: MainMenuItemModel) { - titleLabel.text = model.title - titleLabel.textColor = UIColor("262B32") - titleLabel.font = UIFont(name: "PingFangSC-Medium", size: convertPixel(w: 17.0 - getEnglishOffet())) - descLabel.text = model.content - uiComLabel.font = UIFont(name: "PingFangSC-Semibold", size: convertPixel(w: 12.0 - getEnglishOffet())) - if model.imageName.hasPrefix("http") { - if let imageURL = URL(string: model.imageName) { - iconImageView.kf.setImage(with: .network(imageURL)) - } - } else { - iconImageView.image = model.iconImage - } - arrowImageView.isHidden = true - backgroundImageView.isHidden = true - uiComIconView.isHidden = (screenWidth <= 375.0 && isEnglish()) - } -} - -extension MainCollectionCell { - private func getEnglishOffet() -> CGFloat { - return isEnglish() ? 2 : 0 - } - - private func isEnglish() -> Bool { - guard let language = TUIGlobalization.getPreferredLanguage() else { - return false - } - return !language.contains("zh") - } -} diff --git a/application/App-UIKit/Main/UI/MainView.swift b/application/App-UIKit/Main/UI/MainView.swift deleted file mode 100644 index 2aae8d66..00000000 --- a/application/App-UIKit/Main/UI/MainView.swift +++ /dev/null @@ -1,88 +0,0 @@ -// -// MainView.swift -// App-UIKit -// -// Created by yukiwwwang on 2025/8/7. -// - -import UIKit -import Kingfisher -import TUICore - -protocol MainViewDelegate: NSObjectProtocol { - func jumpProfileController() -} - -class MainView: UIView { - weak var delegate: MainViewDelegate? - - private lazy var iconView: UIImageView = { - let imageView = UIImageView(frame: .zero) - imageView.isUserInteractionEnabled = true - imageView.image = UIImage(named: getMainLogoStr()) - imageView.contentMode = .scaleAspectFill - return imageView - }() - - private lazy var mineCenterBtn: UIButton = { - let button = UIButton(type: .custom) - button.layer.cornerRadius = 16 - button.clipsToBounds = true - return button - }() - - private var isViewReady = false - override func didMoveToWindow() { - super.didMoveToWindow() - guard !isViewReady else { - return - } - backgroundColor = UIColor("EBEDF5") - isViewReady = true - constructViewHierarchy() - activateConstraints() - bindInteraction() - } - - private func constructViewHierarchy() { - addSubview(iconView) - addSubview(mineCenterBtn) - } - - private func activateConstraints() { - iconView.snp.makeConstraints { (make) in - make.left.centerY.equalToSuperview() - make.width.equalTo(142.scale375Width()) - make.height.equalTo(32.scale375Height()) - } - mineCenterBtn.snp.makeConstraints { (make) in - make.right.centerY.equalToSuperview() - make.width.height.equalTo(32.scale375Width()) - } - } - - private func bindInteraction() { - mineCenterBtn.addTarget(self, action: #selector(goMine(sender:)), for: .touchUpInside) - } - - func updateIconImage(with image: UIImage) { - mineCenterBtn.setBackgroundImage(image, for: .normal) - } - - @objc private func goMine(sender: UIButton) { - delegate?.jumpProfileController() - } -} - -fileprivate func getMainLogoStr() -> String { - guard let language = TUIGlobalization.tk_localizableLanguageKey() else { - return "main_english_logo" - } - if language.contains("zh-Hans") { - return "main_simplified_chinese_logo" - } else if language.contains("zh-Hant") { - return "main_traditional_chinese_logo" - } else { - return "main_english_logo" - } -} diff --git a/application/App-UIKit/Main/UI/MainViewController.swift b/application/App-UIKit/Main/UI/MainViewController.swift deleted file mode 100644 index d4ce0e81..00000000 --- a/application/App-UIKit/Main/UI/MainViewController.swift +++ /dev/null @@ -1,241 +0,0 @@ -// -// MainViewController.swift -// App-UIKit -// -// Created by yukiwwwang on 2025/8/7. -// - -import UIKit -import ImSDK_Plus -import TUICore -import AtomicX -import TUICallKit_Swift -import SensorsAnalyticsSDK -import Kingfisher -import AtomicXCore -import TUIRoomKit -import TUILiveKit - -private let mainMenuItemColors = [ - UIColor(red: 204/255.0, green: 223/255.0, blue: 255/255.0, alpha: 1), - UIColor(red: 204/255.0, green: 223/255.0, blue: 255/255.0, alpha: 0.3), - UIColor(red: 204/255.0, green: 223/255.0, blue: 255/255.0, alpha: 0) -] - -class MainViewController: UIViewController { - private var mainMenuItems: [MainMenuItemModel] = [] - private lazy var mainView: MainView = { - let mainView = MainView(frame: .zero) - mainView.delegate = self - return mainView - }() - - lazy var collectionView: UICollectionView = { - let flowLayout = UICollectionViewFlowLayout() - flowLayout.sectionInset = UIEdgeInsets(top: 0, left: 12, bottom: 0, right: 12) - flowLayout.itemSize = CGSize(width: screenWidth / 2 - 12, height: 106) - flowLayout.minimumLineSpacing = 0 - flowLayout.minimumInteritemSpacing = 0 - let collectionView = UICollectionView(frame: .zero, collectionViewLayout: flowLayout) - collectionView.backgroundColor = UIColor.clear - collectionView.isScrollEnabled = true - collectionView.isPagingEnabled = true - return collectionView - }() - - private lazy var mineCenterBtn: UIButton = { - let button = UIButton(type: .custom) - button.layer.cornerRadius = 16 - button.clipsToBounds = true - return button - }() - - private func configData() { - mainMenuItems = [ - MainMenuItemModel(imageName: "main_call", - title: "call".localized, - content: "callContent".localized, - gradientColors: mainMenuItemColors, - selectHandle: { [weak self] in - guard let self = self else { return } - self.gotoCallView() - self.trackSensorData("video_call") - }), - MainMenuItemModel(imageName: "main_live", - title: "live".localized, - content: "liveContent".localized, - gradientColors: mainMenuItemColors, - selectHandle: { [weak self] in - guard let self = self else { return } - self.gotoLiveView() - self.trackSensorData("live_streaming") - }), - MainMenuItemModel(imageName: "main_room", - title: "tuiRoom".localized, - content: "tuiRoomContent".localized, - gradientColors: mainMenuItemColors, - selectHandle: { [weak self] in - guard let self = self else { return } - self.gotoRoomView() - self.trackSensorData("conference") - }), -// MainMenuItemModel(imageName: "debug", -// title: "性能测试", -// content: "SVGA vs PAG 性能对比", -// gradientColors: mainMenuItemColors, -// selectHandle: { [weak self] in -// guard let self = self else { return } -// self.gotoPerformanceTest() -// self.trackSensorData("performance_test") -// }), - ] - } - - override func viewDidLoad() { - super.viewDidLoad() - configData() - view.backgroundColor = UIColor(red: 235, green: 237, blue: 245) - constructViewHierarchy() - activateConstraints() - bindInteraction() - updateMineCenterImage() - } - - @objc private func handleUserProfileChanged(_ notification: Notification) { - updateMineCenterImage() - } - override func viewWillAppear(_ animated: Bool) { - super.viewWillAppear(animated) - navigationController?.setNavigationBarHidden(true, animated: true) - updateMineCenterImage() - } -} - -extension MainViewController { - private func constructViewHierarchy() { - view.addSubview(mainView) - view.addSubview(collectionView) - } - - private func activateConstraints() { - let statusBarHeight = statusBarHeight() - mainView.snp.makeConstraints { make in - make.top.equalTo(view).offset(statusBarHeight) - make.height.equalTo(44.scale375Height()) - make.leading.equalTo(view).offset(20.scale375Width()) - make.trailing.equalTo(view).offset(-20.scale375Width()) - } - - collectionView.snp.makeConstraints { make in - make.top.equalTo(mainView.snp.bottom).offset(12.scale375Height()) - make.leading.trailing.equalTo(view) - make.bottom.equalTo(view) - } - } - - private func bindInteraction() { - collectionView.register(MainCollectionCell.self,forCellWithReuseIdentifier: "MainCollectionCell") - collectionView.delegate = self - collectionView.dataSource = self - } -} - -extension MainViewController { - - func gotoCallView() { - let enterCallVC = CallViewController() - enterCallVC.title = "call".localized - enterCallVC.hidesBottomBarWhenPushed = true - navigationController?.pushViewController(enterCallVC, animated: true) - } - - func gotoLiveView() { - let enterLiveVC = LiveViewController() - navigationController?.pushViewController(enterLiveVC, animated: true) - } - - func gotoRoomView() { - let roomHomeViewController = RoomHomeViewController() - self.navigationController?.pushViewController(roomHomeViewController, animated: true) - } - -// func gotoPerformanceTest() { -// let testVC = AnimationPerformanceTestVC() -// testVC.title = "动画性能测试" -// testVC.hidesBottomBarWhenPushed = true -// navigationController?.pushViewController(testVC, animated: true) -// } - -} - -extension MainViewController { - func trackSensorData(_ sensor: String) { - SensorsAnalyticsSDK.sharedInstance()?.track("app_uikit_main_click_event", withProperties: ["main" : sensor]) - } -} - -extension MainViewController { - func updateMineCenterImage() { - guard let userId = LoginStore.shared.state.value.loginUserInfo?.userID, !userId.isEmpty else { - mainView.updateIconImage(with: UIImage(named: "default_avatar")!) - return - } - let faceUrl = LoginStore.shared.state.value.loginUserInfo?.avatarURL - if let avatarURL = faceUrl, !avatarURL.isEmpty { - loadAvatarImage(from: avatarURL) - } else { - mainView.updateIconImage(with: UIImage(named: "default_avatar")!) - } - } - - private func loadAvatarImage(from urlString: String) { - guard let url = URL(string: urlString) else { - mainView.updateIconImage(with: UIImage(named: "default_avatar")!) - return - } - KingfisherManager.shared.retrieveImage(with: url) { [weak self] result in - switch result { - case .success(let imageResult): - self?.mainView.updateIconImage(with: imageResult.image) - case .failure: - self?.mainView.updateIconImage(with: UIImage(named: "default_avatar")!) - } - } - } -} - - -extension MainViewController: MainViewDelegate { - func jumpProfileController() { - let mineView = MineViewController() - navigationController?.pushViewController(mineView, animated: true) - } - -} - -extension MainViewController: UICollectionViewDataSource{ - func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { - return mainMenuItems.count - } - func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { - - let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "MainCollectionCell", - for: indexPath) as! MainCollectionCell - cell.setupDefaultConfig(mainMenuItems[indexPath.row]) - return cell - } -} - -extension MainViewController: UICollectionViewDelegate { - func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { - mainMenuItems[indexPath.row].selectHandle() - } -} - -extension MainViewController: UICollectionViewDelegateFlowLayout { - func collectionView(_ collectionView: UICollectionView, - layout collectionViewLayout: UICollectionViewLayout, - sizeForItemAt indexPath: IndexPath) -> CGSize { - return CGSize(width: screenWidth / 2 - 13, height: 106) - } -} diff --git a/application/App-UIKit/Mine/Log/LogUploadManager.swift b/application/App-UIKit/Mine/Log/LogUploadManager.swift deleted file mode 100644 index d14eccc9..00000000 --- a/application/App-UIKit/Mine/Log/LogUploadManager.swift +++ /dev/null @@ -1,146 +0,0 @@ -// -// LogUploadManager.swift -// App-UIKit -// -// Created by yukiwwwang on 2025/8/18. -// - -import UIKit -import AtomicX - -class FileModel { - var fileName: String - var filePath: String - - init(fileName: String, filePath: String) { - self.fileName = fileName - self.filePath = filePath - } -} - -public class LogUploadManager: NSObject { - - public static let sharedInstance: LogUploadManager = { - let instance = LogUploadManager() - if let currentWin = WindowUtils.getCurrentWindow() { - currentWin.addSubview(instance.logUploadView) - } - return instance - }() - - private var fileModelArray: [FileModel] = [] - public func startUpload(withSuccessHandler success:((() ->Void))?, - withCancelHandler canceld:((() ->Void))?) { - self.showLogUploadView() - logUploadView.shareHandler = { [weak self] row in - guard let self = self else { return } - if row < self.fileModelArray.count { - let fileModel = self.fileModelArray[row] - let logPath = fileModel.filePath - let shareObj = URL(fileURLWithPath: logPath) - let activityView = UIActivityViewController(activityItems: [shareObj], applicationActivities: nil) - guard let curVC = WindowUtils.getCurrentWindowViewController() else { return } - curVC.present(activityView, animated: true) { - self.logUploadView.isHidden = true - success?() - } - } - } - logUploadView.cancelHandler = { [weak self] in - guard let self = self else { return } - self.logUploadView.isHidden = true - canceld?() - } - - } - - private lazy var logUploadView: LogUploadView = { - let uploadView = LogUploadView() - uploadView.frame = CGRect(x: 0, y: 0, width: UIScreen.main.bounds.width, height: UIScreen.main.bounds.height) - uploadView.delegate = self - uploadView.dataSource = self - uploadView.isHidden = true - return uploadView - }() - - private func getFilesFromDirectory(atPath path: String, withExtension fileExtension: String) -> [FileModel] { - let fileManager = FileManager.default - var files: [FileModel] = [] - - do { - let contents = try fileManager.contentsOfDirectory(atPath: path) - for fileName in contents { - if fileName.hasSuffix(fileExtension) { - let filePath = (path as NSString).appendingPathComponent(fileName) - let file = FileModel(fileName: fileName, filePath: filePath) - files.append(file) - } - } - } catch { - print("Error: \(error.localizedDescription)") - } - - return files - } - -} - -extension LogUploadManager { - - func showLogUploadView() { - var fileArray: [FileModel] = [] - guard let documentsPath = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true).first - else { return } - let logPath = (documentsPath as NSString).appendingPathComponent("log") - guard let libraryPath = NSSearchPathForDirectoriesInDomains(.libraryDirectory, .userDomainMask, true).first - else { return } - let cachePath = (libraryPath as NSString).appendingPathComponent("Caches/com_tencent_imsdk_log") - let liteAVSDKClogFiles = getFilesFromDirectory(atPath: logPath, withExtension: ".clog") - fileArray += liteAVSDKClogFiles - let liteAVSDKXlogFiles = getFilesFromDirectory(atPath: logPath, withExtension: ".xlog") - fileArray += liteAVSDKXlogFiles - let imXlogFiles = getFilesFromDirectory(atPath: cachePath, withExtension: ".xlog") - fileArray += imXlogFiles - - // 按文件修改时间排序(最新的在前) - fileArray.sort { file1, file2 in - let fileManager = FileManager.default - guard let date1 = try? fileManager.attributesOfItem(atPath: file1.filePath)[.modificationDate] as? Date, - let date2 = try? fileManager.attributesOfItem(atPath: file2.filePath)[.modificationDate] as? Date else { - return false - } - return date1 > date2 - } - - fileModelArray = fileArray - logUploadView.reloadAllComponents() - logUploadView.alpha = 0.1 - UIView.animate(withDuration: 0.5) { - self.logUploadView.isHidden = false - self.logUploadView.alpha = 1 - } - } -} - -// MARK: - LogUploadViewDataSource -extension LogUploadManager: LogUploadViewDataSource { - func numberOfComponents(in logUploadView: LogUploadView) -> Int { - return 1 - } - - func logUploadView(_ logUploadView: LogUploadView, numberOfRowsInComponent component: Int) -> Int { - return fileModelArray.count - } -} - -// MARK: - LogUploadViewDelegate -extension LogUploadManager: LogUploadViewDelegate { - - internal func logUploadView(_ logUploadView: LogUploadView, titleForRow row: Int, forComponent component: Int) -> String? { - if row < fileModelArray.count { - return fileModelArray[row].fileName - } - return nil - } - -} diff --git a/application/App-UIKit/Mine/Log/LogUploadView.swift b/application/App-UIKit/Mine/Log/LogUploadView.swift deleted file mode 100644 index 5756fd61..00000000 --- a/application/App-UIKit/Mine/Log/LogUploadView.swift +++ /dev/null @@ -1,183 +0,0 @@ -// -// LogUploadView.swift -// App-UIKit -// -// Created by yukiwwwang on 2025/8/18. -// - -import UIKit -import AtomicX - -protocol LogUploadViewDataSource: AnyObject { - func numberOfComponents(in logUploadView: LogUploadView) -> Int - func logUploadView(_ logUploadView: LogUploadView, numberOfRowsInComponent component: Int) -> Int -} - -@objc protocol LogUploadViewDelegate: AnyObject { - - @objc optional func logUploadView(_ logUploadView: LogUploadView, didSelectRow row: Int, inComponent component: Int) - @objc optional func logUploadView(_ logUploadView: LogUploadView, titleForRow row: Int, forComponent component: Int) -> String? -} - -class LogUploadView: UIView { - weak var dataSource: LogUploadViewDataSource? - weak var delegate: LogUploadViewDelegate? - - var shareHandler:(_ row: Int) ->Void = {row in } - - var cancelHandler:() ->Void = {} - - private let logPickerView: UIPickerView = { - let pickView = UIPickerView() - return pickView - }() - - private let containerView: UIView = { - let view = UIView(frame: .zero) - view.backgroundColor = .white - return view - }() - - private let shareButton: UIButton = { - let button = UIButton(type: .system) - button.titleLabel?.font = .systemFont(ofSize: 14, weight: .semibold) - button.setTitle(("share").localized, - for: .normal) - return button - }() - - private let shareLogTitle: UILabel = { - let label = UILabel() - label.text = ("sharelog").localized - label.font = .systemFont(ofSize: 14, weight: .medium) - return label - }() - - private let cancelButton: UIButton = { - let button = UIButton(type: .system) - button.setTitle(("Cancel").localized, - for: .normal) - button.titleLabel?.font = .systemFont(ofSize: 14, weight: .semibold) - return button - }() - - private let backButton: UIButton = { - let button = UIButton(type: .system) - return button - }() - - init() { - super.init(frame: .zero) - logPickerView.dataSource = self - logPickerView.delegate = self - backgroundColor = UIColor(red: 0, green: 0, blue: 0, alpha: 0.4) - } - - private var isViewReady = false - override func didMoveToWindow() { - super.didMoveToWindow() - guard !isViewReady else { - return - } - isViewReady = true - constructViewHierarchy() - activateConstraints() - bindInteraction() - } - - required init?(coder: NSCoder) { - fatalError("init(coder:) has not been implemented") - } -} -extension LogUploadView { - func constructViewHierarchy() { - addSubview(containerView) - addSubview(backButton) - containerView.addSubview(cancelButton) - containerView.addSubview(shareLogTitle) - containerView.addSubview(shareButton) - containerView.addSubview(logPickerView) - } - - func activateConstraints() { - let containerHeight = UIScreen.main.bounds.height/2 - containerView.snp.makeConstraints { make in - make.height.equalTo(containerHeight) - make.bottom.left.right.equalToSuperview() - } - shareLogTitle.snp.makeConstraints { make in - make.centerX.equalToSuperview() - make.centerY.equalTo(cancelButton) - } - backButton.snp.makeConstraints { make in - make.top.left.right.equalToSuperview() - make.bottom.equalTo(containerView.snp.top) - } - logPickerView.snp.makeConstraints { make in - make.top.equalToSuperview().offset(44) - make.bottom.left.right.equalToSuperview() - } - cancelButton.snp.makeConstraints { make in - make.left.equalToSuperview().offset(16) - make.bottom.equalTo(logPickerView.snp.top) - make.top.equalToSuperview() - make.width.equalTo(60) - } - shareButton.snp.makeConstraints { make in - make.right.equalToSuperview().offset(-16) - make.bottom.equalTo(logPickerView.snp.top) - make.top.equalToSuperview() - make.width.equalTo(60) - } - } - - func bindInteraction() { - shareButton.addTarget(self, - action: #selector(shareButtonClicked), - for: .touchUpInside) - cancelButton.addTarget(self, - action: #selector(cancelButtonClicked), - for: .touchUpInside) - backButton.addTarget(self, - action: #selector(cancelButtonClicked), - for: .touchUpInside) - } -} -extension LogUploadView { - func reloadAllComponents() { - logPickerView.reloadAllComponents() - } - - func reloadComponent(in row :Int) { - logPickerView.reloadComponent(row) - } -} - -extension LogUploadView: UIPickerViewDataSource { - func numberOfComponents(in pickerView: UIPickerView) -> Int { - return dataSource?.numberOfComponents(in: self) ?? 0 - } - - func pickerView(_ pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int { - return dataSource?.logUploadView(self, numberOfRowsInComponent: component) ?? 0 - } -} - -extension LogUploadView: UIPickerViewDelegate { - func pickerView(_ pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int) { - delegate?.logUploadView?(self, didSelectRow: row, inComponent: component) - } - - func pickerView(_ pickerView: UIPickerView, titleForRow row: Int, forComponent component: Int) -> String? { - return delegate?.logUploadView?(self, titleForRow: row, forComponent: component) - } -} - -extension LogUploadView { - @objc func shareButtonClicked() { - self.shareHandler(self.logPickerView.selectedRow(inComponent: 0)) - } - @objc func cancelButtonClicked() { - self.cancelHandler() - } -} diff --git a/application/App-UIKit/Mine/MinePage/Model/MineTableViewCellModel.swift b/application/App-UIKit/Mine/MinePage/Model/MineTableViewCellModel.swift deleted file mode 100644 index c4bd7f27..00000000 --- a/application/App-UIKit/Mine/MinePage/Model/MineTableViewCellModel.swift +++ /dev/null @@ -1,21 +0,0 @@ -// -// MineTableViewCellModel.swift -// App-UIKit -// -// Created by yukiwwwang on 2025/8/12. -// - -import Foundation -import Kingfisher - -class MineTableViewCellModel: NSObject { - let title: String - let image: UIImage? - let type: MineListType - init(title: String, image: UIImage?, type: MineListType) { - self.title = title - self.image = image - self.type = type - super.init() - } -} diff --git a/application/App-UIKit/Mine/MinePage/Model/MineViewModel.swift b/application/App-UIKit/Mine/MinePage/Model/MineViewModel.swift deleted file mode 100644 index 56c22d1a..00000000 --- a/application/App-UIKit/Mine/MinePage/Model/MineViewModel.swift +++ /dev/null @@ -1,44 +0,0 @@ -// -// MineViewModel.swift -// App-UIKit -// -// Created by yukiwwwang on 2025/8/12. -// - -import Foundation -import UIKit -import TUICore - -enum MineListType { - case settings - case log -} - -class MineViewModel: NSObject { - lazy var tableDataSource: [MineTableViewCellModel] = { - var result: [MineTableViewCellModel] = [] - tableTypeSource.forEach { (type) in - switch type { - case .settings: - let model = MineTableViewCellModel(title: ("Settings").localized, - image: UIImage(named: "mine_setting"), type: type) - result.append(model) - case .log: - let model = MineTableViewCellModel(title: ("Log").localized, - image: UIImage(named: "mine_log"), type: type) - result.append(model) - } - } - return result - }() - - private lazy var tableTypeSource: [MineListType] = { - return [.settings, .log] - }() - - func validate(userName: String) -> Bool { - let reg = "^[a-z0-9A-Z\\u4e00-\\u9fa5\\_]{2,20}$" - let predicate = NSPredicate(format: "SELF MATCHES %@", reg) - return predicate.evaluate(with: userName) - } -} diff --git a/application/App-UIKit/Mine/MinePage/UI/MineTableViewCell.swift b/application/App-UIKit/Mine/MinePage/UI/MineTableViewCell.swift deleted file mode 100644 index 0430fc7b..00000000 --- a/application/App-UIKit/Mine/MinePage/UI/MineTableViewCell.swift +++ /dev/null @@ -1,101 +0,0 @@ -// -// MainTableViewCell.swift -// App-UIKit -// -// Created by yukiwwwang on 2025/8/12. -// - -import Foundation -import UIKit - -class MineTableViewCell: UITableViewCell { - - private let titleImageView: UIImageView = { - let imageV = UIImageView(frame: .zero) - return imageV - }() - - private let titleLabel: UILabel = { - let label = UILabel(frame: .zero) - label.font = UIFont(name: "PingFangSC-Semibold", size: 14) - label.textColor = UIColor("000000") - return label - }() - - private let detailLabel: UILabel = { - let label = UILabel(frame: .zero) - label.font = UIFont(name: "PingFangSC-Regular", size: 12) - label.isHidden = true - label.textColor = UIColor("727A8A") - label.textAlignment = .left - return label - }() - - private let detailImageView: UIImageView = { - let imageV = UIImageView(image: UIImage(named: "mine_detail")) - return imageV - }() - - var model: MineTableViewCellModel? { - didSet { - guard let model = model else { - return - } - titleImageView.image = model.image - titleLabel.text = model.title - } - } - - override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { - super.init(style: style, reuseIdentifier: reuseIdentifier) - selectionStyle = .none - backgroundColor = .clear - } - - required init?(coder: NSCoder) { - fatalError("init(coder:) has not been implemented") - } - - private var isViewReady = false - override func didMoveToWindow() { - super.didMoveToWindow() - guard !isViewReady else { - return - } - isViewReady = true - constructViewHierarchy() - activateConstraints() - } - - private func constructViewHierarchy() { - contentView.addSubview(titleImageView) - contentView.addSubview(titleLabel) - contentView.addSubview(detailImageView) - contentView.addSubview(detailLabel) - } - - private func activateConstraints() { - titleImageView.snp.makeConstraints { make in - make.left.equalTo(contentView).offset(20.scale375Width()) - make.centerY.equalTo(contentView) - make.width.height.equalTo(24.scale375Width()) - } - - detailImageView.snp.makeConstraints { make in - make.right.equalTo(contentView).offset(-20.scale375Width()) - make.centerY.equalTo(titleImageView) - make.width.height.equalTo(18.scale375Width()) - } - - titleLabel.snp.makeConstraints { make in - make.centerY.equalTo(titleImageView) - make.left.equalTo(titleImageView.snp.right).offset(20.scale375Width()) - make.right.lessThanOrEqualTo(detailImageView.snp.left).offset(-10.scale375Width()) - } - - detailLabel.snp.makeConstraints { make in - make.right.equalTo(detailImageView.snp.left).offset(-4.scale375Width()) - make.centerY.equalTo(titleImageView) - } - } -} diff --git a/application/App-UIKit/Mine/MinePage/UI/MineView.swift b/application/App-UIKit/Mine/MinePage/UI/MineView.swift deleted file mode 100644 index 8bd2e6b2..00000000 --- a/application/App-UIKit/Mine/MinePage/UI/MineView.swift +++ /dev/null @@ -1,280 +0,0 @@ -// -// MineView.swift -// App-UIKit -// -// Created by yukiwwwang on 2025/8/8. -// - -import Foundation -import Kingfisher -import UIKit -import TUICore -import AtomicXCore -import AtomicX - -protocol MineViewDelegate: NSObjectProtocol { - func didTapBackOnMine() - func didTapSettingsOnMine() - func didTapLogOnMine() - func didRequestLogout() -} - -class MineView: UIView { - private let screenWidth = UIScreen.main.bounds.width - let viewModel: MineViewModel - weak var delegate: MineViewController? - - init(viewModel: MineViewModel, frame: CGRect = .zero) { - self.viewModel = viewModel - super.init(frame: frame) - } - - private let backBtn: UIButton = { - let btn = UIButton(type: .system) - btn.setBackgroundImage(UIImage(named: "mine_goback"), for: .normal) - btn.sizeToFit() - return btn - }() - - private let titleLabel: UILabel = { - let label = UILabel(frame: .zero) - label.font = UIFont(name: "PingFangSC-Semibold", size: 16) - label.text = ("Personal Center").localized - label.textAlignment = .center - label.textColor = .black - return label - }() - - required init?(coder: NSCoder) { - fatalError("init(coder:) has not been implemented") - } - - private let bgImageView: UIImageView = { - let imageView = UIImageView(frame: .zero) - imageView.contentMode = .scaleAspectFill - imageView.image = UIImage(named: "mine_bg_icon") - return imageView - }() - - private let headImageDiameter: CGFloat = 72 - private lazy var headImageView: UIImageView = { - let imageV = UIImageView(frame: .zero) - imageV.contentMode = .scaleAspectFill - imageV.layer.cornerRadius = headImageDiameter / 2 - imageV.clipsToBounds = true - return imageV - }() - - private let userNameLabel: UILabel = { - let label = UILabel() - label.text = "USERID" - label.textColor = UIColor("262B32") - label.font = UIFont(name: "PingFangSC-Semibold", size: 18) - label.textAlignment = .center - label.lineBreakMode = .byTruncatingTail - return label - }() - - private let userIdLabel: UILabel = { - let label = UILabel(frame: .zero) - label.font = UIFont(name: "PingFangSC-Regular", size: 12) - label.textColor = UIColor("626E84") - return label - }() - - private let containerView: UIView = { - let view = UIView(frame: .zero) - view.backgroundColor = .white - return view - }() - - private let tableView: UITableView = { - let tableView = UITableView(frame: .zero, style: .plain) - tableView.backgroundColor = .clear - tableView.separatorStyle = .none - tableView.contentInset = UIEdgeInsets(top: 0, left: 0, bottom: 48, right: 0) - return tableView - }() - - - private let logoutBtn: UIButton = { - let btn = UIButton(type: .custom) - btn.setTitle(("Log out").localized, for: .normal) - btn.setTitleColor(UIColor("F33A50"), for: .normal) - btn.titleLabel?.font = UIFont(name: "PingFangSC-Semibold", size: 16) - btn.backgroundColor = UIColor.white - btn.sizeToFit() - return btn - }() - - override func draw(_ rect: CGRect) { - super.draw(rect) - containerView.roundedRect(rect: containerView.bounds, byRoundingCorners: .allCorners, cornerRadii: CGSize(width: 10, height: 10)) - logoutBtn.roundedRect(rect: logoutBtn.bounds, byRoundingCorners: .allCorners, cornerRadii: CGSize(width: 10, height: 10)) - } - - private var isViewReady = false - override func didMoveToWindow() { - super.didMoveToWindow() - guard !isViewReady else { - return - } - backgroundColor = UIColor("EBEDF5") - isViewReady = true - constructViewHierarchy() - activateConstraints() - bindInteraction() - updateProfile() - } - - private func constructViewHierarchy() { - addSubview(bgImageView) - addSubview(backBtn) - addSubview(titleLabel) - addSubview(headImageView) - addSubview(userNameLabel) - addSubview(userIdLabel) - addSubview(containerView) - containerView.addSubview(tableView) - addSubview(logoutBtn) - } - - private func activateConstraints() { - bgImageView.snp.makeConstraints { make in - make.top.equalToSuperview() - make.centerX.equalToSuperview() - make.width.equalTo(screenWidth) - make.height.equalTo(screenWidth * (112.0 / 375.0) + navigationFullHeight()) - } - - backBtn.snp.makeConstraints { make in - make.centerY.equalTo(titleLabel) - make.leading.equalToSuperview().offset(20.scale375Width()) - make.width.height.equalTo(24.scale375Width()) - } - - titleLabel.snp.makeConstraints { make in - make.top.equalToSuperview().offset(statusBarHeight()) - make.centerX.equalToSuperview() - make.width.equalTo(screenWidth/2.0) - make.height.equalTo(44.scale375Height()) - } - - headImageView.snp.makeConstraints { make in - make.bottom.equalTo(bgImageView) - make.centerX.equalTo(bgImageView) - make.width.height.equalTo(headImageDiameter) - } - - userNameLabel.snp.makeConstraints { make in - make.top.equalTo(headImageView.snp.bottom).offset(12.scale375Height()) - make.leading.equalToSuperview().offset(20.scale375Width()) - make.trailing.equalToSuperview().offset(-20.scale375Width()) - make.centerX.equalToSuperview() - } - - userIdLabel.snp.makeConstraints { make in - make.top.equalTo(userNameLabel.snp.bottom).offset(2.scale375Height()) - make.centerX.equalToSuperview() - } - - containerView.snp.makeConstraints { make in - make.top.equalTo(userIdLabel.snp.bottom).offset(20.scale375Height()) - make.leading.equalToSuperview().offset(20.scale375Width()) - make.trailing.equalToSuperview().offset(-20.scale375Width()) - make.height.equalTo(60.scale375Height() * CGFloat(viewModel.tableDataSource.count) + 6.scale375Height()) - } - - tableView.snp.makeConstraints { make in - make.top.equalTo(containerView.snp.top).offset(8.scale375Height()) - make.leading.trailing.equalTo(containerView) - make.bottom.equalTo(containerView.snp.bottom).offset(-8.scale375Height()) - } - - logoutBtn.snp.makeConstraints { make in - make.top.equalTo(containerView.snp.bottom).offset(12.scale375Height()) - make.leading.equalToSuperview().offset(20.scale375Width()) - make.trailing.equalToSuperview().offset(-20.scale375Width()) - make.height.equalTo(52.scale375Height()) - } - } - - private func bindInteraction() { - backBtn.addTarget(self, action: #selector(goBack(sender:)), for: .touchUpInside) - logoutBtn.addTarget(self, action: #selector(logout(sender:)), for: .touchUpInside) - tableView.register(MineTableViewCell.self, forCellReuseIdentifier: "MineTableViewCell") - tableView.delegate = self - tableView.dataSource = self - } - - func updateProfile() { - DispatchQueue.main.async { - self.updateHeadImage() - self.updateName() - self.updateUserId() - } - } - - private func updateHeadImage() { - if let url = URL(string: LoginStore.shared.state.value.loginUserInfo?.avatarURL ?? "") { - headImageView.kf.setImage(with: .network(url), placeholder: UIImage(named: "default_avatar")) - } else { - headImageView.image = UIImage(named: "default_avatar") - } - } - - private func updateUserId() { - if let userID = LoginStore.shared.state.value.loginUserInfo?.userID { - userIdLabel.text = "ID:\(String(describing: userID))" - } - } - - private func updateName() { - if let nickName = LoginStore.shared.state.value.loginUserInfo?.nickname { - userNameLabel.text = nickName - userNameLabel.snp.makeConstraints { make in - make.top.equalTo(headImageView.snp.bottom).offset(12.scale375Height()) - make.centerX.equalToSuperview() - make.width.lessThanOrEqualTo(screenWidth - 80.scale375Width()) - } - } - } - - @objc private func goBack(sender: UIButton) { - delegate?.didTapBackOnMine() - } - - @objc private func logout(sender: UIButton) { - delegate?.didRequestLogout() - } -} - -extension MineView : UITableViewDataSource { - func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { - return viewModel.tableDataSource.count - } - func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { - let cell = tableView.dequeueReusableCell(withIdentifier: "MineTableViewCell", for: indexPath) - if let scell = cell as? MineTableViewCell { - let model = viewModel.tableDataSource[indexPath.row] - scell.model = model - } - return cell - } - func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { - return 58 - } -} - -extension MineView : UITableViewDelegate { - func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { - let model = viewModel.tableDataSource[indexPath.row] - switch model.type { - case .settings: - delegate?.didTapSettingsOnMine() - case .log: - delegate?.didTapLogOnMine() - } - } -} - diff --git a/application/App-UIKit/Mine/MinePage/UI/MineViewController.swift b/application/App-UIKit/Mine/MinePage/UI/MineViewController.swift deleted file mode 100644 index 595612b2..00000000 --- a/application/App-UIKit/Mine/MinePage/UI/MineViewController.swift +++ /dev/null @@ -1,93 +0,0 @@ -// -// MineViewController.swift -// App-UIKit -// -// Created by yukiwwwang on 2025/8/8. -// -import UIKit -import ImSDK_Plus -import AtomicX -import TUICore -import AtomicXCore - -@objc class MineViewController: UIViewController { - private lazy var rootView: MineView = { - let viewModel = MineViewModel() - let view = MineView(viewModel: viewModel) - view.delegate = self - return view - }() - - override func viewDidLoad() { - super.viewDidLoad() - view.backgroundColor = UIColor("EBEDF5") - constructViewHierarchy() - activateConstraints() - } - - private func constructViewHierarchy() { - view.addSubview(rootView) - } - - private func activateConstraints() { - rootView.snp.makeConstraints { make in - make.edges.equalToSuperview() - } - } - - override func viewWillAppear(_ animated: Bool) { - super.viewWillAppear(animated) - navigationController?.setNavigationBarHidden(true, animated: true) - rootView.updateProfile() - } - - override func viewWillDisappear(_ animated: Bool) { - super.viewWillDisappear(animated) - navigationController?.setNavigationBarHidden(false, animated: false) - } -} - -extension MineViewController: MineViewDelegate { - func didTapBackOnMine() { - self.navigationController?.popViewController(animated: true) - } - - func didTapSettingsOnMine() { - let mineSettingsViewController = MineSettingsViewController() - navigationController?.pushViewController(mineSettingsViewController, animated: true) - } - - func didTapLogOnMine() { - LogUploadManager.sharedInstance.startUpload(withSuccessHandler: nil) { - debugPrint("Log upload canceled") - } - } - - func didRequestLogout() { - let alertVC = UIAlertController(title: ("Are you sure you want to log out?").localized, message: nil, preferredStyle: .alert) - let cancelAction = UIAlertAction(title: ("Cancel").localized, style: .cancel, handler: nil) - let sureAction = UIAlertAction(title: ("Yes").localized, style: .default) { _ in - UserDefaults.standard.removeObject(forKey: "UserIdKey") - LoginStore.shared.logout { _ in - TUILogin.logout { - DispatchQueue.main.async { - if let appDelegate = UIApplication.shared.delegate as? AppDelegate { - appDelegate.showLoginViewController() - } - } - } fail: { _, _ in - DispatchQueue.main.async { - if let appDelegate = UIApplication.shared.delegate as? AppDelegate { - appDelegate.showLoginViewController() - } - } - } - } - } - alertVC.addAction(cancelAction) - alertVC.addAction(sureAction) - present(alertVC, animated: true, completion: nil) - } -} - - diff --git a/application/App-UIKit/Mine/MineSettings/Model/LanguageSelectCellModel.swift b/application/App-UIKit/Mine/MineSettings/Model/LanguageSelectCellModel.swift deleted file mode 100644 index e75d3443..00000000 --- a/application/App-UIKit/Mine/MineSettings/Model/LanguageSelectCellModel.swift +++ /dev/null @@ -1,18 +0,0 @@ -// -// LanguageSelectCellModel.swift -// App-UIKit -// -// Created by yukiwwwang on 2025/8/19. -// - -struct LanguageSelectCellModel { - let languageID: String - let languageName: String - var selected: Bool - - init(languageID: String, languageName: String = "", selected: Bool = false) { - self.languageID = languageID - self.languageName = languageName - self.selected = selected - } -} diff --git a/application/App-UIKit/Mine/MineSettings/Model/MineSettingsModel.swift b/application/App-UIKit/Mine/MineSettings/Model/MineSettingsModel.swift deleted file mode 100644 index f5dadc80..00000000 --- a/application/App-UIKit/Mine/MineSettings/Model/MineSettingsModel.swift +++ /dev/null @@ -1,15 +0,0 @@ -// -// MineSettingsModel.swift -// App-UIKit -// -// Created by yukiwwwang on 2025/8/13. -// -import UIKit - -class MineSettingsModel: NSObject { - let title: String - init(title: String, value: String = "") { - self.title = title - super.init() - } -} diff --git a/application/App-UIKit/Mine/MineSettings/UI/AvatarCardItem.swift b/application/App-UIKit/Mine/MineSettings/UI/AvatarCardItem.swift deleted file mode 100644 index 4becde14..00000000 --- a/application/App-UIKit/Mine/MineSettings/UI/AvatarCardItem.swift +++ /dev/null @@ -1,23 +0,0 @@ -// -// AvatarCardItem.swift -// TIMCommon -// -// Created by AI Assistant on 2025/10/10. -// Copyright © 2025 Tencent. All rights reserved. -// - -import UIKit - -class AvatarCardItem: NSObject { - var posterUrlStr: String? - var isSelect: Bool = false - var fullUrlStr: String? - var isDefaultBackgroundItem: Bool = false - var isGroupGridAvatar: Bool = false - var createGroupType: String? - var cacheGroupGridAvatarImage: UIImage? - - override init() { - super.init() - } -} \ No newline at end of file diff --git a/application/App-UIKit/Mine/MineSettings/UI/AvatarCollectionCell.swift b/application/App-UIKit/Mine/MineSettings/UI/AvatarCollectionCell.swift deleted file mode 100644 index ef354ffc..00000000 --- a/application/App-UIKit/Mine/MineSettings/UI/AvatarCollectionCell.swift +++ /dev/null @@ -1,164 +0,0 @@ -// -// AvatarCollectionCell.swift -// TIMCommon -// -// Created by AI Assistant on 2025/10/10. -// Copyright © 2025 Tencent. All rights reserved. -// - -import UIKit -import SDWebImage - -class AvatarCollectionCell: UICollectionViewCell { - - // MARK: - Properties - var cardItem: AvatarCardItem? { - didSet { - updateCellView() - } - } - - private lazy var imageView = UIImageView(frame: bounds) - private var selectedView: UIImageView! - private lazy var bgView: UIView = UIView(frame: .zero) - private var descLabel: UILabel! - - // MARK: - Initialization - override init(frame: CGRect) { - super.init(frame: frame) - setupViews() - } - - required init?(coder: NSCoder) { - super.init(coder: coder) - setupViews() - } - - // MARK: - Layout - override func layoutSubviews() { - super.layoutSubviews() - updateCellView() - selectedView.frame = CGRect(x: imageView.frame.width - 20, y: 4, width: 16, height: 16) - } - - // MARK: - Private Methods - private func setupViews() { - setupImageView() - setupSelectedView() - setupMaskView() - } - - private func setupImageView() { - imageView.isUserInteractionEnabled = true - imageView.layer.cornerRadius = 8.0 // TUIConfig.defaultConfig.avatarCornerRadius - imageView.layer.borderWidth = 2 - imageView.layer.masksToBounds = true - contentView.addSubview(imageView) - } - - private func setupSelectedView() { - selectedView = UIImageView() - selectedView.image = UIImage(named: "icon_avatar_selected") // TIMCommonImagePath - selectedView.isHidden = true - imageView.addSubview(selectedView) - } - - private func setupMaskView() { - bgView.backgroundColor = UIColor("cccccc") - bgView.isHidden = true - imageView.addSubview(bgView) - - descLabel = UILabel() - descLabel.text = "默认背景" // TIMCommonLocalizableString - descLabel.textColor = .white - descLabel.font = UIFont.systemFont(ofSize: 13) - descLabel.textAlignment = .center - bgView.addSubview(descLabel) - } - - private func updateCellView() { - updateSelectedUI() - updateImageView() - updateMaskView() - } - - func updateSelectedUI() { - guard let cardItem = cardItem else { return } - - if cardItem.isSelect { - imageView.layer.borderColor = UIColor.systemBlue.cgColor - selectedView.isHidden = false - } else { - if cardItem.isDefaultBackgroundItem { - imageView.layer.borderColor = UIColor.gray.withAlphaComponent(0.1).cgColor - } else { - imageView.layer.borderColor = UIColor.clear.cgColor - } - selectedView.isHidden = true - } - } - - private func updateImageView() { - guard let cardItem = cardItem else { return } - - if cardItem.isGroupGridAvatar { - updateNormalGroupGridAvatar() - } else { - let placeholder = UIImage(named: "default_c2c_head_img") - if let urlString = cardItem.posterUrlStr, let url = URL(string: urlString) { - imageView.sd_setImage(with: url, placeholderImage: placeholder) - } else { - imageView.image = placeholder - } - } - } - - private func updateMaskView() { - guard let cardItem = cardItem else { return } - - if cardItem.isDefaultBackgroundItem { - bgView.isHidden = false - bgView.frame = CGRect(x: 0, y: imageView.frame.height - 28, - width: imageView.frame.width, height: 28) - descLabel.sizeToFit() - descLabel.center = CGPoint(x: bgView.bounds.midX, y: bgView.bounds.midY) - } else { - bgView.isHidden = true - } - } - - private func updateNormalGroupGridAvatar() { - guard let cardItem = cardItem else { return } - - if let cacheImage = cardItem.cacheGroupGridAvatarImage { - imageView.image = cacheImage - } - } -} - -// MARK: - UIColor Extension -extension UIColor { - convenience init(hex: String) { - let hex = hex.trimmingCharacters(in: CharacterSet.alphanumerics.inverted) - var int: UInt64 = 0 - Scanner(string: hex).scanHexInt64(&int) - let a, r, g, b: UInt64 - switch hex.count { - case 3: // RGB (12-bit) - (a, r, g, b) = (255, (int >> 8) * 17, (int >> 4 & 0xF) * 17, (int & 0xF) * 17) - case 6: // RGB (24-bit) - (a, r, g, b) = (255, int >> 16, int >> 8 & 0xFF, int & 0xFF) - case 8: // ARGB (32-bit) - (a, r, g, b) = (int >> 24, int >> 16 & 0xFF, int >> 8 & 0xFF, int & 0xFF) - default: - (a, r, g, b) = (1, 1, 1, 0) - } - - self.init( - red: Double(r) / 255, - green: Double(g) / 255, - blue: Double(b) / 255, - alpha: Double(a) / 255 - ) - } -} diff --git a/application/App-UIKit/Mine/MineSettings/UI/AvatarSelectorType.swift b/application/App-UIKit/Mine/MineSettings/UI/AvatarSelectorType.swift deleted file mode 100644 index e4ab3166..00000000 --- a/application/App-UIKit/Mine/MineSettings/UI/AvatarSelectorType.swift +++ /dev/null @@ -1,17 +0,0 @@ -// -// AvatarSelectorType.swift -// TIMCommon -// -// Created by AI Assistant on 2025/10/10. -// Copyright © 2025 Tencent. All rights reserved. -// - -import Foundation - -/// 头像选择类型枚举 -enum AvatarSelectorType: Int { - case userAvatar = 0 // 用户头像 - case groupAvatar = 1 // 群组头像 - case cover = 2 // 封面 - case conversationBackgroundCover = 3 // 会话背景封面 -} \ No newline at end of file diff --git a/application/App-UIKit/Mine/MineSettings/UI/AvatarSelectorViewController.swift b/application/App-UIKit/Mine/MineSettings/UI/AvatarSelectorViewController.swift deleted file mode 100644 index 93618c79..00000000 --- a/application/App-UIKit/Mine/MineSettings/UI/AvatarSelectorViewController.swift +++ /dev/null @@ -1,353 +0,0 @@ -// -// AvatarSelectorViewController.swift -// TIMCommon -// -// Created by AI Assistant on 2025/10/10. -// Copyright © 2025 Tencent. All rights reserved. -// - -import UIKit -import SDWebImage - -class AvatarSelectorViewController: UIViewController { - - // MARK: - Properties - var selectCallback: ((String?) -> Void)? - var selectAvatarType: AvatarSelectorType = .userAvatar - var profileFaceURL: String? - var cacheGroupGridAvatarImage: UIImage? - var createGroupType: String? - - // MARK: - Private Properties - private var titleView: UILabel! - private var collectionView: UICollectionView! - private var dataArray: [AvatarCardItem] = [] - private var currentSelectCardItem: AvatarCardItem? { - didSet { - updateRightButton() - } - } - private var rightButton: UIButton! - - private let reuseIdentifier = "AvatarCollectionCell" - - // MARK: - Constants - private let userAvatarCount = 20 - private let groupAvatarCount = 15 - private let backgroundCoverCount = 10 - private let communityCoverCount = 8 - - // MARK: - Lifecycle - override func viewDidLoad() { - super.viewDidLoad() - setupUI() - setupNavigator() - loadData() - } - - // MARK: - Private Methods - private func setupUI() { - view.backgroundColor = UIColor.systemGroupedBackground - - let flowLayout = UICollectionViewFlowLayout() - flowLayout.scrollDirection = .vertical - - collectionView = UICollectionView(frame: view.bounds, collectionViewLayout: flowLayout) - collectionView.backgroundColor = UIColor.systemGroupedBackground - collectionView.dataSource = self - collectionView.delegate = self - collectionView.register(AvatarCollectionCell.self, forCellWithReuseIdentifier: reuseIdentifier) - - view.addSubview(collectionView) - - // Auto Layout - collectionView.translatesAutoresizingMaskIntoConstraints = false - NSLayoutConstraint.activate([ - collectionView.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor), - collectionView.leadingAnchor.constraint(equalTo: view.leadingAnchor), - collectionView.trailingAnchor.constraint(equalTo: view.trailingAnchor), - collectionView.bottomAnchor.constraint(equalTo: view.bottomAnchor) - ]) - } - - private func setupNavigator() { - // Title - let titleText: String - switch selectAvatarType { - case .cover: - titleText = "选择封面" - case .conversationBackgroundCover: - titleText = "选择背景" - default: - titleText = "选择头像" - } - title = titleText - - // Right button - rightButton = UIButton(type: .system) - rightButton.setTitle("保存", for: .normal) - rightButton.titleLabel?.font = UIFont.systemFont(ofSize: 14) - rightButton.setTitleColor(.gray, for: .normal) - rightButton.addTarget(self, action: #selector(rightBarButtonClick), for: .touchUpInside) - - let rightItem = UIBarButtonItem(customView: rightButton) - navigationItem.rightBarButtonItem = rightItem - } - - private func loadData() { - dataArray.removeAll() - - switch selectAvatarType { - case .userAvatar: - for i in 1...userAvatarCount { - let cardItem = createCardItem(byURL: getUserAvatarURL(i)) - dataArray.append(cardItem) - } - - case .groupAvatar: - // Add group grid avatar if enabled - if let cacheImage = cacheGroupGridAvatarImage { - let cardItem = createGroupGridAvatarCardItem() - dataArray.append(cardItem) - } - - for i in 1...groupAvatarCount { - let cardItem = createCardItem(byURL: getGroupAvatarURL(i)) - dataArray.append(cardItem) - } - - case .conversationBackgroundCover: - let cleanCardItem = createCleanCardItem() - dataArray.append(cleanCardItem) - - for i in 1...backgroundCoverCount { - let cardItem = createCardItem(byURL: getBackgroundCoverURL(i), - fullURL: getBackgroundCoverFullURL(i)) - dataArray.append(cardItem) - } - - case .cover: - for i in 1...communityCoverCount { - let cardItem = createCardItem(byURL: getCommunityCoverURL(i)) - dataArray.append(cardItem) - } - } - - collectionView.reloadData() - } - - private func createCardItem(byURL urlString: String) -> AvatarCardItem { - let cardItem = AvatarCardItem() - cardItem.posterUrlStr = urlString - cardItem.isSelect = false - - if cardItem.posterUrlStr == profileFaceURL { - cardItem.isSelect = true - currentSelectCardItem = cardItem - } - - return cardItem - } - - private func createCardItem(byURL urlString: String, fullURL: String) -> AvatarCardItem { - let cardItem = AvatarCardItem() - cardItem.posterUrlStr = urlString - cardItem.fullUrlStr = fullURL - cardItem.isSelect = false - - if cardItem.posterUrlStr == profileFaceURL || cardItem.fullUrlStr == profileFaceURL { - cardItem.isSelect = true - currentSelectCardItem = cardItem - } - - return cardItem - } - - private func createGroupGridAvatarCardItem() -> AvatarCardItem { - let cardItem = AvatarCardItem() - cardItem.posterUrlStr = nil - cardItem.isSelect = false - cardItem.isGroupGridAvatar = true - cardItem.createGroupType = createGroupType - cardItem.cacheGroupGridAvatarImage = cacheGroupGridAvatarImage - - if profileFaceURL == nil { - cardItem.isSelect = true - currentSelectCardItem = cardItem - } - - return cardItem - } - - private func createCleanCardItem() -> AvatarCardItem { - let cardItem = AvatarCardItem() - cardItem.posterUrlStr = nil - cardItem.isSelect = false - cardItem.isDefaultBackgroundItem = true - - if profileFaceURL?.isEmpty != false { - cardItem.isSelect = true - currentSelectCardItem = cardItem - } - - return cardItem - } - - private func updateRightButton() { - if currentSelectCardItem != nil { - rightButton.setTitleColor(.systemBlue, for: .normal) - } else { - rightButton.setTitleColor(.gray, for: .normal) - } - } - - @objc private func rightBarButtonClick() { - guard let currentItem = currentSelectCardItem else { return } - - if selectAvatarType == .conversationBackgroundCover { - if let fullURL = currentItem.fullUrlStr, !fullURL.isEmpty { - // Show loading - showLoadingToast() - - // Prefetch image - SDWebImagePrefetcher.shared.prefetchURLs([URL(string: fullURL)].compactMap { $0 }) { [weak self] _, _ in - DispatchQueue.main.asyncAfter(deadline: .now() + 0.25) { - self?.hideLoadingToast() - self?.showSuccessToast("背景设置成功") - self?.selectCallback?(currentItem.fullUrlStr) - self?.navigationController?.popViewController(animated: true) - } - } - } else { - showSuccessToast("背景设置成功") - selectCallback?(currentItem.fullUrlStr) - navigationController?.popViewController(animated: true) - } - } else { - selectCallback?(currentItem.posterUrlStr) - navigationController?.popViewController(animated: true) - } - } - - private func recoverSelectedStatus() { - guard let currentItem = currentSelectCardItem else { return } - - if let index = dataArray.firstIndex(of: currentItem) { - currentItem.isSelect = false - let indexPath = IndexPath(row: index, section: 0) - - if let cell = collectionView.cellForItem(at: indexPath) as? AvatarCollectionCell { - cell.updateSelectedUI() - } else { - collectionView.layoutIfNeeded() - if let cell = collectionView.cellForItem(at: indexPath) as? AvatarCollectionCell { - cell.updateSelectedUI() - } - } - } - } - - // MARK: - URL Generators (Mock implementations) - private func getUserAvatarURL(_ index: Int) -> String { - return "https://im.sdk.qcloud.com/download/tuikit-resource/avatar/avatar_\(index).png" - } - - private func getGroupAvatarURL(_ index: Int) -> String { - return "https://im.sdk.qcloud.com/download/tuikit-resource/group-avatar/group_avatar_\(index).png" - } - - private func getBackgroundCoverURL(_ index: Int) -> String { - return "https://im.sdk.qcloud.com/download/tuikit-resource/conversation-backgroundImage/backgroundImage_\(index).png" - } - - private func getBackgroundCoverFullURL(_ index: Int) -> String { - return "https://im.sdk.qcloud.com/download/tuikit-resource/conversation-backgroundImage/backgroundImage_\(index)_full.png" - } - - private func getCommunityCoverURL(_ index: Int) -> String { - return "https://im.sdk.qcloud.com/download/tuikit-resource/community-cover/community_cover_\(index).png" - } - - // MARK: - Toast Methods (Mock implementations) - private func showLoadingToast() { - // Implementation for loading toast - } - - private func hideLoadingToast() { - // Implementation for hiding loading toast - } - - private func showSuccessToast(_ message: String) { - // Implementation for success toast - } -} - -// MARK: - UICollectionViewDataSource -extension AvatarSelectorViewController: UICollectionViewDataSource { - - func numberOfSections(in collectionView: UICollectionView) -> Int { - return 1 - } - - func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { - return dataArray.count - } - - func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { - let cell = collectionView.dequeueReusableCell(withReuseIdentifier: reuseIdentifier, for: indexPath) as! AvatarCollectionCell - - if indexPath.row < dataArray.count { - cell.cardItem = dataArray[indexPath.row] - } - - return cell - } -} - -// MARK: - UICollectionViewDelegate -extension AvatarSelectorViewController: UICollectionViewDelegate { - - func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { - recoverSelectedStatus() - - guard let cell = collectionView.cellForItem(at: indexPath) as? AvatarCollectionCell else { - collectionView.layoutIfNeeded() - guard let cell = collectionView.cellForItem(at: indexPath) as? AvatarCollectionCell else { return } - handleCellSelection(cell) - return - } - - handleCellSelection(cell) - } - - private func handleCellSelection(_ cell: AvatarCollectionCell) { - guard let cardItem = cell.cardItem else { return } - - if currentSelectCardItem == cardItem { - currentSelectCardItem = nil - } else { - cardItem.isSelect = true - cell.updateSelectedUI() - currentSelectCardItem = cardItem - } - } -} - -// MARK: - UICollectionViewDelegateFlowLayout -extension AvatarSelectorViewController: UICollectionViewDelegateFlowLayout { - - func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize { - let margin: CGFloat = 15 - let padding: CGFloat = 13 - - let rowCount: CGFloat = (selectAvatarType == .cover || selectAvatarType == .conversationBackgroundCover) ? 2.0 : 4.0 - let width = (view.frame.width - 2 * margin - (rowCount - 1) * padding) / rowCount - let height: CGFloat = (selectAvatarType == .conversationBackgroundCover) ? 125 : 77 - - return CGSize(width: width, height: height) - } - - func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAt section: Int) -> UIEdgeInsets { - return UIEdgeInsets(top: 24, left: 15, bottom: 0, right: 15) - } -} diff --git a/application/App-UIKit/Mine/MineSettings/UI/LanguageSelectCell.swift b/application/App-UIKit/Mine/MineSettings/UI/LanguageSelectCell.swift deleted file mode 100644 index 4a7a9cb7..00000000 --- a/application/App-UIKit/Mine/MineSettings/UI/LanguageSelectCell.swift +++ /dev/null @@ -1,63 +0,0 @@ -// -// LanguageSelectCell.swift -// App-UIKit -// -// Created by yukiwwwang on 2025/8/19. -// - -import UIKit - -class LanguageSelectCell: UITableViewCell { - - let nameLabel: UILabel = { - let label = UILabel(frame: .zero) - label.font = UIFont(name: "PingFangSC-Regular", size: 16) - label.textColor = UIColor("333333") - return label - }() - - let chooseIconView: UIImageView = { - let imageView = UIImageView(image: UIImage(named: "main_mine_choose")) - return imageView - }() - - override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { - super.init(style: style, reuseIdentifier: reuseIdentifier) - selectionStyle = .none - backgroundColor = .clear - } - - required init?(coder: NSCoder) { - fatalError("init(coder:) has not been implemented") - } - - private var isViewReady = false - override func didMoveToWindow() { - super.didMoveToWindow() - guard !isViewReady else { - return - } - isViewReady = true - constructViewHierarchy() - activateConstraints() - } - - private func constructViewHierarchy() { - contentView.addSubview(nameLabel) - contentView.addSubview(chooseIconView) - } - - private func activateConstraints() { - nameLabel.snp.makeConstraints { (make) in - make.leading.equalToSuperview().offset(20.scale375Width()) - make.centerY.equalToSuperview() - } - chooseIconView.snp.makeConstraints { (make) in - make.right.equalToSuperview().offset(-20.scale375Width()) - make.centerY.equalToSuperview() - make.width.height.equalTo(20.scale375Height()) - } - } - -} - diff --git a/application/App-UIKit/Mine/MineSettings/UI/LanguageSelectViewController.swift b/application/App-UIKit/Mine/MineSettings/UI/LanguageSelectViewController.swift deleted file mode 100644 index 3853a6c8..00000000 --- a/application/App-UIKit/Mine/MineSettings/UI/LanguageSelectViewController.swift +++ /dev/null @@ -1,123 +0,0 @@ -// -// LanguageSelectViewController.swift -// App-UIKit -// -// Created by yukiwwwang on 2025/8/18. -// - -import UIKit -import TUICore - -protocol LanguageSelectViewControllerDelegate: NSObjectProtocol { - func onSelectLanguage(cellModel: LanguageSelectCellModel) -> Void -} - -class LanguageSelectViewController: UIViewController { - - weak var delegate: LanguageSelectViewControllerDelegate? - private var dataSource: [LanguageSelectCellModel] = [] - - private let tableView: UITableView = { - let tableView = UITableView(frame: .zero, style: .plain) - tableView.backgroundColor = .clear - tableView.separatorStyle = .none - tableView.contentInset = UIEdgeInsets(top: 20, left: 0, bottom: 20, right: 0) - return tableView - }() - - private func configData() -> () { - self.dataSource = [ - LanguageSelectCellModel(languageID: "zh-Hans", languageName: "简体中文", selected: false), - LanguageSelectCellModel(languageID: "en", languageName: "English", selected: false), - ] - - let languageID = TUIGlobalization.getPreferredLanguage() - - for (index, model) in self.dataSource.enumerated() where languageID == model.languageID { - self.dataSource[index].selected = true - } - } - - override func viewDidLoad() { - super.viewDidLoad() - view.backgroundColor = UIColor.white - self.title = "Change Language".localized - configData() - setupNavigationBackButton() - constructViewHierarchy() - activateConstraints() - bindInteraction() - } - - private func constructViewHierarchy() { - view.addSubview(tableView) - } - - private func activateConstraints() { - tableView.snp.makeConstraints { (make) in - make.edges.equalToSuperview() - } - } - - private func bindInteraction() { - tableView.register(LanguageSelectCell.self, forCellReuseIdentifier: "LanguageSelectCell") - tableView.dataSource = self - tableView.delegate = self - } - - private func setupNavigationBackButton() -> () { - let backBtn = UIButton(type: .custom) - backBtn.setImage(UIImage(named: "back"), for: .normal) - backBtn.addTarget(self, action: #selector(backBtnClick), for: .touchUpInside) - backBtn.sizeToFit() - let item = UIBarButtonItem(customView: backBtn) - item.tintColor = .black - navigationItem.leftBarButtonItem = item - } - - override func viewWillAppear(_ animated: Bool) { - navigationController?.setNavigationBarHidden(false, animated: false) - } - - @objc private func backBtnClick() { - navigationController?.popViewController(animated: true) - } -} - -extension LanguageSelectViewController: UITableViewDataSource { - - func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { - return dataSource.count - } - - func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { - let model = dataSource[indexPath.row] - let cell = tableView.dequeueReusableCell(withIdentifier: "LanguageSelectCell", for: indexPath) - if let cell = cell as? LanguageSelectCell { - cell.nameLabel.text = model.languageName - cell.chooseIconView.isHidden = !model.selected - } - return cell - } - - func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { - return 56 - } -} - -extension LanguageSelectViewController: UITableViewDelegate { - - func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { - let cellModel = self.dataSource[indexPath.row] - TUIGlobalization.setPreferredLanguage(cellModel.languageID) - self.dataSource[indexPath.row].selected = true - for (index, model) in self.dataSource.enumerated() { - if (index != indexPath.row && model.selected) { - self.dataSource[index].selected = false - } - } - tableView.reloadData() - self.delegate?.onSelectLanguage(cellModel: cellModel) - } - -} diff --git a/application/App-UIKit/Mine/MineSettings/UI/MineSettingsTableViewCell.swift b/application/App-UIKit/Mine/MineSettings/UI/MineSettingsTableViewCell.swift deleted file mode 100644 index 0fdb5af8..00000000 --- a/application/App-UIKit/Mine/MineSettings/UI/MineSettingsTableViewCell.swift +++ /dev/null @@ -1,103 +0,0 @@ -// -// MineSettingsTableViewCell.swift -// App-UIKit -// -// Created by yukiwwwang on 2025/8/13. -// - -import UIKit - -class MineSettingsTableViewCell: UITableViewCell { - let titleLabel: UILabel = { - let label = UILabel(frame: .zero) - label.font = UIFont(name: "PingFangSC-Regular", size: 16) - label.textColor = UIColor("333333") - return label - }() - - private let lineView: UIView = { - let view = UIView(frame: .zero) - view.backgroundColor = UIColor("EEEEEE") - return view - }() - - private let detailImageView: UIImageView = { - let imageView = UIImageView(image: UIImage(named: "mine_detail")) - return imageView - }() - - let avatarImageView: UIImageView = { - let imageView = UIImageView(frame: .zero) - imageView.contentMode = .scaleAspectFill - imageView.layer.cornerRadius = 18 - imageView.clipsToBounds = true - imageView.isHidden = true - return imageView - }() - - let nicknameLabel: UILabel = { - let label = UILabel(frame: .zero) - label.font = UIFont(name: "PingFangSC-Regular", size: 15) - label.textColor = UIColor("333333") - label.isHidden = true - label.textAlignment = .right - return label - }() - - override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { - super.init(style: style, reuseIdentifier: reuseIdentifier) - selectionStyle = .none - backgroundColor = .clear - } - - required init?(coder: NSCoder) { - fatalError("init(coder:) has not been implemented") - } - - private var isViewReady = false - override func didMoveToWindow() { - super.didMoveToWindow() - guard !isViewReady else { - return - } - isViewReady = true - constructViewHierarchy() - activateConstraints() - } - - private func constructViewHierarchy() { - contentView.addSubview(titleLabel) - contentView.addSubview(avatarImageView) - contentView.addSubview(nicknameLabel) - contentView.addSubview(detailImageView) - contentView.addSubview(lineView) - } - - private func activateConstraints() { - titleLabel.snp.makeConstraints { (make) in - make.leading.equalToSuperview().offset(20.scale375Width()) - make.centerY.equalToSuperview() - } - avatarImageView.snp.makeConstraints { (make) in - make.centerY.equalToSuperview() - make.trailing.equalTo(detailImageView.snp.leading).offset(-10.scale375Width()) - make.width.height.equalTo(36) - } - nicknameLabel.snp.makeConstraints { (make) in - make.centerY.equalToSuperview() - make.trailing.equalTo(detailImageView.snp.leading).offset(-10.scale375Width()) - make.height.equalTo(22) - make.width.lessThanOrEqualTo(120) - } - detailImageView.snp.makeConstraints { (make) in - make.trailing.equalToSuperview().offset(-20.scale375Width()) - make.centerY.equalToSuperview() - } - lineView.snp.makeConstraints { (make) in - make.leading.equalTo(titleLabel) - make.trailing.equalToSuperview().offset(-20.scale375Width()) - make.bottom.equalToSuperview() - make.height.equalTo(1.scale375Height()) - } - } -} diff --git a/application/App-UIKit/Mine/MineSettings/UI/MineSettingsViewController.swift b/application/App-UIKit/Mine/MineSettings/UI/MineSettingsViewController.swift deleted file mode 100644 index 6fd94011..00000000 --- a/application/App-UIKit/Mine/MineSettings/UI/MineSettingsViewController.swift +++ /dev/null @@ -1,197 +0,0 @@ -// -// MineSettingsViewController.swift -// App-UIKit -// -// Created by yukiwwwang on 2025/8/12. -// - -import UIKit -import SnapKit -import AtomicX -import TUICore - -class MineSettingsViewController: UIViewController{ - - private let tableView: UITableView = { - let tableView = UITableView(frame: .zero, style: .plain) - tableView.backgroundColor = .clear - tableView.separatorStyle = .none - tableView.contentInset = UIEdgeInsets(top: 20, left: 0, bottom: 20, right: 0) - return tableView - }() - - private let backButton: UIButton = { - let button = UIButton(type: .custom) - button.setImage(UIImage(named: "mine_goback"), for: .normal) - button.tintColor = .black - button.sizeToFit() - return button - }() - - private let dataSource: [MineSettingsModel] = { - var res : [MineSettingsModel] = [] - let avatar = MineSettingsModel(title: ("Avatar").localized) - res.append(avatar) - - let nickName = MineSettingsModel(title: ("Nickname").localized) - res.append(nickName) - - let language = MineSettingsModel(title: ("Language").localized) - res.append(language) - - return res - }() - - override func viewDidLoad() { - super.viewDidLoad() - view.backgroundColor = .white - setupNavigationBar() - constructViewHierarchy() - activateConstraints() - bindInteraction() - } - - override func viewWillAppear(_ animated: Bool) { - super.viewWillAppear(animated) - navigationController?.setNavigationBarHidden(false, animated: false) - tableView.reloadData() - } - - private func setupNavigationBar() { - self.title = ("Settings").localized - navigationController?.navigationBar.titleTextAttributes = [ - .foregroundColor : UIColor.black, - .font: UIFont(name: "PingFangSC-Semibold", size: 18) ?? UIFont.systemFont(ofSize: 18) - ] - let item = UIBarButtonItem(customView: backButton) - navigationItem.leftBarButtonItem = item - } - - private func constructViewHierarchy() { - view.addSubview(tableView) - } - - private func activateConstraints() { - tableView.snp.makeConstraints { make in - make.edges.equalToSuperview() - } - } - - private func bindInteraction() { - tableView.dataSource = self - tableView.delegate = self - tableView.register(MineSettingsTableViewCell.self, forCellReuseIdentifier: "MineSettingsTableViewCell") - backButton.addTarget(self, action: #selector(backBtnClick), for: .touchUpInside) - } - - @objc private func backBtnClick() { - navigationController?.popViewController(animated: true) - } - - var currentUserInfo: V2TIMUserFullInfo? - @objc func didSelectChangeHead() { - let avatarVC = AvatarSelectorViewController() - avatarVC.selectAvatarType = .userAvatar - avatarVC.profileFaceURL = TUILogin.getFaceUrl() ?? "" - self.navigationController?.pushViewController(avatarVC, animated: true) - avatarVC.selectCallback = { [weak self] urlString in - guard let self = self, let userID = TUILogin.getUserID() else { return } - let info = V2TIMUserFullInfo() - info.faceURL = urlString - V2TIMManager.sharedInstance().setSelfInfo(info: info) { - V2TIMManager.sharedInstance().getUsersInfo([userID]) { userInfos in - self.currentUserInfo = userInfos?.first - self.tableView.reloadRows(at: [IndexPath(row: 0, section: 0)], with: .none) - } fail: { _,_ in - self.tableView.reloadRows(at: [IndexPath(row: 0, section: 0)], with: .none) - } - } fail: { code, err in - self.view.showAtomicToast(text: ("profileUpdateFailed").localized) - } - } - } - - @objc func didSelectChangeNick() { - let view = ProfileUpdateInfoView(oldInfo: TUILogin.getNickName()) - view.show(in: self) - view.submitClosure = { [weak self] newName in - guard let self = self, let userID = TUILogin.getUserID() else { return } - let info = V2TIMUserFullInfo() - info.nickName = newName - V2TIMManager.sharedInstance().setSelfInfo(info: info) { - V2TIMManager.sharedInstance().getUsersInfo([userID]) { userInfos in - self.currentUserInfo = userInfos?.first - self.tableView.reloadRows(at: [IndexPath(row: 1, section: 0)], with: .none) - } fail: { _,_ in - self.tableView.reloadRows(at: [IndexPath(row: 1, section: 0)], with: .none) - } - } fail: { code, err in - self.view.showAtomicToast(text: ("profileUpdateFailed").localized) - debugPrint("updateUserInfoWithUserModel:\(code)==\(String(describing: err))") - } - } - } - - @objc func didSelectChangeLanguage() { - let vc = LanguageSelectViewController() - vc.delegate = self - navigationController?.pushViewController(vc, animated: true) - } -} - -extension MineSettingsViewController: UITableViewDataSource { - func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { - return dataSource.count - } - func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { - let model = dataSource[indexPath.row] - let cell = tableView.dequeueReusableCell(withIdentifier: "MineSettingsTableViewCell", for: indexPath) - if let scell = cell as? MineSettingsTableViewCell { - scell.titleLabel.text = model.title - if indexPath.row == 0 { - scell.avatarImageView.isHidden = false - scell.nicknameLabel.isHidden = true - let faceUrl = currentUserInfo?.faceURL ?? TUILogin.getFaceUrl() ?? "" - if let avatarUrl = URL(string: faceUrl), !faceUrl.isEmpty { - scell.avatarImageView.kf.setImage(with: avatarUrl, placeholder: UIImage(named: "default_avatar")) - } else { - scell.avatarImageView.image = UIImage(named: "default_avatar") - } - } else if indexPath.row == 1 { - scell.avatarImageView.isHidden = true - scell.nicknameLabel.isHidden = false - let nick = currentUserInfo?.nickName ?? TUILogin.getNickName() - scell.nicknameLabel.text = (nick ?? "").isEmpty ? "No nickname".localized : nick - } else { - scell.avatarImageView.isHidden = true - scell.nicknameLabel.isHidden = true - } - } - return cell - } - func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { - return 56 - } -} -extension MineSettingsViewController: UITableViewDelegate { - func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { - if indexPath.row == 0 { - didSelectChangeHead() - } else if indexPath.row == 1 { - didSelectChangeNick() - } else if indexPath.row == 2 { - didSelectChangeLanguage() - } - } -} - -extension MineSettingsViewController: LanguageSelectViewControllerDelegate { - func onSelectLanguage(cellModel: LanguageSelectCellModel) { - DispatchQueue.main.async { - guard let appDelegate = UIApplication.shared.delegate as? AppDelegate else { - return - } - appDelegate.showMainViewController() - } - } -} diff --git a/application/App-UIKit/Mine/MineSettings/UI/ProfileUpdateInfoView.swift b/application/App-UIKit/Mine/MineSettings/UI/ProfileUpdateInfoView.swift deleted file mode 100644 index a94e1e4d..00000000 --- a/application/App-UIKit/Mine/MineSettings/UI/ProfileUpdateInfoView.swift +++ /dev/null @@ -1,267 +0,0 @@ -// -// NicknameUpdateInfoView.swift -// App-UIKit -// -// Created by yukiwwwang on 2025/8/18. -// - -import UIKit -import SnapKit -import AtomicX - - -class ProfileUpdateInfoView: UIView { - - var submitClosure: (String?)->Void = { newInfo in } - private var oldInfo: String? - - private let containerView: UIView = { - let view = UIView(frame: .zero) - view.backgroundColor = .white - return view - }() - - private let titleLabel: UILabel = { - let label = UILabel() - label.text = ("Nickname").localized - label.font = UIFont(name: "PingFangSC-Regular", size: 16) - return label - }() - - private let intervalView:UIView = { - let view = UIView(frame: .zero) - view.backgroundColor = UIColor("E7ECF6") - return view - }() - - private let inputBackView: UIView = { - let view = UIView(frame: .zero) - view.backgroundColor = UIColor("F5F5F5") - view.layer.cornerRadius = 8 - view.layer.masksToBounds = true - return view - }() - - private let inputTextView: UITextField = { - let view = UITextField() - view.backgroundColor = .clear - view.layer.masksToBounds = true - return view - }() - - private let inputLabel: UILabel = { - let label = UILabel() - label.font = UIFont(name: "PingFangSC-Regular", size: 16) - label.textColor = UIColor("4E5461") - return label - }() - - private lazy var tipsLabel: UILabel = { - let label = UILabel() - label.font = UIFont(name: "PingFangSC-Regular", size: 12) - label.text = ("EditAliasDesc").localized - label.textColor = UIColor("888888") - return label - }() - - private let submitButton: UIButton = { - let button = UIButton(type: .custom) - button.setBackgroundImage(UIColor("1C66E5").trans2Image(), for: .normal) - button.layer.shadowColor = UIColor("1C66E5").cgColor - button.layer.cornerRadius = 8 - button.layer.masksToBounds = true - button.setTitle(("OK").localized, for: .normal) - return button - }() - - private let closeButton: UIButton = { - let button = UIButton(type: .custom) - button.setImage(UIImage(named: "mine_profilepop_close"), for: .normal) - return button - }() - - private let backButton: UIButton = { - let button = UIButton(type: .custom) - return button - }() - - private var isViewReady = false - - override func didMoveToWindow() { - super.didMoveToWindow() - guard !isViewReady else { - return - } - isViewReady = true - self.backgroundColor = UIColor(red: 0, green: 0, blue: 0, alpha: 0.4) - constructViewHierarchy() - activateConstraints() - bindInteraction() - observeKeyboardNotifications() - } - - convenience init(oldInfo: String? = nil) { - self.init() - self.inputTextView.text = oldInfo - self.tipsLabel.isHidden = false - self.inputLabel.isHidden = true - } - - override func draw(_ rect: CGRect) { - super.draw(rect) - containerView.roundedRect(rect: self.bounds, byRoundingCorners: [.topLeft, .topRight], cornerRadii: CGSize(width: 12, height: 12)) - } - - private func constructViewHierarchy() { - addSubview(backButton) - addSubview(containerView) - containerView.addSubview(titleLabel) - containerView.addSubview(intervalView) - containerView.addSubview(closeButton) - containerView.addSubview(inputBackView) - containerView.addSubview(tipsLabel) - inputBackView.addSubview(inputLabel) - inputBackView.addSubview(inputTextView) - containerView.addSubview(submitButton) - } - - private func activateConstraints() { - containerView.snp.makeConstraints { make in - make.height.equalTo(convertPixel(h: 237)) - make.bottom.left.right.equalToSuperview() - } - backButton.snp.makeConstraints { make in - make.top.left.right.equalToSuperview() - make.bottom.equalTo(containerView.snp.top) - } - titleLabel.snp.makeConstraints { make in - make.centerX.equalToSuperview() - make.top.equalTo(convertPixel(h: 20)) - } - closeButton.snp.makeConstraints { make in - make.top.equalTo(titleLabel) - make.right.equalToSuperview().offset(convertPixel(w: -16)) - make.size.equalTo(CGSize(width: convertPixel(w: 20), height: convertPixel(h: 20))) - } - intervalView.snp.makeConstraints { make in - make.top.equalToSuperview().offset(convertPixel(h: 60)) - make.width.equalToSuperview() - make.height.equalTo(convertPixel(h: 1)) - } - inputBackView.snp.makeConstraints { make in - make.top.equalToSuperview().offset(convertPixel(h: 78)) - make.centerX.equalToSuperview() - make.left.equalToSuperview().offset(convertPixel(w: 16)) - make.height.equalTo(convertPixel(h: 40)) - } - inputTextView.snp.makeConstraints { make in - make.leading.trailing.equalToSuperview().inset(convertPixel(w: 8)) - make.top.bottom.equalToSuperview() - } - inputLabel.snp.makeConstraints { make in - make.centerY.equalToSuperview() - make.left.equalToSuperview().offset(convertPixel(w: 12)) - } - tipsLabel.snp.makeConstraints { make in - make.leading.equalTo(inputBackView) - make.top.equalTo(inputBackView.snp.bottom).offset(8) - } - submitButton.snp.makeConstraints { make in - make.leading.trailing.equalTo(inputBackView) - make.top.equalTo(inputBackView.snp.bottom).offset(convertPixel(h: 27)) - make.height.equalTo(convertPixel(h: 44)) - } - - } - - private func bindInteraction() { - backButton.addTarget(self, action: #selector(closeButtonClicked), for: .touchUpInside) - closeButton.addTarget(self, action: #selector(closeButtonClicked), for: .touchUpInside) - submitButton.addTarget(self, action: #selector(submitClicked), for: .touchUpInside) - inputTextView.addTarget(self, action: #selector(textFieldDidChange), for: .editingChanged) - inputTextView.delegate = self - } - -} - -extension ProfileUpdateInfoView { - @objc func closeButtonClicked () { - self.removeFromSuperview() - } - - @objc func submitClicked() { - var newInfo: String? - newInfo = inputTextView.text - if oldInfo != newInfo { - self.submitClosure(newInfo) - } else { - - } - self.removeFromSuperview() - } - - @objc func show (in viewController: UIViewController) { - self.frame = CGRect(x: 0, - y: 0, - width: UIScreen.main.bounds.width, - height: UIScreen.main.bounds.height) - self.backgroundColor = UIColor(red: 0, green: 0, blue: 0, alpha: 0.5) - viewController.view.window?.addSubview(self) - viewController.view.window?.bringSubviewToFront(self) - } - @objc func textFieldDidChange(){ - checkSubmitButtonState() - } - -} - -extension ProfileUpdateInfoView { - private func observeKeyboardNotifications() { - NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillShow(notification:)), - name: UIResponder.keyboardWillShowNotification, - object: nil) - NotificationCenter.default.addObserver(self, - selector: #selector(keyboardWillHide(notification:)), name: UIResponder.keyboardWillHideNotification, - object: nil) - } - - @objc private func keyboardWillShow(notification: Notification) { - guard let userInfo = notification.userInfo, - let keyboardFrame = userInfo[UIResponder.keyboardFrameEndUserInfoKey] as? CGRect, - let duration = userInfo[UIResponder.keyboardAnimationDurationUserInfoKey] as? TimeInterval else { - return - } - containerView.snp.updateConstraints { make in - make.bottom.equalToSuperview().offset(-keyboardFrame.height) - } - UIView.animate(withDuration: duration) { - self.layoutIfNeeded() - } - } - - @objc private func keyboardWillHide(notification: Notification) { - guard let userInfo = notification.userInfo, - let duration = userInfo[UIResponder.keyboardAnimationDurationUserInfoKey] as? TimeInterval else { - return - } - containerView.snp.updateConstraints { make in - make.bottom.equalToSuperview() - } - UIView.animate(withDuration: duration) { - self.layoutIfNeeded() - } - } -} - -extension ProfileUpdateInfoView: UITextFieldDelegate { - func checkSubmitButtonState(){ - submitButton.isEnabled = !(inputTextView.text?.isEmpty ?? true) - } - func textFieldDidBeginEditing(_ textField: UITextField) { - checkSubmitButtonState() - } - func textFieldShouldEndEditing(_ textField: UITextField) -> Bool { - checkSubmitButtonState() - return true - } -} diff --git a/application/App-UIKit/Register/RegisterView.swift b/application/App-UIKit/Register/RegisterView.swift deleted file mode 100644 index 8156b4ff..00000000 --- a/application/App-UIKit/Register/RegisterView.swift +++ /dev/null @@ -1,246 +0,0 @@ -// -// RegisterView.swift -// App-UIKit -// -// Created by yukiwwwang on 2025/8/7. -// - -import UIKit -import Kingfisher -import TUICore - -protocol RegisterViewDelegate: NSObjectProtocol { - func registerDelegate(username: String) -} - -class RegisterView: UIView { - weak var delegate: RegisterViewDelegate? - - private let headImageView: UIImageView = { - let imageView = UIImageView(frame: .zero) - imageView.contentMode = .scaleAspectFill - imageView.layer.cornerRadius = 50 - imageView.clipsToBounds = true - return imageView - }() - - private lazy var textField: UITextField = { - let textField = UITextField(frame: .zero) - textField.backgroundColor = .white - textField.font = UIFont(name: "PingFangSC-Regular", size: 16) - textField.textColor = UIColor.tui_color(withHex: "333333") - let attributes: [NSAttributedString.Key: Any] = [ - .font: UIFont(name: "PingFangSC-Regular", size: 16) ?? UIFont.systemFont(ofSize: 16), - .foregroundColor: UIColor.tui_color(withHex: "BBBBBB") - ] - textField.attributedPlaceholder = NSAttributedString( - string: "Enter a userId".localized, - attributes: attributes - ) - textField.delegate = self - return textField - }() - - private let textFieldSpacingLine: UIView = { - let view = UIView(frame: .zero) - view.backgroundColor = UIColor.tui_color(withHex: "EEEEEE") - return view - }() - - private let descLabel: UILabel = { - let label = UILabel(frame: .zero) - label.font = UIFont(name: "PingFangSC-Regular", size: 16) - label.textColor = .darkGray - label.text = "Chinese characters, letters, numbers and underscores, 1 – 20 words".localized - label.adjustsFontSizeToFitWidth = true - return label - }() - - private let registBtn: UIButton = { - let btn = UIButton(type: .custom) - btn.setTitleColor(.white, for: .normal) - btn.setTitle("Register".localized, for: .normal) - btn.adjustsImageWhenHighlighted = false - btn.setBackgroundImage(UIColor.tui_color(withHex: "006EFF").trans2Image(), for: .normal) - btn.titleLabel?.font = UIFont(name: "PingFangSC-Medium", size: 18) - btn.layer.shadowColor = UIColor.tui_color(withHex: "006EFF").cgColor - btn.layer.shadowOffset = CGSize(width: 0, height: 6) - btn.layer.shadowRadius = 16 - btn.layer.shadowOpacity = 0.4 - btn.layer.masksToBounds = true - btn.isEnabled = false - return btn - }() - - override func draw(_ rect: CGRect) { - super.draw(rect) - registBtn.layer.cornerRadius = registBtn.frame.height * 0.5 - } - - override func touchesBegan(_ touches: Set, with event: UIEvent?) { - super.touchesBegan(touches, with: event) - - textField.resignFirstResponder() - UIView.animate(withDuration: 0.3) { - self.transform = .identity - } - checkRegistBtnState() - } - - override init(frame: CGRect) { - super.init(frame: frame) - - NotificationCenter.default.addObserver(self, - selector: #selector(keyboardFrameChange(noti:)), - name: UIResponder.keyboardWillChangeFrameNotification, - object: nil) - } - - deinit { - NotificationCenter.default.removeObserver(self) - } - - @objc private func keyboardFrameChange(noti : Notification) { - guard let info = noti.userInfo else { - return - } - guard let value = info[UIResponder.keyboardFrameEndUserInfoKey], value is CGRect else { - return - } - guard let superview = textField.superview else { - return - } - let rect = value as! CGRect - let converted = superview.convert(textField.frame, to: self) - if rect.intersects(converted) { - transform = CGAffineTransform(translationX: 0, y: -converted.maxY+rect.minY) - } - } - - required init?(coder: NSCoder) { - fatalError("init(coder:) has not been implemented") - } - - private var isViewReady = false - override func didMoveToWindow() { - super.didMoveToWindow() - guard !isViewReady else { - return - } - isViewReady = true - constructViewHierarchy() - activateConstraints() - bindInteraction() - updateContent() - } - - private func constructViewHierarchy() { - addSubview(headImageView) - addSubview(textField) - addSubview(textFieldSpacingLine) - addSubview(descLabel) - addSubview(registBtn) - } - - private func activateConstraints() { - headImageView.snp.makeConstraints { (make) in - make.centerX.equalToSuperview() - make.top.equalToSuperview().offset(kDeviceSafeTopHeight + 70.scale375Height()) - make.size.equalTo(CGSize(width: 100.scale375Width(), height: 100.scale375Height())) - } - - textField.snp.makeConstraints { (make) in - make.top.equalTo(headImageView.snp_bottom).offset(40.scale375Height()) - make.leading.equalToSuperview().offset(40.scale375Width()) - make.trailing.equalToSuperview().offset(-40.scale375Width()) - make.height.equalTo(57.scale375Height()) - } - - textFieldSpacingLine.snp.makeConstraints { (make) in - make.bottom.leading.trailing.equalTo(textField) - make.height.equalTo(1.scale375Height()) - } - - descLabel.snp.makeConstraints { (make) in - make.top.equalTo(textField.snp_bottom).offset(10.scale375Height()) - make.leading.equalToSuperview().offset(40.scale375Width()) - make.trailing.lessThanOrEqualToSuperview().offset(-40.scale375Width()) - } - - registBtn.snp.makeConstraints { (make) in - make.top.equalTo(descLabel.snp_bottom).offset(40.scale375Height()) - make.leading.equalToSuperview().offset(20.scale375Width()) - make.trailing.equalToSuperview().offset(-20.scale375Width()) - make.height.equalTo(52.scale375Height()) - } - - } - - private func bindInteraction() { - registBtn.addTarget(self, action: #selector(registerBtnClick), for: .touchUpInside) - } - - private func updateContent() { - let url = DEFAULT_AVATAR_REGISTER - headImageView.kf.setImage(with: URL(string: url)) - } - - override func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? { - guard let superview = headImageView.superview else { - return super.hitTest(point, with: event) - } - let rect = superview.convert(headImageView.frame, to: self) - if rect.contains(point) { - return headImageView - } - return super.hitTest(point, with: event) - } - - @objc private func registerBtnClick() { - textField.resignFirstResponder() - guard let name = textField.text else { return } - delegate?.registerDelegate(username: name) - } - - private func checkRegistBtnState(_ count: Int = -1) { - if count > -1 { - registBtn.isEnabled = count > 0 - } - else { - registBtn.isEnabled = false - } - } -} - -extension RegisterView : UITextFieldDelegate { - func textFieldDidBeginEditing(_ textField: UITextField) { - textField.becomeFirstResponder() - } - func textFieldDidEndEditing(_ textField: UITextField) { - textField.resignFirstResponder() - UIView.animate(withDuration: 0.3) { - self.transform = .identity - } - checkRegistBtnState() - } - func textFieldShouldReturn(_ textField: UITextField) -> Bool { - textField.resignFirstResponder() - return true - } - func textField(_ textField: UITextField, - shouldChangeCharactersIn range: NSRange, - replacementString string: String) -> Bool { - let maxCount = 20 - guard let textFieldText = textField.text, - let rangeOfTextToReplace = Range(range, in: textFieldText) else { - return false - } - let substringToReplace = textFieldText[rangeOfTextToReplace] - let count = textFieldText.count - substringToReplace.count + string.count - let result = count <= maxCount - if result { - checkRegistBtnState(count) - } - return result - } -} diff --git a/application/App-UIKit/Register/RegisterViewController.swift b/application/App-UIKit/Register/RegisterViewController.swift deleted file mode 100644 index f06a6433..00000000 --- a/application/App-UIKit/Register/RegisterViewController.swift +++ /dev/null @@ -1,65 +0,0 @@ -// -// RegisterViewController.swift -// App-UIKit -// -// Created by yukiwwwang on 2025/8/7. -// - -import Foundation -import SnapKit -import UIKit -import ImSDK_Plus -import TUICore - -class RegisterViewController: UIViewController { - - private let rootView = RegisterView() - - override func viewDidLoad() { - super.viewDidLoad() - view.backgroundColor = .white - title = "Register".localized - constructViewHierarchy() - activateConstraints() - rootView.delegate = self - } - - private func constructViewHierarchy() { - view.addSubview(rootView) - } - - private func activateConstraints() { - rootView.snp.makeConstraints { make in - make.edges.equalToSuperview() - } - } - - private func register(_ userName: String) { - let userFullInfo = V2TIMUserFullInfo() - userFullInfo.nickName = userName - userFullInfo.faceURL = DEFAULT_AVATAR_REGISTER - V2TIMManager.sharedInstance().setSelfInfo(info: userFullInfo) { [weak self] in - self?.registerSuccess() - } fail: { [weak self] code, message in - guard let self = self else {return} - view.showAtomicToast(text: "login failed, code:\(code), message: \(String(describing: message))") - DispatchQueue.main.asyncAfter(deadline: .now() + 1) { - self.navigationController?.popViewController(animated: true) - } - } - } - - private func registerSuccess() { - self.view.showAtomicToast(text: "Registered successfully".localized) - DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) { - let appDelegate = UIApplication.shared.delegate as? AppDelegate - appDelegate?.showMainViewController() - } - } -} - -extension RegisterViewController: RegisterViewDelegate { - func registerDelegate(username: String) { - register(username) - } -} diff --git a/application/App-UIKit/Resource/Localized/Localized.swift b/application/App-UIKit/Resource/Localized/Localized.swift deleted file mode 100644 index db33ab62..00000000 --- a/application/App-UIKit/Resource/Localized/Localized.swift +++ /dev/null @@ -1,37 +0,0 @@ -// -// Localized.swift -// App-UIKit -// -// Created by yukiwwwang on 2025/8/7. -// - -import Foundation - -extension String { - var localized: String { - return Bundle.main.localizedString(forKey: self, value: "", table: AppUIKitLocalizeTableName) - } - - //MARK: Replace String - func localized(replace xxx_replace: String) -> String { - return self.replacingOccurrences(of: "xxx", with: xxx_replace) - } - - func localized(replace xxx_replace: String, yyy_replace: String) -> String { - return self.localized(replace: xxx_replace).replacingOccurrences(of: "yyy", with: yyy_replace) - } - - func localized(replace xxx_replace: String, yyy_replace: String, zzz_replace: String) -> String { - return self.localized(replace: xxx_replace, yyy_replace: yyy_replace).replacingOccurrences(of: "zzz", with: zzz_replace) - } - - func localized(replace xxx_replace: String, yyy_replace: String, zzz_replace: String, mmm_replace: String) -> String { - return self.localized(replace: xxx_replace, yyy_replace: yyy_replace, zzz_replace: zzz_replace).replacingOccurrences(of: "mmm", with: mmm_replace) - } - - func localized(replace xxx_replace: String, yyy_replace: String, zzz_replace: String, mmm_replace: String, nnn_replace: String) -> String { - return self.localized(replace: xxx_replace, yyy_replace: yyy_replace, zzz_replace: zzz_replace, mmm_replace: mmm_replace).replacingOccurrences(of: "nnn", with: nnn_replace) - } -} - -let AppUIKitLocalizeTableName = "Localized" diff --git a/application/App-UIKit/Resource/Localized/Localized.xcstrings b/application/App-UIKit/Resource/Localized/Localized.xcstrings deleted file mode 100644 index bc8dd895..00000000 --- a/application/App-UIKit/Resource/Localized/Localized.xcstrings +++ /dev/null @@ -1,3462 +0,0 @@ -{ - "sourceLanguage": "en", - "strings": { - "App_Call": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "اتصال" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Call" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "拨打" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "発信" - } - } - } - }, - "Are you sure you want to log out?": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "هل أنت متأكد أنك تريد تسجيل الخروج؟" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Are you sure you want to log out?" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "确定退出当前账号吗?" - } - }, - "zh-Hant": { - "stringUnit": { - "state": "translated", - "value": "確定退出當前帳號嗎?" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "ログアウトしてもよろしいですか?" - } - } - } - }, - "Audio Call": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "مكالمة صوتية" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Voice Call" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "语音通话" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "音声通話" - } - } - } - }, - "Avatar": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "الصورة الرمزية" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Avatar" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "头像" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "アバター" - } - } - } - }, - "BasicSetting": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "الإعدادات الأساسية" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Basic Setting" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "基础设置" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "基本設定" - } - } - } - }, - "BeautyLevel": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "مستوى التجميل" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "BeautyLevel" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "美颜级别" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "美顔レベル" - } - } - } - }, - "call": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "مكالمة" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Call" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "通话" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "通話" - } - } - } - }, - "callContent": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "نغمة الرنين/النافذة العائمة/تقليل التأخير" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Ringtone/Floating window/Less stutter" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "响铃通知·通话悬浮窗·通话卡顿优化" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "着信音/フローティングウィンドウ/遅延軽減" - } - } - } - }, - "CallParamsSetting": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "إعدادات معلمات المكالمة" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Call Params Setting" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "通话自定义参数设置" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "通話パラメータ設定" - } - } - } - }, - "CallSettings": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "إعدادات المكالمة" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Call Settings" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "通话设置" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "通話設定" - } - } - } - }, - "Cancel": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "إلغاء" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Cancel" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "取消" - } - }, - "zh-Hant": { - "stringUnit": { - "state": "translated", - "value": "取消" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "キャンセル" - } - } - } - }, - "Change Language": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "تغيير اللغة" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Change Language" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "切换语言" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "言語を変更" - } - } - } - }, - "Chinese characters, letters, numbers and underscores, 1 – 20 words": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "الأحرف الصينية والحروف والأرقام والشرطات السفلية، 1-20 حرف" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Chinese characters, letters, numbers and underscores, 1 – 20 words" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "仅限中文、字母、数字和下划线,1–20个字" - } - }, - "zh-Hant": { - "stringUnit": { - "state": "translated", - "value": "僅限中文、字母、數字和下劃線,1–20個字" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "漢字、英字、数字、アンダースコアのみ、1〜20文字" - } - } - } - }, - "Conference Type": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "نوع المؤتمر" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Conference Type" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "会议类型" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "会議タイプ" - } - } - } - }, - "Create Room": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "إنشاء غرفة" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Create Room" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "创建会议" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "ルームを作成" - } - } - } - }, - "EditAliasDesc": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "الحروف والأرقام والشرطات السفلية والأحرف الصينية فقط." - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Only letters, digits, underscores, and Chinese characters." - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "仅限中文、字母、数字和下划线" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "英字、数字、アンダースコア、漢字のみ使用可能です。" - } - } - } - }, - "EnableFloating": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "نافذة عائمة" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Floating" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "显示悬浮窗按钮" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "フローティング" - } - } - } - }, - "EnableIncomingBanner": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "شعار المكالمة الواردة" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Incoming Banner" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "横幅显示来电" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "着信バナー" - } - } - } - }, - "EnableAITranscriber": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "النسخ بالذكاء الاصطناعي" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "AI Transcriber" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "AI转录" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "AI文字起こし" - } - } - } - }, - "EnableVirtualBackground": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "خلفية افتراضية" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Virtual Background" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "显示虚拟背景按钮" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "バーチャル背景" - } - } - } - }, - "Enter a room ID": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "أدخل معرف الغرفة" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Enter a room ID" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "请输入会议号" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "ルームIDを入力" - } - } - } - }, - "Enter a userId": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "أدخل معرف المستخدم" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Enter a userId" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "请输入用户名" - } - }, - "zh-Hant": { - "stringUnit": { - "state": "translated", - "value": "請輸入用戶名" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "ユーザーIDを入力" - } - } - } - }, - "Enter a valid room ID.": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "أدخل معرف غرفة صالح" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Enter a valid room ID" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "请输入正确房间号" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "有効なルームIDを入力してください" - } - } - } - }, - "Exit": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "خروج" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Exit" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "退出" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "終了" - } - } - } - }, - "ExpendedInfo": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "معلومات موسعة" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Expended" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "扩展信息" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "拡張情報" - } - } - } - }, - "Fill": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "ملء" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Fill" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "充满" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "フィル" - } - } - } - }, - "FillMode": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "وضع الملء" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Fill Mode" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "填充模式" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "フィルモード" - } - } - } - }, - "Fit": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "ملاءمة" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Fit" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "自适应" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "フィット" - } - } - } - }, - "Free Speech Conference": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "مؤتمر حرية التحدث" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Free Speech Conference" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "自由发言会议" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "自由発言会議" - } - } - } - }, - "Generating room number, please try again later": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "جاري إنشاء رقم الغرفة، يرجى المحاولة لاحقاً" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Generating room number, please try again later" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "正在生成会议号,请稍后重试" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "ルーム番号を生成中です。後でもう一度お試しください" - } - } - } - }, - "GoToSettings": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "الذهاب إلى الإعدادات" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Go To Settings" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "去设置" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "設定へ" - } - } - } - }, - "Group ID": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "معرف المجموعة" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Group ID" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "群组ID" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "グループID" - } - } - } - }, - "Horizontal": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "أفقي" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Horizontal" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "横屏" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "横向き" - } - } - } - }, - "InputGroupId": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "يرجى إدخال معرف مجموعة الدردشة" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Please enter the ChatGroup ID" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "请输入ChatGroup ID" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "チャットグループIDを入力してください" - } - } - } - }, - "InputRoomId": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "يرجى إدخال معرف الغرفة" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Please enter the Room ID" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "请输入Room ID" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "ルームIDを入力してください" - } - } - } - }, - "InputUserIds": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "يرجى إدخال معرف المستخدم، مفصولة بـ \",\"" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Please enter the User ID, separated by \",\"" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "请输入User ID,以\",\"分隔" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "ユーザーIDを入力してください(カンマ区切り)" - } - } - } - }, - "Join Room": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "انضمام للغرفة" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Join Room" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "加入房间" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "ルームに参加" - } - } - } - }, - "JoinGroupCall": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "انضمام لمكالمة جماعية" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Join GroupCall" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "加入群组通话" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "グループ通話に参加" - } - } - } - }, - "Language": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "اللغة" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Language" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "语言" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "言語" - } - } - } - }, - "live": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "بث مباشر" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Live" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "直播" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "ライブ" - } - } - } - }, - "liveContent": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "معاينة البث/فلاتر التجميل/مضيفين متعددين" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Live preview/Beauty filters/Multi-host" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "开播预览·智能美颜·连麦PK" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "ライブプレビュー/美顔フィルター/マルチホスト" - } - } - } - }, - "Log": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "السجل" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Log" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "日志" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "ログ" - } - } - } - }, - "Log In": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "تسجيل الدخول" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Log In" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "登录" - } - }, - "zh-Hant": { - "stringUnit": { - "state": "translated", - "value": "登錄" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "ログイン" - } - } - } - }, - "Log out": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "تسجيل الخروج" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Log out" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "退出登录" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "ログアウト" - } - } - } - }, - "Logged In": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "تم تسجيل الدخول" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Logged In" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "登录成功" - } - }, - "zh-Hant": { - "stringUnit": { - "state": "translated", - "value": "登錄成功" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "ログイン成功" - } - } - } - }, - "Me": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "أنا" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Me" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "我" - } - }, - "zh-Hant": { - "stringUnit": { - "state": "translated", - "value": "我" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "マイページ" - } - } - } - }, - "MediaType": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "نوع الوسائط" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Media Type" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "媒体类型" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "メディアタイプ" - } - } - } - }, - "Mic": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "الميكروفون" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Mic" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "开启音频" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "マイク" - } - } - } - }, - "MuteMode": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "كتم الصوت" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Mute" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "静音模式" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "ミュート" - } - } - } - }, - "Name": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "الاسم" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Name" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "设置名字" - } - }, - "zh-Hant": { - "stringUnit": { - "state": "translated", - "value": "設置名字" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "名前を設定" - } - } - } - }, - "Nickname": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "الاسم المستعار" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Nickname" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "昵称" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "ニックネーム" - } - } - } - }, - "No nickname": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "لا يوجد اسم مستعار" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "No nickname" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "昵称未设置" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "ニックネーム未設定" - } - } - } - }, - "NotSet": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "غير محدد" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Not Set" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "未设置" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "未設定" - } - } - } - }, - "OfflinePushInfo": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "إشعار دون اتصال" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "OfflinePush" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "离线推送信息" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "オフラインプッシュ" - } - } - } - }, - "OK": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "موافق" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "OK" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "确认" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "OK" - } - } - } - }, - "On-stage Speech Conference": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "مؤتمر التحدث على المنصة" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "On-stage Speech Conference" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "举手发言会议" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "挙手発言会議" - } - } - } - }, - "Operate Success": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "تمت العملية بنجاح" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Operate Success" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "操作成功" - } - }, - "zh-Hant": { - "stringUnit": { - "state": "translated", - "value": "操作成功" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "操作成功" - } - } - } - }, - "OptionalParameters": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "معلمات اختيارية" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Optional Parameters" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "可选参数" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "オプションパラメータ" - } - } - } - }, - "OtherSetting": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "إعدادات أخرى" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Other Settings" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "其他设置" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "その他の設定" - } - } - } - }, - "Personal Center": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "المركز الشخصي" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Personal Center" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "个人中心" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "個人センター" - } - } - } - }, - "profileUpdateFailed": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "فشل التحديث" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "update failed" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "更改失败" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "更新に失敗しました" - } - } - } - }, - "Register": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "تسجيل" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Register" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "注册" - } - }, - "zh-Hant": { - "stringUnit": { - "state": "translated", - "value": "註冊" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "登録" - } - } - } - }, - "Registered successfully": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "تم التسجيل بنجاح" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Registered successfully" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "注册成功" - } - }, - "zh-Hant": { - "stringUnit": { - "state": "translated", - "value": "註冊成功" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "登録成功" - } - } - } - }, - "Resolution": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "الدقة" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Resolution" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "分辨率" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "解像度" - } - } - } - }, - "ResolutionMode": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "وضع الدقة" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Resolution Mode" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "横竖屏" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "画面モード" - } - } - } - }, - "RingSetting": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "نغمة الرنين" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Ring" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "铃声设置" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "着信音" - } - } - } - }, - "Room ID": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "معرف الغرفة" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Room ID" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "房间号" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "ルームID" - } - } - } - }, - "RoomIdInt": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "معرف الغرفة (رقم)" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Room Id(Int)" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "房间Id(数字)" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "ルームID(数値)" - } - } - } - }, - "RoomIdString": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "معرف الغرفة (نص)" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Room Id(String)" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "房间Id(字符串)" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "ルームID(文字列)" - } - } - } - }, - "Rotation": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "التدوير" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Rotation" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "旋转角度" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "回転" - } - } - } - }, - "Save": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "حفظ" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Save" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "保存" - } - }, - "zh-Hant": { - "stringUnit": { - "state": "translated", - "value": "保存" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "保存" - } - } - } - }, - "Schedule Room": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "جدولة الغرفة" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Schedule Room" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "预定房间" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "ルームを予約" - } - } - } - }, - "Screen_Auto": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "تلقائي" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Screen_Auto" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "自动" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "自動" - } - } - } - }, - "Screen_Horizontal": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "عرض أفقي" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Screen_Horizontal" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "横屏观看" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "横画面表示" - } - } - } - }, - "Screen_Vertical": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "عرض عمودي" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Screen_Vertical" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "竖屏观看" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "縦画面表示" - } - } - } - }, - "SetAvatar": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "تعيين الصورة الرمزية" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Set Avatar" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "设置头像" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "アバターを設定" - } - } - } - }, - "SetAvatarTip": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "يرجى إدخال عنوان URL للصورة الرمزية." - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Please enter the URL address of the avatar." - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "请输入头像的URL地址。" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "アバターのURLを入力してください。" - } - } - } - }, - "SetExtend": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "تعيين معلومات موسعة" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Set Extend" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "设置扩展信息" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "拡張情報を設定" - } - } - } - }, - "SetExtendTip": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "يرجى إدخال المعلومات الموسعة." - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Please enter extended information." - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "请输入扩展信息。" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "拡張情報を入力してください。" - } - } - } - }, - "SetOffLineInfo": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "تعيين معلومات دون اتصال" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Set OffLineInfo" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "设置离线推送消息" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "オフラインプッシュを設定" - } - } - } - }, - "SetOffLineInfoTip": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "يرجى إدخال سلسلة JSON للرسالة دون اتصال." - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Please enter the json string of the offline push message." - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "请输入离线推送消息的json串。" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "オフラインプッシュメッセージのJSON文字列を入力してください。" - } - } - } - }, - "SetRing": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "تعيين نغمة الرنين" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Set Ring" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "设置铃声" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "着信音を設定" - } - } - } - }, - "SetRingTip": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "يرجى إدخال عنوان نغمة الرنين." - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Please enter the ringtone address." - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "请输入铃声地址。" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "着信音のアドレスを入力してください。" - } - } - } - }, - "Settings": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "الإعدادات" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Settings" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "设置" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "設定" - } - } - } - }, - "share": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "مشاركة" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "share" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "分享" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "共有" - } - } - } - }, - "sharelog": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "مشاركة وتحميل السجلات" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Share and Upload Logs" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "分享上传日志" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "ログを共有・アップロード" - } - } - } - }, - "Speaker": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "مكبر الصوت" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Speaker" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "开启扬声器" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "スピーカー" - } - } - } - }, - "Tencent Real-Time Communication": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "تينسنت للاتصالات في الوقت الفعلي" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Tencent RTC" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "腾讯云音视频" - } - }, - "zh-Hant": { - "stringUnit": { - "state": "needs_review", - "value": "騰訊雲音視頻" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "Tencent RTC" - } - } - } - }, - "Test Environment": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "بيئة الاختبار" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Test Environment" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "测试环境" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "テスト環境" - } - } - } - }, - "Auto Login": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "تسجيل دخول تلقائي" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Auto Login" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "自动登录" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "自動ログイン" - } - } - } - }, - "Timeout": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "انتهاء المهلة" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Timeout" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "呼叫超时时长" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "タイムアウト" - } - } - } - }, - "tuiChat": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "الدردشة" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Chat" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "聊天" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "チャット" - } - } - } - }, - "tuiChatContent": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "دردشة جماعية/جهات الاتصال/دردشة صوتية/مزامنة البيانات" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Group chat/Contacts/Audio chat/Data syn" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "群组聊天·好友通讯录·语音消息·资料多端同步" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "グループチャット/連絡先/音声チャット/データ同期" - } - } - } - }, - "tuiRoom": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "المؤتمر" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Conference" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "会议" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "会議" - } - } - } - }, - "tuiRoomContent": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "اجتماع سريع/دعوة/إدارة المشاركين/مشاركة الشاشة" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Quick meeting/Invite/Manage participants/Share screen" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "快速会议·邀请入会·会中管控·共享屏幕" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "クイック会議/招待/参加者管理/画面共有" - } - } - } - }, - "UICompnent": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "مكونات واجهة المستخدم" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "UIKit" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "UI组件" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "UIKit" - } - } - } - }, - "Unviersal:xxx": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "عام: xxx" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Unviersal:xxx" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "通用布局:xxx" - } - }, - "zh-Hant": { - "stringUnit": { - "state": "translated", - "value": "通用布局:xxx" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "汎用レイアウト:xxx" - } - } - } - }, - "User ID": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "معرف المستخدم" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "User ID" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "用户ID" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "ユーザーID" - } - } - } - }, - "Vertical": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "عمودي" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Vertical" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "竖屏" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "縦向き" - } - } - } - }, - "Video": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "فيديو" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Video" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "开启视频" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "ビデオ" - } - } - } - }, - "Video Call": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "مكالمة فيديو" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Video Call" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "视频通话" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "ビデオ通話" - } - } - } - }, - "VideoSetting": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "إعدادات الفيديو" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Video Setting" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "视频设置" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "ビデオ設定" - } - } - } - }, - "Yes": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "نعم" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Yes" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "确定" - } - }, - "zh-Hant": { - "stringUnit": { - "state": "translated", - "value": "確定" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "はい" - } - } - } - }, - "Your Name": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "اسمك" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Your Name" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "您的姓名" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "お名前" - } - } - } - }, - "Fans": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "المتابعون" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Fans" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "粉丝" - } - }, - "zh-Hant": { - "stringUnit": { - "state": "translated", - "value": "粉絲" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "フォロワー" - } - } - } - }, - "Likes": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "إعجابات" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Likes" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "点赞" - } - }, - "zh-Hant": { - "stringUnit": { - "state": "translated", - "value": "點讚" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "いいね" - } - } - } - }, - "Go Live": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "بدء البث" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Go Live" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "开直播" - } - }, - "zh-Hant": { - "stringUnit": { - "state": "translated", - "value": "開直播" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "ライブ配信開始" - } - } - } - }, - "Video Live": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "بث فيديو مباشر" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Video Live" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "在线直播" - } - }, - "zh-Hant": { - "stringUnit": { - "state": "translated", - "value": "在線直播" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "ビデオライブ" - } - } - } - }, - "Create Interactive Video Live with Live API for a Seamless Streaming Experience.": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "إنشاء بث فيديو تفاعلي مباشر باستخدام Live API لتجربة بث سلسة." - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Create Interactive Video Live with Live API for a Seamless Streaming Experience." - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "通过 Live API 构建互动视频直播,为您带来清晰流畅的直播体验。" - } - }, - "zh-Hant": { - "stringUnit": { - "state": "translated", - "value": "通過 Live API 構建互動視頻直播,為您帶來清晰流暢的直播體驗。" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "Live APIでインタラクティブなビデオライブを作成し、シームレスな配信体験を。" - } - } - } - }, - "Voice Room": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "غرفة صوتية" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Voice Room" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "语聊房" - } - }, - "zh-Hant": { - "stringUnit": { - "state": "translated", - "value": "語聊房" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "ボイスルーム" - } - } - } - }, - "Enable Interactive Voice Room with Live API for an Enhanced Communication Experience.": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "تمكين غرفة صوتية تفاعلية باستخدام Live API لتجربة اتصال محسنة." - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Enable Interactive Voice Room with Live API for an Enhanced Communication Experience." - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "通过 Live API 搭建互动语音聊天室,为您带来低延迟高音质的体验。" - } - }, - "zh-Hant": { - "stringUnit": { - "state": "translated", - "value": "通過 Live API 搭建互動語音聊天室,為您帶來低延遲高音質的體驗。" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "Live APIでインタラクティブなボイスルームを有効にし、コミュニケーション体験を向上。" - } - } - } - }, - "TUILiveKit": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "TUILiveKit" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "TUILiveKit" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "TUILiveKit" - } - }, - "zh-Hant": { - "stringUnit": { - "state": "translated", - "value": "TUILiveKit" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "TUILiveKit" - } - } - } - }, - "Live": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "بث مباشر" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Live" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "直播" - } - }, - "zh-Hant": { - "stringUnit": { - "state": "translated", - "value": "直播" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "ライブ" - } - } - } - }, - "Likes Count": { - "extractionState": "manual", - "localizations": { - "ar": { - "stringUnit": { - "state": "translated", - "value": "عدد الإعجابات" - } - }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Likes Count" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "点赞数量" - } - }, - "zh-Hant": { - "stringUnit": { - "state": "translated", - "value": "點讚數量" - } - }, - "ja": { - "stringUnit": { - "state": "translated", - "value": "いいね数" - } - } - } - } - }, - "version": "1.0" -} \ No newline at end of file diff --git a/application/App-UIKit/Resource/phone_ringing.mp3 b/application/App-UIKit/Resource/phone_ringing.mp3 deleted file mode 100644 index 166c027c..00000000 Binary files a/application/App-UIKit/Resource/phone_ringing.mp3 and /dev/null differ diff --git a/application/App-UIKit/Room/Model/ConferenceOptionsModel.swift b/application/App-UIKit/Room/Model/ConferenceOptionsModel.swift deleted file mode 100644 index a1452cb8..00000000 --- a/application/App-UIKit/Room/Model/ConferenceOptionsModel.swift +++ /dev/null @@ -1,52 +0,0 @@ -// -// ConferenceOptionsModel.swift -// App-UIKit -// -// Created by yukiwwwang on 2025/8/20. -// - -import Foundation -import UIKit - -typealias ConferenceItemTapClosure = (UIButton) -> Void - -struct ConferenceOptionInfo { - let normalText: String - let normalIcon: String - let backgroundColor: String - var tapAction: ConferenceItemTapClosure? - init(normalText: String, normalIcon: String, backgroundColor: String, tapAction: ConferenceItemTapClosure? = nil) { - self.normalText = normalText - self.normalIcon = normalIcon - self.backgroundColor = backgroundColor - } -} - -class ConferenceOptionsModel { - func generateOptionsData() -> [ConferenceOptionInfo] { - var options: [ConferenceOptionInfo] = [] - let enterRoom = ConferenceOptionInfo(normalText: .joinRoomText, normalIcon: "enter_conference", backgroundColor: "0x146EFA") - options.append(enterRoom) - - let createRoom = ConferenceOptionInfo(normalText: .createRoomText, normalIcon: "create_conference", backgroundColor: "0x146EFA") - options.append(createRoom) - - - let scheduleRoom = ConferenceOptionInfo(normalText: .scheduleRoomText, normalIcon: "schedule_conference", backgroundColor: "0x146EFA") - options.append(scheduleRoom) - return options - } -} - -private extension String { - static var joinRoomText: String { - ("Join Room").localized - } - static var createRoomText: String { - ("Create Room").localized - } - static var scheduleRoomText: String { - ("Schedule Room").localized - } -} - diff --git a/application/App-UIKit/Room/Model/ListCellItemModel.swift b/application/App-UIKit/Room/Model/ListCellItemModel.swift deleted file mode 100644 index 95ec0481..00000000 --- a/application/App-UIKit/Room/Model/ListCellItemModel.swift +++ /dev/null @@ -1,29 +0,0 @@ -// -// ListCellItemModel.swift -// App-UIKit -// -// Created by yukiwwwang on 2025/8/20. -// - -import Foundation -import UIKit - -class ListCellItemModel { - - var titleText: String = "" - var messageText: String = "" - var fieldPlaceholderText: String = "" - var fieldText: String = "" - var fieldEnable: Bool = false - var isSwitchOn: Bool = false - var action: ((Any)->Void)? - var normalIcon: String = "" - var resourceBundle: Bundle = Bundle.main - var hasSwitch: Bool = false - var hasButton: Bool = false - var hasFieldView: Bool = false - var hasOverAllAction: Bool = false - var size: CGSize? - var backgroundColor: UIColor? - var hasDownLineView: Bool = true -} diff --git a/application/App-UIKit/Room/UI/ConferenceOptionsView.swift b/application/App-UIKit/Room/UI/ConferenceOptionsView.swift deleted file mode 100644 index eb3e22bb..00000000 --- a/application/App-UIKit/Room/UI/ConferenceOptionsView.swift +++ /dev/null @@ -1,174 +0,0 @@ -// -// ConferenceOptionsViewController.swift -// App-UIKit -// -// Created by yukiwwwang on 2025/8/20. -// -import UIKit -import Combine -import TUIRoomKit -import TUICore - -class ConferenceOptionsView: UIView { - weak var rootViewController: ConferenceOptionsViewController? -// private var listView: ConferenceListView - - lazy var options: [ConferenceOptionInfo] = { - return ConferenceOptionsModel().generateOptionsData() - }() - - let topViewContainer: UIView = { - let view = UIView(frame: .zero) - return view - }() - - let backButton: UIButton = { - let button = UIButton(type: .custom) - let image = UIImage(named: "back") - button.setImage(image, for: .normal) - return button - }() - - let stackView: UIStackView = { - let view = UIStackView() - view.axis = .horizontal - view.alignment = .center - view.distribution = .fillEqually - view.spacing = 20 - return view - }() - - let lineView: UIView = { - let line = UIView() - line.backgroundColor = UIColor.tui_color(withHex: "E7ECF6") - return line - }() - - init(viewController: ConferenceOptionsViewController) { - rootViewController = viewController -// listView = ConferenceListView(viewController: viewController) - super.init(frame: .zero) - } - - required init?(coder: NSCoder) { - fatalError("init(coder:) has not been implemented") - } - - // MARK: - view layout - private var isViewReady: Bool = false - public override func didMoveToWindow() { - super.didMoveToWindow() - guard !isViewReady else { return } - backgroundColor = .white - constructViewHierarchy() - activateConstraints() - bindInteraction() - isViewReady = true - } - - func constructViewHierarchy() { - addSubview(topViewContainer) - topViewContainer.addSubview(backButton) - addSubview(stackView) - addSubview(lineView) -// addSubview(listView) - } - - func activateConstraints() { - topViewContainer.snp.makeConstraints { make in - make.top.equalTo(self.safeAreaLayoutGuide.snp.top).offset(20) - make.left.right.equalToSuperview() - make.height.equalTo(32.scale375()) - } - backButton.snp.makeConstraints { make in - make.height.width.equalTo(32.scale375()) - make.leading.equalToSuperview().offset(15) - make.centerY.equalToSuperview() - } - stackView.snp.makeConstraints { make in - make.top.equalTo(topViewContainer.snp.bottom).offset(25) - make.height.equalTo(80.scale375()) - make.leading.equalToSuperview().offset(32) - make.trailing.equalToSuperview().offset(-33) - } - for (index, item) in options.enumerated() { - let button = self.createOptionButton(index: index, info: item) - stackView.addArrangedSubview(button) - button.snp.makeConstraints { make in - make.width.equalTo(90.scale375()) - make.height.equalTo(80.scale375()) - } - } - lineView.snp.makeConstraints { make in - make.height.equalTo(1) - make.leading.equalToSuperview().offset(20) - make.trailing.equalToSuperview().offset(-20) - make.top.equalTo(stackView.snp.bottom).offset(20) - } -// listView.snp.makeConstraints { make in -// make.top.equalTo(lineView.snp.bottom).offset(19) -// make.leading.equalToSuperview().offset(20) -// make.trailing.equalToSuperview().offset(-20) -// make.bottom.equalTo(self.safeAreaLayoutGuide.snp.bottom) -// } - } - - func bindInteraction() { - backButton.addTarget(self, action: #selector(onBackButtonTapped(sender:)), for: .touchUpInside) - } - - - private func createOptionButton(index: Int, info: ConferenceOptionInfo) -> UIButton { - let button = UIButton(type: .custom) - button.setTitle(info.normalText, for: .normal) - button.setTitleColor(.white, for: .normal) - button.titleLabel?.font = UIFont(name: "PingFangSC-Medium", size: 14) - let normalIcon = UIImage(named: info.normalIcon) - button.setImage(normalIcon, for: .normal) - button.layer.cornerRadius = 10 - button.backgroundColor = UIColor.tui_color(withHex: info.backgroundColor) - - button.sizeToFit() - let imageHeight = button.imageView?.bounds.size.height ?? 0 - let imageWidth = button.imageView?.bounds.size.width ?? 0 - let titleHeight = button.titleLabel?.bounds.size.height ?? 0 - let titleWidth = button.titleLabel?.bounds.size.width ?? 0 - let spacing: CGFloat = 9 - button.imageEdgeInsets = UIEdgeInsets(top: -(titleHeight + spacing) / 2, left: 0 , bottom: (titleHeight + spacing) / 2, right: -titleWidth) - button.titleEdgeInsets = UIEdgeInsets(top: (imageHeight + spacing) / 2, left: -imageWidth, bottom: -(imageHeight + spacing) / 2, right: 0) - - button.tag = index + 1_000 - button.addTarget(self, action: #selector(optionTapAction(sender:)), for: .touchUpInside) - return button - } - - @objc - func optionTapAction(sender: UIButton) { - let index = sender.tag - 1_000 - switch index { - case 0: - rootViewController?.joinRoom() - case 1: - rootViewController?.createRoom() - case 2: - rootViewController?.scheduleRoom() - default: - assertionFailure("undefine button index,please check") - } - } - - @objc func onBackButtonTapped(sender: UIButton) { - self.rootViewController?.didBackButtonClicked(in: self) - } - - func reloadConferenceList() { -// listView.reloadList() - } - - deinit { - debugPrint("deinit \(self)") - } -} - - - diff --git a/application/App-UIKit/Room/UI/ConferenceOptionsViewController.swift b/application/App-UIKit/Room/UI/ConferenceOptionsViewController.swift deleted file mode 100644 index 8479bab5..00000000 --- a/application/App-UIKit/Room/UI/ConferenceOptionsViewController.swift +++ /dev/null @@ -1,82 +0,0 @@ -// -// ConferenceOptionsViewController.swift -// App-UIKit -// -// Created by yukiwwwang on 2025/8/20. -// - -import UIKit -import RTCRoomEngine -import Combine -import TUIRoomKit - -class ConferenceOptionsViewController: UIViewController { - private var cancellableSet = Set() - override var shouldAutorotate: Bool { - return false - } - - override var supportedInterfaceOrientations: UIInterfaceOrientationMask { - return .portrait - } - - init() { - super.init(nibName: nil, bundle: nil) - } - - required init?(coder: NSCoder) { - fatalError("init(coder:) has not been implemented") - } - - override func viewWillAppear(_ animated: Bool) { - super.viewWillAppear(animated) - guard let optionsView = view as? ConferenceOptionsView else { - return - } - UIApplication.shared.isIdleTimerDisabled = false - navigationController?.setNavigationBarHidden(true, animated: false) - optionsView.reloadConferenceList() - } - - override func loadView() { - let view = ConferenceOptionsView(viewController: self) - self.view = view - } - - override func viewDidLoad() { - super.viewDidLoad() -// ConferenceSession.sharedInstance.enableWaterMark() - } - - deinit { - debugPrint("deinit \(self)") - } -} - -extension ConferenceOptionsViewController { - func didBackButtonClicked(in optionsView: ConferenceOptionsView) { - if let navigationController = self.navigationController { - if navigationController.viewControllers.first != self { - navigationController.popViewController(animated: true) - } else if presentingViewController != nil { - navigationController.dismiss(animated: true, completion: nil) - } - } else if presentingViewController != nil { - dismiss(animated: true, completion: nil) - } - - } - - func joinRoom() { - navigationController?.pushViewController(RoomViewController(), animated: true) - } - - func createRoom() { - navigationController?.pushViewController(CreateRoomViewController(), animated: true) - } - - func scheduleRoom() { -// let scheduleViewController = ScheduleConferenceViewController() -// navigationController?.pushViewController(scheduleViewController, animated: true) - } -} diff --git a/application/App-UIKit/Room/UI/CreateRoomView.swift b/application/App-UIKit/Room/UI/CreateRoomView.swift deleted file mode 100644 index 97993a90..00000000 --- a/application/App-UIKit/Room/UI/CreateRoomView.swift +++ /dev/null @@ -1,168 +0,0 @@ -// -// CreateRoomView.swift -// App-UIKit -// -// Created by yukiwwwang on 2025/8/20. -// - -import UIKit -import TUICore - -class CreateRoomView: UIView { - let loading = UIActivityIndicatorView(style: .gray) - weak var rootViewController: CreateRoomViewController? - private var inputViewArray: [ListCellItemView] = [] - private var switchViewArray: [ListCellItemView] = [] - - let inputStackView: UIStackView = { - let view = UIStackView() - view.axis = .vertical - view.alignment = .center - view.distribution = .equalSpacing - view.spacing = 0 - return view - }() - - let switchStackView: UIStackView = { - let view = UIStackView() - view.axis = .vertical - view.alignment = .center - view.distribution = .equalSpacing - view.spacing = 0 - return view - }() - - let enterButton: UIButton = { - let button = UIButton(type: .custom) - button.setBackgroundImage(UIColor(0x0062E3).trans2Image(), for: .normal) - button.layer.cornerRadius = 10 - button.clipsToBounds = true - button.titleLabel?.font = UIFont.boldSystemFont(ofSize: 19) - button.setTitleColor(.white, for: .normal) - button.setTitle(.createRoomText, for: .normal) - button.titleLabel?.adjustsFontSizeToFitWidth = true - return button - }() - - lazy var switchSpeakerModelView: RoomTypeView = { - let view = RoomTypeView() - view.rootViewController = rootViewController - view.isHidden = true - return view - }() - - private var isViewReady: Bool = false - - override func didMoveToWindow() { - super.didMoveToWindow() - guard !isViewReady else { return } - constructViewHierarchy() - activateConstraints() - bindInteraction() - isViewReady = true - } - - override func draw(_ rect: CGRect) { - super.draw(rect) - inputStackView.roundedRect(rect: inputStackView.bounds, - byRoundingCorners: [.topLeft, .topRight, .bottomLeft, .bottomRight], - cornerRadii: CGSize(width: 12, height: 12)) - switchStackView.roundedRect(rect: switchStackView.bounds, - byRoundingCorners: [.topLeft, .topRight, .bottomLeft, .bottomRight], - cornerRadii: CGSize(width: 12, height: 12)) - } - - override func touchesBegan(_ touches: Set, with event: UIEvent?) { - super.touchesBegan(touches, with: event) - switchSpeakerModelView.isHidden = true - } - - func constructViewHierarchy() { - backgroundColor = UIColor(0x17181F) - addSubview(inputStackView) - addSubview(switchStackView) - addSubview(enterButton) - addSubview(loading) - addSubview(switchSpeakerModelView) - guard let rootViewController = rootViewController else { return } - for item in rootViewController.inputViewItems { - let view = ListCellItemView(itemData: item) - inputViewArray.append(view) - inputStackView.addArrangedSubview(view) - view.snp.makeConstraints { make in - make.height.equalTo(52.scale375()) - make.width.equalToSuperview() - } - view.backgroundColor = item.backgroundColor ?? UIColor(0x2A2D38) - } - for item in rootViewController.switchViewItems { - let view = ListCellItemView(itemData: item) - switchViewArray.append(view) - switchStackView.addArrangedSubview(view) - view.snp.makeConstraints { make in - make.height.equalTo(52.scale375()) - make.width.equalToSuperview() - } - view.backgroundColor = item.backgroundColor ?? UIColor(0x2A2D38) - } - } - - func activateConstraints() { - inputStackView.snp.makeConstraints { make in - make.top.equalTo(snp.topMargin).offset(20) - make.leading.equalToSuperview().offset(20) - make.trailing.equalToSuperview().offset(-20) - } - - switchStackView.snp.makeConstraints { make in - make.leading.equalToSuperview().offset(20) - make.trailing.equalToSuperview().offset(-20) - make.top.equalTo(inputStackView.snp.bottom).offset(12) - } - - enterButton.snp.makeConstraints { make in - make.bottom.equalToSuperview().offset(-40 - safeAreaInsets.bottom) - make.centerX.equalToSuperview() - make.width.equalToSuperview().multipliedBy(0.4) - make.height.equalTo(50) - } - - loading.snp.makeConstraints { make in - make.width.height.equalTo(40) - make.centerX.centerY.equalToSuperview() - } - - switchSpeakerModelView.snp.makeConstraints { make in - make.bottom.equalToSuperview() - make.height.equalTo(191.scale375()) - make.width.equalToSuperview() - } - } - - func bindInteraction() { - enterButton.addTarget(self, action: #selector(enterButtonClick(sender:)), for: .touchUpInside) - } - - @objc func enterButtonClick(sender: UIButton) { - rootViewController?.enterButtonClick(sender: sender) - } - - func updateInputStackView(item: ListCellItemModel, index: Int) { - guard inputViewArray.count > index else { return } - inputViewArray[index].setupViewState(item: item) - } - - func showSpeechModeControlView() { - switchSpeakerModelView.isHidden = false - } - - deinit { - debugPrint("deinit \(self)") - } -} - -private extension String { - static var createRoomText: String { - ("Create Room").localized - } -} diff --git a/application/App-UIKit/Room/UI/CreateRoomViewController.swift b/application/App-UIKit/Room/UI/CreateRoomViewController.swift deleted file mode 100644 index b38dd5b2..00000000 --- a/application/App-UIKit/Room/UI/CreateRoomViewController.swift +++ /dev/null @@ -1,270 +0,0 @@ -// -// TUIRoomViewController.swift -// App-UIKit -// -// Created by yukiwwwang on 2025/8/20. -// - -import SnapKit -import UIKit -import RTCRoomEngine -import TUIRoomKit -import TUICore - -class CreateRoomViewController: UIViewController { - weak var rootView: CreateRoomView? - private(set) var inputViewItems: [ListCellItemModel] = [] - private(set) var switchViewItems: [ListCellItemModel] = [] - private(set) var isSeatEnable: Bool = false - private let currentUserName: String = TUILogin.getNickName() ?? "" - private let currentUserId: String = TUILogin.getUserID() ?? "" - private let roomInfo: TUIRoomInfo = TUIRoomInfo() - private var enableLocalAudio: Bool = true - private var enableLocalVideo: Bool = true - private var isSoundOnSpeaker: Bool = true - let roomHashNumber: Int = 0x3B9AC9FF - var roomId: String? - - let backButton: UIButton = { - let button = UIButton(type: .custom) - let normalIcon = UIImage(named: "room_back_white") - button.setImage(normalIcon, for: .normal) - button.setTitleColor(UIColor(0xD1D9EC), for: .normal) - return button - }() - override var shouldAutorotate: Bool { - return false - } - override var supportedInterfaceOrientations: UIInterfaceOrientationMask { - return .portrait - } - - init() { - super.init(nibName: nil, bundle: nil) - createItems() - backButton.addTarget(self, action: #selector(backButtonClick(sender:)), for: .touchUpInside) - } - - required init?(coder: NSCoder) { - fatalError("init(coder:) has not been implemented") - } - - override func loadView() { - let rootView = CreateRoomView() - rootView.rootViewController = self - view = rootView - self.rootView = rootView - } - - override func viewDidLoad() { - super.viewDidLoad() -// ConferenceSession.sharedInstance.addObserver(observer: self) - } - - override func viewWillAppear(_ animated: Bool) { - super.viewWillAppear(animated) - navigationController?.setNavigationBarHidden(false, animated: false) - navigationItem.leftBarButtonItem = UIBarButtonItem(customView: backButton) - UIApplication.shared.isIdleTimerDisabled = false - setupRoomId() - } - - @objc - func backButtonClick(sender: UIButton) { - navigationController?.popViewController(animated: true) - } - - deinit { -// ConferenceSession.sharedInstance.removeObserver(observer: self) - debugPrint("deinit \(self)") - } -} - -extension CreateRoomViewController { - private func createItems() { - let roomTypeItem = ListCellItemModel() - roomTypeItem.titleText = .roomTypeText - roomTypeItem.messageText = .freedomSpeakText - roomTypeItem.hasOverAllAction = true - roomTypeItem.hasButton = true - roomTypeItem.action = { [weak self] sender in - guard let self = self else { return } - self.switchRoomTypeClick() - } - inputViewItems.append(roomTypeItem) - - let userNameItem = ListCellItemModel() - userNameItem.titleText = .userNameText - userNameItem.messageText = currentUserName - userNameItem.hasDownLineView = false - inputViewItems.append(userNameItem) - - let openMicItem = ListCellItemModel() - openMicItem.titleText = .openMicText - openMicItem.hasSwitch = true - openMicItem.isSwitchOn = enableLocalAudio - openMicItem.action = { [weak self] sender in - guard let self = self, let view = sender as? UISwitch else { return } - self.enableLocalAudio = view.isOn - } - switchViewItems.append(openMicItem) - - let openSpeakerItem = ListCellItemModel() - openSpeakerItem.titleText = .openSpeakerText - openSpeakerItem.hasSwitch = true - openSpeakerItem.isSwitchOn = isSoundOnSpeaker - openSpeakerItem.action = { [weak self] sender in - guard let self = self, let view = sender as? UISwitch else { return } - self.isSoundOnSpeaker = view.isOn - } - switchViewItems.append(openSpeakerItem) - - let openCameraItem = ListCellItemModel() - openCameraItem.titleText = .openCameraText - openCameraItem.hasSwitch = true - openCameraItem.isSwitchOn = enableLocalVideo - openCameraItem.hasDownLineView = false - openCameraItem.action = { [weak self] sender in - guard let self = self, let view = sender as? UISwitch else { return } - self.enableLocalVideo = view.isOn - } - switchViewItems.append(openCameraItem) - } - - func enterButtonClick(sender: UIButton) { - guard let roomId = self.roomId else { - self.view.showAtomicToast(text: .generatingRoomIdText) - return - } - quickStartConference(roomId: roomId) - } - - private func quickStartConference(roomId: String) { -// let vc = ConferenceMainViewController() -// let params = StartConferenceParams(roomId: roomId) -// params.isSeatEnabled = isSeatEnable -// params.isOpenMicrophone = enableLocalAudio -// params.isOpenCamera = enableLocalVideo -// params.isOpenSpeaker = isSoundOnSpeaker -// vc.setStartConferenceParams(params: params) -// navigationController?.pushViewController(vc, animated: true) - } - - func switchRoomTypeClick() { - rootView?.showSpeechModeControlView() - } - - func freedomAction(sender: UIButton, view: RoomTypeView) { - sender.isSelected = !sender.isSelected - view.raiseHandButton.isSelected = false - isSeatEnable = false - view.isHidden = true - guard let itemData = inputViewItems.first(where: { $0.titleText == .roomTypeText }) else { return } - itemData.messageText = isSeatEnable ? .raiseHandSpeakText : .freedomSpeakText - rootView?.updateInputStackView(item: itemData, index: 0) - } - - func raiseHandAction(sender: UIButton, view: RoomTypeView) { - sender.isSelected = !sender.isSelected - view.freedomButton.isSelected = false - isSeatEnable = true - view.isHidden = true - guard let itemData = inputViewItems.first(where: { $0.titleText == .roomTypeText }) else { return } - itemData.messageText = isSeatEnable ? .raiseHandSpeakText : .freedomSpeakText - rootView?.updateInputStackView(item: itemData, index: 0) - } - - private func setupRoomId() { - let roomId = getRandomRoomId(numberOfDigits: 6) - checkIfRoomIdExists(roomId: roomId) { [weak self] in - guard let self = self else { return } - self.setupRoomId() - } onNotExist: { [weak self] in - guard let self = self else { return } - self.roomId = roomId - } - } - - private func getRandomRoomId(numberOfDigits: Int) -> String { - var numberOfDigit = numberOfDigits > 0 ? numberOfDigits : 1 - numberOfDigit = numberOfDigit < 10 ? numberOfDigit : 9 - let minNumber = Int(truncating: NSDecimalNumber(decimal: pow(10, numberOfDigit - 1))) - let maxNumber = Int(truncating: NSDecimalNumber(decimal: pow(10, numberOfDigit))) - 1 - let randomNumber = arc4random_uniform(UInt32(maxNumber - minNumber)) + UInt32(minNumber) - return String(randomNumber) - } - - private func checkIfRoomIdExists(roomId: String, onExist: @escaping () -> (), onNotExist: @escaping () -> ()) { - V2TIMManager.sharedInstance().getGroupsInfo([roomId]) { infoResult in - if infoResult?.first?.resultCode == 0 { - onExist() - } else { - onNotExist() - } - } fail: { code, message in - onNotExist() - } - } -} - -//extension CreateRoomViewController: ConferenceObserver { -// func onConferenceStarted(roomInfo: TUIRoomInfo, error: TUIError, message: String) { -// guard error != .success else { return } -// navigationController?.popViewController(animated: true) -// guard !message.isEmpty else { return } -// SceneDelegate.getCurrentWindow()?.makeToast(message, duration: 1, position:TUICSToastPositionCenter) -// } -// -// func onConferenceFinished(roomInfo: TUIRoomInfo, reason: ConferenceFinishedReason) { -// debugPrint("onConferenceFinished") -// } -// -// func onConferenceExited(roomInfo: TUIRoomInfo, reason: ConferenceExitedReason) { -// debugPrint("onConferenceExited") -// } -//} - -private extension String { - static var userNameText: String { - ("Your Name").localized - } - static var roomTypeText: String { - ("Conference Type").localized - } - static var openCameraText: String { - ("Video").localized - } - static var openMicText: String { - ("Mic").localized - } - static var openSpeakerText: String { - ("Speaker").localized - } - static var freedomSpeakText: String { - ("Free Speech Conference").localized - } - static var raiseHandSpeakText: String { - ("On-stage Speech Conference").localized - } - static var generatingRoomIdText: String { - ("Generating room number, please try again later").localized - } - func truncateUtf8String(maxByteLength: Int) -> String { - let length = self.utf8.count - if length <= maxByteLength { - return self - } else { - var byteLen = 0 - var result = "" - for c in self { - byteLen += String(c).utf8.count - if byteLen > maxByteLength { - break - } - result.append(c) - } - return result - } - } -} - diff --git a/application/App-UIKit/Room/UI/EnterRoomView.swift b/application/App-UIKit/Room/UI/EnterRoomView.swift deleted file mode 100644 index 29ab21b0..00000000 --- a/application/App-UIKit/Room/UI/EnterRoomView.swift +++ /dev/null @@ -1,157 +0,0 @@ -// -// EnterRoomView.swift -// App-UIKit -// -// Created by yukiwwwang on 2025/8/20. -// - -import UIKit -import TUICore - -class EnterRoomView: UIView { - weak var rootViewController: RoomViewController? - let loading = UIActivityIndicatorView(style: .gray) - private var inputViewArray: [ListCellItemView] = [] - private var switchViewArray: [ListCellItemView] = [] - - let inputStackView: UIStackView = { - let view = UIStackView() - view.axis = .vertical - view.alignment = .center - view.distribution = .equalSpacing - view.spacing = 0 - return view - }() - - let switchStackView: UIStackView = { - let view = UIStackView() - view.axis = .vertical - view.alignment = .center - view.distribution = .equalSpacing - view.spacing = 0 - return view - }() - - let enterButton: UIButton = { - let button = UIButton(type: .custom) - button.setBackgroundImage(UIColor(0x0062E3).trans2Image(), for: .normal) - button.layer.cornerRadius = 10 - button.clipsToBounds = true - button.titleLabel?.font = UIFont.boldSystemFont(ofSize: 19) - button.setTitleColor(.white, for: .normal) - button.setTitle(.enterRoomText, for: .normal) - button.titleLabel?.adjustsFontSizeToFitWidth = true - return button - }() - - private var isViewReady: Bool = false - - override func didMoveToWindow() { - super.didMoveToWindow() - guard !isViewReady else { return } - constructViewHierarchy() - activateConstraints() - bindInteraction() - isViewReady = true - } - - override func draw(_ rect: CGRect) { - super.draw(rect) - inputStackView.roundedRect(rect: inputStackView.bounds, - byRoundingCorners: [.topLeft, .topRight, .bottomLeft, .bottomRight], - cornerRadii: CGSize(width: 12, height: 12)) - switchStackView.roundedRect(rect: switchStackView.bounds, - byRoundingCorners: [.topLeft, .topRight, .bottomLeft, .bottomRight], - cornerRadii: CGSize(width: 12, height: 12)) - } - - override func touchesBegan(_ touches: Set, with event: UIEvent?) { - super.touchesBegan(touches, with: event) - resignTextFieldFirstResponder() - } - - func constructViewHierarchy() { - backgroundColor = UIColor(0x17181F) - addSubview(inputStackView) - addSubview(switchStackView) - addSubview(enterButton) - addSubview(loading) - guard let rootViewController = rootViewController else { return } - for item in rootViewController.inputViewItems { - let view = ListCellItemView(itemData: item) - inputStackView.addArrangedSubview(view) - view.snp.makeConstraints { make in - make.height.equalTo(52.scale375()) - make.width.equalToSuperview() - } - view.backgroundColor = item.backgroundColor ?? UIColor(0x2A2D38) - } - for item in rootViewController.switchViewItems { - let view = ListCellItemView(itemData: item) - switchStackView.addArrangedSubview(view) - view.snp.makeConstraints { make in - make.height.equalTo(52.scale375()) - make.width.equalToSuperview() - } - view.backgroundColor = item.backgroundColor ?? UIColor(0x2A2D38) - } - } - - func activateConstraints() { - inputStackView.snp.makeConstraints { make in - make.top.equalTo(snp.topMargin).offset(20) - make.leading.equalToSuperview().offset(20) - make.trailing.equalToSuperview().offset(-20) - } - - switchStackView.snp.makeConstraints { make in - make.leading.equalToSuperview().offset(20) - make.trailing.equalToSuperview().offset(-20) - make.top.equalTo(inputStackView.snp.bottom).offset(12) - } - - enterButton.snp.makeConstraints { make in - make.top.equalTo(switchStackView.snp.bottom).offset(48) - make.centerX.equalToSuperview() - make.width.equalToSuperview().multipliedBy(0.4) - make.height.equalTo(50) - } - - loading.snp.makeConstraints { make in - make.width.height.equalTo(40) - make.centerX.centerY.equalToSuperview() - } - } - - func bindInteraction() { - enterButton.addTarget(self, action: #selector(enterButtonClick(sender:)), for: .touchUpInside) - } - - @objc func backButtonClick(sender: UIButton) { - rootViewController?.backButtonClick(sender: sender) - } - - @objc func enterButtonClick(sender: UIButton) { - resignTextFieldFirstResponder() - rootViewController?.enterButtonClick(sender: sender) - } - - private func resignTextFieldFirstResponder() { - for subView in inputStackView.subviews { - guard subView is ListCellItemView, let view = subView as? ListCellItemView else { continue } - guard view.itemData.hasFieldView, view.textField.isFirstResponder else { continue } - view.textField.resignFirstResponder() - break - } - } - - deinit { - debugPrint("deinit \(self)") - } -} - -private extension String { - static var enterRoomText: String { - ("Join Room").localized - } -} diff --git a/application/App-UIKit/Room/UI/EnterRoomViewController.swift b/application/App-UIKit/Room/UI/EnterRoomViewController.swift deleted file mode 100644 index fbe2c209..00000000 --- a/application/App-UIKit/Room/UI/EnterRoomViewController.swift +++ /dev/null @@ -1,201 +0,0 @@ -// -// TUIRoomViewController.swift -// App-UIKit -// -// Created by yukiwwwang on 2025/8/20. -// - -import SnapKit -import UIKit -import TUIRoomKit -import TUICore -import RTCRoomEngine - -class RoomViewController: UIViewController { - weak var rootView: EnterRoomView? - private var fieldText: String = "" - private(set) var inputViewItems: [ListCellItemModel] = [] - private(set) var switchViewItems: [ListCellItemModel] = [] - private let currentUserName: String = TUILogin.getNickName() ?? "" - private let currentUserId: String = TUILogin.getUserID() ?? "" - private var roomId: String = "" - private var enableLocalAudio: Bool = true - private var enableLocalVideo: Bool = true - private var isSoundOnSpeaker: Bool = true - - let backButton: UIButton = { - let button = UIButton(type: .custom) - let normalIcon = UIImage(named: "room_back_white") - button.setImage(normalIcon, for: .normal) - button.setTitleColor(UIColor(0xD1D9EC), for: .normal) - return button - }() - - override var shouldAutorotate: Bool { - return false - } - - override var supportedInterfaceOrientations: UIInterfaceOrientationMask { - return .portrait - } - - init() { - super.init(nibName: nil, bundle: nil) - createItems() - backButton.addTarget(self, action: #selector(backButtonClick(sender:)), for: .touchUpInside) - } - - required init?(coder: NSCoder) { - fatalError("init(coder:) has not been implemented") - } - - override func loadView() { - let rootView = EnterRoomView() - rootView.rootViewController = self - view = rootView - self.rootView = rootView - } - - override func viewDidLoad() { - super.viewDidLoad() -// ConferenceSession.sharedInstance.addObserver(observer: self) - } - - override func viewWillAppear(_ animated: Bool) { - super.viewWillAppear(animated) - navigationController?.setNavigationBarHidden(false, animated: false) - navigationItem.leftBarButtonItem = UIBarButtonItem(customView: backButton) - UIApplication.shared.isIdleTimerDisabled = false - } - - @objc func backButtonClick(sender: UIButton) { - navigationController?.popViewController(animated: true) - } - - deinit { -// ConferenceSession.sharedInstance.removeObserver(observer: self) - debugPrint("deinit \(self)") - } -} - -extension RoomViewController { - private func createItems() { - let enterRoomIdItem = ListCellItemModel() - enterRoomIdItem.titleText = .roomNumText - enterRoomIdItem.fieldEnable = true - enterRoomIdItem.hasFieldView = true - enterRoomIdItem.fieldPlaceholderText = .placeholderTipsText - enterRoomIdItem.action = { [weak self] sender in - guard let self = self, let view = sender as? UITextField else { return } - self.fieldText = view.text ?? "" - } - inputViewItems.append(enterRoomIdItem) - - let userNameItem = ListCellItemModel() - userNameItem.titleText = .userNameText - userNameItem.messageText = currentUserName - userNameItem.hasDownLineView = false - inputViewItems.append(userNameItem) - - let openMicItem = ListCellItemModel() - openMicItem.titleText = .openMicText - openMicItem.hasSwitch = true - openMicItem.isSwitchOn = enableLocalAudio - openMicItem.action = {[weak self] sender in - guard let self = self, let view = sender as? UISwitch else { return } - self.enableLocalAudio = view.isOn - } - switchViewItems.append(openMicItem) - - let openSpeakerItem = ListCellItemModel() - openSpeakerItem.titleText = .openSpeakerText - openSpeakerItem.hasSwitch = true - openSpeakerItem.isSwitchOn = true - openSpeakerItem.action = {[weak self] sender in - guard let self = self, let view = sender as? UISwitch else { return } - self.isSoundOnSpeaker = view.isOn - } - switchViewItems.append(openSpeakerItem) - - let openCameraItem = ListCellItemModel() - openCameraItem.titleText = .openCameraText - openCameraItem.hasSwitch = true - openCameraItem.isSwitchOn = enableLocalVideo - openCameraItem.hasDownLineView = false - openCameraItem.action = {[weak self] sender in - guard let self = self, let view = sender as? UISwitch else { return } - self.enableLocalVideo = view.isOn - } - switchViewItems.append(openCameraItem) - } - - func enterButtonClick(sender: UIButton) { - if fieldText.count <= 0 { - view.showAtomicToast(text: .enterRoomIdErrorToast) - return - } - let roomIDStr = fieldText - .replacingOccurrences(of: " ", - with: "", - options: .literal, - range: nil) - if roomIDStr.count <= 0 { - view.showAtomicToast(text: .enterRoomIdErrorToast) - return - } - roomId = roomIDStr - joinConference(roomId: roomId) - } - - private func joinConference(roomId: String) { -// let vc = ConferenceMainViewController() -// let params = JoinConferenceParams(roomId: roomId) -// params.isOpenMicrophone = enableLocalAudio -// params.isOpenCamera = enableLocalVideo -// params.isOpenSpeaker = isSoundOnSpeaker -// vc.setJoinConferenceParams(params: params) -// navigationController?.pushViewController(vc, animated: true) - } - -} - -//extension RoomViewController: ConferenceObserver { -// func onConferenceJoined(roomInfo: TUIRoomInfo, error: TUIError, message: String) { -// guard error != .success else { return } -// navigationController?.popViewController(animated: true) -// guard !message.isEmpty else { return } -// SceneDelegate.getCurrentWindow()?.showAtomicToast(message, duration: 1, position:TUICSToastPositionCenter) -// } -// -// func onConferenceFinished(roomInfo: TUIRoomInfo, reason: ConferenceFinishedReason) { -// debugPrint("onConferenceFinished") -// } -// -// func onConferenceExited(roomInfo: TUIRoomInfo, reason: ConferenceExitedReason) { -// debugPrint("onConferenceExited") -// } -//} - -private extension String { - static var enterRoomIdErrorToast: String { - ("Enter a valid room ID.").localized - } - static var placeholderTipsText: String { - ("Enter a room ID").localized - } - static var userNameText: String { - ("Your Name").localized - } - static var roomNumText: String { - ("Room ID").localized - } - static var openCameraText: String { - ("Video").localized - } - static var openMicText: String { - ("Mic").localized - } - static var openSpeakerText: String { - ("Speaker").localized - } -} diff --git a/application/App-UIKit/Room/UI/ListCellItemView.swift b/application/App-UIKit/Room/UI/ListCellItemView.swift deleted file mode 100644 index 671af77c..00000000 --- a/application/App-UIKit/Room/UI/ListCellItemView.swift +++ /dev/null @@ -1,226 +0,0 @@ -// -// ListCellItemView.swift -// App-UIKit -// -// Created by yukiwwwang on 2025/8/20. -// - -import Foundation -import UIKit - -class ListCellItemView: UIView { - let itemData: ListCellItemModel - - let titleLabel: UILabel = { - let view = UILabel() - view.backgroundColor = .clear - view.textColor = UIColor(0xD1D9EC) - view.font = UIFont.systemFont(ofSize: 14, weight: .regular) - view.minimumScaleFactor = 0.5 - return view - }() - - let messageLabel: UILabel = { - let view = UILabel() - view.backgroundColor = .clear - view.textColor = UIColor(0xD1D9EC) - view.font = UIFont.systemFont(ofSize: 14, weight: .medium) - view.adjustsFontSizeToFitWidth = false - view.numberOfLines = 0 - view.minimumScaleFactor = 0.5 - return view - }() - - let textField: UITextField = { - let view = UITextField() - view.backgroundColor = .clear - view.textColor = UIColor(0xD1D9EC) - view.font = UIFont(name: "PingFangSC-Regular", size: 14) - let color = UIColor(0xBBBBBB) - view.keyboardType = .numberPad - return view - }() - - let rightSwitch: UISwitch = { - let view = UISwitch() - view.isOn = true - view.onTintColor = UIColor(0x0062E3) - return view - }() - - lazy var rightButton: UIButton = { - let button = UIButton(type: .custom) - let normalIcon = UIImage(named: "room_drop_down") - button.setImage(normalIcon, for: .normal) - return button - }() - - let downLineView : UIView = { - let view = UIView() - view.backgroundColor = UIColor(0x6B758A,alpha: 0.3) - return view - }() - - init(itemData: ListCellItemModel) { - self.itemData = itemData - super.init(frame: .zero) - } - - required init?(coder: NSCoder) { - fatalError("init(coder:) has not been implemented") - } - - private var isViewReady: Bool = false - override func didMoveToWindow() { - super.didMoveToWindow() - guard !isViewReady else { return } - constructViewHierarchy() - activateConstraints() - bindInteraction() - isViewReady = true - } - - func constructViewHierarchy() { - addSubview(titleLabel) - addSubview(messageLabel) - addSubview(textField) - addSubview(rightSwitch) - addSubview(rightButton) - addSubview(downLineView) - } - - func activateConstraints() { - titleLabel.snp.makeConstraints { make in - make.leading.equalToSuperview().offset(20) - make.centerY.equalToSuperview() - make.width.equalTo(100.scale375()) - } - - messageLabel.snp.makeConstraints { make in - make.left.equalTo(titleLabel.snp.right).offset(10.scale375()) - make.trailing.equalToSuperview().offset(-40) - make.centerY.equalToSuperview() - } - - textField.snp.makeConstraints { make in - make.left.equalTo(titleLabel.snp.right).offset(10) - make.trailing.equalToSuperview().offset(-100) - make.centerY.equalToSuperview() - } - - rightSwitch.snp.makeConstraints { make in - make.trailing.equalToSuperview().offset(-20) - make.centerY.equalToSuperview() - make.width.equalTo(42) - make.height.equalTo(24) - } - - rightButton.snp.makeConstraints { make in - make.centerY.equalToSuperview() - make.trailing.equalToSuperview().offset(-20) - } - - downLineView.snp.makeConstraints { make in - make.leading.equalToSuperview().offset(20) - make.trailing.equalToSuperview().offset(-20) - make.bottom.equalToSuperview() - make.height.equalTo(1) - } - } - - func bindInteraction() { - setupViewState(item: itemData) - if itemData.hasOverAllAction { - let tap = UITapGestureRecognizer(target: self, action: #selector(overAllAction(sender:))) - addGestureRecognizer(tap) - } - rightButton.addTarget(self, action: #selector(rightButtonAction(sender:)), for: .touchUpInside) - rightSwitch.addTarget(self, action: #selector(switchAction(sender:)), for: .touchUpInside) - } - - func setupViewState(item: ListCellItemModel) { - if item.titleText.isEmpty { - titleLabel.isHidden = true - } - if item.messageText.isEmpty { - messageLabel.isHidden = true - } - if !item.hasFieldView { - textField.isHidden = true - } - if !item.hasSwitch { - rightSwitch.isHidden = true - } - if !item.hasButton { - rightButton.isHidden = true - } - rightSwitch.isOn = item.isSwitchOn - titleLabel.text = item.titleText - messageLabel.text = item.messageText - textField.isUserInteractionEnabled = item.fieldEnable - textField.delegate = self - if item.fieldEnable { - let color = UIColor(0xBBBBBB) - textField.attributedPlaceholder = NSAttributedString(string: item.fieldPlaceholderText,attributes: - [NSAttributedString.Key.foregroundColor:color]) - } else { - textField.text = item.fieldText - } - downLineView.isHidden = !item.hasDownLineView - } - - @objc func overAllAction(sender: UIView) { - itemData.action?(sender) - } - - @objc func rightButtonAction(sender: UIButton) { - itemData.action?(sender) - } - - @objc func switchAction(sender: UISwitch) { - itemData.action?(sender) - } - - @objc func textFieldAction(sender: UITextField) { - itemData.action?(sender) - } - - deinit { - debugPrint("deinit \(self)") - } -} - -extension ListCellItemView: UITextFieldDelegate { - func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool { - let maxCount = 11 - DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 0.05) { - textField.text = textField.text? - .replacingOccurrences(of: " ", - with: "", - options: .literal, - range: nil) - .addIntervalSpace(intervalStr: " ", interval: 3) - } - - guard let textFieldText = textField.text, - let rangeOfTextToReplace = Range(range, in: textFieldText) else { - return false - } - let substringToReplace = textFieldText[rangeOfTextToReplace] - if substringToReplace.count > 0 && string.count == 0 { - return true - } - let count = textFieldText.count - substringToReplace.count + string.count - - let res = count <= maxCount - return res - } - - func textFieldDidChangeSelection(_ textField: UITextField) { - textFieldAction(sender: textField) - } - - func textFieldDidEndEditing(_ textField: UITextField) { - textFieldAction(sender: textField) - } -} diff --git a/application/App-UIKit/Room/UI/RoomNavigationController.swift b/application/App-UIKit/Room/UI/RoomNavigationController.swift deleted file mode 100644 index 03b6ffc2..00000000 --- a/application/App-UIKit/Room/UI/RoomNavigationController.swift +++ /dev/null @@ -1,34 +0,0 @@ -// -// RoomNavigationController.swift -// App-UIKit -// -// Created by yukiwwwang on 2025/8/20. -// - -import Foundation -import UIKit - -class RoomNavigationController: UINavigationController { - override init(rootViewController: UIViewController) { - super.init(rootViewController: rootViewController) - interactivePopGestureRecognizer?.isEnabled = false - } - - required init?(coder aDecoder: NSCoder) { - fatalError("init(coder:) has not been implemented") - } - - override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) { - super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil) - } - - override var supportedInterfaceOrientations: UIInterfaceOrientationMask { - guard let supportedInterfaceOrientations = topViewController?.supportedInterfaceOrientations as? UIInterfaceOrientationMask - else { return .portrait } - return supportedInterfaceOrientations - } - override var shouldAutorotate: Bool { - guard let shouldAutorotate = topViewController?.shouldAutorotate else { return false } - return shouldAutorotate - } -} diff --git a/application/App-UIKit/Room/UI/RoomTypeView.swift b/application/App-UIKit/Room/UI/RoomTypeView.swift deleted file mode 100644 index d000afae..00000000 --- a/application/App-UIKit/Room/UI/RoomTypeView.swift +++ /dev/null @@ -1,95 +0,0 @@ -// -// RoomTypeView.swift -// App-UIKit -// -// Created by yukiwwwang on 2025/8/20. -// - -import Foundation -import UIKit - -class RoomTypeView: UIView { - weak var rootViewController: CreateRoomViewController? - - let freedomButton: UIButton = { - let button = UIButton() - button.setTitle(.freedomSpeakText, for: .normal) - button.setTitleColor(UIColor(0xFFFFFF), for: .normal) - button.setBackgroundImage(UIColor.tui_color(withHex: "2A2D38").trans2Image(), for: .normal) - button.setBackgroundImage(UIColor.tui_color(withHex: "4F515A").trans2Image(), for: .selected) - button.backgroundColor = .clear - return button - }() - - let raiseHandButton: UIButton = { - let button = UIButton() - button.setTitle(.raiseHandSpeakText, for: .normal) - button.setTitleColor(UIColor(0xFFFFFF), for: .normal) - button.setBackgroundImage(UIColor.tui_color(withHex: "2A2D38").trans2Image(), for: .normal) - button.setBackgroundImage(UIColor.tui_color(withHex: "4F515A").trans2Image(), for: .selected) - button.backgroundColor = .clear - return button - }() - - private var isViewReady: Bool = false - override func didMoveToWindow() { - super.didMoveToWindow() - backgroundColor = UIColor(0x2A2D38) - guard !isViewReady else { return } - constructViewHierarchy() - activateConstraints() - bindInteraction() - isViewReady = true - } - - func constructViewHierarchy() { - addSubview(freedomButton) - addSubview(raiseHandButton) - } - - func activateConstraints() { - freedomButton.snp.makeConstraints { make in - make.top.equalToSuperview().offset(60.scale375()) - make.width.equalToSuperview() - make.height.equalTo(46.scale375()) - } - raiseHandButton.snp.makeConstraints { make in - make.top.equalTo(freedomButton.snp.bottom) - make.width.height.equalTo(freedomButton) - } - } - - func bindInteraction() { - self.layer.cornerRadius = 12 - setupViewState() - freedomButton.addTarget(self, action: #selector(freedomAction(sender:)), for: .touchUpInside) - raiseHandButton.addTarget(self, action: #selector(raiseHandAction(sender:)), for: .touchUpInside) - } - - func setupViewState() { - let isSeatEnable = rootViewController?.isSeatEnable ?? false - freedomButton.isSelected = !isSeatEnable - raiseHandButton.isSelected = isSeatEnable - } - - @objc func freedomAction(sender: UIButton) { - rootViewController?.freedomAction(sender: sender, view: self) - } - - @objc func raiseHandAction(sender: UIButton) { - rootViewController?.raiseHandAction(sender: sender, view: self) - } - - deinit { - debugPrint("deinit \(self)") - } -} - -private extension String { - static var raiseHandSpeakText: String { - ("On-stage Speech Conference").localized - } - static var freedomSpeakText: String { - ("Free Speech Conference").localized - } -} diff --git a/application/App-UIKit/SceneDelegate.swift b/application/App-UIKit/SceneDelegate.swift deleted file mode 100644 index ed7c7b5c..00000000 --- a/application/App-UIKit/SceneDelegate.swift +++ /dev/null @@ -1,68 +0,0 @@ -// -// SceneDelegate.swift -// UIKitApp-UIKit -// -// Created by yukiwwwang on 2025/8/6. -// - -import UIKit - -class SceneDelegate: UIResponder, UIWindowSceneDelegate { - - var window: UIWindow? - - - func scene(_ scene: UIScene, - willConnectTo session: UISceneSession, - options connectionOptions: UIScene.ConnectionOptions) { - // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. - // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. - // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). - guard let windowScene = (scene as? UIWindowScene) else { return } - self.window = UIWindow(windowScene: windowScene) - self.window?.backgroundColor = UIColor.white - - let loginVC = LoginViewController() - let nav = AppNavigationController(rootViewController: loginVC) - self.window?.rootViewController = nav - self.window?.makeKeyAndVisible() - } - - func sceneDidDisconnect(_ scene: UIScene) { - // Called as the scene is being released by the system. - // This occurs shortly after the scene enters the background, or when its session is discarded. - // Release any resources associated with this scene that can be re-created the next time the scene connects. - // The scene may re-connect later, as its session was not necessarily discarded (see `application:didDiscardSceneSessions` instead). - } - - func sceneDidBecomeActive(_ scene: UIScene) { - // Called when the scene has moved from an inactive state to an active state. - // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. - } - - func sceneWillResignActive(_ scene: UIScene) { - // Called when the scene will move from an active state to an inactive state. - // This may occur due to temporary interruptions (ex. an incoming phone call). - } - - func sceneWillEnterForeground(_ scene: UIScene) { - // Called as the scene transitions from the background to the foreground. - // Use this method to undo the changes made on entering the background. - } - - func sceneDidEnterBackground(_ scene: UIScene) { - // Called as the scene transitions from the foreground to the background. - // Use this method to save data, release shared resources, and store enough scene-specific state information - // to restore the scene back to its current state. - } - - static func getCurrentWindow() -> UIWindow? { - if let windowScene = UIApplication.shared.connectedScenes.first as? UIWindowScene { - if let keyWindow = windowScene.windows.first { - return keyWindow - } - } - return nil - } -} - diff --git a/application/App-UIKit/Utils/AppUtils.swift b/application/App-UIKit/Utils/AppUtils.swift deleted file mode 100644 index 919270ad..00000000 --- a/application/App-UIKit/Utils/AppUtils.swift +++ /dev/null @@ -1,38 +0,0 @@ -// -// AppUtils.swift -// App-UIKit -// -// Created by yukiwwwang on 2025/8/13. -// - -import UIKit - -// MARK: - 屏幕适配方法 -public func convertPixel(w:CGFloat) -> CGFloat { - return w / 375.0 * screenWidth -} - -public func convertPixel(h:CGFloat) -> CGFloat { - return h / 812.0 * screenHeight -} - -public func statusBarHeight() -> CGFloat { - var statusBarHeight: CGFloat = 0 - if #available(iOS 13.0, *) { - let scene = UIApplication.shared.connectedScenes.first - guard let windowScene = scene as? UIWindowScene else { return 0 } - guard let statusBarManager = windowScene.statusBarManager else { return 0 } - statusBarHeight = statusBarManager.statusBarFrame.height - } else { - statusBarHeight = UIApplication.shared.statusBarFrame.height - } - return statusBarHeight -} - -public func navigationBarHeight() -> CGFloat { - return 44.0 -} - -public func navigationFullHeight() -> CGFloat { - return statusBarHeight() + navigationBarHeight() -} diff --git a/application/App-UIKit/Utils/Constants.swift b/application/App-UIKit/Utils/Constants.swift deleted file mode 100644 index f7d07d54..00000000 --- a/application/App-UIKit/Utils/Constants.swift +++ /dev/null @@ -1,53 +0,0 @@ -// -// Constants.swift -// App-UIKit -// -// Created by yukiwwwang on 2025/8/14. -// - -import Foundation -import UIKit - -// MARK: - 屏幕尺寸和设备常量 -public let screenWidth = UIScreen.main.bounds.width -public let screenHeight = UIScreen.main.bounds.height - -public let kDeviceIsIphoneX : Bool = { - if UIDevice.current.userInterfaceIdiom == .pad { - return false - } - let size = UIScreen.main.bounds.size - let notchValue = Int(size.width/size.height*100) - if notchValue == 216 || notchValue == 46 { - return true - } - return false -}() - -public let kDeviceSafeTopHeight : CGFloat = { - if kDeviceIsIphoneX { - return 44 - } - else { - return 20 - } -}() - -public let kDeviceSafeBottomHeight : CGFloat = { - if kDeviceIsIphoneX { - return 34 - } - else { - return 0 - } -}() - - -public let DEFAULT_AVATAR: String = "https://imgcache.qq.com/qcloud/public/static//avatar1_100.20191230.png" -public let DEFAULT_COVER: String = "https://imgcache.qq.com/qcloud/public/static//avatar1_100.20191230.png" -public let PURCHASE_URL = "https://cloud.tencent.com/document/product/1640/79968" -public let ACCESS_URL = "https://cloud.tencent.com/document/product/1640/81131" -public let API_URL = "https://cloud.tencent.com/document/product/1640/79996" -public let PROBLEM_URL = "https://cloud.tencent.com/document/product/1640/81148" -public let IM_GROUP_MANAGER = "https://cloud.tencent.com/document/product/269/75394#.E5.88.9B.E5.BB.BA.E7.BE.A4.E7.BB.84" -public let DEFAULT_AVATAR_REGISTER: String = "https://liteav.sdk.qcloud.com/app/res/picture/voiceroom/avatar/user_avatar1.png" diff --git a/application/App-UIKit/Utils/String+Extension.swift b/application/App-UIKit/Utils/String+Extension.swift deleted file mode 100644 index 5ade9f0e..00000000 --- a/application/App-UIKit/Utils/String+Extension.swift +++ /dev/null @@ -1,46 +0,0 @@ -// -// String+Extension.swift -// App-UIKit -// -// Created by yukiwwwang on 2025/8/20. -// - -// Description: -// This extension provides utility methods for String manipulation and conversion. -// -// Features: -// 1. addIntervalSpace: Inserts a separator string at regular intervals -// - Useful for formatting phone numbers, card numbers, ID numbers, etc. -// - Example: "13812345678".addIntervalSpace(intervalStr: " ", interval: 3) -// → "138 123 456 78" -// -// 2. convertToDic: Converts a JSON string to a Dictionary -// - Parses JSON formatted strings into [String: Any] dictionaries -// - Returns nil if parsing fails -// - Example: "{\"name\":\"John\"}".convertToDic() -// → ["name": "John"] -// - -import Foundation - -extension String { - func addIntervalSpace(intervalStr: String, interval: Int) -> String { - var output = "" - enumerated().forEach { index, c in - if (index % interval == 0) && index > 0 { - output += intervalStr - } - output.append(c) - } - return output - } - - func convertToDic() -> [String : Any]?{ - guard let data = self.data(using: String.Encoding.utf8) else { return nil } - if let dict = try? JSONSerialization.jsonObject(with: data, - options: .mutableContainers) as? [String : Any] { - return dict - } - return nil - } -} diff --git a/application/App-UIKit/Utils/TUIGlobalization+Extension.swift b/application/App-UIKit/Utils/TUIGlobalization+Extension.swift deleted file mode 100644 index d9e6eda2..00000000 --- a/application/App-UIKit/Utils/TUIGlobalization+Extension.swift +++ /dev/null @@ -1,70 +0,0 @@ -// -// TUIGlobalization+Extension.swift -// App-UIKit -// -// Created by gg on 2025/1/9. -// - -import Foundation -import TUICore - -extension TUIGlobalization { - private static let appLanguageKey = "AppleLanguages" - private static let rtlLanguages = ["ar", "he", "fa", "ur"] - - @objc static func enableLanguageHook() { - swizzleGetPreferredLanguage() - swizzleSetPreferredLanguage() - - TUIGlobalization.setRTLOption(isCurrentLanguageRTL()) - } - - private static func isCurrentLanguageRTL() -> Bool { - guard let language = hooked_getPreferredLanguage() else { return false } - let baseCode = language.components(separatedBy: "-").first ?? language - return rtlLanguages.contains(baseCode) - } - - private static func swizzleGetPreferredLanguage() { - let originalSelector = #selector(TUIGlobalization.getPreferredLanguage) - let swizzledSelector = #selector(TUIGlobalization.hooked_getPreferredLanguage) - - guard let originalMethod = class_getClassMethod(TUIGlobalization.self, originalSelector), - let swizzledMethod = class_getClassMethod(TUIGlobalization.self, swizzledSelector) - else { - return - } - method_exchangeImplementations(originalMethod, swizzledMethod) - } - - @objc private static func hooked_getPreferredLanguage() -> String? { - if let languages = UserDefaults.standard.array(forKey: appLanguageKey) as? [String], - let first = languages.first - { - return first - } - return Locale.preferredLanguages.first - } - - private static func swizzleSetPreferredLanguage() { - let originalSelector = #selector(TUIGlobalization.setPreferredLanguage(_:)) - let swizzledSelector = #selector(TUIGlobalization.hooked_setPreferredLanguage(_:)) - - guard let originalMethod = class_getClassMethod(TUIGlobalization.self, originalSelector), - let swizzledMethod = class_getClassMethod(TUIGlobalization.self, swizzledSelector) - else { - return - } - method_exchangeImplementations(originalMethod, swizzledMethod) - } - - @objc private static func hooked_setPreferredLanguage(_ language: String?) { - guard let language = language else { return } - UserDefaults.standard.set([language], forKey: appLanguageKey) - UserDefaults.standard.synchronize() - - let baseCode = language.components(separatedBy: "-").first ?? language - let isRTL = rtlLanguages.contains(baseCode) - TUIGlobalization.setRTLOption(isRTL) - } -} diff --git a/application/App-UIKit/beauty_panel/beauty.json b/application/App-UIKit/beauty_panel/beauty.json deleted file mode 100644 index d2c38a7e..00000000 --- a/application/App-UIKit/beauty_panel/beauty.json +++ /dev/null @@ -1,154 +0,0 @@ -{ - "displayName":"美颜", - "displayNameEn":"Beauty", - "propertyList":[ - { - "displayName":"关闭", - "displayNameEn":"None", - "icon":"beauty_panel/panel_icon/beauty/none.png" - }, - { - "displayName":"美白", - "displayNameEn":"Brighten", - "icon":"beauty_panel/panel_icon/beauty/beauty_whiten.png", - "propertyList":[ - { - "displayName":"靓白", - "displayNameEn":"Bright White", - "icon":"beauty_panel/panel_icon/beauty/beauty_whiten_liangbai.png", - "sdkParam":{ - "effectName":"beauty.lutFoundationAlpha0", - "effectValue":40 - }, - "uiState":2 - }, - { - "displayName":"自然", - "displayNameEn":"Natural White", - "icon":"beauty_panel/panel_icon/beauty/beauty_whiten_nature.png", - "sdkParam":{ - "effectName":"beauty.lutFoundationAlpha", - "effectValue":0 - } - }, - { - "displayName":"粉白", - "displayNameEn":"Pinkish White", - "icon":"beauty_panel/panel_icon/beauty/beauty_whiten_pink.png", - "sdkParam":{ - "effectName":"beauty.lutFoundationAlpha2", - "effectValue":0 - } - }, - { - "displayName":"冷白", - "displayNameEn":"Cool White", - "icon":"beauty_panel/panel_icon/beauty/beauty_whiten_cool.png", - "sdkParam":{ - "effectName":"beauty.lutFoundationAlpha3", - "effectValue":0 - } - } - ], - "uiState":2 - }, - { - "displayName":"美黑", - "displayNameEn":"Black", - "icon":"beauty_panel/panel_icon/beauty/beauty_black.png", - "propertyList":[ - { - "displayName":"美黑", - "displayNameEn":"Black", - "icon":"beauty_panel/panel_icon/beauty/beauty_black_01.png", - "sdkParam":{ - "effectName":"beauty.lutBlackAlpha1", - "effectValue":0 - } - }, - { - "displayName":"小麦色", - "displayNameEn":"Brown", - "icon":"beauty_panel/panel_icon/beauty/beauty_black_wheat.png", - "sdkParam":{ - "effectName":"beauty.lutBlackAlpha2", - "effectValue":0 - } - } - ] - }, - { - "displayName":"磨皮", - "displayNameEn":"Smooth Skin", - "icon":"beauty_panel/panel_icon/beauty/beauty_smooth.png", - "uiState":1, - "propertyList":[ - { - "displayName":"幼龄", - "displayNameEn":"Young", - "icon":"beauty_panel/panel_icon/beauty/beauty_smooth/beauty_smooth_1.png", - "uiState":1, - "sdkParam":{ - "effectName":"smooth.smooth", - "effectValue":40 - } - }, - { - "displayName":"质感", - "displayNameEn":"Texture", - "icon":"beauty_panel/panel_icon/beauty/beauty_smooth/beauty_smooth_2.png", - "sdkParam":{ - "effectName":"smooth.smooth2", - "effectValue":40 - } - }, - { - "displayName":"真实", - "displayNameEn":"Realistic", - "icon":"beauty_panel/panel_icon/beauty/beauty_smooth/beauty_smooth_3.png", - "sdkParam":{ - "effectName":"smooth.smooth3", - "effectValue":40 - } - }, - { - "displayName":"经典", - "displayNameEn":"Classic", - "icon":"beauty_panel/panel_icon/beauty/beauty_smooth/beauty_smooth_4.png", - "sdkParam":{ - "effectName":"smooth.smooth4", - "effectValue":40 - } - } - ] - }, - { - "displayName":"AI 美肌", - "displayNameEn":"AI Beauty Skin", - "icon":"beauty_panel/panel_icon/beauty/beauty_smooth_gan.png", - "sdkParam":{ - "effectName":"beauty.skinRetouch", - "effectValue":40 - } - }, - { - "displayName":"皮肤高光", - "displayNameEn":"Skin Highlight", - "icon":"beauty_panel/panel_icon/beauty/beauty_skin_highlight.png", - "sdkParam":{ - "effectName":"beauty.skinHighlight", - "effectValue":0 - } - }, - { - "displayName":"红润", - "displayNameEn":"Rosy Skin", - "icon":"beauty_panel/panel_icon/beauty/beauty_ruddy.png", - "sdkParam":{ - "effectName":"smooth.rosy", - "effectValue":0 - } - } - ], - "uiState":2 -} \ No newline at end of file diff --git a/application/App-UIKit/beauty_panel/beauty_body.json b/application/App-UIKit/beauty_panel/beauty_body.json deleted file mode 100644 index 4144fcbf..00000000 --- a/application/App-UIKit/beauty_panel/beauty_body.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "displayName":"美体", - "displayNameEn":"Body", - "propertyList":[ - { - "displayName":"关闭", - "displayNameEn":"None", - "icon":"beauty_panel/panel_icon/beauty/none.png" - }, - { - "displayName":"一键瘦身", - "displayNameEn":"Slim", - "icon":"beauty_panel/panel_icon/beauty_body/body_autohtin_body_strength.png", - "sdkParam":{ - "effectName":"body.autothinBodyStrength", - "effectValue":0 - } - }, - { - "displayName":"长腿", - "displayNameEn":"Long Legs", - "icon":"beauty_panel/panel_icon/beauty_body/body_leg_stretch.png", - "sdkParam":{ - "effectName":"body.legStretch", - "effectValue":0 - } - }, - { - "displayName":"瘦腿", - "displayNameEn":"Slim Legs", - "icon":"beauty_panel/panel_icon/beauty_body/body_slim_leg_strength.png", - "sdkParam":{ - "effectName":"body.slimLegStrength", - "effectValue":0 - } - }, - { - "displayName":"瘦胳膊", - "displayNameEn":"Slim Arms", - "icon":"beauty_panel/panel_icon/beauty_body/body_slim_arm_strength.png", - "sdkParam":{ - "effectName":"body.slimArmStrength", - "effectValue":0 - } - }, - { - "displayName":"瘦腰", - "displayNameEn":"Slim Waist", - "icon":"beauty_panel/panel_icon/beauty_body/body_waish_strength.png", - "sdkParam":{ - "effectName":"body.waistStrength", - "effectValue":0 - } - }, - { - "displayName":"瘦肩", - "displayNameEn":"Slim Shoulder", - "icon":"beauty_panel/panel_icon/beauty_body/body_thin_shoulder_strength.png", - "sdkParam":{ - "effectName":"body.thinShoulderStrength", - "effectValue":0 - } - }, - { - "displayName":"胸部调整", - "displayNameEn":"Breast Adjust", - "icon":"beauty_panel/panel_icon/beauty_body/body_beauty_chest.png", - "sdkParam":{ - "effectName":"body.enlargeChestStrength", - "effectValue":0 - } - }, - { - "displayName":"小头", - "displayNameEn":"Slim Head", - "icon":"beauty_panel/panel_icon/beauty_body/body_slim_head_strength.png", - "sdkParam":{ - "effectName":"body.slimHeadStrength", - "effectValue":0 - } - } - ], - "uiState":2 -} \ No newline at end of file diff --git a/application/App-UIKit/beauty_panel/beauty_image.json b/application/App-UIKit/beauty_panel/beauty_image.json deleted file mode 100644 index a7886e51..00000000 --- a/application/App-UIKit/beauty_panel/beauty_image.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "displayName":"画质调整", - "displayNameEn":"Quality Adjustment", - "propertyList":[ - { - "displayName":"关闭", - "displayNameEn":"None", - "icon":"beauty_panel/panel_icon/beauty/none.png" - }, - { - "displayName":"对比度", - "displayNameEn":"Contrast", - "icon":"beauty_panel/panel_icon/beauty/beauty_image_contrast.png", - "sdkParam":{ - "effectName":"beauty.imageContrastAlpha", - "effectValue":0 - } - }, - { - "displayName":"饱和度", - "displayNameEn":"Saturation", - "icon":"beauty_panel/panel_icon/beauty/beauty_image_saturation.png", - "sdkParam":{ - "effectName":"smooth.saturation", - "effectValue":0 - } - }, - { - "displayName":"清晰度", - "displayNameEn":"Sharpness", - "icon":"beauty_panel/panel_icon/beauty/beauty_image_sharpen.png", - "sdkParam":{ - "effectName":"beauty.lutClearAlpha", - "effectValue":80 - }, - "uiState":1 - }, - { - "displayName":"锐化", - "displayNameEn":"Sharpen", - "icon":"beauty_panel/panel_icon/beauty/beauty_sharpen.png", - "sdkParam":{ - "effectName":"smooth.sharpen", - "effectValue":30 - }, - "uiState":1 - }, - { - "displayName":"亮度", - "displayNameEn":"Brightness", - "icon":"beauty_panel/panel_icon/beauty/beauty_image_brightness.png", - "sdkParam":{ - "effectName":"beauty.imageBrightness", - "effectValue":0 - } - }, - { - "displayName":"弱光降噪", - "displayNameEn":"Denoise", - "icon":"beauty_panel/panel_icon/beauty/beauty_denoise.png", - "sdkParam":{ - "effectName":"postEffect.denoise", - "effectValue":0 - } - }, - { - "displayName":"色温", - "displayNameEn":"Warmth", - "icon":"beauty_panel/panel_icon/beauty/beauty_image_warmth.png", - "sdkParam":{ - "effectName":"beauty.imageWarmth", - "effectValue":0 - } - }, - { - "displayName":"色调", - "displayNameEn":"Tint", - "icon":"beauty_panel/panel_icon/beauty/beauty_image_tint.png", - "sdkParam":{ - "effectName":"beauty.imageTint", - "effectValue":0 - } - } - ] -} \ No newline at end of file diff --git a/application/App-UIKit/beauty_panel/beauty_makeup.json b/application/App-UIKit/beauty_panel/beauty_makeup.json deleted file mode 100644 index 50518226..00000000 --- a/application/App-UIKit/beauty_panel/beauty_makeup.json +++ /dev/null @@ -1,964 +0,0 @@ -{ - "displayName":"单点美妆", - "displayNameEn":"Point Makeup", - "hasSubTitle":true, - "verticalLayout":true, - "propertyList":[ - { - "displayName":"口红", - "displayNameEn":"Lipstick", - "icon":"beauty_panel/panel_icon/beauty/beauty_lips.png", - "propertyList":[ - { - "displayName":"无", - "displayNameEn":"None", - "icon":"beauty_panel/panel_icon/beauty/none.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureLipsLut", - "effectValue":0 - } - }, - { - "displayName":"复古红", - "displayNameEn":"Vintage Red", - "icon":"beauty_panel/panel_icon/beauty/kouhong/fuguhong.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureLipsLut", - "effectValue":50, - "resourcePath":"/images/beauty/lips_fuguhong.png" - } - }, - { - "displayName":"蜜桃色", - "displayNameEn":"Peachy", - "icon":"beauty_panel/panel_icon/beauty/kouhong/mitaose.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureLipsLut", - "effectValue":50, - "resourcePath":"/images/beauty/lips_mitaose.png" - } - }, - { - "displayName":"珊瑚橘", - "displayNameEn":"Coral", - "icon":"beauty_panel/panel_icon/beauty/kouhong/shanhuju.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureLipsLut", - "effectValue":50, - "resourcePath":"/images/beauty/lips_shanhuju.png" - } - }, - { - "displayName":"温柔粉", - "displayNameEn":"Pink", - "icon":"beauty_panel/panel_icon/beauty/kouhong/wenrufen.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureLipsLut", - "effectValue":50, - "resourcePath":"/images/beauty/lips_wenroufen.png" - } - }, - { - "displayName":"活力橙", - "displayNameEn":"Orange", - "icon":"beauty_panel/panel_icon/beauty/kouhong/huolicheng.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureLipsLut", - "effectValue":50, - "resourcePath":"/images/beauty/lips_huolicheng.png" - } - } - ] - }, - { - "displayName":"腮红", - "displayNameEn":"Blush", - "icon":"beauty_panel/panel_icon/beauty/beauty_redcheeks.png", - "propertyList":[ - { - "displayName":"无", - "displayNameEn":"None", - "icon":"beauty_panel/panel_icon/beauty/none.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureRedCheek", - "effectValue":0 - } - }, - { - "displayName":"简约", - "displayNameEn":"Simple", - "icon":"beauty_panel/panel_icon/beauty/saihong/saihong_jianyue.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureRedCheek", - "effectValue":50, - "resourcePath":"/images/beauty/saihong_jianyue.png" - } - }, - { - "displayName":"盛夏", - "displayNameEn":"Summer", - "icon":"beauty_panel/panel_icon/beauty/saihong/saihong_shengxia.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureRedCheek", - "effectValue":50, - "resourcePath":"/images/beauty/saihong_shengxia.png" - } - }, - { - "displayName":"害羞", - "displayNameEn":"Shy", - "icon":"beauty_panel/panel_icon/beauty/saihong/saihong_haixiu.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureRedCheek", - "effectValue":50, - "resourcePath":"/images/beauty/saihong_haixiu.png" - } - }, - { - "displayName":"成熟", - "displayNameEn":"Mature", - "icon":"beauty_panel/panel_icon/beauty/saihong/saihong_chengshu.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureRedCheek", - "effectValue":50, - "resourcePath":"/images/beauty/saihong_chengshu.png" - } - }, - { - "displayName":"雀斑", - "displayNameEn":"Freckles", - "icon":"beauty_panel/panel_icon/beauty/saihong/saihong_queban.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureRedCheek", - "effectValue":50, - "resourcePath":"/images/beauty/saihong_queban.png" - } - }, - { - "displayName":"蜜桃", - "displayNameEn":"Peach", - "icon":"beauty_panel/panel_icon/beauty/saihong/saihong_mitao.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureRedCheek", - "effectValue":50, - "resourcePath":"/images/beauty/saihong_peach.png" - } - }, - { - "displayName":"甜莓", - "displayNameEn":"Sweetberry", - "icon":"beauty_panel/panel_icon/beauty/saihong/saihong_tianmei.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureRedCheek", - "effectValue":50, - "resourcePath":"/images/beauty/saihong_sweetberry.png" - } - }, - { - "displayName":"橘调", - "displayNameEn":"Orange Tone", - "icon":"beauty_panel/panel_icon/beauty/saihong/saihong_judiao.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureRedCheek", - "effectValue":50, - "resourcePath":"/images/beauty/saihong_orange_tone.png" - } - }, - { - "displayName":"草莓", - "displayNameEn":"Strawberry", - "icon":"beauty_panel/panel_icon/beauty/saihong/saihong_caomei.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureRedCheek", - "effectValue":50, - "resourcePath":"/images/beauty/saihong_strawberry.png" - } - }, - { - "displayName":"杏子", - "displayNameEn":"Apricot", - "icon":"beauty_panel/panel_icon/beauty/saihong/saihong_xingzi.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureRedCheek", - "effectValue":50, - "resourcePath":"/images/beauty/saihong_apricot.png" - } - }, - { - "displayName":"玫瑰", - "displayNameEn":"Rose", - "icon":"beauty_panel/panel_icon/beauty/saihong/saihong_meigui.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureRedCheek", - "effectValue":50, - "resourcePath":"/images/beauty/saihong_rose.png" - } - }, - { - "displayName":"奶橘", - "displayNameEn":"Orange", - "icon":"beauty_panel/panel_icon/beauty/saihong/saihong_naiju.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureRedCheek", - "effectValue":50, - "resourcePath":"/images/beauty/saihong_orange.png" - } - } - ] - }, - { - "displayName":"染发", - "displayNameEn":"HairColor", - "icon":"beauty_panel/panel_icon/beauty/hair_color.png", - "propertyList":[ - { - "displayName":"无", - "displayNameEn":"None", - "icon":"beauty_panel/panel_icon/beauty/none.png", - "sdkParam":{ - "effectName":"beauty.hairColorLut", - "effectValue":0 - } - }, - { - "displayName":"红色", - "displayNameEn":"Red", - "icon":"beauty_panel/panel_icon/beauty/hair_color_red.png", - "sdkParam":{ - "effectName":"beauty.hairColorLut", - "effectValue":70, - "resourcePath":"images/hair_color/red.png" - } - }, - { - "displayName":"紫色", - "displayNameEn":"Purple", - "icon":"beauty_panel/panel_icon/beauty/hair_color_purple.png", - "sdkParam":{ - "effectName":"beauty.hairColorLut", - "effectValue":70, - "resourcePath":"images/hair_color/purple.png" - } - }, - { - "displayName":"蓝色", - "displayNameEn":"Blue", - "icon":"beauty_panel/panel_icon/beauty/hair_color_blue.png", - "sdkParam":{ - "effectName":"beauty.hairColorLut", - "effectValue":70, - "resourcePath":"images/hair_color/blue.png" - } - }, - { - "displayName":"黄色", - "displayNameEn":"Yellow", - "icon":"beauty_panel/panel_icon/beauty/hair_color_yellow.png", - "sdkParam":{ - "effectName":"beauty.hairColorLut", - "effectValue":70, - "resourcePath":"images/hair_color/yellow.png" - } - }, - { - "displayName":"灰色", - "displayNameEn":"Gray", - "icon":"beauty_panel/panel_icon/beauty/hair_color_gray.png", - "sdkParam":{ - "effectName":"beauty.hairColorLut", - "effectValue":70, - "resourcePath":"images/hair_color/gray.png" - } - }, - { - "displayName":"绿色", - "displayNameEn":"Green", - "icon":"beauty_panel/panel_icon/beauty/hair_color_green.png", - "sdkParam":{ - "effectName":"beauty.hairColorLut", - "effectValue":70, - "resourcePath":"images/hair_color/green.png" - } - } - ] - }, - { - "displayName":"眼影", - "displayNameEn":"EyeShadow", - "icon":"beauty_panel/panel_icon/beauty/eyes_makeup/eye_shadow.png", - "propertyList":[ - { - "displayName":"无", - "displayNameEn":"None", - "icon":"beauty_panel/panel_icon/beauty/none.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureEyesMakeup.eyeShadow", - "effectValue":0 - } - }, - { - "displayName":"裸色", - "displayNameEn":"Nude color", - "icon":"beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_0-albatross.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureEyesMakeup.eyeShadow", - "effectValue":50, - "resourcePath":"/images/beauty/eyes_makeup_eye_shadow_0-albatross.png" - } - }, - { - "displayName":"C位", - "displayNameEn":"C position", - "icon":"beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_1-falcon.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureEyesMakeup.eyeShadow", - "effectValue":50, - "resourcePath":"/images/beauty/eyes_makeup_eye_shadow_1-falcon.png" - } - }, - { - "displayName":"日常", - "displayNameEn":"Daily", - "icon":"beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_2-flamingo.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureEyesMakeup.eyeShadow", - "effectValue":50, - "resourcePath":"/images/beauty/eyes_makeup_eye_shadow_2-flamingo.png" - } - }, - { - "displayName":"橘棕", - "displayNameEn":"Orange Brown", - "icon":"beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_3-hawk.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureEyesMakeup.eyeShadow", - "effectValue":50, - "resourcePath":"/images/beauty/eyes_makeup_eye_shadow_3-hawk.png" - } - }, - { - "displayName":"哭包", - "displayNameEn":"Crying", - "icon":"beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_4-kingfisher.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureEyesMakeup.eyeShadow", - "effectValue":50, - "resourcePath":"/images/beauty/eyes_makeup_eye_shadow_4-kingfisher.png" - } - }, - { - "displayName":"扩眼", - "displayNameEn":"Eye-widening", - "icon":"beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_5-owl.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureEyesMakeup.eyeShadow", - "effectValue":50, - "resourcePath":"/images/beauty/eyes_makeup_eye_shadow_5-owl.png" - } - }, - { - "displayName":"钓系", - "displayNameEn":"Fishing series", - "icon":"beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_6-parrot.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureEyesMakeup.eyeShadow", - "effectValue":50, - "resourcePath":"/images/beauty/eyes_makeup_eye_shadow_6-parrot.png" - } - }, - { - "displayName":"莫兰迪", - "displayNameEn":"Morandi", - "icon":"beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_7-peacock.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureEyesMakeup.eyeShadow", - "effectValue":50, - "resourcePath":"/images/beauty/eyes_makeup_eye_shadow_7-peacock.png" - } - }, - { - "displayName":"温柔", - "displayNameEn":"Tenderness", - "icon":"beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_8-robin.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureEyesMakeup.eyeShadow", - "effectValue":50, - "resourcePath":"/images/beauty/eyes_makeup_eye_shadow_8-robin.png" - } - }, - { - "displayName":"浅粉", - "displayNameEn":"Light pink", - "icon":"beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_9-swan.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureEyesMakeup.eyeShadow", - "effectValue":50, - "resourcePath":"/images/beauty/eyes_makeup_eye_shadow_9-swan.png" - } - }, - { - "displayName":"紫韵", - "displayNameEn":"Purple", - "icon":"beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_10-grapes.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureEyesMakeup.eyeShadow", - "effectValue":50, - "resourcePath":"/images/beauty/eyes_makeup_eye_shadow_10-grapes.png" - } - }, - { - "displayName":"绽放", - "displayNameEn":"Blossom", - "icon":"beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_11-blossom.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureEyesMakeup.eyeShadow", - "effectValue":50, - "resourcePath":"/images/beauty/eyes_makeup_eye_shadow_11-blossom.png" - } - }, - { - "displayName":"日初", - "displayNameEn":"Sunrise", - "icon":"beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_12-raised.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureEyesMakeup.eyeShadow", - "effectValue":50, - "resourcePath":"/images/beauty/eyes_makeup_eye_shadow_12-raised.png" - } - }, - { - "displayName":"日落", - "displayNameEn":"Sunset", - "icon":"beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_13-sunset.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureEyesMakeup.eyeShadow", - "effectValue":50, - "resourcePath":"/images/beauty/eyes_makeup_eye_shadow_13-sunset.png" - } - }, - { - "displayName":"烟熏", - "displayNameEn":"Smudging", - "icon":"beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_14-smudging.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureEyesMakeup.eyeShadow", - "effectValue":50, - "resourcePath":"/images/beauty/eyes_makeup_eye_shadow_14-smudging.png" - } - }, - { - "displayName":"醉意", - "displayNameEn":"Tipsy", - "icon":"beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_15-tipsy.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureEyesMakeup.eyeShadow", - "effectValue":50, - "resourcePath":"/images/beauty/eyes_makeup_eye_shadow_15-tipsy.png" - } - } - ] - }, - { - "displayName":"眼线", - "displayNameEn":"Eyeliner", - "icon":"beauty_panel/panel_icon/beauty/eyes_makeup/eye_liner.png", - "propertyList":[ - { - "displayName":"无", - "displayNameEn":"None", - "icon":"beauty_panel/panel_icon/beauty/none.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureEyesMakeup.eyeLiner", - "effectValue":0 - } - }, - { - "displayName":"御姐", - "displayNameEn":"Queen", - "icon":"beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_liner_0.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureEyesMakeup.eyeLiner", - "effectValue":50, - "resourcePath":"/images/beauty/eyes_makeup_eye_liner_0.png" - } - }, - { - "displayName":"猫眼", - "displayNameEn":"Cat Eyes", - "icon":"beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_liner_1.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureEyesMakeup.eyeLiner", - "effectValue":50, - "resourcePath":"/images/beauty/eyes_makeup_eye_liner_1.png" - } - }, - { - "displayName":"狗狗眼", - "displayNameEn":"Dog Eyes", - "icon":"beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_liner_2.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureEyesMakeup.eyeLiner", - "effectValue":50, - "resourcePath":"/images/beauty/eyes_makeup_eye_liner_2.png" - } - } - ] - }, - { - "displayName":"睫毛", - "displayNameEn":"Eyelash", - "icon":"beauty_panel/panel_icon/beauty/eyes_makeup/eyelash.png", - "propertyList":[ - { - "displayName":"无", - "displayNameEn":"None", - "icon":"beauty_panel/panel_icon/beauty/none.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureEyesMakeup.eyelash", - "effectValue":0 - } - }, - { - "displayName":"甜心", - "displayNameEn":"Sweetheart", - "icon":"beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyelash_0.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureEyesMakeup.eyelash", - "effectValue":50, - "resourcePath":"/images/beauty/eyes_makeup_eyelash_0.png" - } - }, - { - "displayName":"无辜眼", - "displayNameEn":"Innocent", - "icon":"beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyelash_1.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureEyesMakeup.eyelash", - "effectValue":50, - "resourcePath":"/images/beauty/eyes_makeup_eyelash_1.png" - } - }, - { - "displayName":"下睫毛", - "displayNameEn":"Lower Eyelashes", - "icon":"beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyelash_2.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureEyesMakeup.eyelash", - "effectValue":50, - "resourcePath":"/images/beauty/eyes_makeup_eyelash_2.png" - } - }, - { - "displayName":"自然", - "displayNameEn":"Natural", - "icon":"beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyelash_3.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureEyesMakeup.eyelash", - "effectValue":50, - "resourcePath":"/images/beauty/eyes_makeup_eyelash_3.png" - } - }, - { - "displayName":"异域", - "displayNameEn":"Exotic", - "icon":"beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyelash_4.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureEyesMakeup.eyelash", - "effectValue":50, - "resourcePath":"/images/beauty/eyes_makeup_eyelash_4.png" - } - }, - { - "displayName":"纯欲", - "displayNameEn":"Pure desire", - "icon":"beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyelash_5.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureEyesMakeup.eyelash", - "effectValue":50, - "resourcePath":"/images/beauty/eyes_makeup_eyelash_5.png" - } - }, - { - "displayName":"二次元", - "displayNameEn":"Second Dimension", - "icon":"beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyelash_6.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureEyesMakeup.eyelash", - "effectValue":50, - "resourcePath":"/images/beauty/eyes_makeup_eyelash_6.png" - } - }, - { - "displayName":"倒置", - "displayNameEn":"Inverted", - "icon":"beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyelash_7.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureEyesMakeup.eyelash", - "effectValue":50, - "resourcePath":"/images/beauty/eyes_makeup_eyelash_7.png" - } - }, - { - "displayName":"婴儿弯", - "displayNameEn":"Baby Bend", - "icon":"beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyelash_8.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureEyesMakeup.eyelash", - "effectValue":50, - "resourcePath":"/images/beauty/eyes_makeup_eyelash_8.png" - } - }, - { - "displayName":"毛绒", - "displayNameEn":"Fluffy", - "icon":"beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyelash_9.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureEyesMakeup.eyelash", - "effectValue":50, - "resourcePath":"/images/beauty/eyes_makeup_eyelash_9.png" - } - }, - { - "displayName":"狐系", - "displayNameEn":"Fox", - "icon":"beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyelash_10.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureEyesMakeup.eyelash", - "effectValue":50, - "resourcePath":"/images/beauty/eyes_makeup_eyelash_10.png" - } - } - ] - }, - { - "displayName":"双眼皮", - "displayNameEn":"Eyelids", - "icon":"beauty_panel/panel_icon/beauty/eyes_makeup/eyelids.png", - "propertyList":[ - { - "displayName":"无", - "displayNameEn":"None", - "icon":"beauty_panel/panel_icon/beauty/none.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureEyesMakeup.eyelids", - "effectValue":0 - } - }, - { - "displayName":"开扇", - "displayNameEn":"0", - "icon":"beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyelids_kaishan_icon.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureEyesMakeup.eyelids", - "effectValue":50, - "resourcePath":"/images/beauty/eyes_makeup_eyelids_kaishan.png" - } - }, - { - "displayName":"平扇", - "displayNameEn":"1", - "icon":"beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyelids_pingshan_icon.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureEyesMakeup.eyelids", - "effectValue":50, - "resourcePath":"/images/beauty/eyes_makeup_eyelids_pingshan.png" - } - }, - { - "displayName":"新月", - "displayNameEn":"2", - "icon":"beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyelids_xinyue_icon.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureEyesMakeup.eyelids", - "effectValue":50, - "resourcePath":"/images/beauty/eyes_makeup_eyelids_xinyue.png" - } - } - ] - }, - { - "displayName":"卧蚕", - "displayNameEn":"Lower Eyelids", - "icon":"beauty_panel/panel_icon/beauty/eyes_makeup/wocan.png", - "propertyList":[ - { - "displayName":"无", - "displayNameEn":"None", - "icon":"beauty_panel/panel_icon/beauty/none.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureEyesMakeup.eyewocan", - "effectValue":0 - } - }, - { - "displayName":"可爱", - "displayNameEn":"0", - "icon":"beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_wocan_keai_icon.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureEyesMakeup.eyewocan", - "effectValue":50, - "resourcePath":"/images/beauty/eyes_makeup_eye_wocan_keai.png" - } - }, - { - "displayName":"素颜", - "displayNameEn":"1", - "icon":"beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_wocan_suyan_icon.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureEyesMakeup.eyewocan", - "effectValue":50, - "resourcePath":"/images/beauty/eyes_makeup_eye_wocan_suyan.png" - } - }, - { - "displayName":"甜丧", - "displayNameEn":"2", - "icon":"beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_wocan_tiansang_icon.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureEyesMakeup.eyewocan", - "effectValue":50, - "resourcePath":"/images/beauty/eyes_makeup_eye_wocan_tiansang.png" - } - }, - { - "displayName":"自然", - "displayNameEn":"3", - "icon":"beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_wocan_ziran_icon.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureEyesMakeup.eyewocan", - "effectValue":50, - "resourcePath":"/images/beauty/eyes_makeup_eye_wocan_ziran.png" - } - } - ] - }, - { - "displayName":"美瞳", - "displayNameEn":"Eyeball", - "icon":"beauty_panel/panel_icon/beauty/beauty_eyeball.png", - "propertyList":[ - { - "displayName":"无", - "displayNameEn":"None", - "icon":"beauty_panel/panel_icon/beauty/none.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureEyesMakeup.eyeball", - "effectValue":0 - } - }, - { - "displayName":"琥珀流", - "displayNameEn":"Amber Flow", - "icon":"beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyeball_0.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureEyesMakeup.eyeball", - "effectValue":50, - "resourcePath":"/images/beauty/eyes_makeup_eyeball_0.png" - } - }, - { - "displayName":"树影棕", - "displayNameEn":"Tree Shadow Brown", - "icon":"beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyeball_1.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureEyesMakeup.eyeball", - "effectValue":50, - "resourcePath":"/images/beauty/eyes_makeup_eyeball_1.png" - } - }, - { - "displayName":"焦糖奶咖", - "displayNameEn":"Caramel Milk Coffee", - "icon":"beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyeball_2.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureEyesMakeup.eyeball", - "effectValue":50, - "resourcePath":"/images/beauty/eyes_makeup_eyeball_2.png" - } - }, - { - "displayName":"榛子脆", - "displayNameEn":"Hazelnut Crisp", - "icon":"beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyeball_3.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureEyesMakeup.eyeball", - "effectValue":50, - "resourcePath":"/images/beauty/eyes_makeup_eyeball_3.png" - } - }, - { - "displayName":"暮色漫", - "displayNameEn":"Twilight Manga", - "icon":"beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyeball_4.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureEyesMakeup.eyeball", - "effectValue":50, - "resourcePath":"/images/beauty/eyes_makeup_eyeball_4.png" - } - }, - { - "displayName":"蓝宝石", - "displayNameEn":"Sapphire", - "icon":"beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyeball_5.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureEyesMakeup.eyeball", - "effectValue":50, - "resourcePath":"/images/beauty/eyes_makeup_eyeball_5.png" - } - }, - { - "displayName":"可可碎冰", - "displayNameEn":"Cocoa Crushed Ice", - "icon":"beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyeball_6.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureEyesMakeup.eyeball", - "effectValue":50, - "resourcePath":"/images/beauty/eyes_makeup_eyeball_6.png" - } - }, - { - "displayName":"灰瞳", - "displayNameEn":"Gray", - "icon":"beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyeball_7.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureEyesMakeup.eyeball", - "effectValue":50, - "resourcePath":"/images/beauty/eyes_makeup_eyeball_7.png" - } - }, - { - "displayName":"棕糖雾", - "displayNameEn":"Brown Sugar Mist", - "icon":"beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyeball_8.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureEyesMakeup.eyeball", - "effectValue":50, - "resourcePath":"/images/beauty/eyes_makeup_eyeball_8.png" - } - }, - { - "displayName":"栗木浅棕", - "displayNameEn":"Chestnut Light Brown", - "icon":"beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyeball_9.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureEyesMakeup.eyeball", - "effectValue":50, - "resourcePath":"/images/beauty/eyes_makeup_eyeball_9.png" - } - } - ] - }, - { - "displayName":"眉毛", - "displayNameEn":"Eyebrow", - "icon":"beauty_panel/panel_icon/beauty/beauty_eyebrow.png", - "propertyList":[ - { - "displayName":"无", - "displayNameEn":"None", - "icon":"beauty_panel/panel_icon/beauty/none.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureEyesMakeup.eyebrow", - "effectValue":0 - } - }, - { - "displayName":"素眉", - "displayNameEn":"Plain", - "icon":"beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyebrow_0.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureEyesMakeup.eyebrow", - "effectValue":50, - "resourcePath":"/images/beauty/eyes_makeup_eyebrow_0.png" - } - }, - { - "displayName":"粗平眉", - "displayNameEn":"Thick flat", - "icon":"beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyebrow_1.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureEyesMakeup.eyebrow", - "effectValue":50, - "resourcePath":"/images/beauty/eyes_makeup_eyebrow_1.png" - } - }, - { - "displayName":"落尾眉", - "displayNameEn":"Falling", - "icon":"beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyebrow_2.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureEyesMakeup.eyebrow", - "effectValue":50, - "resourcePath":"/images/beauty/eyes_makeup_eyebrow_2.png" - } - }, - { - "displayName":"远山眉", - "displayNameEn":"Distant mountain", - "icon":"beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyebrow_3.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureEyesMakeup.eyebrow", - "effectValue":50, - "resourcePath":"/images/beauty/eyes_makeup_eyebrow_3.png" - } - } - ] - }, - { - "displayName":"立体", - "displayNameEn":"Contour", - "icon":"beauty_panel/panel_icon/beauty/beauty_liti.png", - "propertyList":[ - { - "displayName":"无", - "displayNameEn":"None", - "icon":"beauty_panel/panel_icon/beauty/none.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureSoftlight", - "effectValue":0 - } - }, - { - "displayName":"自然", - "displayNameEn":"Natural", - "icon":"beauty_panel/panel_icon/beauty/liti/liti_ziran.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureSoftlight", - "effectValue":50, - "resourcePath":"/images/beauty/liti_ziran.png" - } - }, - { - "displayName":"俊朗", - "displayNameEn":"Smart", - "icon":"beauty_panel/panel_icon/beauty/liti/liti_junlang.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureSoftlight", - "effectValue":50, - "resourcePath":"/images/beauty/liti_junlang.png" - } - }, - { - "displayName":"光芒", - "displayNameEn":"Glow", - "icon":"beauty_panel/panel_icon/beauty/liti/liti_guangmang.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureSoftlight", - "effectValue":50, - "resourcePath":"/images/beauty/liti_guangmang.png" - } - }, - { - "displayName":"清新", - "displayNameEn":"Fresh", - "icon":"beauty_panel/panel_icon/beauty/liti/liti_qingxin.png", - "sdkParam":{ - "effectName":"beauty.faceFeatureSoftlight", - "effectValue":50, - "resourcePath":"/images/beauty/liti_qingxin.png" - } - } - ] - } - ] -} \ No newline at end of file diff --git a/application/App-UIKit/beauty_panel/beauty_shape.json b/application/App-UIKit/beauty_panel/beauty_shape.json deleted file mode 100644 index d5eac166..00000000 --- a/application/App-UIKit/beauty_panel/beauty_shape.json +++ /dev/null @@ -1,422 +0,0 @@ -{ - "displayName":"高级美型", - "displayNameEn":"Advanced Face", - "propertyList":[ - { - "displayName":"关闭", - "displayNameEn":"None", - "icon":"beauty_panel/panel_icon/beauty/none.png" - }, - { - "displayName":"面部", - "displayNameEn":"Face", - "icon":"beauty_panel/panel_icon/beauty/beauty_basic_face.png", - "propertyList":[ - { - "displayName":"窄脸", - "displayNameEn":"Face Width", - "icon":"beauty_panel/panel_icon/beauty/beauty_narrow_face.png", - "sdkParam":{ - "effectName":"basicV7.thinFace", - "effectValue":5 - }, - "uiState":1 - }, - { - "displayName":"瘦脸", - "displayNameEn":"Thin Face", - "icon":"beauty_panel/panel_icon/beauty/beauty_thin_face.png", - "propertyList":[ - { - "displayName":"自然", - "displayNameEn":"Natural", - "icon":"beauty_panel/panel_icon/beauty/beauty_thin_face1.png", - "sdkParam":{ - "effectName":"basicV7.natureFace", - "effectValue":30 - }, - "uiState":1 - }, - { - "displayName":"女神", - "displayNameEn":"Goddess", - "icon":"beauty_panel/panel_icon/beauty/beauty_thin_face2.png", - "sdkParam":{ - "effectName":"basicV7.godnessFace", - "effectValue":0 - } - }, - { - "displayName":"英俊", - "displayNameEn":"Handsome", - "icon":"beauty_panel/panel_icon/beauty/beauty_thin_face3.png", - "sdkParam":{ - "effectName":"basicV7.maleGodFace", - "effectValue":0 - } - } - ] - }, - { - "displayName":"V脸", - "displayNameEn":"V Shape", - "icon":"beauty_panel/panel_icon/beauty/beauty_v_face.png", - "sdkParam":{ - "effectName":"basicV7.vFace", - "effectValue":20 - }, - "uiState":1 - }, - { - "displayName":"收下颌", - "displayNameEn":"Slim Jaw", - "icon":"beauty_panel/panel_icon/beauty/beauty_face_jaw.png", - "sdkParam":{ - "effectName":"basicV7.faceJaw", - "effectValue":0 - } - }, - { - "displayName":"短脸", - "displayNameEn":"Face Length", - "icon":"beauty_panel/panel_icon/beauty/beauty_short_face.png", - "sdkParam":{ - "effectName":"basicV7.shortFace", - "effectValue":0 - } - }, - { - "displayName":"脸型", - "displayNameEn":"Face Shape", - "icon":"beauty_panel/panel_icon/beauty/beauty_basic_face.png", - "sdkParam":{ - "effectName":"liquefaction.basic3", - "effectValue":0 - } - }, - { - "displayName":"下巴", - "displayNameEn":"Chin", - "icon":"beauty_panel/panel_icon/beauty/beauty_chin.png", - "sdkParam":{ - "effectName":"basicV7.chin", - "effectValue":0 - } - }, - { - "displayName":"额头高度", - "displayNameEn":"Forehead Height", - "icon":"beauty_panel/panel_icon/beauty/beauty_forehead.png", - "sdkParam":{ - "effectName":"basicV7.forehead", - "effectValue":0 - } - }, - { - "displayName":"额头宽度", - "displayNameEn":"Forehead Width", - "icon":"beauty_panel/panel_icon/beauty/beauty_forehead.png", - "sdkParam":{ - "effectName":"basicV7.forehead2", - "effectValue":0 - } - }, - { - "displayName":"祛皱", - "displayNameEn":"Wrinkles", - "icon":"beauty_panel/panel_icon/beauty/beauty_remove_pounch.png", - "sdkParam":{ - "effectName":"beauty.removeWrinkle", - "effectValue":0 - } - }, - { - "displayName":"祛法令纹", - "displayNameEn":"Smile Lines", - "icon":"beauty_panel/panel_icon/beauty/beauty_wrinkle_smooth.png", - "sdkParam":{ - "effectName":"beauty.removeLawLine", - "effectValue":30 - }, - "uiState":1 - }, - { - "displayName":"瘦颧骨", - "displayNameEn":"Cheekbones", - "icon":"beauty_panel/panel_icon/beauty/beauty_thin_cheek.png", - "sdkParam":{ - "effectName":"basicV7.cheekboneThin", - "effectValue":0 - } - } - ] - }, - { - "displayName":"眼睛", - "displayNameEn":"Eyes", - "icon":"beauty_panel/panel_icon/beauty/beauty_eye.png", - "propertyList":[ - { - "displayName":"大眼", - "displayNameEn":"Big Eyes", - "icon":"beauty_panel/panel_icon/beauty/beauty_enlarge_eye.png", - "sdkParam":{ - "effectName":"basicV7.enlargeEye", - "effectValue":20 - }, - "uiState":1 - }, - { - "displayName":"亮眼", - "displayNameEn":"Bright Eyes", - "icon":"beauty_panel/panel_icon/beauty/beauty_eye_lighten.png", - "sdkParam":{ - "effectName":"beauty.eyeLighten", - "effectValue":40 - }, - "uiState":1 - }, - { - "displayName":"外眼角", - "displayNameEn":"Eye Out Corner", - "icon":"beauty_panel/panel_icon/beauty/beauty_eye_out_angle.png", - "sdkParam":{ - "effectName":"basicV7.eyeOutCorner", - "effectValue":0 - } - }, - { - "displayName":"眼距", - "displayNameEn":"Eye Distance", - "icon":"beauty_panel/panel_icon/beauty/beauty_eye_distance.png", - "sdkParam":{ - "effectName":"basicV7.eyeDistance", - "effectValue":0 - } - }, - { - "displayName":"眼角", - "displayNameEn":"Eye Corners", - "icon":"beauty_panel/panel_icon/beauty/beauty_eye_angle.png", - "sdkParam":{ - "effectName":"basicV7.eyeAngle", - "effectValue":0 - } - }, - { - "displayName":"眼宽", - "displayNameEn":"Eye Width", - "icon":"beauty_panel/panel_icon/beauty/beauty_eye_width.png", - "sdkParam":{ - "effectName":"basicV7.eyeWidth", - "effectValue":0 - } - }, - { - "displayName":"眼高", - "displayNameEn":"Eye Height", - "icon":"beauty_panel/panel_icon/beauty/beauty_eye_height.png", - "sdkParam":{ - "effectName":"basicV7.eyeHeight", - "effectValue":0 - } - }, - { - "displayName":"眼睛位置", - "displayNameEn":"Eye Position", - "icon":"beauty_panel/panel_icon/beauty/beauty_eye_position.png", - "sdkParam":{ - "effectName":"basicV7.eyePosition", - "effectValue":0 - } - }, - { - "displayName":"祛眼袋", - "displayNameEn":"Eye Bags", - "icon":"beauty_panel/panel_icon/beauty/beauty_remove_eye_pouch.png", - "sdkParam":{ - "effectName":"beauty.removeEyeBags", - "effectValue":50 - }, - "uiState":1 - } - ] - }, - { - "displayName":"眉毛", - "displayNameEn":"Eyebrow", - "icon":"beauty_panel/panel_icon/beauty/beauty_eyebrow.png", - "propertyList":[ - { - "displayName":"眉毛角度", - "displayNameEn":"Eyebrow Angle", - "icon":"beauty_panel/panel_icon/beauty/beauty_eyebrow_angle.png", - "sdkParam":{ - "effectName":"basicV7.eyebrowAngle", - "effectValue":0 - } - }, - { - "displayName":"眉毛距离", - "displayNameEn":"Eyebrow Distance", - "icon":"beauty_panel/panel_icon/beauty/beauty_eyebrow_distance.png", - "sdkParam":{ - "effectName":"basicV7.eyebrowDistance", - "effectValue":0 - } - }, - { - "displayName":"眉毛高度", - "displayNameEn":"Eyebrow Height", - "icon":"beauty_panel/panel_icon/beauty/beauty_eyebrow_position.png", - "sdkParam":{ - "effectName":"basicV7.eyebrowHeight", - "effectValue":0 - } - }, - { - "displayName":"眉毛长度", - "displayNameEn":"Eyebrow Length", - "icon":"beauty_panel/panel_icon/beauty/beauty_eyebrow_length.png", - "sdkParam":{ - "effectName":"basicV7.eyebrowLength", - "effectValue":0 - } - }, - { - "displayName":"眉毛粗细", - "displayNameEn":"Eyebrow Thickness", - "icon":"beauty_panel/panel_icon/beauty/beauty_eyebrow_thickness.png", - "sdkParam":{ - "effectName":"basicV7.eyebrowThickness", - "effectValue":0 - } - }, - { - "displayName":"眉峰", - "displayNameEn":"Eyebrow Ridge", - "icon":"beauty_panel/panel_icon/beauty/beauty_eyebrow_ridge.png", - "sdkParam":{ - "effectName":"basicV7.eyebrowRidge", - "effectValue":0 - } - } - ] - }, - { - "displayName":"鼻子", - "displayNameEn":"Nose", - "icon":"beauty_panel/panel_icon/beauty/beauty_nose.png", - "propertyList":[ - { - "displayName":"瘦鼻", - "displayNameEn":"Nose Size", - "icon":"beauty_panel/panel_icon/beauty/beauty_thin_nose.png", - "sdkParam":{ - "effectName":"basicV7.thinNose", - "effectValue":20 - }, - "uiState":1 - }, - { - "displayName":"鼻翼", - "displayNameEn":"Nose Wings", - "icon":"beauty_panel/panel_icon/beauty/beauty_nose_wing.png", - "sdkParam":{ - "effectName":"basicV7.noseWing", - "effectValue":0 - } - }, - { - "displayName":"鼻子位置", - "displayNameEn":"Nose Position", - "icon":"beauty_panel/panel_icon/beauty/beauty_nose_position.png", - "sdkParam":{ - "effectName":"basicV7.noseHeight", - "effectValue":0 - } - }, - { - "displayName":"鼻梁", - "displayNameEn":"Nose Bridge Width", - "icon":"beauty_panel/panel_icon/beauty/nose_bridge_width.png", - "sdkParam":{ - "effectName":"basicV7.noseBridgeWidth", - "effectValue":0 - } - }, - { - "displayName":"山根", - "displayNameEn":"Nasion", - "icon":"beauty_panel/panel_icon/beauty/nasion.png", - "sdkParam":{ - "effectName":"basicV7.nasion", - "effectValue":0 - } - } - ] - }, - { - "displayName":"嘴巴", - "displayNameEn":"Mouth", - "icon":"beauty_panel/panel_icon/beauty/beauty_mouth.png", - "propertyList":[ - { - "displayName":"白牙", - "displayNameEn":"White Teeth", - "icon":"beauty_panel/panel_icon/beauty/beauty_tooth_beauty.png", - "sdkParam":{ - "effectName":"beauty.toothWhiten", - "effectValue":40 - }, - "uiState":1 - }, - { - "displayName":"嘴型", - "displayNameEn":"Lip Shape", - "icon":"beauty_panel/panel_icon/beauty/beauty_mouth_size.png", - "sdkParam":{ - "effectName":"basicV7.mouthSize", - "effectValue":0 - } - }, - { - "displayName":"嘴唇厚度", - "displayNameEn":"Lip Height", - "icon":"beauty_panel/panel_icon/beauty/beauty_mouth_height.png", - "sdkParam":{ - "effectName":"basicV7.mouthHeight", - "effectValue":0 - } - }, - { - "displayName":"嘴唇宽度", - "displayNameEn":"Lip Width", - "icon":"beauty_panel/panel_icon/beauty/beauty_mouth_width.png", - "sdkParam":{ - "effectName":"basicV7.mouthWidth", - "effectValue":0 - } - }, - { - "displayName":"嘴唇位置", - "displayNameEn":"Lip Position", - "icon":"beauty_panel/panel_icon/beauty/beauty_mouth_position.png", - "sdkParam":{ - "effectName":"basicV7.mouthPosition", - "effectValue":0 - } - }, - { - "displayName":"微笑唇", - "displayNameEn":"Smile Face", - "icon":"beauty_panel/panel_icon/beauty/beauty_mouth_smile.png", - "sdkParam":{ - "effectName":"basicV7.smileFace", - "effectValue":0 - } - } - ] - } - ] -} \ No newline at end of file diff --git a/application/App-UIKit/beauty_panel/beauty_template.json b/application/App-UIKit/beauty_panel/beauty_template.json deleted file mode 100644 index 0a43c993..00000000 --- a/application/App-UIKit/beauty_panel/beauty_template.json +++ /dev/null @@ -1,722 +0,0 @@ -{ - "displayName": "美颜模板", - "displayNameEn": "Template", - "propertyList": [ - { - "id": 0, - "displayName": "关闭", - "displayNameEn": "None", - "icon": "beauty_panel/panel_icon/beauty/none.png" - }, - { - "id": 1, - "displayName": "自然", - "displayNameEn": "Nature", - "icon": "beauty_panel/panel_icon/beauty_template/nature.png", - "paramList": [ - { - "effectName": "beauty.lutFoundationAlpha", - "effectValue": 30 - }, - { - "effectName": "smooth.smooth", - "effectValue": 50 - }, - { - "effectName": "smooth.sharpen", - "effectValue": 30 - }, - { - "effectName": "basicV7.natureFace", - "effectValue": 35 - }, - { - "effectName": "basicV7.enlargeEye", - "effectValue": 35 - } - ], - "uiState": 2 - }, - { - "id": 2, - "displayName": "女神", - "displayNameEn": "Goddess", - "icon": "beauty_panel/panel_icon/beauty_template/nature.png", - "paramList": [ - { - "effectName": "beauty.lutFoundationAlpha", - "effectValue": 30 - }, - { - "effectName": "smooth.smooth", - "effectValue": 60 - }, - { - "effectName": "beauty.lutClearAlpha", - "effectValue": 30 - }, - { - "effectName": "smooth.sharpen", - "effectValue": 40 - }, - { - "effectName": "basicV7.natureFace", - "effectValue": 20 - }, - { - "effectName": "basicV7.enlargeEye", - "effectValue": 20 - }, - { - "effectName": "basicV7.forehead", - "effectValue": -60 - }, - { - "effectName": "basicV7.faceJaw", - "effectValue": 40 - }, - { - "effectName": "basicV7.noseWing", - "effectValue": 20 - }, - { - "effectName": "basicV7.mouthSize", - "effectValue": 30 - }, - { - "effectName": "beauty.removeEyeBags", - "effectValue": 80 - }, - { - "effectName": "beauty.removeLawLine", - "effectValue": 80 - }, - { - "effectName": "beauty.toothWhiten", - "effectValue": 20 - }, - { - "effectName": "basicV7.cheekboneThin", - "effectValue": 40 - } - ] - }, - { - "id": 3, - "displayName": "元气", - "displayNameEn": "Vitality", - "icon": "beauty_panel/panel_icon/beauty_template/energetic.png", - "paramList": [ - { - "effectName": "beauty.lutFoundationAlpha", - "effectValue": 30 - }, - { - "effectName": "smooth.smooth", - "effectValue": 75 - }, - { - "effectName": "smooth.rosy", - "effectValue": 30 - }, - { - "effectName": "smooth.sharpen", - "effectValue": 10 - }, - { - "effectName": "basicV7.vFace", - "effectValue": 50 - }, - { - "effectName": "basicV7.enlargeEye", - "effectValue": 40 - }, - { - "effectName": "basicV7.chin", - "effectValue": 20 - }, - { - "effectName": "basicV7.forehead", - "effectValue": -20 - }, - { - "effectName": "basicV7.thinNose", - "effectValue": 50 - }, - { - "effectName": "basicV7.mouthSize", - "effectValue": -10 - }, - { - "effectName": "lut", - "resourcePath":"light_material/lut/ziran_lf.png", - "effectValue": 40 - } - ] - }, - { - "id": 4, - "displayName": "经典直播", - "displayNameEn": "Classic Live", - "icon": "beauty_panel/panel_icon/beauty_template/energetic.png", - "paramList": [ - { - "effectName": "beauty.lutFoundationAlpha", - "effectValue": 50 - }, - { - "effectName": "smooth.smooth", - "effectValue": 60 - }, - { - "effectName": "beauty.lutClearAlpha", - "effectValue": 20 - }, - { - "effectName": "basicV7.natureFace", - "effectValue": 30 - }, - { - "effectName": "basicV7.enlargeEye", - "effectValue": 30 - }, - { - "effectName": "beauty.removeEyeBags", - "effectValue": 50 - }, - { - "effectName": "basicV7.thinNose", - "effectValue": 10 - }, - { - "effectName": "basicV7.smileFace", - "effectValue": 20 - }, - { - "effectName": "beauty.removeLawLine", - "effectValue": 35 - } - ] - }, - { - "id": 5, - "displayName": "异域", - "displayNameEn": "Exotic", - "icon": "beauty_panel/panel_icon/beauty_template/energetic.png", - "paramList": [ - { - "effectName": "beauty.lutFoundationAlpha", - "effectValue": 80 - }, - { - "effectName": "smooth.smooth", - "effectValue": 75 - }, - { - "effectName": "basicV7.thinFace", - "effectValue": 20 - }, - { - "effectName": "basicV7.natureFace", - "effectValue": 35 - }, - { - "effectName": "basicV7.vFace", - "effectValue": 30 - }, - { - "effectName": "basicV7.thinNose", - "effectValue": 40 - }, - { - "effectName": "basicV7.noseWing", - "effectValue": 10 - }, - { - "effectName": "beauty.toothWhiten", - "effectValue": 40 - }, - { - "effectName": "beauty.lutClearAlpha", - "effectValue": 60 - }, - { - "effectName": "smooth.sharpen", - "effectValue": 15 - } - ] - }, - { - "id": 6, - "displayName": "初级", - "displayNameEn": "Beginner", - "icon": "beauty_panel/panel_icon/beauty_template/nature.png", - "paramList": [ - { - "effectName": "beauty.lutFoundationAlpha2", - "effectValue": 40 - }, - { - "effectName": "smooth.smooth", - "effectValue": 40 - }, - { - "effectName": "beauty.lutClearAlpha", - "effectValue": 70 - }, - { - "effectName": "smooth.sharpen", - "effectValue": 30 - }, - { - "effectName": "basicV7.enlargeEye", - "effectValue": 10 - }, - { - "effectName": "beauty.eyeLighten", - "effectValue": 40 - }, - { - "effectName": "beauty.removeEyeBags", - "effectValue": 50 - }, - { - "effectName": "basicV7.thinNose", - "effectValue": 20 - }, - { - "effectName": "beauty.toothWhiten", - "effectValue": 40 - }, - { - "effectName": "basicV7.thinFace", - "effectValue": 20 - }, - { - "effectName": "beauty.removeLawLine", - "effectValue": 80 - }, - { - "effectName": "basicV7.cheekboneThin", - "effectValue": 10 - }, - { - "effectName": "basicV7.natureFace", - "effectValue": 30 - }, - { - "effectName": "basicV7.vFace", - "effectValue": 20 - }, - { - "effectName": "beauty.faceFeatureLipsLut", - "effectValue": 20, - "resourcePath": "/images/beauty/lips_wenroufen.png" - }, - { - "effectName": "beauty.faceFeatureSoftlight", - "effectValue": 40, - "resourcePath": "/images/beauty/liti_ziran.png" - } - ] - }, - { - "id": 7, - "displayName": "中级", - "displayNameEn": "Intermediate", - "icon": "beauty_panel/panel_icon/beauty_template/gloddess.png", - "paramList": [ - { - "effectName": "beauty.lutFoundationAlpha2", - "effectValue": 50 - }, - { - "effectName": "smooth.smooth", - "effectValue": 50 - }, - { - "effectName": "beauty.lutClearAlpha", - "effectValue": 70 - }, - { - "effectName": "smooth.sharpen", - "effectValue": 30 - }, - { - "effectName": "basicV7.enlargeEye", - "effectValue": 20 - }, - { - "effectName": "beauty.eyeLighten", - "effectValue": 40 - }, - { - "effectName": "beauty.removeEyeBags", - "effectValue": 80 - }, - { - "effectName": "basicV7.thinNose", - "effectValue": 20 - }, - { - "effectName": "beauty.toothWhiten", - "effectValue": 40 - }, - { - "effectName": "basicV7.thinFace", - "effectValue": 30 - }, - { - "effectName": "beauty.removeLawLine", - "effectValue": 80 - }, - { - "effectName": "basicV7.cheekboneThin", - "effectValue": 10 - }, - { - "effectName": "basicV7.natureFace", - "effectValue": 40 - }, - { - "effectName": "basicV7.vFace", - "effectValue": 30 - }, - { - "effectName": "basicV7.faceJaw", - "effectValue": 10 - }, - { - "effectName": "beauty.faceFeatureLipsLut", - "effectValue": 20, - "resourcePath": "/images/beauty/lips_wenroufen.png" - }, - { - "effectName": "beauty.faceFeatureSoftlight", - "effectValue": 50, - "resourcePath": "/images/beauty/liti_ziran.png" - } - ] - }, - { - "id": 8, - "displayName": "高级", - "displayNameEn": "Advanced", - "icon": "beauty_panel/panel_icon/beauty_template/gloddess.png", - "paramList": [ - { - "effectName": "beauty.lutFoundationAlpha2", - "effectValue": 60 - }, - { - "effectName": "smooth.smooth", - "effectValue": 80 - }, - { - "effectName": "beauty.lutClearAlpha", - "effectValue": 70 - }, - { - "effectName": "smooth.sharpen", - "effectValue": 30 - }, - { - "effectName": "basicV7.enlargeEye", - "effectValue": 35 - }, - { - "effectName": "beauty.eyeLighten", - "effectValue": 40 - }, - { - "effectName": "beauty.removeEyeBags", - "effectValue": 100 - }, - { - "effectName": "basicV7.thinNose", - "effectValue": 40 - }, - { - "effectName": "beauty.toothWhiten", - "effectValue": 40 - }, - { - "effectName": "basicV7.thinFace", - "effectValue": 40 - }, - { - "effectName": "beauty.removeLawLine", - "effectValue": 100 - }, - { - "effectName": "basicV7.cheekboneThin", - "effectValue": 10 - }, - { - "effectName": "basicV7.natureFace", - "effectValue": 60 - }, - { - "effectName": "basicV7.vFace", - "effectValue": 40 - }, - { - "effectName": "basicV7.faceJaw", - "effectValue": 10 - }, - { - "effectName": "beauty.faceFeatureLipsLut", - "effectValue": 20, - "resourcePath": "/images/beauty/lips_wenroufen.png" - }, - { - "effectName": "beauty.faceFeatureSoftlight", - "effectValue": 50, - "resourcePath": "/images/beauty/liti_ziran.png" - } - ] - }, - { - "id": 9, - "displayName": "英俊", - "displayNameEn": "Handsome", - "icon": "beauty_panel/panel_icon/beauty_template/handsome.png", - "paramList": [ - { - "effectName": "beauty.lutFoundationAlpha", - "effectValue": 20 - }, - { - "effectName": "smooth.smooth", - "effectValue": 30 - }, - { - "effectName": "smooth.rosy", - "effectValue": 5 - }, - { - "effectName": "basicV7.maleGodFace", - "effectValue": 60 - }, - { - "effectName": "liquefaction.basic3", - "effectValue": 20 - }, - { - "effectName": "basicV7.forehead", - "effectValue": -20 - }, - { - "effectName": "beauty.faceFeatureSoftlight", - "effectValue": 60, - "resourcePath": "/images/beauty/liti_junlang.png" - }, - { - "effectName": "basicV7.thinNose", - "effectValue": 60 - } - ] - }, - { - "id": 10, - "displayName": "经典1", - "displayNameEn": "Classic 1", - "icon": "beauty_panel/panel_icon/beauty_template/nature.png", - "paramList": [ - { - "effectName": "beauty.lutFoundationAlpha", - "effectValue": 30 - }, - { - "effectName": "smooth.smooth", - "effectValue": 30 - }, - { - "effectName": "beauty.imageContrastAlpha", - "effectValue": -30 - }, - { - "effectName": "smooth.saturation", - "effectValue": -70 - }, - { - "effectName": "beauty.lutClearAlpha", - "effectValue": 15 - }, - { - "effectName": "smooth.sharpen", - "effectValue": 25 - }, - { - "effectName": "basicV7.enlargeEye", - "effectValue": 20 - }, - { - "effectName": "beauty.eyeLighten", - "effectValue": 50 - }, - { - "effectName": "beauty.removeEyeBags", - "effectValue": 5 - }, - { - "effectName": "basicV7.thinNose", - "effectValue": 10 - }, - { - "effectName": "beauty.toothWhiten", - "effectValue": 10 - }, - { - "effectName": "basicV7.thinFace", - "effectValue": 10 - }, - { - "effectName": "basicV7.natureFace", - "effectValue": 20 - }, - { - "effectName": "beauty.removeLawLine", - "effectValue": 30 - }, - { - "effectName": "basicV7.vFace", - "effectValue": 10 - }, - { - "effectName": "beauty.faceFeatureLipsLut", - "effectValue": 30, - "resourcePath": "/images/beauty/lips_fuguhong.png" - }, - { - "effectName": "beauty.faceFeatureSoftlight", - "effectValue": 50, - "resourcePath": "/images/beauty/liti_ziran.png" - } - ] - }, - { - "id":11, - "displayName": "经典2", - "displayNameEn": "Classic 2", - "icon": "beauty_panel/panel_icon/beauty_template/nature.png", - "paramList": [ - { - "effectName": "beauty.lutFoundationAlpha", - "effectValue": 30 - }, - { - "effectName": "smooth.smooth", - "effectValue": 40 - }, - { - "effectName": "smooth.rosy", - "effectValue": 20 - }, - { - "effectName": "basicV7.enlargeEye", - "effectValue": 20 - }, - { - "effectName": "basicV7.natureFace", - "effectValue": 30 - } - ] - }, - { - "id": 12, - "displayName": "经典3", - "displayNameEn": "Classic 3", - "icon": "beauty_panel/panel_icon/beauty_template/gloddess.png", - "paramList": [ - { - "effectName": "beauty.lutFoundationAlpha", - "effectValue": 60 - }, - { - "effectName": "smooth.smooth", - "effectValue": 70 - }, - { - "effectName": "smooth.rosy", - "effectValue": 35 - }, - { - "effectName": "basicV7.enlargeEye", - "effectValue": 40 - }, - { - "effectName": "basicV7.natureFace", - "effectValue": 40 - }, - { - "effectName": "beauty.faceFeatureSoftlight", - "effectValue": 50, - "resourcePath": "/images/beauty/liti_ziran.png" - }, - { - "effectName": "beauty.eyeLighten", - "effectValue": 30 - }, - { - "effectName": "basicV7.thinNose", - "effectValue": 10 - } - ] - }, - { - "id": 13, - "displayName": "经典4", - "displayNameEn": "Classic 4", - "icon": "beauty_panel/panel_icon/beauty_template/energetic.png", - "paramList": [ - { - "effectName": "beauty.lutFoundationAlpha", - "effectValue": 60 - }, - { - "effectName": "smooth.smooth", - "effectValue": 65 - }, - { - "effectName": "smooth.rosy", - "effectValue": 30 - }, - { - "effectName": "beauty.imageContrastAlpha", - "effectValue": 28 - }, - { - "effectName": "basicV7.enlargeEye", - "effectValue": 50 - }, - { - "effectName": "beauty.eyeLighten", - "effectValue": 60 - }, - { - "effectName": "basicV7.thinNose", - "effectValue": 35 - }, - { - "effectName": "basicV7.godnessFace", - "effectValue": 50 - }, - { - "effectName": "basicV7.thinFace", - "effectValue": 25 - }, - { - "effectName": "basicV7.vFace", - "effectValue": 40 - }, - { - "effectName": "beauty.faceFeatureLipsLut", - "effectValue": 30, - "resourcePath": "/images/beauty/lips_fuguhong.png" - } - ] - } - ], - "uiState": 2 -} diff --git a/application/App-UIKit/beauty_panel/beauty_template_ios.json b/application/App-UIKit/beauty_panel/beauty_template_ios.json deleted file mode 100644 index 08ea6288..00000000 --- a/application/App-UIKit/beauty_panel/beauty_template_ios.json +++ /dev/null @@ -1,758 +0,0 @@ -{ - "displayName": "美颜模板", - "displayNameEn": "Template", - "propertyList": [ - { - "id": 0, - "displayName": "关闭", - "displayNameEn": "None", - "icon": "beauty_panel/panel_icon/beauty/none.png" - }, - { - "id": 1, - "displayName": "自然", - "displayNameEn": "Nature", - "icon": "beauty_panel/panel_icon/beauty_template/nature.png", - "paramList": [ - { - "effectName": "smooth.smooth", - "effectValue": 80 - }, - { - "effectName": "beauty.lutFoundationAlpha", - "effectValue": 40 - }, - { - "effectName":"beauty.lutClearAlpha", - "effectValue":40 - }, - { - "effectName":"basicV7.natureFace", - "effectValue":30 - }, - { - "effectName":"beauty.removeLawLine", - "effectValue":30 - }, - { - "effectName":"basicV7.enlargeEye", - "effectValue":30 - }, - { - "effectName":"basicV7.thinNose", - "effectValue":15 - }, - { - "effectName":"basicV7.smileFace", - "effectValue":20 - } - - ], - "uiState": 2 - }, - { - "id": 2, - "displayName": "女神", - "displayNameEn": "Goddess", - "icon": "beauty_panel/panel_icon/beauty_template/nature.png", - "paramList": [ - { - "effectName": "smooth.smooth", - "effectValue": 60 - }, - { - "effectName": "beauty.lutFoundationAlpha", - "effectValue": 30 - }, - - { - "effectName": "beauty.lutClearAlpha", - "effectValue": 30 - }, - { - "effectName": "smooth.sharpen", - "effectValue": 40 - }, - { - "effectName": "basicV7.natureFace", - "effectValue": 20 - }, - { - "effectName": "basicV7.enlargeEye", - "effectValue": 20 - }, - { - "effectName": "basicV7.forehead", - "effectValue": -60 - }, - { - "effectName": "basicV7.faceJaw", - "effectValue": 40 - }, - { - "effectName": "basicV7.noseWing", - "effectValue": 20 - }, - { - "effectName": "basicV7.mouthSize", - "effectValue": 30 - }, - { - "effectName": "beauty.removeEyeBags", - "effectValue": 80 - }, - { - "effectName": "beauty.removeLawLine", - "effectValue": 80 - }, - { - "effectName": "beauty.toothWhiten", - "effectValue": 20 - }, - { - "effectName": "basicV7.cheekboneThin", - "effectValue": 40 - } - ] - }, - { - "id": 3, - "displayName": "元气", - "displayNameEn": "Vitality", - "icon": "beauty_panel/panel_icon/beauty_template/energetic.png", - "paramList": [ - { - "effectName": "smooth.smooth", - "effectValue": 55 - }, - { - "effectName": "beauty.lutFoundationAlpha", - "effectValue": 40 - }, - { - "effectName": "smooth.rosy", - "effectValue": 30 - }, - { - "effectName":"beauty.lutClearAlpha", - "effectValue":80 - }, - { - "effectName": "smooth.sharpen", - "effectValue": 40 - }, - { - "effectName":"beauty.faceFeatureSoftlight", - "effectValue":40, - "resourcePath":"/images/beauty/liti_ziran.png" - }, - { - "effectName":"beauty.eyeLighten", - "effectValue":30 - }, - { - "effectName":"beauty.removeEyeBags", - "effectValue":80 - }, - { - "effectName": "beauty.removeLawLine", - "effectValue": 80 - }, - - { - "effectName": "basicV7.vFace", - "effectValue": 50 - }, - { - "effectName": "basicV7.faceJaw", - "effectValue": 10 - }, - { - "effectName": "basicV7.enlargeEye", - "effectValue": 40 - }, - { - "effectName": "basicV7.thinNose", - "effectValue": 50 - }, - { - "effectName":"basicV7.smileFace", - "effectValue": 35 - }, - { - "effectName": "lut", - "resourcePath":"light_material/lut/ziran_lf.png", - "effectValue": 40 - } - ] - }, - { - "id": 4, - "displayName": "经典直播", - "displayNameEn": "Classic Live", - "icon": "beauty_panel/panel_icon/beauty_template/energetic.png", - "paramList": [ - { - "effectName": "smooth.smooth", - "effectValue": 60 - }, - { - "effectName": "beauty.lutFoundationAlpha", - "effectValue": 20 - }, - { - "effectName":"smooth.rosy", - "effectValue":40 - }, - { - "effectName": "beauty.lutClearAlpha", - "effectValue": 50 - }, - { - "effectName": "basicV7.natureFace", - "effectValue": 30 - }, - { - "effectName": "basicV7.enlargeEye", - "effectValue": 30 - }, - { - "effectName":"beauty.removeEyeBags", - "effectValue":50 - }, - { - "effectName": "basicV7.thinNose", - "effectValue": 10 - }, - { - "effectName": "basicV7.smileFace", - "effectValue": 20 - }, - { - "effectName": "beauty.removeLawLine", - "effectValue": 35 - } - ] - }, - { - "id": 5, - "displayName": "异域", - "displayNameEn": "Exotic", - "icon": "beauty_panel/panel_icon/beauty_template/energetic.png", - "paramList": [ - { - "effectName": "beauty.lutFoundationAlpha", - "effectValue": 80 - }, - { - "effectName": "smooth.smooth", - "effectValue": 75 - }, - { - "effectName": "basicV7.thinFace", - "effectValue": 20 - }, - { - "effectName": "basicV7.natureFace", - "effectValue": 35 - }, - { - "effectName": "basicV7.vFace", - "effectValue": 30 - }, - { - "effectName": "basicV7.thinNose", - "effectValue": 40 - }, - { - "effectName": "basicV7.noseWing", - "effectValue": 10 - }, - { - "effectName": "beauty.toothWhiten", - "effectValue": 40 - }, - { - "effectName": "beauty.lutClearAlpha", - "effectValue": 60 - }, - { - "effectName": "smooth.sharpen", - "effectValue": 15 - } - ] - }, - { - "id": 6, - "displayName": "初级", - "displayNameEn": "Beginner", - "icon": "beauty_panel/panel_icon/beauty_template/nature.png", - "paramList": [ - { - "effectName": "beauty.lutFoundationAlpha2", - "effectValue": 40 - }, - { - "effectName": "smooth.smooth", - "effectValue": 40 - }, - { - "effectName": "beauty.lutClearAlpha", - "effectValue": 70 - }, - { - "effectName": "smooth.sharpen", - "effectValue": 30 - }, - { - "effectName": "basicV7.enlargeEye", - "effectValue": 10 - }, - { - "effectName": "beauty.eyeLighten", - "effectValue": 40 - }, - { - "effectName": "beauty.removeEyeBags", - "effectValue": 50 - }, - { - "effectName": "basicV7.thinNose", - "effectValue": 20 - }, - { - "effectName": "beauty.toothWhiten", - "effectValue": 40 - }, - { - "effectName": "basicV7.thinFace", - "effectValue": 20 - }, - { - "effectName": "beauty.removeLawLine", - "effectValue": 80 - }, - { - "effectName": "basicV7.cheekboneThin", - "effectValue": 10 - }, - { - "effectName": "basicV7.natureFace", - "effectValue": 30 - }, - { - "effectName": "basicV7.vFace", - "effectValue": 20 - }, - { - "effectName": "beauty.faceFeatureLipsLut", - "effectValue": 20, - "resourcePath": "/images/beauty/lips_wenroufen.png" - }, - { - "effectName": "beauty.faceFeatureSoftlight", - "effectValue": 40, - "resourcePath": "/images/beauty/liti_ziran.png" - } - ] - }, - { - "id": 7, - "displayName": "中级", - "displayNameEn": "Intermediate", - "icon": "beauty_panel/panel_icon/beauty_template/gloddess.png", - "paramList": [ - { - "effectName": "beauty.lutFoundationAlpha2", - "effectValue": 50 - }, - { - "effectName": "smooth.smooth", - "effectValue": 50 - }, - { - "effectName": "beauty.lutClearAlpha", - "effectValue": 70 - }, - { - "effectName": "smooth.sharpen", - "effectValue": 30 - }, - { - "effectName": "basicV7.enlargeEye", - "effectValue": 20 - }, - { - "effectName": "beauty.eyeLighten", - "effectValue": 40 - }, - { - "effectName": "beauty.removeEyeBags", - "effectValue": 80 - }, - { - "effectName": "basicV7.thinNose", - "effectValue": 20 - }, - { - "effectName": "beauty.toothWhiten", - "effectValue": 40 - }, - { - "effectName": "basicV7.thinFace", - "effectValue": 30 - }, - { - "effectName": "beauty.removeLawLine", - "effectValue": 80 - }, - { - "effectName": "basicV7.cheekboneThin", - "effectValue": 10 - }, - { - "effectName": "basicV7.natureFace", - "effectValue": 40 - }, - { - "effectName": "basicV7.vFace", - "effectValue": 30 - }, - { - "effectName": "basicV7.faceJaw", - "effectValue": 10 - }, - { - "effectName": "beauty.faceFeatureLipsLut", - "effectValue": 20, - "resourcePath": "/images/beauty/lips_wenroufen.png" - }, - { - "effectName": "beauty.faceFeatureSoftlight", - "effectValue": 50, - "resourcePath": "/images/beauty/liti_ziran.png" - } - ] - }, - { - "id": 8, - "displayName": "高级", - "displayNameEn": "Advanced", - "icon": "beauty_panel/panel_icon/beauty_template/gloddess.png", - "paramList": [ - { - "effectName": "beauty.lutFoundationAlpha2", - "effectValue": 60 - }, - { - "effectName": "smooth.smooth", - "effectValue": 80 - }, - { - "effectName": "beauty.lutClearAlpha", - "effectValue": 70 - }, - { - "effectName": "smooth.sharpen", - "effectValue": 30 - }, - { - "effectName": "basicV7.enlargeEye", - "effectValue": 35 - }, - { - "effectName": "beauty.eyeLighten", - "effectValue": 40 - }, - { - "effectName": "beauty.removeEyeBags", - "effectValue": 100 - }, - { - "effectName": "basicV7.thinNose", - "effectValue": 40 - }, - { - "effectName": "beauty.toothWhiten", - "effectValue": 40 - }, - { - "effectName": "basicV7.thinFace", - "effectValue": 40 - }, - { - "effectName": "beauty.removeLawLine", - "effectValue": 100 - }, - { - "effectName": "basicV7.cheekboneThin", - "effectValue": 10 - }, - { - "effectName": "basicV7.natureFace", - "effectValue": 60 - }, - { - "effectName": "basicV7.vFace", - "effectValue": 40 - }, - { - "effectName": "basicV7.faceJaw", - "effectValue": 10 - }, - { - "effectName": "beauty.faceFeatureLipsLut", - "effectValue": 20, - "resourcePath": "/images/beauty/lips_wenroufen.png" - }, - { - "effectName": "beauty.faceFeatureSoftlight", - "effectValue": 50, - "resourcePath": "/images/beauty/liti_ziran.png" - } - ] - }, - { - "id": 9, - "displayName": "英俊", - "displayNameEn": "Handsome", - "icon": "beauty_panel/panel_icon/beauty_template/handsome.png", - "paramList": [ - { - "effectName": "beauty.lutFoundationAlpha", - "effectValue": 20 - }, - { - "effectName": "smooth.smooth", - "effectValue": 30 - }, - { - "effectName": "smooth.rosy", - "effectValue": 5 - }, - { - "effectName": "basicV7.maleGodFace", - "effectValue": 60 - }, - { - "effectName": "liquefaction.basic3", - "effectValue": 20 - }, - { - "effectName": "basicV7.forehead", - "effectValue": -20 - }, - { - "effectName": "beauty.faceFeatureSoftlight", - "effectValue": 60, - "resourcePath": "/images/beauty/liti_junlang.png" - }, - { - "effectName": "basicV7.thinNose", - "effectValue": 60 - } - ] - }, - { - "id": 10, - "displayName": "经典1", - "displayNameEn": "Classic 1", - "icon": "beauty_panel/panel_icon/beauty_template/nature.png", - "paramList": [ - { - "effectName": "beauty.lutFoundationAlpha", - "effectValue": 30 - }, - { - "effectName": "smooth.smooth", - "effectValue": 30 - }, - { - "effectName": "beauty.imageContrastAlpha", - "effectValue": -30 - }, - { - "effectName": "smooth.saturation", - "effectValue": -70 - }, - { - "effectName": "beauty.lutClearAlpha", - "effectValue": 15 - }, - { - "effectName": "smooth.sharpen", - "effectValue": 25 - }, - { - "effectName": "basicV7.enlargeEye", - "effectValue": 20 - }, - { - "effectName": "beauty.eyeLighten", - "effectValue": 50 - }, - { - "effectName": "beauty.removeEyeBags", - "effectValue": 5 - }, - { - "effectName": "basicV7.thinNose", - "effectValue": 10 - }, - { - "effectName": "beauty.toothWhiten", - "effectValue": 10 - }, - { - "effectName": "basicV7.thinFace", - "effectValue": 10 - }, - { - "effectName": "basicV7.natureFace", - "effectValue": 20 - }, - { - "effectName": "beauty.removeLawLine", - "effectValue": 30 - }, - { - "effectName": "basicV7.vFace", - "effectValue": 10 - }, - { - "effectName": "beauty.faceFeatureLipsLut", - "effectValue": 30, - "resourcePath": "/images/beauty/lips_fuguhong.png" - }, - { - "effectName": "beauty.faceFeatureSoftlight", - "effectValue": 50, - "resourcePath": "/images/beauty/liti_ziran.png" - } - ] - }, - { - "id": 11, - "displayName": "经典2", - "displayNameEn": "Classic 2", - "icon": "beauty_panel/panel_icon/beauty_template/nature.png", - "paramList": [ - { - "effectName": "beauty.lutFoundationAlpha", - "effectValue": 30 - }, - { - "effectName": "smooth.smooth", - "effectValue": 40 - }, - { - "effectName": "smooth.rosy", - "effectValue": 20 - }, - { - "effectName": "basicV7.enlargeEye", - "effectValue": 20 - }, - { - "effectName": "basicV7.natureFace", - "effectValue": 30 - } - ] - }, - { - "id": 12, - "displayName": "经典3", - "displayNameEn": "Classic 3", - "icon": "beauty_panel/panel_icon/beauty_template/gloddess.png", - "paramList": [ - { - "effectName": "beauty.lutFoundationAlpha", - "effectValue": 60 - }, - { - "effectName": "smooth.smooth", - "effectValue": 70 - }, - { - "effectName": "smooth.rosy", - "effectValue": 35 - }, - { - "effectName": "basicV7.enlargeEye", - "effectValue": 40 - }, - { - "effectName": "basicV7.natureFace", - "effectValue": 40 - }, - { - "effectName": "beauty.faceFeatureSoftlight", - "effectValue": 50, - "resourcePath": "/images/beauty/liti_ziran.png" - }, - { - "effectName": "beauty.eyeLighten", - "effectValue": 30 - }, - { - "effectName": "basicV7.thinNose", - "effectValue": 10 - } - ] - }, - { - "id": 13, - "displayName": "经典4", - "displayNameEn": "Classic 4", - "icon": "beauty_panel/panel_icon/beauty_template/energetic.png", - "paramList": [ - { - "effectName": "beauty.lutFoundationAlpha", - "effectValue": 60 - }, - { - "effectName": "smooth.smooth", - "effectValue": 65 - }, - { - "effectName": "smooth.rosy", - "effectValue": 30 - }, - { - "effectName": "beauty.imageContrastAlpha", - "effectValue": 28 - }, - { - "effectName": "basicV7.enlargeEye", - "effectValue": 50 - }, - { - "effectName": "beauty.eyeLighten", - "effectValue": 60 - }, - { - "effectName": "basicV7.thinNose", - "effectValue": 35 - }, - { - "effectName": "basicV7.godnessFace", - "effectValue": 50 - }, - { - "effectName": "basicV7.thinFace", - "effectValue": 25 - }, - { - "effectName": "basicV7.vFace", - "effectValue": 40 - }, - { - "effectName": "beauty.faceFeatureLipsLut", - "effectValue": 30, - "resourcePath": "/images/beauty/lips_fuguhong.png" - } - ] - } - ], - "uiState": 2 -} diff --git a/application/App-UIKit/beauty_panel/light_makeup.json b/application/App-UIKit/beauty_panel/light_makeup.json deleted file mode 100644 index 814c07df..00000000 --- a/application/App-UIKit/beauty_panel/light_makeup.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "displayName":"轻美妆", - "displayNameEn":"Makeup", - "downloadPath":"MotionRes/light_makeup/", - "verticalLayout":true, - "propertyList":[ - { - "displayName":"无", - "displayNameEn":"None", - "icon":"beauty_panel/panel_icon/beauty/none.png" - }, - { - "displayName":"白皙", - "displayNameEn":"White", - "icon":"beauty_panel/panel_icon/light_makeup_icon/light_baixi.png", - "resourceUri":"MotionRes/light_makeup/light_baixi", - "sdkParam":{ - "effectValue":50, - "extraInfo":{ - "makeupLutStrength":"50" - } - } - }, - { - "displayName":"淡颜", - "displayNameEn":"Light", - "icon":"beauty_panel/panel_icon/light_makeup_icon/light_danyan.png", - "resourceUri":"MotionRes/light_makeup/light_danyan", - "sdkParam":{ - "effectValue":50, - "extraInfo":{ - "makeupLutStrength":"50" - } - } - } - ] -} \ No newline at end of file diff --git a/application/App-UIKit/beauty_panel/lut.json b/application/App-UIKit/beauty_panel/lut.json deleted file mode 100644 index c87fa667..00000000 --- a/application/App-UIKit/beauty_panel/lut.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "displayName":"滤镜", - "displayNameEn":"Filters", - "downloadPath":"light_material/lut/", - "propertyList":[ - { - "displayName":"无", - "displayNameEn":"None", - "icon":"beauty_panel/panel_icon/beauty/none.png" - }, - { - "displayName":"白皙", - "displayNameEn":"White", - "icon":"beauty_panel/panel_icon/lut_icon/baixi_lf.png", - "resourceUri":"light_material/lut/baixi_lf.png", - "sdkParam":{ - "effectValue":60 - } - }, - { - "displayName":"清新", - "displayNameEn":"Refreshing", - "icon":"beauty_panel/panel_icon/lut_icon/moren_lf.png", - "resourceUri":"light_material/lut/moren_lf.png", - "sdkParam":{ - "effectValue":60 - } - }, - { - "displayName":"东京", - "displayNameEn":"Tokyo", - "icon":"beauty_panel/panel_icon/lut_icon/dongjing_lf.png", - "resourceUri":"light_material/lut/dongjing_lf.png", - "sdkParam":{ - "effectValue":60 - } - }, - { - "displayName":"心动", - "displayNameEn":"Allure", - "icon":"beauty_panel/panel_icon/lut_icon/xindong_lf.png", - "resourceUri":"light_material/lut/xindong_lf.png", - "sdkParam":{ - "effectValue":60 - } - }, - { - "displayName":"自然", - "displayNameEn":"Natural", - "icon":"beauty_panel/panel_icon/lut_icon/ziran_lf.png", - "resourceUri":"light_material/lut/ziran_lf.png", - "sdkParam":{ - "effectValue":60 - } - } - ] -} \ No newline at end of file diff --git a/application/App-UIKit/beauty_panel/makeup.json b/application/App-UIKit/beauty_panel/makeup.json deleted file mode 100644 index db0cb866..00000000 --- a/application/App-UIKit/beauty_panel/makeup.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "displayName":"风格整妆", - "uiCategory":"MAKEUP", - "displayNameEn":"Makeup", - "downloadPath":"MotionRes/makeupRes/", - "propertyList":[ - { - "uiCategory":"MAKEUP", - "displayName":"无", - "displayNameEn":"None", - "parentId":"makeup", - "icon":"beauty_panel/panel_icon/beauty/none.png", - "uiState":0 - }, - { - "displayName":"学妹", - "displayNameEn":"Young", - "icon":"beauty_panel/panel_icon/makeup_icon/video_makeup_xuemei.png", - "resourceUri":"MotionRes/makeupRes/video_makeup_xuemei", - "uiCategory":"MAKEUP", - "sdkParam":{ - "effectValue":60, - "extraInfo":{ - "makeupLutStrength":"60" - } - } - } - ] -} \ No newline at end of file diff --git a/application/App-UIKit/beauty_panel/motion_2d.json b/application/App-UIKit/beauty_panel/motion_2d.json deleted file mode 100644 index 775682f2..00000000 --- a/application/App-UIKit/beauty_panel/motion_2d.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "displayName": "2D贴纸", - "displayNameEn": "2D", - "hasSubTitle": true, - "verticalLayout": true, - "downloadPath": "MotionRes/2dMotionRes/", - "propertyList": [ - { - "displayName": "最新", - "displayNameEn": "New", - "propertyList": [ - { - "displayName": "无", - "displayNameEn": "None", - "icon": "beauty_panel/panel_icon/beauty/none.png" - }, - { - "displayName": "可爱涂鸦", - "displayNameEn": "Cute graffiti", - "icon": "beauty_panel/panel_icon/motions_icon/video_keaituya.png", - "resourceUri": "MotionRes/2dMotionRes/video_keaituya" - }, - { - "displayName": "贵妃脸", - "displayNameEn": "Round", - "icon": "beauty_panel/panel_icon/motions_icon/video_guifeiface.png", - "resourceUri": "MotionRes/2dMotionRes/video_guifeiface" - } - ] - }, - { - "displayName": "精选", - "displayNameEn": "Featured", - "propertyList": [ - { - "displayName": "无", - "displayNameEn": "None", - "icon": "beauty_panel/panel_icon/beauty/none.png" - }, - { - "displayName": "上学前后", - "displayNameEn": "School", - "icon": "beauty_panel/panel_icon/motions_icon/video_kaixueqianhou.png", - "resourceUri": "MotionRes/2dMotionRes/video_kaixueqianhou" - }, - { - "displayName": "闪动爱心", - "displayNameEn": "Hearts4", - "icon": "beauty_panel/panel_icon/motions_icon/video_boys.png", - "resourceUri": "MotionRes/2dMotionRes/video_boys" - }, - { - "displayName": "元气贴纸", - "displayNameEn": "Vigorous", - "icon": "beauty_panel/panel_icon/motions_icon/video_xuanmeizhuang.png", - "resourceUri": "MotionRes/2dMotionRes/video_xuanmeizhuang" - } - ] - } - ] -} \ No newline at end of file diff --git a/application/App-UIKit/beauty_panel/motion_3d.json b/application/App-UIKit/beauty_panel/motion_3d.json deleted file mode 100644 index 7fb038ff..00000000 --- a/application/App-UIKit/beauty_panel/motion_3d.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "displayName":"3D贴纸", - "displayNameEn":"3D", - "downloadPath":"MotionRes/3dMotionRes/", - "propertyList":[ - { - "displayName":"无", - "displayNameEn":"None", - "icon":"beauty_panel/panel_icon/beauty/none.png" - }, - { - "displayName":"知性玫瑰", - "displayNameEn":"Glasses1", - "icon":"beauty_panel/panel_icon/motions_icon/video_zhixingmeigui.png", - "resourceUri":"MotionRes/3dMotionRes/video_zhixingmeigui" - } - ] -} diff --git a/application/App-UIKit/beauty_panel/motion_gesture.json b/application/App-UIKit/beauty_panel/motion_gesture.json deleted file mode 100644 index 5955e1c6..00000000 --- a/application/App-UIKit/beauty_panel/motion_gesture.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "displayName":"手势贴纸", - "displayNameEn":"Gesture Stickers", - "downloadPath":"MotionRes/handMotionRes/", - "propertyList":[ - { - "displayName":"无", - "displayNameEn":"None", - "icon":"beauty_panel/panel_icon/beauty/none.png" - }, - { - "displayName":"樱花女孩", - "displayNameEn":"Sakura", - "resourceUri":"MotionRes/handMotionRes/video_sakuragirl", - "icon":"beauty_panel/panel_icon/motions_icon/video_sakuragirl.png" - } - ] -} \ No newline at end of file diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_basic_face.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_basic_face.png deleted file mode 100644 index aafa8a44..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_basic_face.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_black.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_black.png deleted file mode 100644 index 7fc5f01f..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_black.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_black_01.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_black_01.png deleted file mode 100644 index 3c9be3e0..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_black_01.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_black_wheat.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_black_wheat.png deleted file mode 100644 index c582114f..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_black_wheat.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_chin.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_chin.png deleted file mode 100644 index 509585a8..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_chin.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_contrast.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_contrast.png deleted file mode 100644 index fb4a0383..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_contrast.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_denoise.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_denoise.png deleted file mode 100644 index 534c696c..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_denoise.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_enlarge_eye.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_enlarge_eye.png deleted file mode 100644 index fd8fdd39..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_enlarge_eye.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_eye.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_eye.png deleted file mode 100644 index 0fa0d3c6..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_eye.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_eye_angle.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_eye_angle.png deleted file mode 100644 index 49a5b38d..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_eye_angle.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_eye_distance.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_eye_distance.png deleted file mode 100644 index 850ec217..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_eye_distance.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_eye_height.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_eye_height.png deleted file mode 100644 index f390c842..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_eye_height.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_eye_lighten.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_eye_lighten.png deleted file mode 100644 index 26179cb9..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_eye_lighten.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_eye_out_angle.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_eye_out_angle.png deleted file mode 100644 index 6b0af360..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_eye_out_angle.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_eye_position.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_eye_position.png deleted file mode 100644 index 8727e17c..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_eye_position.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_eye_width.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_eye_width.png deleted file mode 100644 index 193de7a3..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_eye_width.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_eyeball.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_eyeball.png deleted file mode 100644 index f9e7da2d..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_eyeball.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_eyebrow.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_eyebrow.png deleted file mode 100644 index 7103328c..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_eyebrow.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_eyebrow_angle.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_eyebrow_angle.png deleted file mode 100644 index 9ab7a4d0..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_eyebrow_angle.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_eyebrow_distance.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_eyebrow_distance.png deleted file mode 100644 index dbf22602..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_eyebrow_distance.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_eyebrow_length.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_eyebrow_length.png deleted file mode 100644 index 6e668e79..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_eyebrow_length.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_eyebrow_position.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_eyebrow_position.png deleted file mode 100644 index 0848935e..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_eyebrow_position.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_eyebrow_ridge.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_eyebrow_ridge.png deleted file mode 100644 index 07751def..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_eyebrow_ridge.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_eyebrow_thickness.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_eyebrow_thickness.png deleted file mode 100644 index 8be0747d..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_eyebrow_thickness.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_face_jaw.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_face_jaw.png deleted file mode 100644 index cdd5b825..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_face_jaw.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_forehead.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_forehead.png deleted file mode 100644 index 49eb2b03..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_forehead.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_image_brightness.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_image_brightness.png deleted file mode 100644 index 11ecf3c6..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_image_brightness.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_image_contrast.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_image_contrast.png deleted file mode 100644 index 479bfab4..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_image_contrast.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_image_saturation.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_image_saturation.png deleted file mode 100644 index 5e9626dc..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_image_saturation.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_image_sharpen.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_image_sharpen.png deleted file mode 100644 index f0cc5e6a..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_image_sharpen.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_image_tint.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_image_tint.png deleted file mode 100644 index 195f032f..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_image_tint.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_image_warmth.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_image_warmth.png deleted file mode 100644 index f5c5b1f3..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_image_warmth.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_lips.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_lips.png deleted file mode 100644 index b54f5ad5..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_lips.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_liti.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_liti.png deleted file mode 100644 index 02dd627f..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_liti.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_mouth.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_mouth.png deleted file mode 100644 index 4febab5d..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_mouth.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_mouth_height.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_mouth_height.png deleted file mode 100644 index 141c1c22..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_mouth_height.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_mouth_position.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_mouth_position.png deleted file mode 100644 index c2c6b4d7..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_mouth_position.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_mouth_size.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_mouth_size.png deleted file mode 100644 index 3ca2e54f..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_mouth_size.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_mouth_smile.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_mouth_smile.png deleted file mode 100644 index 7d0fb9fd..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_mouth_smile.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_mouth_width.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_mouth_width.png deleted file mode 100644 index 223cf782..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_mouth_width.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_narrow_face.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_narrow_face.png deleted file mode 100644 index 267b126a..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_narrow_face.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_nose.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_nose.png deleted file mode 100644 index 1242dfd6..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_nose.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_nose_position.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_nose_position.png deleted file mode 100644 index df9ac2df..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_nose_position.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_nose_wing.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_nose_wing.png deleted file mode 100644 index b98e26b4..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_nose_wing.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_redcheeks.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_redcheeks.png deleted file mode 100644 index 6b961d90..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_redcheeks.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_remove_eye_pouch.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_remove_eye_pouch.png deleted file mode 100644 index 5f1e7dff..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_remove_eye_pouch.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_remove_pounch.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_remove_pounch.png deleted file mode 100644 index d48520c4..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_remove_pounch.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_ruddy.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_ruddy.png deleted file mode 100644 index 71a73a12..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_ruddy.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_saturation.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_saturation.png deleted file mode 100644 index 3762fb97..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_saturation.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_sharpen.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_sharpen.png deleted file mode 100644 index 06e95ea5..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_sharpen.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_short_face.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_short_face.png deleted file mode 100644 index 16fc1708..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_short_face.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_skin_highlight.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_skin_highlight.png deleted file mode 100644 index c496b9fd..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_skin_highlight.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_smooth.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_smooth.png deleted file mode 100644 index 7917f3d2..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_smooth.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_smooth/beauty_smooth_1.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_smooth/beauty_smooth_1.png deleted file mode 100644 index e954f70e..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_smooth/beauty_smooth_1.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_smooth/beauty_smooth_2.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_smooth/beauty_smooth_2.png deleted file mode 100644 index 554dd343..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_smooth/beauty_smooth_2.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_smooth/beauty_smooth_3.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_smooth/beauty_smooth_3.png deleted file mode 100644 index b36c9bf5..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_smooth/beauty_smooth_3.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_smooth/beauty_smooth_4.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_smooth/beauty_smooth_4.png deleted file mode 100644 index da18b9f3..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_smooth/beauty_smooth_4.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_smooth_gan.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_smooth_gan.png deleted file mode 100644 index 558d4448..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_smooth_gan.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_thin_cheek.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_thin_cheek.png deleted file mode 100644 index 68b522cb..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_thin_cheek.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_thin_face.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_thin_face.png deleted file mode 100644 index b09763a5..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_thin_face.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_thin_face1.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_thin_face1.png deleted file mode 100644 index 7ea6199a..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_thin_face1.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_thin_face2.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_thin_face2.png deleted file mode 100644 index cf5084d5..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_thin_face2.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_thin_face3.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_thin_face3.png deleted file mode 100644 index 5d1ff9d2..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_thin_face3.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_thin_nose.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_thin_nose.png deleted file mode 100644 index b72e8dbe..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_thin_nose.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_tooth_beauty.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_tooth_beauty.png deleted file mode 100644 index 612db4c6..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_tooth_beauty.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_v_face.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_v_face.png deleted file mode 100644 index 4e88389d..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_v_face.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_whiten.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_whiten.png deleted file mode 100644 index 2d2f59fc..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_whiten.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_whiten_cool.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_whiten_cool.png deleted file mode 100644 index 91ca1143..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_whiten_cool.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_whiten_liangbai.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_whiten_liangbai.png deleted file mode 100644 index fc80ec37..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_whiten_liangbai.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_whiten_nature.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_whiten_nature.png deleted file mode 100644 index b4741101..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_whiten_nature.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_whiten_pink.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_whiten_pink.png deleted file mode 100644 index fd69dd30..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_whiten_pink.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_wrinkle_smooth.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_wrinkle_smooth.png deleted file mode 100644 index 94b0b416..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/beauty_wrinkle_smooth.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eye_liner.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eye_liner.png deleted file mode 100644 index 88e556d7..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eye_liner.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eye_sequins.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eye_sequins.png deleted file mode 100644 index c5177e55..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eye_sequins.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eye_shadow.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eye_shadow.png deleted file mode 100644 index 7c94f5ae..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eye_shadow.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyelash.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyelash.png deleted file mode 100644 index 00ec254a..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyelash.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyelids.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyelids.png deleted file mode 100644 index 43c7cdc3..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyelids.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_liner_0.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_liner_0.png deleted file mode 100644 index 3c777852..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_liner_0.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_liner_1.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_liner_1.png deleted file mode 100644 index e70c9262..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_liner_1.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_liner_2.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_liner_2.png deleted file mode 100644 index b9232e25..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_liner_2.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_sequins_0.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_sequins_0.png deleted file mode 100644 index 72a90cab..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_sequins_0.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_sequins_1.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_sequins_1.png deleted file mode 100644 index 84e0ebcd..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_sequins_1.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_sequins_2.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_sequins_2.png deleted file mode 100644 index 1b960dbc..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_sequins_2.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_0-albatross.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_0-albatross.png deleted file mode 100644 index adfc976f..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_0-albatross.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_0.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_0.png deleted file mode 100644 index 5af54bc1..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_0.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_1-falcon.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_1-falcon.png deleted file mode 100644 index c9d75e4e..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_1-falcon.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_1.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_1.png deleted file mode 100644 index c4245432..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_1.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_10-grapes.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_10-grapes.png deleted file mode 100644 index c8e8f5c5..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_10-grapes.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_10.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_10.png deleted file mode 100644 index fc33b25f..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_10.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_11-blossom.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_11-blossom.png deleted file mode 100644 index 2559e54b..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_11-blossom.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_11.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_11.png deleted file mode 100644 index 25edbaad..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_11.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_12-raised.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_12-raised.png deleted file mode 100644 index b925ae64..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_12-raised.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_12.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_12.png deleted file mode 100644 index a1908113..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_12.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_13-sunset.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_13-sunset.png deleted file mode 100644 index 5815d982..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_13-sunset.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_14-smudging.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_14-smudging.png deleted file mode 100644 index 8e10b768..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_14-smudging.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_15-tipsy.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_15-tipsy.png deleted file mode 100644 index 8ca273c9..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_15-tipsy.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_2-flamingo.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_2-flamingo.png deleted file mode 100644 index 7accac4a..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_2-flamingo.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_2.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_2.png deleted file mode 100644 index ae409b5a..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_2.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_3-hawk.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_3-hawk.png deleted file mode 100644 index 0d5d1345..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_3-hawk.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_3.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_3.png deleted file mode 100644 index e80a1784..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_3.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_4-kingfisher.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_4-kingfisher.png deleted file mode 100644 index 03f75af8..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_4-kingfisher.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_4.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_4.png deleted file mode 100644 index 04069b79..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_4.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_5-owl.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_5-owl.png deleted file mode 100644 index 631ac50b..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_5-owl.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_5.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_5.png deleted file mode 100644 index 05260ddb..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_5.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_6-parrot.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_6-parrot.png deleted file mode 100644 index 6283e554..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_6-parrot.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_6.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_6.png deleted file mode 100644 index 94e5cabf..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_6.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_7-peacock.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_7-peacock.png deleted file mode 100644 index dd1cf2cf..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_7-peacock.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_7.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_7.png deleted file mode 100644 index 32cc9edd..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_7.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_8-robin.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_8-robin.png deleted file mode 100644 index cbfae883..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_8-robin.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_8.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_8.png deleted file mode 100644 index 9769bc1a..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_8.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_9-swan.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_9-swan.png deleted file mode 100644 index 5201e41a..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_9-swan.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_9.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_9.png deleted file mode 100644 index 0f284c59..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_shadow_9.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_wocan_keai_icon.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_wocan_keai_icon.png deleted file mode 100644 index f64acec9..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_wocan_keai_icon.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_wocan_suyan_icon.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_wocan_suyan_icon.png deleted file mode 100644 index 2196ef99..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_wocan_suyan_icon.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_wocan_tiansang_icon.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_wocan_tiansang_icon.png deleted file mode 100644 index f998aaa8..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_wocan_tiansang_icon.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_wocan_ziran_icon.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_wocan_ziran_icon.png deleted file mode 100644 index 4be86d24..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eye_wocan_ziran_icon.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyeball_0.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyeball_0.png deleted file mode 100644 index dc261cc3..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyeball_0.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyeball_1.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyeball_1.png deleted file mode 100644 index e5c98845..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyeball_1.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyeball_2.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyeball_2.png deleted file mode 100644 index 9b24de32..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyeball_2.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyeball_3.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyeball_3.png deleted file mode 100644 index 1bf6c47c..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyeball_3.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyeball_4.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyeball_4.png deleted file mode 100644 index 613b7a84..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyeball_4.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyeball_5.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyeball_5.png deleted file mode 100644 index 1f649d93..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyeball_5.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyeball_6.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyeball_6.png deleted file mode 100644 index eacd4474..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyeball_6.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyeball_7.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyeball_7.png deleted file mode 100644 index 33421800..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyeball_7.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyeball_8.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyeball_8.png deleted file mode 100644 index 23aa5a80..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyeball_8.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyeball_9.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyeball_9.png deleted file mode 100644 index 25365b62..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyeball_9.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyebrow_0.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyebrow_0.png deleted file mode 100644 index aca5f97a..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyebrow_0.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyebrow_1.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyebrow_1.png deleted file mode 100644 index 94a39391..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyebrow_1.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyebrow_2.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyebrow_2.png deleted file mode 100644 index a994bd55..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyebrow_2.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyebrow_3.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyebrow_3.png deleted file mode 100644 index 06d69278..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyebrow_3.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyelash_0.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyelash_0.png deleted file mode 100644 index bb1f5390..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyelash_0.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyelash_1.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyelash_1.png deleted file mode 100644 index 0324a0df..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyelash_1.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyelash_10.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyelash_10.png deleted file mode 100644 index 205feac6..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyelash_10.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyelash_2.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyelash_2.png deleted file mode 100644 index 5bbc6d39..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyelash_2.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyelash_3.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyelash_3.png deleted file mode 100644 index 9bc3a7fe..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyelash_3.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyelash_4.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyelash_4.png deleted file mode 100644 index a78523ff..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyelash_4.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyelash_5.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyelash_5.png deleted file mode 100644 index ae645dd5..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyelash_5.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyelash_6.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyelash_6.png deleted file mode 100644 index 55942481..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyelash_6.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyelash_7.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyelash_7.png deleted file mode 100644 index b8ff7a78..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyelash_7.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyelash_8.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyelash_8.png deleted file mode 100644 index 7bccae51..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyelash_8.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyelash_9.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyelash_9.png deleted file mode 100644 index 5fd6b675..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyelash_9.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyelids_kaishan_icon.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyelids_kaishan_icon.png deleted file mode 100644 index 3d131747..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyelids_kaishan_icon.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyelids_oushi_icon.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyelids_oushi_icon.png deleted file mode 100644 index f0ed5ece..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyelids_oushi_icon.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyelids_pingshan_icon.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyelids_pingshan_icon.png deleted file mode 100644 index 45c9dd07..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyelids_pingshan_icon.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyelids_xinyue_icon.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyelids_xinyue_icon.png deleted file mode 100644 index c163a066..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/eyes_makeup_eyelids_xinyue_icon.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/wocan.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/wocan.png deleted file mode 100644 index 5358522d..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/eyes_makeup/wocan.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/hair_color.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/hair_color.png deleted file mode 100644 index 13be5863..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/hair_color.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/hair_color_blue.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/hair_color_blue.png deleted file mode 100644 index e11bed5a..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/hair_color_blue.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/hair_color_gray.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/hair_color_gray.png deleted file mode 100644 index 55a14eb4..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/hair_color_gray.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/hair_color_green.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/hair_color_green.png deleted file mode 100644 index a5d60d6d..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/hair_color_green.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/hair_color_purple.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/hair_color_purple.png deleted file mode 100644 index 636c54c4..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/hair_color_purple.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/hair_color_red.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/hair_color_red.png deleted file mode 100644 index 03e5bae3..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/hair_color_red.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/hair_color_yellow.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/hair_color_yellow.png deleted file mode 100644 index 7b2a1e0f..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/hair_color_yellow.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/kouhong/fuguhong.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/kouhong/fuguhong.png deleted file mode 100644 index 78f68104..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/kouhong/fuguhong.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/kouhong/huolicheng.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/kouhong/huolicheng.png deleted file mode 100644 index d29733c2..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/kouhong/huolicheng.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/kouhong/mitaose.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/kouhong/mitaose.png deleted file mode 100644 index 637b119f..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/kouhong/mitaose.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/kouhong/shanhuju.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/kouhong/shanhuju.png deleted file mode 100644 index ee83f225..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/kouhong/shanhuju.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/kouhong/wenrufen.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/kouhong/wenrufen.png deleted file mode 100644 index d5836b4e..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/kouhong/wenrufen.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/liti/liti_guangmang.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/liti/liti_guangmang.png deleted file mode 100644 index cbe968d8..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/liti/liti_guangmang.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/liti/liti_junlang.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/liti/liti_junlang.png deleted file mode 100644 index 85072783..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/liti/liti_junlang.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/liti/liti_qingxin.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/liti/liti_qingxin.png deleted file mode 100644 index 2c3ce6c3..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/liti/liti_qingxin.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/liti/liti_ziran.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/liti/liti_ziran.png deleted file mode 100644 index 01162180..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/liti/liti_ziran.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/nasion.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/nasion.png deleted file mode 100644 index a91481df..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/nasion.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/none.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/none.png deleted file mode 100644 index 70a316f3..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/none.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/nose_bridge_width.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/nose_bridge_width.png deleted file mode 100644 index 15fef04c..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/nose_bridge_width.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/saihong/saihong_caomei.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/saihong/saihong_caomei.png deleted file mode 100644 index ca2632d6..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/saihong/saihong_caomei.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/saihong/saihong_chengshu.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/saihong/saihong_chengshu.png deleted file mode 100644 index d3fe2eed..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/saihong/saihong_chengshu.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/saihong/saihong_haixiu.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/saihong/saihong_haixiu.png deleted file mode 100644 index 8581eaf5..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/saihong/saihong_haixiu.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/saihong/saihong_jianyue.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/saihong/saihong_jianyue.png deleted file mode 100644 index 97d7a202..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/saihong/saihong_jianyue.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/saihong/saihong_judiao.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/saihong/saihong_judiao.png deleted file mode 100644 index 5212002c..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/saihong/saihong_judiao.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/saihong/saihong_meigui.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/saihong/saihong_meigui.png deleted file mode 100644 index 3213e11a..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/saihong/saihong_meigui.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/saihong/saihong_mitao.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/saihong/saihong_mitao.png deleted file mode 100644 index 4d1a0760..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/saihong/saihong_mitao.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/saihong/saihong_naiju.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/saihong/saihong_naiju.png deleted file mode 100644 index 2baf5513..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/saihong/saihong_naiju.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/saihong/saihong_queban.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/saihong/saihong_queban.png deleted file mode 100644 index dc6951c8..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/saihong/saihong_queban.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/saihong/saihong_shengxia.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/saihong/saihong_shengxia.png deleted file mode 100644 index cb27a8ad..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/saihong/saihong_shengxia.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/saihong/saihong_tianmei.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/saihong/saihong_tianmei.png deleted file mode 100644 index e7492335..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/saihong/saihong_tianmei.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty/saihong/saihong_xingzi.png b/application/App-UIKit/beauty_panel/panel_icon/beauty/saihong/saihong_xingzi.png deleted file mode 100644 index 56ad306c..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty/saihong/saihong_xingzi.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty_body/body_autohtin_body_strength.png b/application/App-UIKit/beauty_panel/panel_icon/beauty_body/body_autohtin_body_strength.png deleted file mode 100644 index df8e8fd2..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty_body/body_autohtin_body_strength.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty_body/body_beauty_chest.png b/application/App-UIKit/beauty_panel/panel_icon/beauty_body/body_beauty_chest.png deleted file mode 100644 index 63fa45ec..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty_body/body_beauty_chest.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty_body/body_leg_stretch.png b/application/App-UIKit/beauty_panel/panel_icon/beauty_body/body_leg_stretch.png deleted file mode 100644 index 6121f719..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty_body/body_leg_stretch.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty_body/body_slim_arm_strength.png b/application/App-UIKit/beauty_panel/panel_icon/beauty_body/body_slim_arm_strength.png deleted file mode 100644 index 7ed3669e..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty_body/body_slim_arm_strength.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty_body/body_slim_head_strength.png b/application/App-UIKit/beauty_panel/panel_icon/beauty_body/body_slim_head_strength.png deleted file mode 100644 index 799b5920..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty_body/body_slim_head_strength.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty_body/body_slim_leg_strength.png b/application/App-UIKit/beauty_panel/panel_icon/beauty_body/body_slim_leg_strength.png deleted file mode 100644 index 23abae12..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty_body/body_slim_leg_strength.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty_body/body_thin_shoulder_strength.png b/application/App-UIKit/beauty_panel/panel_icon/beauty_body/body_thin_shoulder_strength.png deleted file mode 100644 index a4acc299..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty_body/body_thin_shoulder_strength.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty_body/body_waish_strength.png b/application/App-UIKit/beauty_panel/panel_icon/beauty_body/body_waish_strength.png deleted file mode 100644 index 5b0d0288..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty_body/body_waish_strength.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty_template/energetic.png b/application/App-UIKit/beauty_panel/panel_icon/beauty_template/energetic.png deleted file mode 100644 index 3b28df70..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty_template/energetic.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty_template/gloddess.png b/application/App-UIKit/beauty_panel/panel_icon/beauty_template/gloddess.png deleted file mode 100644 index b1117552..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty_template/gloddess.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty_template/handsome.png b/application/App-UIKit/beauty_panel/panel_icon/beauty_template/handsome.png deleted file mode 100644 index 73d7e4c2..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty_template/handsome.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/beauty_template/nature.png b/application/App-UIKit/beauty_panel/panel_icon/beauty_template/nature.png deleted file mode 100644 index 7c125a08..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/beauty_template/nature.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/light_makeup_icon/light_baixi.png b/application/App-UIKit/beauty_panel/panel_icon/light_makeup_icon/light_baixi.png deleted file mode 100644 index b12d0bcb..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/light_makeup_icon/light_baixi.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/light_makeup_icon/light_danyan.png b/application/App-UIKit/beauty_panel/panel_icon/light_makeup_icon/light_danyan.png deleted file mode 100644 index 20057d94..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/light_makeup_icon/light_danyan.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/lut_icon/baixi_lf.png b/application/App-UIKit/beauty_panel/panel_icon/lut_icon/baixi_lf.png deleted file mode 100644 index aa75cc09..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/lut_icon/baixi_lf.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/lut_icon/dongjing_lf.png b/application/App-UIKit/beauty_panel/panel_icon/lut_icon/dongjing_lf.png deleted file mode 100644 index 88350d92..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/lut_icon/dongjing_lf.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/lut_icon/moren_lf.png b/application/App-UIKit/beauty_panel/panel_icon/lut_icon/moren_lf.png deleted file mode 100644 index 7c125a08..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/lut_icon/moren_lf.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/lut_icon/xindong_lf.png b/application/App-UIKit/beauty_panel/panel_icon/lut_icon/xindong_lf.png deleted file mode 100644 index ff7d3dd6..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/lut_icon/xindong_lf.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/lut_icon/ziran_lf.png b/application/App-UIKit/beauty_panel/panel_icon/lut_icon/ziran_lf.png deleted file mode 100644 index 2436fca8..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/lut_icon/ziran_lf.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/makeup_icon/video_makeup_xuemei.png b/application/App-UIKit/beauty_panel/panel_icon/makeup_icon/video_makeup_xuemei.png deleted file mode 100644 index 94b3bf07..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/makeup_icon/video_makeup_xuemei.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/motions_icon/add.png b/application/App-UIKit/beauty_panel/panel_icon/motions_icon/add.png deleted file mode 100644 index 8a42c3e4..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/motions_icon/add.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/motions_icon/greenscreen.png b/application/App-UIKit/beauty_panel/panel_icon/motions_icon/greenscreen.png deleted file mode 100644 index 1e8364f2..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/motions_icon/greenscreen.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/motions_icon/greenscreen_corrosion.png b/application/App-UIKit/beauty_panel/panel_icon/motions_icon/greenscreen_corrosion.png deleted file mode 100644 index 51a03b48..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/motions_icon/greenscreen_corrosion.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/motions_icon/greenscreen_deshadow.png b/application/App-UIKit/beauty_panel/panel_icon/motions_icon/greenscreen_deshadow.png deleted file mode 100644 index bfcd188a..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/motions_icon/greenscreen_deshadow.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/motions_icon/greenscreen_despill.png b/application/App-UIKit/beauty_panel/panel_icon/motions_icon/greenscreen_despill.png deleted file mode 100644 index ec30eae9..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/motions_icon/greenscreen_despill.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/motions_icon/greenscreen_similarity.png b/application/App-UIKit/beauty_panel/panel_icon/motions_icon/greenscreen_similarity.png deleted file mode 100644 index 4b94d361..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/motions_icon/greenscreen_similarity.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/motions_icon/greenscreen_smooth.png b/application/App-UIKit/beauty_panel/panel_icon/motions_icon/greenscreen_smooth.png deleted file mode 100644 index 20e5e35d..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/motions_icon/greenscreen_smooth.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/motions_icon/video_boys.png b/application/App-UIKit/beauty_panel/panel_icon/motions_icon/video_boys.png deleted file mode 100644 index 3b0603a4..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/motions_icon/video_boys.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/motions_icon/video_guifeiface.png b/application/App-UIKit/beauty_panel/panel_icon/motions_icon/video_guifeiface.png deleted file mode 100644 index 3121d07b..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/motions_icon/video_guifeiface.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/motions_icon/video_kaixueqianhou.png b/application/App-UIKit/beauty_panel/panel_icon/motions_icon/video_kaixueqianhou.png deleted file mode 100644 index 1e1e030a..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/motions_icon/video_kaixueqianhou.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/motions_icon/video_keaituya.png b/application/App-UIKit/beauty_panel/panel_icon/motions_icon/video_keaituya.png deleted file mode 100644 index 3c76ce2c..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/motions_icon/video_keaituya.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/motions_icon/video_sakuragirl.png b/application/App-UIKit/beauty_panel/panel_icon/motions_icon/video_sakuragirl.png deleted file mode 100644 index 7d8d1ed5..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/motions_icon/video_sakuragirl.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/motions_icon/video_segmentation_blur_45.png b/application/App-UIKit/beauty_panel/panel_icon/motions_icon/video_segmentation_blur_45.png deleted file mode 100644 index 3c1dbc31..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/motions_icon/video_segmentation_blur_45.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/motions_icon/video_segmentation_blur_75.png b/application/App-UIKit/beauty_panel/panel_icon/motions_icon/video_segmentation_blur_75.png deleted file mode 100644 index 842e3566..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/motions_icon/video_segmentation_blur_75.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/motions_icon/video_segmentation_transparent_bg.png b/application/App-UIKit/beauty_panel/panel_icon/motions_icon/video_segmentation_transparent_bg.png deleted file mode 100644 index 3c1dbc31..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/motions_icon/video_segmentation_transparent_bg.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/motions_icon/video_xuanmeizhuang.png b/application/App-UIKit/beauty_panel/panel_icon/motions_icon/video_xuanmeizhuang.png deleted file mode 100644 index c7f554c6..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/motions_icon/video_xuanmeizhuang.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/panel_icon/motions_icon/video_zhixingmeigui.png b/application/App-UIKit/beauty_panel/panel_icon/motions_icon/video_zhixingmeigui.png deleted file mode 100644 index 54fe776e..00000000 Binary files a/application/App-UIKit/beauty_panel/panel_icon/motions_icon/video_zhixingmeigui.png and /dev/null differ diff --git a/application/App-UIKit/beauty_panel/segmentation.json b/application/App-UIKit/beauty_panel/segmentation.json deleted file mode 100644 index 5ab9455a..00000000 --- a/application/App-UIKit/beauty_panel/segmentation.json +++ /dev/null @@ -1,203 +0,0 @@ -{ - "displayName": "虚拟背景", - "displayNameEn": "Virtual background", - "downloadPath": "MotionRes/segmentMotionRes/", - "verticalLayout": true, - "propertyList": [ - { - "displayName": "无", - "displayNameEn": "None", - "icon": "beauty_panel/panel_icon/beauty/none.png" - }, - { - "displayName": "自定义背景", - "displayNameEn": "Custom", - "icon": "beauty_panel/panel_icon/motions_icon/add.png", - "resourceUri": "MotionRes/segmentMotionRes/video_empty_segmentation", - "sdkParam": { - "extraInfo": { - "segType": "custom_background" - } - } - }, - { - "displayName": "绿幕抠图V2", - "displayNameEn": "Green Screen V2", - "icon": "beauty_panel/panel_icon/motions_icon/greenscreen.png", - "resourceUri": "MotionRes/segmentMotionRes/video_greenscreen_v2", - "sdkParam": { - "extraInfo": { - "segType": "green_background_v2" - } - }, - "propertyList": [ - { - "displayName": "关闭", - "displayNameEn": "Off", - "icon": "beauty_panel/panel_icon/beauty/none.png", - "uiCategory":"GREEN_BACKGROUND_V2_ITEM" - }, - { - "displayName": "导入图片", - "displayNameEn": "import image", - "icon": "beauty_panel/panel_icon/motions_icon/add.png", - "uiCategory":"GREEN_BACKGROUND_V2_ITEM_IMPORT_IMAGE" - }, - { - "displayName": "相似度", - "displayNameEn": "Similarity", - "icon": "beauty_panel/panel_icon/motions_icon/greenscreen_similarity.png", - "uiCategory":"GREEN_BACKGROUND_V2_ITEM", - "sdkParam": { - "effectName":"green_background_v2.similarity", - "effectValue":30 - } - }, - { - "displayName": "平滑度", - "displayNameEn": "Smoothness", - "icon": "beauty_panel/panel_icon/motions_icon/greenscreen_smooth.png", - "uiCategory":"GREEN_BACKGROUND_V2_ITEM", - "sdkParam": { - "effectName":"green_background_v2.smooth", - "effectValue":20 - } - }, - { - "displayName": "边缘消除强度", - "displayNameEn": "Edge Elimination", - "icon": "beauty_panel/panel_icon/motions_icon/greenscreen_corrosion.png", - "uiCategory":"GREEN_BACKGROUND_V2_ITEM", - "sdkParam": { - "effectName":"green_background_v2.corrosion", - "effectValue":1 - } - }, - { - "displayName": "灰度比例", - "displayNameEn": "Grayscale Ratio", - "icon": "beauty_panel/panel_icon/motions_icon/greenscreen_despill.png", - "uiCategory":"GREEN_BACKGROUND_V2_ITEM", - "sdkParam": { - "effectName":"green_background_v2.despill", - "effectValue":30 - } - }, - { - "displayName": "去阴影", - "displayNameEn": "Shadow Removal", - "icon": "beauty_panel/panel_icon/motions_icon/greenscreen_deshadow.png", - "uiCategory":"GREEN_BACKGROUND_V2_ITEM", - "sdkParam": { - "effectName":"green_background_v2.deshadow", - "effectValue":1 - } - } - ] - }, - { - "displayName": "蓝幕抠图", - "displayNameEn": "Blue Screen", - "icon": "beauty_panel/panel_icon/motions_icon/greenscreen.png", - "resourceUri": "MotionRes/segmentMotionRes/video_bluescreen", - "sdkParam": { - "extraInfo": { - "segType": "green_background_v2" - } - }, - "propertyList": [ - { - "displayName": "关闭", - "displayNameEn": "Off", - "icon": "beauty_panel/panel_icon/beauty/none.png", - "uiCategory":"GREEN_BACKGROUND_V2_ITEM" - }, - { - "displayName": "导入图片", - "displayNameEn": "import image", - "icon": "beauty_panel/panel_icon/motions_icon/add.png", - "uiCategory":"GREEN_BACKGROUND_V2_ITEM_IMPORT_IMAGE" - }, - { - "displayName": "相似度", - "displayNameEn": "Similarity", - "icon": "beauty_panel/panel_icon/motions_icon/greenscreen_similarity.png", - "uiCategory":"GREEN_BACKGROUND_V2_ITEM", - "sdkParam": { - "effectName":"green_background_v2.similarity", - "effectValue":35 - } - }, - { - "displayName": "平滑度", - "displayNameEn": "Smoothness", - "icon": "beauty_panel/panel_icon/motions_icon/greenscreen_smooth.png", - "uiCategory":"GREEN_BACKGROUND_V2_ITEM", - "sdkParam": { - "effectName":"green_background_v2.smooth", - "effectValue":8 - } - }, - { - "displayName": "边缘消除强度", - "displayNameEn": "Edge Elimination", - "icon": "beauty_panel/panel_icon/motions_icon/greenscreen_corrosion.png", - "uiCategory":"GREEN_BACKGROUND_V2_ITEM", - "sdkParam": { - "effectName":"green_background_v2.corrosion", - "effectValue":1 - } - }, - { - "displayName": "灰度比例", - "displayNameEn": "Grayscale Ratio", - "icon": "beauty_panel/panel_icon/motions_icon/greenscreen_despill.png", - "uiCategory":"GREEN_BACKGROUND_V2_ITEM", - "sdkParam": { - "effectName":"green_background_v2.despill", - "effectValue":10 - } - }, - { - "displayName": "去阴影", - "displayNameEn": "Shadow Removal", - "icon": "beauty_panel/panel_icon/motions_icon/greenscreen_deshadow.png", - "uiCategory":"GREEN_BACKGROUND_V2_ITEM", - "sdkParam": { - "effectName":"green_background_v2.deshadow", - "effectValue":1 - } - } - ] - }, - { - "displayName": "背景模糊-弱", - "displayNameEn": "Blur(weak)", - "icon": "beauty_panel/panel_icon/motions_icon/video_segmentation_blur_45.png", - "resourceUri": "MotionRes/segmentMotionRes/video_segmentation_blur_45" - }, - { - "displayName": "背景模糊-强", - "displayNameEn": "Blur(strong)", - "icon": "beauty_panel/panel_icon/motions_icon/video_segmentation_blur_75.png", - "resourceUri": "MotionRes/segmentMotionRes/video_segmentation_blur_75" - }, - { - "displayName": "背景透明", - "displayNameEn": "Transparent", - "icon": "beauty_panel/panel_icon/motions_icon/video_segmentation_transparent_bg.png", - "resourceUri": "MotionRes/segmentMotionRes/video_segmentation_transparent_bg" - }, - { - "displayName": "绿幕抠图", - "displayNameEn": "GreenScreen", - "icon": "beauty_panel/panel_icon/motions_icon/greenscreen.png", - "resourceUri": "MotionRes/segmentMotionRes/video_greenscreen", - "sdkParam": { - "extraInfo": { - "segType": "green_background" - } - } - } - ] -} diff --git a/application/App-UIKit/lightMakeupRes.bundle/light_baixi/image/jiemao.png b/application/App-UIKit/lightMakeupRes.bundle/light_baixi/image/jiemao.png deleted file mode 100644 index a8f5fa04..00000000 Binary files a/application/App-UIKit/lightMakeupRes.bundle/light_baixi/image/jiemao.png and /dev/null differ diff --git a/application/App-UIKit/lightMakeupRes.bundle/light_baixi/image/kouhong.png b/application/App-UIKit/lightMakeupRes.bundle/light_baixi/image/kouhong.png deleted file mode 100644 index f140b892..00000000 Binary files a/application/App-UIKit/lightMakeupRes.bundle/light_baixi/image/kouhong.png and /dev/null differ diff --git a/application/App-UIKit/lightMakeupRes.bundle/light_baixi/image/lut.png b/application/App-UIKit/lightMakeupRes.bundle/light_baixi/image/lut.png deleted file mode 100644 index 0a274115..00000000 Binary files a/application/App-UIKit/lightMakeupRes.bundle/light_baixi/image/lut.png and /dev/null differ diff --git a/application/App-UIKit/lightMakeupRes.bundle/light_baixi/image/meimao.png b/application/App-UIKit/lightMakeupRes.bundle/light_baixi/image/meimao.png deleted file mode 100644 index 4cf090cc..00000000 Binary files a/application/App-UIKit/lightMakeupRes.bundle/light_baixi/image/meimao.png and /dev/null differ diff --git a/application/App-UIKit/lightMakeupRes.bundle/light_baixi/image/meitong.png b/application/App-UIKit/lightMakeupRes.bundle/light_baixi/image/meitong.png deleted file mode 100644 index 65800a90..00000000 Binary files a/application/App-UIKit/lightMakeupRes.bundle/light_baixi/image/meitong.png and /dev/null differ diff --git a/application/App-UIKit/lightMakeupRes.bundle/light_baixi/image/saihong.png b/application/App-UIKit/lightMakeupRes.bundle/light_baixi/image/saihong.png deleted file mode 100644 index a009575c..00000000 Binary files a/application/App-UIKit/lightMakeupRes.bundle/light_baixi/image/saihong.png and /dev/null differ diff --git a/application/App-UIKit/lightMakeupRes.bundle/light_baixi/image/xiurong.png b/application/App-UIKit/lightMakeupRes.bundle/light_baixi/image/xiurong.png deleted file mode 100644 index b1cee915..00000000 Binary files a/application/App-UIKit/lightMakeupRes.bundle/light_baixi/image/xiurong.png and /dev/null differ diff --git a/application/App-UIKit/lightMakeupRes.bundle/light_baixi/image/yanxian.png b/application/App-UIKit/lightMakeupRes.bundle/light_baixi/image/yanxian.png deleted file mode 100644 index 3a889443..00000000 Binary files a/application/App-UIKit/lightMakeupRes.bundle/light_baixi/image/yanxian.png and /dev/null differ diff --git a/application/App-UIKit/lightMakeupRes.bundle/light_baixi/image/yanying.png b/application/App-UIKit/lightMakeupRes.bundle/light_baixi/image/yanying.png deleted file mode 100644 index 75fd5800..00000000 Binary files a/application/App-UIKit/lightMakeupRes.bundle/light_baixi/image/yanying.png and /dev/null differ diff --git a/application/App-UIKit/lightMakeupRes.bundle/light_baixi/makeup.json b/application/App-UIKit/lightMakeupRes.bundle/light_baixi/makeup.json deleted file mode 100644 index 3a7512f5..00000000 --- a/application/App-UIKit/lightMakeupRes.bundle/light_baixi/makeup.json +++ /dev/null @@ -1 +0,0 @@ -[{"alpha":1.0,"effectName":"lut","resourcePath":"image/lut.png"},{"alpha":1.0,"effectName":"beauty.faceFeatureLipsLut","resourcePath":"image/kouhong.png"},{"alpha":1.0,"effectName":"beauty.faceFeatureRedCheek","resourcePath":"image/saihong.png"},{"alpha":1.0,"effectName":"beauty.faceFeatureSoftlight","resourcePath":"image/xiurong.png"},{"alpha":1.0,"effectName":"beauty.faceFeatureEyesMakeup.eyeShadow","resourcePath":"image/yanying.png"},{"alpha":1.0,"effectName":"beauty.faceFeatureEyesMakeup.eyeLiner","resourcePath":"image/yanxian.png"},{"alpha":1.0,"effectName":"beauty.faceFeatureEyesMakeup.eyelash","resourcePath":"image/jiemao.png"},{"alpha":1.0,"effectName":"beauty.faceFeatureEyesMakeup.eyebrow","resourcePath":"image/meimao.png"},{"alpha":1.0,"effectName":"beauty.faceFeatureEyesMakeup.eyeball","resourcePath":"image/meitong.png"},{"alpha":0.0,"effectName":"beauty.faceFeatureEyesMakeup.eyelids","resourcePath":""},{"alpha":0.0,"effectName":"beauty.faceFeatureEyesMakeup.eyewocan","resourcePath":""}] \ No newline at end of file diff --git a/application/App-UIKit/lightMakeupRes.bundle/light_danyan/image/kouhong.png b/application/App-UIKit/lightMakeupRes.bundle/light_danyan/image/kouhong.png deleted file mode 100644 index b62e0673..00000000 Binary files a/application/App-UIKit/lightMakeupRes.bundle/light_danyan/image/kouhong.png and /dev/null differ diff --git a/application/App-UIKit/lightMakeupRes.bundle/light_danyan/image/meimao.png b/application/App-UIKit/lightMakeupRes.bundle/light_danyan/image/meimao.png deleted file mode 100644 index 0013a261..00000000 Binary files a/application/App-UIKit/lightMakeupRes.bundle/light_danyan/image/meimao.png and /dev/null differ diff --git a/application/App-UIKit/lightMakeupRes.bundle/light_danyan/image/meitong.png b/application/App-UIKit/lightMakeupRes.bundle/light_danyan/image/meitong.png deleted file mode 100644 index 2d922d33..00000000 Binary files a/application/App-UIKit/lightMakeupRes.bundle/light_danyan/image/meitong.png and /dev/null differ diff --git a/application/App-UIKit/lightMakeupRes.bundle/light_danyan/image/saihong.png b/application/App-UIKit/lightMakeupRes.bundle/light_danyan/image/saihong.png deleted file mode 100644 index 7c123dc6..00000000 Binary files a/application/App-UIKit/lightMakeupRes.bundle/light_danyan/image/saihong.png and /dev/null differ diff --git a/application/App-UIKit/lightMakeupRes.bundle/light_danyan/image/xiurong.png b/application/App-UIKit/lightMakeupRes.bundle/light_danyan/image/xiurong.png deleted file mode 100644 index e5c5b78e..00000000 Binary files a/application/App-UIKit/lightMakeupRes.bundle/light_danyan/image/xiurong.png and /dev/null differ diff --git a/application/App-UIKit/lightMakeupRes.bundle/light_danyan/image/yanying.png b/application/App-UIKit/lightMakeupRes.bundle/light_danyan/image/yanying.png deleted file mode 100644 index ff255c9e..00000000 Binary files a/application/App-UIKit/lightMakeupRes.bundle/light_danyan/image/yanying.png and /dev/null differ diff --git a/application/App-UIKit/lightMakeupRes.bundle/light_danyan/makeup.json b/application/App-UIKit/lightMakeupRes.bundle/light_danyan/makeup.json deleted file mode 100644 index 788d12f3..00000000 --- a/application/App-UIKit/lightMakeupRes.bundle/light_danyan/makeup.json +++ /dev/null @@ -1 +0,0 @@ -[{"alpha":0.0,"effectName":"lut","resourcePath":""},{"alpha":1.0,"effectName":"beauty.faceFeatureLipsLut","resourcePath":"image/kouhong.png"},{"alpha":1.0,"effectName":"beauty.faceFeatureRedCheek","resourcePath":"image/saihong.png"},{"alpha":1.0,"effectName":"beauty.faceFeatureSoftlight","resourcePath":"image/xiurong.png"},{"alpha":1.0,"effectName":"beauty.faceFeatureEyesMakeup.eyeShadow","resourcePath":"image/yanying.png"},{"alpha":0.0,"effectName":"beauty.faceFeatureEyesMakeup.eyeLiner","resourcePath":""},{"alpha":0.0,"effectName":"beauty.faceFeatureEyesMakeup.eyelash","resourcePath":""},{"alpha":0.0,"effectName":"beauty.faceFeatureEyesMakeup.eyebrow","resourcePath":"image/meimao.png"},{"alpha":1.0,"effectName":"beauty.faceFeatureEyesMakeup.eyeball","resourcePath":"image/meitong.png"},{"alpha":0.0,"effectName":"beauty.faceFeatureEyesMakeup.eyelids","resourcePath":""},{"alpha":0.0,"effectName":"beauty.faceFeatureEyesMakeup.eyewocan","resourcePath":""}] \ No newline at end of file diff --git a/application/App-UIKit/lut.bundle/baixi_lf.png b/application/App-UIKit/lut.bundle/baixi_lf.png deleted file mode 100644 index 53305705..00000000 Binary files a/application/App-UIKit/lut.bundle/baixi_lf.png and /dev/null differ diff --git a/application/App-UIKit/lut.bundle/dongjing_lf.png b/application/App-UIKit/lut.bundle/dongjing_lf.png deleted file mode 100644 index ddf9dfc7..00000000 Binary files a/application/App-UIKit/lut.bundle/dongjing_lf.png and /dev/null differ diff --git a/application/App-UIKit/lut.bundle/moren_lf.png b/application/App-UIKit/lut.bundle/moren_lf.png deleted file mode 100644 index 39afb19c..00000000 Binary files a/application/App-UIKit/lut.bundle/moren_lf.png and /dev/null differ diff --git a/application/App-UIKit/lut.bundle/xindong_lf.png b/application/App-UIKit/lut.bundle/xindong_lf.png deleted file mode 100644 index 326f04b4..00000000 Binary files a/application/App-UIKit/lut.bundle/xindong_lf.png and /dev/null differ diff --git a/application/App-UIKit/lut.bundle/ziran_lf.png b/application/App-UIKit/lut.bundle/ziran_lf.png deleted file mode 100644 index 69bdfbb1..00000000 Binary files a/application/App-UIKit/lut.bundle/ziran_lf.png and /dev/null differ diff --git a/application/App-UIKit/makeupMotionRes.bundle/video_makeup_xuemei/DeviceCameraTexture.tex b/application/App-UIKit/makeupMotionRes.bundle/video_makeup_xuemei/DeviceCameraTexture.tex deleted file mode 100644 index 119ca577..00000000 --- a/application/App-UIKit/makeupMotionRes.bundle/video_makeup_xuemei/DeviceCameraTexture.tex +++ /dev/null @@ -1,4 +0,0 @@ -{ - "type": "TextureData", - "key": "DeviceCameraTexture" -} \ No newline at end of file diff --git a/application/App-UIKit/makeupMotionRes.bundle/video_makeup_xuemei/RenderTarget.rdt b/application/App-UIKit/makeupMotionRes.bundle/video_makeup_xuemei/RenderTarget.rdt deleted file mode 100644 index a98616e9..00000000 --- a/application/App-UIKit/makeupMotionRes.bundle/video_makeup_xuemei/RenderTarget.rdt +++ /dev/null @@ -1 +0,0 @@ -{"type":"RenderTarget","path":"RenderTarget.rdt","key":"RenderTarget","input":"DeviceCameraTexture"} \ No newline at end of file diff --git a/application/App-UIKit/makeupMotionRes.bundle/video_makeup_xuemei/_DS_Store b/application/App-UIKit/makeupMotionRes.bundle/video_makeup_xuemei/_DS_Store deleted file mode 100644 index dff5320a..00000000 Binary files a/application/App-UIKit/makeupMotionRes.bundle/video_makeup_xuemei/_DS_Store and /dev/null differ diff --git a/application/App-UIKit/makeupMotionRes.bundle/video_makeup_xuemei/cropImage/default_mask_crop.png b/application/App-UIKit/makeupMotionRes.bundle/video_makeup_xuemei/cropImage/default_mask_crop.png deleted file mode 100644 index a260168a..00000000 Binary files a/application/App-UIKit/makeupMotionRes.bundle/video_makeup_xuemei/cropImage/default_mask_crop.png and /dev/null differ diff --git a/application/App-UIKit/makeupMotionRes.bundle/video_makeup_xuemei/cropImage/dzyylp_crop.png b/application/App-UIKit/makeupMotionRes.bundle/video_makeup_xuemei/cropImage/dzyylp_crop.png deleted file mode 100644 index ef26d753..00000000 Binary files a/application/App-UIKit/makeupMotionRes.bundle/video_makeup_xuemei/cropImage/dzyylp_crop.png and /dev/null differ diff --git a/application/App-UIKit/makeupMotionRes.bundle/video_makeup_xuemei/cropImage/jm2_crop.png b/application/App-UIKit/makeupMotionRes.bundle/video_makeup_xuemei/cropImage/jm2_crop.png deleted file mode 100644 index 558f7e3c..00000000 Binary files a/application/App-UIKit/makeupMotionRes.bundle/video_makeup_xuemei/cropImage/jm2_crop.png and /dev/null differ diff --git a/application/App-UIKit/makeupMotionRes.bundle/video_makeup_xuemei/cropImage/mm_crop.png b/application/App-UIKit/makeupMotionRes.bundle/video_makeup_xuemei/cropImage/mm_crop.png deleted file mode 100644 index fdb6928f..00000000 Binary files a/application/App-UIKit/makeupMotionRes.bundle/video_makeup_xuemei/cropImage/mm_crop.png and /dev/null differ diff --git a/application/App-UIKit/makeupMotionRes.bundle/video_makeup_xuemei/cropImage/yy_crop.png b/application/App-UIKit/makeupMotionRes.bundle/video_makeup_xuemei/cropImage/yy_crop.png deleted file mode 100644 index 5a5e85b1..00000000 Binary files a/application/App-UIKit/makeupMotionRes.bundle/video_makeup_xuemei/cropImage/yy_crop.png and /dev/null differ diff --git a/application/App-UIKit/makeupMotionRes.bundle/video_makeup_xuemei/cropImage/zc_crop.png b/application/App-UIKit/makeupMotionRes.bundle/video_makeup_xuemei/cropImage/zc_crop.png deleted file mode 100644 index 50d77d3f..00000000 Binary files a/application/App-UIKit/makeupMotionRes.bundle/video_makeup_xuemei/cropImage/zc_crop.png and /dev/null differ diff --git a/application/App-UIKit/makeupMotionRes.bundle/video_makeup_xuemei/dzyylp.png b/application/App-UIKit/makeupMotionRes.bundle/video_makeup_xuemei/dzyylp.png deleted file mode 100644 index de94a8dd..00000000 Binary files a/application/App-UIKit/makeupMotionRes.bundle/video_makeup_xuemei/dzyylp.png and /dev/null differ diff --git a/application/App-UIKit/makeupMotionRes.bundle/video_makeup_xuemei/fenbai.png b/application/App-UIKit/makeupMotionRes.bundle/video_makeup_xuemei/fenbai.png deleted file mode 100644 index 81468219..00000000 Binary files a/application/App-UIKit/makeupMotionRes.bundle/video_makeup_xuemei/fenbai.png and /dev/null differ diff --git a/application/App-UIKit/makeupMotionRes.bundle/video_makeup_xuemei/jm2.png b/application/App-UIKit/makeupMotionRes.bundle/video_makeup_xuemei/jm2.png deleted file mode 100644 index dfa6bbc1..00000000 Binary files a/application/App-UIKit/makeupMotionRes.bundle/video_makeup_xuemei/jm2.png and /dev/null differ diff --git a/application/App-UIKit/makeupMotionRes.bundle/video_makeup_xuemei/mm.png b/application/App-UIKit/makeupMotionRes.bundle/video_makeup_xuemei/mm.png deleted file mode 100644 index d2fa1b70..00000000 Binary files a/application/App-UIKit/makeupMotionRes.bundle/video_makeup_xuemei/mm.png and /dev/null differ diff --git a/application/App-UIKit/makeupMotionRes.bundle/video_makeup_xuemei/sh.png b/application/App-UIKit/makeupMotionRes.bundle/video_makeup_xuemei/sh.png deleted file mode 100644 index 79b05f70..00000000 Binary files a/application/App-UIKit/makeupMotionRes.bundle/video_makeup_xuemei/sh.png and /dev/null differ diff --git a/application/App-UIKit/makeupMotionRes.bundle/video_makeup_xuemei/template.json b/application/App-UIKit/makeupMotionRes.bundle/video_makeup_xuemei/template.json deleted file mode 100644 index 60aea367..00000000 --- a/application/App-UIKit/makeupMotionRes.bundle/video_makeup_xuemei/template.json +++ /dev/null @@ -1,1759 +0,0 @@ -{ - "isFragment": false, - "componentLevel": 4, - "madeIn": "LightStudio", - "root": { - "id": 16, - "name": "拍摄模板", - "children": [ - { - "id": 17, - "name": "2D画板", - "children": [ - { - "id": 18, - "name": "脸妆_腮红", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 18, - "componentID": 18001, - "level": 2 - }, - { - "componentID": 18002, - "enabled": true, - "entityId": 18, - "faceExchangeImageDisableFaceCrop": true, - "faceExchangeImageEnableOpacity": false, - "faceImage": "c852cc4b-6584-4754-a609-a05397b4582c", - "faceMask": "none", - "facePointsFile": "", - "facePointsOption": false, - "level": 2, - "makeupFaceVersion": "v6", - "maskImage": "", - "type": "MakeupFaceV6", - "version": 36, - "visMethod": 0 - }, - { - "alpha": 1, - "componentID": 18003, - "enabled": true, - "entityId": 18, - "level": 2, - "mode": "multiply", - "type": "BlendMode", - "version": 42 - }, - { - "alignPoints": [ - 64 - ], - "componentID": 18004, - "enabled": true, - "entityId": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "genderBinding": "", - "isAllFrameFaceDetect": false, - "isRefine": true, - "isWaitFirstFrameDetect": false, - "level": 2, - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "type": "FaceTracking", - "xAxisRotateTrack": true, - "xAxisScale": true, - "xAxisTrack": true, - "yAxisRotateTrack": true, - "yAxisScale": true, - "yAxisTrack": true, - "zAxisRotateTrack": true, - "version": 2 - }, - { - "type": "EntityIdentifier", - "name": "脸妆_腮红", - "id": 18, - "originID": 18, - "enabled": true - } - ] - }, - { - "id": 216, - "name": "脸妆_修容", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 216, - "componentID": 216001, - "level": 2 - }, - { - "componentID": 216002, - "enabled": true, - "entityId": 216, - "faceExchangeImageDisableFaceCrop": true, - "faceExchangeImageEnableOpacity": false, - "faceImage": "5d626ce5-4308-4fa1-ab00-ed780b3f29fc", - "faceMask": "none", - "facePointsFile": "", - "facePointsOption": false, - "level": 2, - "makeupFaceVersion": "v6", - "maskImage": "", - "type": "MakeupFaceV6", - "version": 20, - "visMethod": 0 - }, - { - "alpha": 0.7, - "componentID": 216003, - "enabled": true, - "entityId": 216, - "level": 2, - "mode": "softlight", - "type": "BlendMode", - "version": 281 - }, - { - "alignPoints": [ - 64 - ], - "componentID": 216004, - "enabled": true, - "entityId": 216, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "genderBinding": "", - "isAllFrameFaceDetect": false, - "isRefine": true, - "isWaitFirstFrameDetect": false, - "level": 2, - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "type": "FaceTracking", - "xAxisRotateTrack": true, - "xAxisScale": true, - "xAxisTrack": true, - "yAxisRotateTrack": true, - "yAxisScale": true, - "yAxisTrack": true, - "zAxisRotateTrack": true, - "version": 2 - }, - { - "type": "EntityIdentifier", - "name": "脸妆_修容", - "id": 216, - "originID": 216, - "enabled": true - } - ] - }, - { - "id": 27, - "name": "眉妆", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 27, - "componentID": 27001, - "level": 2 - }, - { - "componentID": 27002, - "cropRect": { - "bottom": 904, - "left": 368, - "right": 1176, - "top": 754 - }, - "enabled": true, - "entityId": 27, - "eyebrowCropImageName": "cropImage/mm_crop.png", - "eyebrowImageName": "bfeb1111-e79e-4039-9577-e07bf1d092fb", - "level": 2, - "minVisibility": 0, - "type": "MakeupEyebrowV6", - "version": 32, - "visMethod": 0 - }, - { - "alpha": 0.9, - "componentID": 27003, - "enabled": true, - "entityId": 27, - "level": 2, - "mode": "multiply", - "type": "BlendMode", - "version": 4 - }, - { - "alignPoints": [ - 64 - ], - "componentID": 27004, - "enabled": true, - "entityId": 27, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "genderBinding": "", - "isAllFrameFaceDetect": false, - "isRefine": true, - "isWaitFirstFrameDetect": false, - "level": 2, - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "type": "FaceTracking", - "xAxisRotateTrack": true, - "xAxisScale": true, - "xAxisTrack": true, - "yAxisRotateTrack": true, - "yAxisScale": true, - "yAxisTrack": true, - "zAxisRotateTrack": true, - "version": 2 - }, - { - "type": "EntityIdentifier", - "name": "眉妆", - "id": 27, - "originID": 27, - "enabled": true - } - ] - }, - { - "id": 19, - "name": "眼妆", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "interactive": false, - "enabled": true, - "entityId": 19, - "componentID": 19001, - "level": 2 - }, - { - "componentID": 19002, - "cropRect": { - "bottom": 1010, - "left": 468, - "right": 1068, - "top": 842 - }, - "enabled": true, - "entityId": 19, - "extraFlag": 0, - "eyeCropImageName": "cropImage/jm2_crop.png", - "eyeImageName": "2d0bea07-35d8-4a32-9b83-080b23d3a37e", - "eyeMeshOptType": 0, - "level": 2, - "minVisibility": 0, - "type": "MakeupEyeV6", - "version": 11, - "visMethod": 0 - }, - { - "alpha": 0.9, - "componentID": 19003, - "enabled": true, - "entityId": 19, - "level": 2, - "mode": "multiply", - "type": "BlendMode", - "version": 4 - }, - { - "alignPoints": [ - 64 - ], - "componentID": 19004, - "enabled": true, - "entityId": 19, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "genderBinding": "", - "isAllFrameFaceDetect": false, - "isRefine": true, - "isWaitFirstFrameDetect": false, - "level": 2, - "maxTrackingNum": 5, - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "type": "FaceTracking", - "xAxisRotateTrack": true, - "xAxisScale": true, - "xAxisTrack": true, - "yAxisRotateTrack": true, - "yAxisScale": true, - "yAxisTrack": true, - "zAxisRotateTrack": true, - "zOffset": 0, - "version": 2 - }, - { - "type": "EntityIdentifier", - "name": "眼妆", - "id": 19, - "originID": 19, - "enabled": true - } - ] - }, - { - "id": 187, - "name": "眼妆_高光", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 187, - "componentID": 187001, - "level": 2 - }, - { - "componentID": 187002, - "cropRect": { - "bottom": 1120, - "left": 518, - "right": 1024, - "top": 832 - }, - "enabled": true, - "entityId": 187, - "eyeCropImageName": "cropImage/dzyylp_crop.png", - "eyeImageName": "ef6f38e0-1d6b-4433-9ab5-6a645d6550d8", - "level": 2, - "minVisibility": 0, - "type": "MakeupEyeV6", - "version": 37, - "visMethod": 0 - }, - { - "alpha": 1, - "componentID": 187003, - "enabled": true, - "entityId": 187, - "level": 2, - "mode": "screen", - "type": "BlendMode", - "version": 764 - }, - { - "alignPoints": [ - 64 - ], - "componentID": 187004, - "enabled": true, - "entityId": 187, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "genderBinding": "", - "isAllFrameFaceDetect": false, - "isRefine": true, - "isWaitFirstFrameDetect": false, - "level": 2, - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "type": "FaceTracking", - "xAxisRotateTrack": true, - "xAxisScale": true, - "xAxisTrack": true, - "yAxisRotateTrack": true, - "yAxisScale": true, - "yAxisTrack": true, - "zAxisRotateTrack": true, - "version": 2 - }, - { - "type": "EntityIdentifier", - "name": "眼妆_高光", - "id": 187, - "originID": 187, - "enabled": true - } - ] - }, - { - "id": 108, - "name": "眼妆_眼影", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 108, - "componentID": 108001, - "level": 2 - }, - { - "componentID": 108002, - "cropRect": { - "bottom": 1092, - "left": 328, - "right": 1214, - "top": 782 - }, - "enabled": true, - "entityId": 108, - "eyeCropImageName": "cropImage/yy_crop.png", - "eyeImageName": "7df8cd66-4dd1-4591-9173-f1aafb4eab81", - "level": 2, - "minVisibility": 0, - "type": "MakeupEyeV6", - "version": 54, - "visMethod": 0 - }, - { - "alpha": 0.8, - "componentID": 108003, - "enabled": true, - "entityId": 108, - "level": 2, - "mode": "multiply", - "type": "BlendMode", - "version": 4 - }, - { - "alignPoints": [ - 64 - ], - "componentID": 108004, - "enabled": true, - "entityId": 108, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "genderBinding": "", - "isAllFrameFaceDetect": false, - "isRefine": true, - "isWaitFirstFrameDetect": false, - "level": 2, - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "type": "FaceTracking", - "xAxisRotateTrack": true, - "xAxisScale": true, - "xAxisTrack": true, - "yAxisRotateTrack": true, - "yAxisScale": true, - "yAxisTrack": true, - "zAxisRotateTrack": true, - "version": 2 - }, - { - "type": "EntityIdentifier", - "name": "眼妆_眼影", - "id": 108, - "originID": 108, - "enabled": true - } - ] - }, - { - "id": 125, - "name": "美瞳", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 125, - "componentID": 125001, - "level": 2 - }, - { - "alpha": 0.3, - "componentID": 125003, - "enabled": true, - "entityId": 125, - "level": 2, - "mode": "multiply", - "type": "BlendMode", - "version": 234 - }, - { - "alignPoints": [ - 64 - ], - "componentID": 125004, - "enabled": true, - "entityId": 125, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "genderBinding": "", - "isAllFrameFaceDetect": false, - "isRefine": true, - "isWaitFirstFrameDetect": false, - "level": 2, - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "type": "FaceTracking", - "xAxisRotateTrack": true, - "xAxisScale": true, - "xAxisTrack": true, - "yAxisRotateTrack": true, - "yAxisScale": true, - "yAxisTrack": true, - "zAxisRotateTrack": true, - "version": 2 - }, - { - "type": "EntityIdentifier", - "name": "美瞳", - "id": 125, - "originID": 125, - "enabled": true - } - ] - }, - { - "id": 166, - "name": "唇彩", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 166, - "componentID": 166001, - "level": 2 - }, - { - "closeMouseMask": "", - "componentID": 166002, - "enabled": true, - "entityId": 166, - "level": 2, - "lipsColor": "", - "lipsImage": "4ecbc9b9-a603-417f-b4ea-c9994ed0b9df", - "lipsImageCrop": "cropImage/zc_crop.png", - "lipsImageCropRect": { - "bottom": 1440, - "left": 590, - "right": 966, - "top": 1238 - }, - "lipsLut": "", - "lipsMask": "Default", - "lipsMaskCrop": "cropImage/default_mask_crop.png", - "lipsMaskCropRect": { - "bottom": 2048, - "left": 0, - "right": 1536, - "top": 0 - }, - "lipsMaskEnum": 0, - "lipsTextureType": "Default", - "lipsType": "Image", - "minVisibility": 0, - "openMouseMask": "", - "type": "MakeupLipsV6", - "version": 30, - "visMethod": 0, - "lipsDetailType": "Default" - }, - { - "alpha": 0.9, - "componentID": 166003, - "enabled": true, - "entityId": 166, - "level": 2, - "mode": "multiply", - "type": "BlendMode", - "version": 10 - }, - { - "alignPoints": [ - 64 - ], - "componentID": 166004, - "enabled": true, - "entityId": 166, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "genderBinding": "", - "isAllFrameFaceDetect": false, - "isRefine": true, - "isWaitFirstFrameDetect": false, - "level": 2, - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "type": "FaceTracking", - "xAxisRotateTrack": true, - "xAxisScale": true, - "xAxisTrack": true, - "yAxisRotateTrack": true, - "yAxisScale": true, - "yAxisTrack": true, - "zAxisRotateTrack": true, - "version": 2 - }, - { - "type": "EntityIdentifier", - "name": "唇彩", - "id": 166, - "originID": 166, - "enabled": true - } - ] - }, - { - "id": 253, - "name": "滤镜", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 253, - "componentID": 253001, - "level": 2 - }, - { - "componentID": 253002, - "enabled": true, - "entityId": 253, - "intensity": 0.78, - "level": 1, - "src": "9cd97270-3f58-4bd4-a33a-9e111204a2ff", - "type": "LUTFilter", - "version": 296 - }, - { - "startOffset": 0, - "duration": -2147483648, - "endOffset": 0, - "loopCount": -2147483648, - "type": "TimeOffset", - "enabled": true, - "entityId": 253, - "componentID": 253003, - "version": 5, - "level": 1 - }, - { - "type": "EntityIdentifier", - "name": "滤镜", - "id": 253, - "originID": 253, - "enabled": true - } - ] - } - ], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "entityId": 17, - "componentID": 17001, - "type": "ScreenTransform", - "enabled": true, - "version": 2, - "objectEnabled": true, - "level": 2 - }, - { - "componentID": 17002, - "enabled": true, - "entityId": 17, - "renderTargetKey": "RenderTarget", - "type": "Camera", - "version": 2, - "level": 2 - }, - { - "type": "EntityIdentifier", - "name": "2D画板", - "id": 17, - "originID": 17, - "enabled": true - } - ] - } - ], - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 16, - "componentID": 16001, - "type": "ScreenTransform", - "enabled": true, - "version": 10, - "level": 2 - }, - { - "componentID": 16002, - "enableRotation": true, - "enabled": true, - "entityId": 16, - "level": 4, - "resetWhenStartRecord": true, - "type": "ExtraSetting", - "version": 3, - "needAutoBeauty": true, - "requireAbility": [] - }, - { - "type": "EntityIdentifier", - "name": "拍摄模板", - "id": 16, - "originID": 16, - "enabled": true - } - ], - "enabled": true, - "version": 0 - }, - "inputSources": { - "RenderTarget": { - "type": "RenderTarget", - "commandMap": {}, - "inputColor": "#ffffffff", - "sizeType": 0, - "compatibilityMode": true, - "depthType": "DEPTH24", - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "NEAREST", - "minFilter": "NEAREST", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "useForDisplay": false, - "width": 0, - "height": 0, - "key": "RenderTarget", - "path": "RenderTarget.rdt", - "label": "RenderTarget.rdt", - "inputKey": "DeviceCameraTexture", - "input": "DeviceCameraTexture", - "level": 2 - }, - "DeviceCameraTexture": { - "type": "TextureData", - "commandMap": {}, - "key": "DeviceCameraTexture", - "path": "DeviceCameraTexture.tex", - "label": "DeviceCameraTexture.tex", - "level": 2 - }, - "c852cc4b-6584-4754-a609-a05397b4582c": { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "reSize": 1, - "key": "c852cc4b-6584-4754-a609-a05397b4582c", - "label": "sh.png", - "path": "sh.png", - "level": 2, - "actualSize": 215028, - "resolution": { - "height": 1024, - "width": 768 - }, - "width": 768, - "height": 1024 - }, - "5d626ce5-4308-4fa1-ab00-ed780b3f29fc": { - "type": "ImageData", - "commandMap": {}, - "key": "5d626ce5-4308-4fa1-ab00-ed780b3f29fc", - "label": "xr.png", - "path": "xr.png", - "level": 2, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "actualSize": 63255, - "resolution": { - "height": 1024, - "width": 768 - }, - "width": 768, - "height": 1024 - }, - "9cd97270-3f58-4bd4-a33a-9e111204a2ff": { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "reSize": 1, - "key": "9cd97270-3f58-4bd4-a33a-9e111204a2ff", - "label": "fenbai.png", - "path": "fenbai.png", - "level": 2, - "actualSize": 3895, - "resolution": { - "height": 512, - "width": 512 - }, - "width": 512, - "height": 512 - }, - "7eca898b-cfd1-4ef4-8beb-5e4515827529": { - "type": "folder", - "commandMap": {}, - "key": "7eca898b-cfd1-4ef4-8beb-5e4515827529", - "label": "root", - "path": "./", - "level": 2 - }, - "655900a5-467e-4c49-8236-0a6760d71330": { - "type": "default", - "commandMap": {}, - "key": "655900a5-467e-4c49-8236-0a6760d71330", - "label": "_DS_Store", - "path": "_DS_Store", - "level": 2 - }, - "3661eacd-cb02-411c-85ba-52a87aeeda2c": { - "type": "folder", - "commandMap": {}, - "key": "3661eacd-cb02-411c-85ba-52a87aeeda2c", - "label": "cropImage", - "path": "cropImage", - "level": 2 - }, - "3f633bfd-b1a4-4090-b97c-4681bb61081b": { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "reSize": 1, - "key": "3f633bfd-b1a4-4090-b97c-4681bb61081b", - "label": "default_mask_crop.png", - "path": "cropImage/default_mask_crop.png", - "level": 2, - "actualSize": 2727, - "resolution": { - "height": 511, - "width": 383 - }, - "width": 383, - "height": 511 - }, - "ef6f38e0-1d6b-4433-9ab5-6a645d6550d8": { - "type": "ImageData", - "commandMap": {}, - "key": "ef6f38e0-1d6b-4433-9ab5-6a645d6550d8", - "label": "dzyylp_crop.png", - "path": "cropImage/dzyylp_crop.png", - "level": 2, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "actualSize": 35337, - "resolution": { - "height": 144, - "width": 253 - }, - "width": 253, - "height": 144 - }, - "2d0bea07-35d8-4a32-9b83-080b23d3a37e": { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "reSize": 1, - "key": "2d0bea07-35d8-4a32-9b83-080b23d3a37e", - "label": "jm2_crop.png", - "path": "cropImage/jm2_crop.png", - "level": 2, - "actualSize": 13411, - "resolution": { - "height": 84, - "width": 300 - }, - "width": 300, - "height": 84 - }, - "bfeb1111-e79e-4039-9577-e07bf1d092fb": { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "reSize": 1, - "key": "bfeb1111-e79e-4039-9577-e07bf1d092fb", - "label": "mm_crop.png", - "path": "cropImage/mm_crop.png", - "level": 2, - "actualSize": 26563, - "resolution": { - "height": 75, - "width": 404 - }, - "width": 404, - "height": 75 - }, - "7df8cd66-4dd1-4591-9173-f1aafb4eab81": { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "reSize": 1, - "key": "7df8cd66-4dd1-4591-9173-f1aafb4eab81", - "label": "yy_crop.png", - "path": "cropImage/yy_crop.png", - "level": 2, - "actualSize": 75809, - "resolution": { - "height": 155, - "width": 443 - }, - "width": 443, - "height": 155 - }, - "4ecbc9b9-a603-417f-b4ea-c9994ed0b9df": { - "type": "ImageData", - "commandMap": {}, - "key": "4ecbc9b9-a603-417f-b4ea-c9994ed0b9df", - "label": "zc_crop.png", - "path": "cropImage/zc_crop.png", - "level": 2, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "actualSize": 18181, - "resolution": { - "height": 101, - "width": 188 - }, - "width": 188, - "height": 101 - }, - "8747bae9-20d2-494b-b3a0-4ff6379d6655": { - "type": "ImageData", - "commandMap": {}, - "key": "8747bae9-20d2-494b-b3a0-4ff6379d6655", - "label": "dzyylp.png", - "path": "dzyylp.png", - "level": 2, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "actualSize": 47270, - "resolution": { - "height": 1024, - "width": 768 - }, - "width": 768, - "height": 1024 - }, - "ead8d177-5c88-4881-b982-8d1632f0ecb2": { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "reSize": 1, - "key": "ead8d177-5c88-4881-b982-8d1632f0ecb2", - "label": "jm2.png", - "path": "jm2.png", - "level": 2, - "actualSize": 21940, - "resolution": { - "height": 1024, - "width": 768 - }, - "width": 768, - "height": 1024 - }, - "761f3b71-5db4-4810-b981-ae3501bb843f": { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "reSize": 1, - "key": "761f3b71-5db4-4810-b981-ae3501bb843f", - "label": "mm.png", - "path": "mm.png", - "level": 2, - "actualSize": 36620, - "resolution": { - "height": 1024, - "width": 768 - }, - "width": 768, - "height": 1024 - }, - "66e11afc-413d-41ec-a15d-0228404f8345": { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "reSize": 1, - "key": "66e11afc-413d-41ec-a15d-0228404f8345", - "label": "xiurong.png", - "path": "xiurong.png", - "level": 2, - "actualSize": 49853, - "resolution": { - "height": 1024, - "width": 768 - }, - "width": 768, - "height": 1024 - }, - "0a86f618-478c-4e5e-8d9b-ff871cfe8da2": { - "type": "default", - "commandMap": {}, - "key": "0a86f618-478c-4e5e-8d9b-ff871cfe8da2", - "label": "xuemei.2023-12-20-09-29-48-220Z.bak", - "path": "xuemei.2023-12-20-09-29-48-220Z.bak", - "level": 2 - }, - "a7e1a25b-0f82-4fa5-b8fc-3470af63c9e2": { - "type": "default", - "commandMap": {}, - "key": "a7e1a25b-0f82-4fa5-b8fc-3470af63c9e2", - "label": "xuemei.2024-01-17-09-54-42-051Z.bak", - "path": "xuemei.2024-01-17-09-54-42-051Z.bak", - "level": 2 - }, - "4ef689ca-9816-4a69-8326-98bee98a5a98": { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "reSize": 1, - "key": "4ef689ca-9816-4a69-8326-98bee98a5a98", - "label": "yy.png", - "path": "yy.png", - "level": 2, - "actualSize": 87125, - "resolution": { - "height": 1024, - "width": 768 - }, - "width": 768, - "height": 1024, - "lastResize": 1, - "lastCompression": 0 - }, - "c0c46abf-b90c-4006-83f5-e623544a2055": { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "reSize": 1, - "key": "c0c46abf-b90c-4006-83f5-e623544a2055", - "label": "yylp.png", - "path": "yylp.png", - "level": 2, - "actualSize": 8630, - "resolution": { - "height": 1024, - "width": 768 - }, - "width": 768, - "height": 1024 - }, - "2443c3c8-4e24-461f-9e59-71242eaadd73": { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "reSize": 1, - "key": "2443c3c8-4e24-461f-9e59-71242eaadd73", - "label": "zc.png", - "path": "zc.png", - "level": 2, - "actualSize": 28670, - "resolution": { - "height": 1024, - "width": 768 - }, - "width": 768, - "height": 1024 - } - }, - "preset": {}, - "properties": { - "layout": { - "width": 720, - "height": 1280 - }, - "boundsTrackerPlaceHolders": [], - "musicIDs": [], - "fonts": [], - "movieConfig": { - "sourceType": 2, - "minClipAssetCount": 1, - "maxClipAssetCount": 999, - "minImageDuration": 1000000, - "maxImageDuration": 10000000, - "minVideoDuration": 2000000, - "minFreezePointInterval": 0, - "preferredCoverTime": 1000000, - "originVolume": 1, - "cropEvents": [ - "SlowRhythmTrail" - ], - "imageCropSpace": 0, - "videoCropSpace": -1, - "disableEventsWhileTransition": true, - "useInternalRhythm": true, - "headProtectDuration": 0 - }, - "materialConfigs": [], - "resourceIDs": [] - } -} \ No newline at end of file diff --git a/application/App-UIKit/makeupMotionRes.bundle/video_makeup_xuemei/template.png b/application/App-UIKit/makeupMotionRes.bundle/video_makeup_xuemei/template.png deleted file mode 100644 index 151049b2..00000000 Binary files a/application/App-UIKit/makeupMotionRes.bundle/video_makeup_xuemei/template.png and /dev/null differ diff --git a/application/App-UIKit/makeupMotionRes.bundle/video_makeup_xuemei/xiurong.png b/application/App-UIKit/makeupMotionRes.bundle/video_makeup_xuemei/xiurong.png deleted file mode 100644 index 646c9a18..00000000 Binary files a/application/App-UIKit/makeupMotionRes.bundle/video_makeup_xuemei/xiurong.png and /dev/null differ diff --git a/application/App-UIKit/makeupMotionRes.bundle/video_makeup_xuemei/xr.png b/application/App-UIKit/makeupMotionRes.bundle/video_makeup_xuemei/xr.png deleted file mode 100644 index 576b77e8..00000000 Binary files a/application/App-UIKit/makeupMotionRes.bundle/video_makeup_xuemei/xr.png and /dev/null differ diff --git a/application/App-UIKit/makeupMotionRes.bundle/video_makeup_xuemei/xuemei.2023-12-20-09-29-48-220Z.bak b/application/App-UIKit/makeupMotionRes.bundle/video_makeup_xuemei/xuemei.2023-12-20-09-29-48-220Z.bak deleted file mode 100644 index a5c68477..00000000 --- a/application/App-UIKit/makeupMotionRes.bundle/video_makeup_xuemei/xuemei.2023-12-20-09-29-48-220Z.bak +++ /dev/null @@ -1,1619 +0,0 @@ -{ - "name": "xuemei", - "author": "Administrator", - "category": 1, - "scene": { - "id": 16, - "name": "拍摄模板", - "children": [ - { - "id": 17, - "name": "2D画板", - "children": [ - { - "id": 18, - "name": "脸妆_腮红", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 18, - "componentID": 18001, - "level": 2 - }, - { - "componentID": 18002, - "enabled": true, - "entityId": 18, - "faceExchangeImageDisableFaceCrop": true, - "faceExchangeImageEnableOpacity": false, - "faceImage": "c852cc4b-6584-4754-a609-a05397b4582c", - "faceMask": "none", - "facePointsFile": "", - "facePointsOption": false, - "level": 2, - "makeupFaceVersion": "v6", - "maskImage": "", - "type": "MakeupFaceV6", - "version": 36, - "visMethod": 0 - }, - { - "alpha": 1, - "componentID": 18003, - "enabled": true, - "entityId": 18, - "mode": "multiply", - "type": "BlendMode", - "version": 2, - "level": 2 - }, - { - "alignPoints": [ - 64 - ], - "componentID": 18004, - "enabled": true, - "entityId": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "genderBinding": "", - "isAllFrameFaceDetect": false, - "isRefine": true, - "isWaitFirstFrameDetect": false, - "level": 2, - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "type": "FaceTracking", - "xAxisRotateTrack": true, - "xAxisScale": true, - "xAxisTrack": true, - "yAxisRotateTrack": true, - "yAxisScale": true, - "yAxisTrack": true, - "zAxisRotateTrack": true, - "version": 2 - } - ] - }, - { - "id": 216, - "name": "脸妆_修容", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 216, - "componentID": 216001, - "level": 2 - }, - { - "componentID": 216002, - "enabled": true, - "entityId": 216, - "faceExchangeImageDisableFaceCrop": true, - "faceExchangeImageEnableOpacity": false, - "faceImage": "66e11afc-413d-41ec-a15d-0228404f8345", - "faceMask": "none", - "facePointsFile": "", - "facePointsOption": false, - "level": 2, - "makeupFaceVersion": "v6", - "maskImage": "", - "type": "MakeupFaceV6", - "version": 12, - "visMethod": 0 - }, - { - "alpha": 1, - "componentID": 216003, - "enabled": true, - "entityId": 216, - "level": 2, - "mode": "softlight", - "type": "BlendMode", - "version": 275 - }, - { - "alignPoints": [ - 64 - ], - "componentID": 216004, - "enabled": true, - "entityId": 216, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "genderBinding": "", - "isAllFrameFaceDetect": false, - "isRefine": true, - "isWaitFirstFrameDetect": false, - "level": 2, - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "type": "FaceTracking", - "xAxisRotateTrack": true, - "xAxisScale": true, - "xAxisTrack": true, - "yAxisRotateTrack": true, - "yAxisScale": true, - "yAxisTrack": true, - "zAxisRotateTrack": true, - "version": 2 - } - ] - }, - { - "id": 27, - "name": "眉妆", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 27, - "componentID": 27001, - "level": 2 - }, - { - "componentID": 27002, - "cropRect": { - "bottom": 904, - "left": 368, - "right": 1176, - "top": 754 - }, - "enabled": true, - "entityId": 27, - "eyebrowCropImageName": "cropImage/mm_crop.png", - "eyebrowImageName": "bfeb1111-e79e-4039-9577-e07bf1d092fb", - "level": 2, - "minVisibility": 0, - "type": "MakeupEyebrowV6", - "version": 32, - "visMethod": 0 - }, - { - "alpha": 1, - "componentID": 27003, - "enabled": true, - "entityId": 27, - "level": 2, - "mode": "multiply", - "type": "BlendMode", - "version": 2 - }, - { - "alignPoints": [ - 64 - ], - "componentID": 27004, - "enabled": true, - "entityId": 27, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "genderBinding": "", - "isAllFrameFaceDetect": false, - "isRefine": true, - "isWaitFirstFrameDetect": false, - "level": 2, - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "type": "FaceTracking", - "xAxisRotateTrack": true, - "xAxisScale": true, - "xAxisTrack": true, - "yAxisRotateTrack": true, - "yAxisScale": true, - "yAxisTrack": true, - "zAxisRotateTrack": true, - "version": 2 - } - ] - }, - { - "id": 19, - "name": "眼妆", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "interactive": false, - "enabled": true, - "entityId": 19, - "componentID": 19001, - "level": 2 - }, - { - "componentID": 19002, - "cropRect": { - "bottom": 1008, - "left": 468, - "right": 1068, - "top": 842 - }, - "enabled": true, - "entityId": 19, - "extraFlag": 0, - "eyeCropImageName": "cropImage/jm_crop.png", - "eyeImageName": "f21075f0-65cc-4b53-88e2-aba94ba6dc04", - "eyeMeshOptType": 0, - "level": 2, - "minVisibility": 0, - "type": "MakeupEyeV6", - "version": 8, - "visMethod": 0 - }, - { - "alpha": 1, - "componentID": 19003, - "enabled": true, - "entityId": 19, - "level": 2, - "mode": "multiply", - "type": "BlendMode", - "version": 2 - }, - { - "alignPoints": [ - 64 - ], - "componentID": 19004, - "eAlignType": 64, - "enabled": true, - "entityId": 19, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "genderBinding": "", - "isAllFrameFaceDetect": false, - "isRefine": true, - "isWaitFirstFrameDetect": false, - "level": 2, - "maxTrackingNum": 5, - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "type": "FaceTracking", - "xAxisRotateTrack": true, - "xAxisScale": true, - "xAxisTrack": true, - "yAxisRotateTrack": true, - "yAxisScale": true, - "yAxisTrack": true, - "zAxisRotateTrack": true, - "zOffset": 0, - "version": 2 - } - ] - }, - { - "id": 187, - "name": "眼妆_高光", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 187, - "componentID": 187001, - "level": 2 - }, - { - "componentID": 187002, - "cropRect": { - "bottom": 1016, - "left": 570, - "right": 980, - "top": 932 - }, - "enabled": true, - "entityId": 187, - "eyeCropImageName": "cropImage/yylp_crop.png", - "eyeImageName": "c7222883-7df1-4d57-92b3-e825c8c7e794", - "level": 2, - "minVisibility": 0, - "type": "MakeupEyeV6", - "version": 17, - "visMethod": 0 - }, - { - "alpha": 0.85, - "componentID": 187003, - "enabled": true, - "entityId": 187, - "level": 2, - "mode": "screen", - "type": "BlendMode", - "version": 10 - }, - { - "alignPoints": [ - 64 - ], - "componentID": 187004, - "enabled": true, - "entityId": 187, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "genderBinding": "", - "isAllFrameFaceDetect": false, - "isRefine": true, - "isWaitFirstFrameDetect": false, - "level": 2, - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "type": "FaceTracking", - "xAxisRotateTrack": true, - "xAxisScale": true, - "xAxisTrack": true, - "yAxisRotateTrack": true, - "yAxisScale": true, - "yAxisTrack": true, - "zAxisRotateTrack": true, - "version": 2 - } - ] - }, - { - "id": 108, - "name": "眼妆_眼影", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 108, - "componentID": 108001, - "level": 2 - }, - { - "componentID": 108002, - "cropRect": { - "bottom": 1092, - "left": 328, - "right": 1214, - "top": 782 - }, - "enabled": true, - "entityId": 108, - "eyeCropImageName": "cropImage/yy_crop.png", - "eyeImageName": "e9851097-a0e5-4e65-9550-ecdbe42b6355", - "level": 2, - "minVisibility": 0, - "type": "MakeupEyeV6", - "version": 32, - "visMethod": 0 - }, - { - "alpha": 1, - "componentID": 108003, - "enabled": true, - "entityId": 108, - "mode": "multiply", - "type": "BlendMode", - "version": 2, - "level": 2 - }, - { - "alignPoints": [ - 64 - ], - "componentID": 108004, - "enabled": true, - "entityId": 108, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "genderBinding": "", - "isAllFrameFaceDetect": false, - "isRefine": true, - "isWaitFirstFrameDetect": false, - "level": 2, - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "type": "FaceTracking", - "xAxisRotateTrack": true, - "xAxisScale": true, - "xAxisTrack": true, - "yAxisRotateTrack": true, - "yAxisScale": true, - "yAxisTrack": true, - "zAxisRotateTrack": true, - "version": 2 - } - ] - }, - { - "id": 125, - "name": "美瞳", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 125, - "componentID": 125001, - "level": 2 - }, - { - "componentID": 125002, - "enablePreMultiply": false, - "enableRadiusScale": false, - "enabled": true, - "entityId": 125, - "irisImage": "eb8da683-8d33-4757-af24-f4b7f62fa422", - "level": 2, - "liquifyOffsetX": 0.2, - "liquifyOffsetY": 0.1, - "liquifyStrength": 0.2, - "maxRadiusFactor": 0.45, - "minVisibility": 0, - "radiusScale": 2, - "type": "MakeupIrisV6", - "version": 10, - "visMethod": 0 - }, - { - "alpha": 1, - "componentID": 125003, - "enabled": true, - "entityId": 125, - "level": 2, - "mode": "normal", - "type": "BlendMode", - "version": 67 - }, - { - "alignPoints": [ - 64 - ], - "componentID": 125004, - "enabled": true, - "entityId": 125, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "genderBinding": "", - "isAllFrameFaceDetect": false, - "isRefine": true, - "isWaitFirstFrameDetect": false, - "level": 2, - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "type": "FaceTracking", - "xAxisRotateTrack": true, - "xAxisScale": true, - "xAxisTrack": true, - "yAxisRotateTrack": true, - "yAxisScale": true, - "yAxisTrack": true, - "zAxisRotateTrack": true, - "version": 2 - } - ] - }, - { - "id": 166, - "name": "唇彩", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 166, - "componentID": 166001, - "level": 2 - }, - { - "closeMouseMask": "", - "componentID": 166002, - "enabled": true, - "entityId": 166, - "level": 2, - "lipsColor": "", - "lipsImage": "1fa85099-a615-4915-978f-58500ae94683", - "lipsImageCrop": "cropImage/zc_crop.png", - "lipsImageCropRect": { - "bottom": 1440, - "left": 590, - "right": 966, - "top": 1242 - }, - "lipsLut": "", - "lipsMask": "Default", - "lipsMaskCrop": "cropImage/default_mask_crop.png", - "lipsMaskCropRect": { - "bottom": 2048, - "left": 0, - "right": 1536, - "top": 0 - }, - "lipsMaskEnum": 0, - "lipsTextureType": "Default", - "lipsType": "Image", - "minVisibility": 0, - "openMouseMask": "", - "type": "MakeupLipsV6", - "version": 25, - "visMethod": 0 - }, - { - "alpha": 1, - "componentID": 166003, - "enabled": true, - "entityId": 166, - "level": 2, - "mode": "multiply", - "type": "BlendMode", - "version": 8 - }, - { - "alignPoints": [ - 64 - ], - "componentID": 166004, - "enabled": true, - "entityId": 166, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "genderBinding": "", - "isAllFrameFaceDetect": false, - "isRefine": true, - "isWaitFirstFrameDetect": false, - "level": 2, - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "type": "FaceTracking", - "xAxisRotateTrack": true, - "xAxisScale": true, - "xAxisTrack": true, - "yAxisRotateTrack": true, - "yAxisScale": true, - "yAxisTrack": true, - "zAxisRotateTrack": true, - "version": 2 - } - ] - }, - { - "id": 253, - "name": "滤镜", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 253, - "componentID": 253001, - "level": 2 - }, - { - "componentID": 253002, - "enabled": true, - "entityId": 253, - "intensity": 0.6, - "level": 1, - "src": "9cd97270-3f58-4bd4-a33a-9e111204a2ff", - "type": "LUTFilter", - "version": 217 - }, - { - "eAlignMode": 0, - "startOffset": 0, - "duration": 2000000, - "endOffset": 0, - "loopCount": 0, - "type": "TimeOffset", - "enabled": true, - "entityId": 253, - "componentID": 253003, - "version": 3, - "level": 1 - } - ] - } - ], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 0, - "x": 0, - "y": 0, - "z": 0 - }, - "entityId": 17, - "componentID": 17001, - "type": "ScreenTransform", - "enabled": true, - "version": 2, - "objectEnabled": true, - "level": 2 - }, - { - "componentID": 17002, - "enabled": true, - "entityId": 17, - "renderTargetKey": "RenderTarget", - "type": "Camera", - "version": 2, - "level": 2 - } - ] - } - ], - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 0, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 16, - "componentID": 16001, - "type": "ScreenTransform", - "enabled": true, - "version": 10, - "level": 2 - }, - { - "enableRotation": true, - "resetWhenStartRecord": true, - "type": "ExtraSetting", - "enabled": true, - "version": 1, - "entityId": 16, - "componentID": 16002, - "level": 4 - } - ], - "enabled": true, - "version": 0 - }, - "resources": { - "items": [ - { - "type": "folder", - "commandMap": {}, - "key": "7eca898b-cfd1-4ef4-8beb-5e4515827529", - "label": "root", - "path": "./", - "level": 2 - }, - { - "type": "default", - "commandMap": {}, - "key": "655900a5-467e-4c49-8236-0a6760d71330", - "label": "_DS_Store", - "path": "_DS_Store", - "level": 2 - }, - { - "type": "folder", - "commandMap": {}, - "key": "3661eacd-cb02-411c-85ba-52a87aeeda2c", - "label": "cropImage", - "path": "cropImage", - "level": 2 - }, - { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "key": "3f633bfd-b1a4-4090-b97c-4681bb61081b", - "label": "default_mask_crop.png", - "path": "cropImage/default_mask_crop.png", - "level": 2, - "actualSize": 2727, - "resolution": { - "height": 511, - "width": 383 - }, - "width": 383, - "height": 511 - }, - { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "key": "f21075f0-65cc-4b53-88e2-aba94ba6dc04", - "label": "jm_crop.png", - "path": "cropImage/jm_crop.png", - "level": 2, - "actualSize": 11784, - "resolution": { - "height": 83, - "width": 300 - }, - "width": 300, - "height": 83 - }, - { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "key": "bfeb1111-e79e-4039-9577-e07bf1d092fb", - "label": "mm_crop.png", - "path": "cropImage/mm_crop.png", - "level": 2, - "actualSize": 26563, - "resolution": { - "height": 75, - "width": 404 - }, - "width": 404, - "height": 75 - }, - { - "type": "ImageData", - "commandMap": {}, - "key": "e9851097-a0e5-4e65-9550-ecdbe42b6355", - "label": "yy_crop.png", - "path": "cropImage/yy_crop.png", - "level": 2, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "actualSize": 75120, - "resolution": { - "height": 155, - "width": 443 - }, - "width": 443, - "height": 155 - }, - { - "type": "ImageData", - "commandMap": {}, - "key": "c7222883-7df1-4d57-92b3-e825c8c7e794", - "label": "yylp_crop.png", - "path": "cropImage/yylp_crop.png", - "level": 2, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "actualSize": 2794, - "resolution": { - "height": 42, - "width": 205 - }, - "width": 205, - "height": 42 - }, - { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "key": "1fa85099-a615-4915-978f-58500ae94683", - "label": "zc_crop.png", - "path": "cropImage/zc_crop.png", - "level": 2, - "actualSize": 17628, - "resolution": { - "height": 99, - "width": 188 - }, - "width": 188, - "height": 99 - }, - { - "type": "TextureData", - "commandMap": {}, - "key": "DeviceCameraTexture", - "path": "DeviceCameraTexture.tex", - "label": "DeviceCameraTexture.tex", - "level": 2 - }, - { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "key": "9cd97270-3f58-4bd4-a33a-9e111204a2ff", - "label": "fenbai.png", - "path": "fenbai.png", - "level": 2, - "actualSize": 3007, - "resolution": { - "height": 512, - "width": 512 - }, - "width": 512, - "height": 512 - }, - { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "key": "a122649d-dc2f-425a-b278-4b6312e7338e", - "label": "jm.png", - "path": "jm.png", - "level": 2, - "actualSize": 20788, - "resolution": { - "height": 1024, - "width": 768 - }, - "width": 768, - "height": 1024 - }, - { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "key": "761f3b71-5db4-4810-b981-ae3501bb843f", - "label": "mm.png", - "path": "mm.png", - "level": 2, - "actualSize": 36620, - "resolution": { - "height": 1024, - "width": 768 - }, - "width": 768, - "height": 1024 - }, - { - "type": "RenderTarget", - "commandMap": {}, - "inputColor": "#ffffffff", - "sizeType": 0, - "compatibilityMode": true, - "depthType": "DEPTH24", - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "NEAREST", - "minFilter": "NEAREST", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "width": 0, - "height": 0, - "key": "RenderTarget", - "path": "RenderTarget.rdt", - "label": "RenderTarget.rdt", - "inputKey": "DeviceCameraTexture", - "input": "DeviceCameraTexture", - "level": 2 - }, - { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "key": "c852cc4b-6584-4754-a609-a05397b4582c", - "label": "sh.png", - "path": "sh.png", - "level": 2, - "actualSize": 215028, - "resolution": { - "height": 1024, - "width": 768 - }, - "width": 768, - "height": 1024 - }, - { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "key": "66e11afc-413d-41ec-a15d-0228404f8345", - "label": "xiurong.png", - "path": "xiurong.png", - "level": 2, - "actualSize": 49853, - "resolution": { - "height": 1024, - "width": 768 - }, - "width": 768, - "height": 1024 - }, - { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "key": "eb8da683-8d33-4757-af24-f4b7f62fa422", - "label": "xmmt.png", - "path": "xmmt.png", - "level": 2, - "actualSize": 10509, - "resolution": { - "height": 125, - "width": 125 - }, - "width": 125, - "height": 125 - }, - { - "type": "ImageData", - "commandMap": {}, - "key": "cc77aafd-fd5d-4f8e-853a-c48479237a67", - "label": "yy.png", - "path": "yy.png", - "level": 2, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "actualSize": 86187, - "resolution": { - "height": 1024, - "width": 768 - }, - "width": 768, - "height": 1024 - }, - { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "key": "c0c46abf-b90c-4006-83f5-e623544a2055", - "label": "yylp.png", - "path": "yylp.png", - "level": 2, - "actualSize": 8630, - "resolution": { - "height": 1024, - "width": 768 - }, - "width": 768, - "height": 1024 - }, - { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "key": "2443c3c8-4e24-461f-9e59-71242eaadd73", - "label": "zc.png", - "path": "zc.png", - "level": 2, - "actualSize": 28670, - "resolution": { - "height": 1024, - "width": 768 - }, - "width": 768, - "height": 1024 - } - ] - }, - "cloudResourceData": [], - "componentLevel": 4, - "creationTime": "2023-12-11 10:36:10", - "updateTime": "2023-12-20 15:40:53", - "path": "C:/Users/herzhan/Desktop/8个美妆韩雨欣/xuemei/" -} \ No newline at end of file diff --git a/application/App-UIKit/makeupMotionRes.bundle/video_makeup_xuemei/xuemei.2024-01-17-09-54-42-051Z.bak b/application/App-UIKit/makeupMotionRes.bundle/video_makeup_xuemei/xuemei.2024-01-17-09-54-42-051Z.bak deleted file mode 100644 index dceb3159..00000000 --- a/application/App-UIKit/makeupMotionRes.bundle/video_makeup_xuemei/xuemei.2024-01-17-09-54-42-051Z.bak +++ /dev/null @@ -1,1627 +0,0 @@ -{ - "name": "xuemei", - "author": "Administrator", - "category": 1, - "scene": { - "id": 16, - "name": "拍摄模板", - "children": [ - { - "id": 17, - "name": "2D画板", - "children": [ - { - "id": 18, - "name": "脸妆_腮红", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 18, - "componentID": 18001, - "level": 2 - }, - { - "componentID": 18002, - "enabled": true, - "entityId": 18, - "faceExchangeImageDisableFaceCrop": true, - "faceExchangeImageEnableOpacity": false, - "faceImage": "c852cc4b-6584-4754-a609-a05397b4582c", - "faceMask": "none", - "facePointsFile": "", - "facePointsOption": false, - "level": 2, - "makeupFaceVersion": "v6", - "maskImage": "", - "type": "MakeupFaceV6", - "version": 36, - "visMethod": 0 - }, - { - "alpha": 1, - "componentID": 18003, - "enabled": true, - "entityId": 18, - "level": 2, - "mode": "multiply", - "type": "BlendMode", - "version": 42 - }, - { - "alignPoints": [ - 64 - ], - "componentID": 18004, - "enabled": true, - "entityId": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "genderBinding": "", - "isAllFrameFaceDetect": false, - "isRefine": true, - "isWaitFirstFrameDetect": false, - "level": 2, - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "type": "FaceTracking", - "xAxisRotateTrack": true, - "xAxisScale": true, - "xAxisTrack": true, - "yAxisRotateTrack": true, - "yAxisScale": true, - "yAxisTrack": true, - "zAxisRotateTrack": true, - "version": 2 - } - ] - }, - { - "id": 216, - "name": "脸妆_修容", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 216, - "componentID": 216001, - "level": 2 - }, - { - "componentID": 216002, - "enabled": true, - "entityId": 216, - "faceExchangeImageDisableFaceCrop": true, - "faceExchangeImageEnableOpacity": false, - "faceImage": "66e11afc-413d-41ec-a15d-0228404f8345", - "faceMask": "none", - "facePointsFile": "", - "facePointsOption": false, - "level": 2, - "makeupFaceVersion": "v6", - "maskImage": "", - "type": "MakeupFaceV6", - "version": 12, - "visMethod": 0 - }, - { - "alpha": 1, - "componentID": 216003, - "enabled": true, - "entityId": 216, - "level": 2, - "mode": "softlight", - "type": "BlendMode", - "version": 275 - }, - { - "alignPoints": [ - 64 - ], - "componentID": 216004, - "enabled": true, - "entityId": 216, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "genderBinding": "", - "isAllFrameFaceDetect": false, - "isRefine": true, - "isWaitFirstFrameDetect": false, - "level": 2, - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "type": "FaceTracking", - "xAxisRotateTrack": true, - "xAxisScale": true, - "xAxisTrack": true, - "yAxisRotateTrack": true, - "yAxisScale": true, - "yAxisTrack": true, - "zAxisRotateTrack": true, - "version": 2 - } - ] - }, - { - "id": 27, - "name": "眉妆", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 27, - "componentID": 27001, - "level": 2 - }, - { - "componentID": 27002, - "cropRect": { - "bottom": 904, - "left": 368, - "right": 1176, - "top": 754 - }, - "enabled": true, - "entityId": 27, - "eyebrowCropImageName": "cropImage/mm_crop.png", - "eyebrowImageName": "bfeb1111-e79e-4039-9577-e07bf1d092fb", - "level": 2, - "minVisibility": 0, - "type": "MakeupEyebrowV6", - "version": 32, - "visMethod": 0 - }, - { - "alpha": 0.9, - "componentID": 27003, - "enabled": true, - "entityId": 27, - "level": 2, - "mode": "multiply", - "type": "BlendMode", - "version": 4 - }, - { - "alignPoints": [ - 64 - ], - "componentID": 27004, - "enabled": true, - "entityId": 27, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "genderBinding": "", - "isAllFrameFaceDetect": false, - "isRefine": true, - "isWaitFirstFrameDetect": false, - "level": 2, - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "type": "FaceTracking", - "xAxisRotateTrack": true, - "xAxisScale": true, - "xAxisTrack": true, - "yAxisRotateTrack": true, - "yAxisScale": true, - "yAxisTrack": true, - "zAxisRotateTrack": true, - "version": 2 - } - ] - }, - { - "id": 19, - "name": "眼妆", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "interactive": false, - "enabled": true, - "entityId": 19, - "componentID": 19001, - "level": 2 - }, - { - "componentID": 19002, - "cropRect": { - "bottom": 1010, - "left": 468, - "right": 1068, - "top": 842 - }, - "enabled": true, - "entityId": 19, - "extraFlag": 0, - "eyeCropImageName": "cropImage/jm2_crop.png", - "eyeImageName": "2d0bea07-35d8-4a32-9b83-080b23d3a37e", - "eyeMeshOptType": 0, - "level": 2, - "minVisibility": 0, - "type": "MakeupEyeV6", - "version": 11, - "visMethod": 0 - }, - { - "alpha": 0.9, - "componentID": 19003, - "enabled": true, - "entityId": 19, - "level": 2, - "mode": "multiply", - "type": "BlendMode", - "version": 4 - }, - { - "alignPoints": [ - 64 - ], - "componentID": 19004, - "eAlignType": 64, - "enabled": true, - "entityId": 19, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "genderBinding": "", - "isAllFrameFaceDetect": false, - "isRefine": true, - "isWaitFirstFrameDetect": false, - "level": 2, - "maxTrackingNum": 5, - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "type": "FaceTracking", - "xAxisRotateTrack": true, - "xAxisScale": true, - "xAxisTrack": true, - "yAxisRotateTrack": true, - "yAxisScale": true, - "yAxisTrack": true, - "zAxisRotateTrack": true, - "zOffset": 0, - "version": 2 - } - ] - }, - { - "id": 187, - "name": "眼妆_高光", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 187, - "componentID": 187001, - "level": 2 - }, - { - "componentID": 187002, - "cropRect": { - "bottom": 1016, - "left": 570, - "right": 980, - "top": 932 - }, - "enabled": true, - "entityId": 187, - "eyeCropImageName": "cropImage/yylp_crop.png", - "eyeImageName": "c7222883-7df1-4d57-92b3-e825c8c7e794", - "level": 2, - "minVisibility": 0, - "type": "MakeupEyeV6", - "version": 17, - "visMethod": 0 - }, - { - "alpha": 0.3, - "componentID": 187003, - "enabled": true, - "entityId": 187, - "level": 2, - "mode": "screen", - "type": "BlendMode", - "version": 301 - }, - { - "alignPoints": [ - 64 - ], - "componentID": 187004, - "enabled": true, - "entityId": 187, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "genderBinding": "", - "isAllFrameFaceDetect": false, - "isRefine": true, - "isWaitFirstFrameDetect": false, - "level": 2, - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "type": "FaceTracking", - "xAxisRotateTrack": true, - "xAxisScale": true, - "xAxisTrack": true, - "yAxisRotateTrack": true, - "yAxisScale": true, - "yAxisTrack": true, - "zAxisRotateTrack": true, - "version": 2 - } - ] - }, - { - "id": 108, - "name": "眼妆_眼影", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 108, - "componentID": 108001, - "level": 2 - }, - { - "componentID": 108002, - "cropRect": { - "bottom": 1092, - "left": 328, - "right": 1214, - "top": 782 - }, - "enabled": true, - "entityId": 108, - "eyeCropImageName": "cropImage/yy_crop.png", - "eyeImageName": "7df8cd66-4dd1-4591-9173-f1aafb4eab81", - "level": 2, - "minVisibility": 0, - "type": "MakeupEyeV6", - "version": 54, - "visMethod": 0 - }, - { - "alpha": 0.8, - "componentID": 108003, - "enabled": true, - "entityId": 108, - "level": 2, - "mode": "multiply", - "type": "BlendMode", - "version": 4 - }, - { - "alignPoints": [ - 64 - ], - "componentID": 108004, - "enabled": true, - "entityId": 108, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "genderBinding": "", - "isAllFrameFaceDetect": false, - "isRefine": true, - "isWaitFirstFrameDetect": false, - "level": 2, - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "type": "FaceTracking", - "xAxisRotateTrack": true, - "xAxisScale": true, - "xAxisTrack": true, - "yAxisRotateTrack": true, - "yAxisScale": true, - "yAxisTrack": true, - "zAxisRotateTrack": true, - "version": 2 - } - ] - }, - { - "id": 125, - "name": "美瞳", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 125, - "componentID": 125001, - "level": 2 - }, - { - "componentID": 125002, - "enablePreMultiply": false, - "enableRadiusScale": false, - "enabled": true, - "entityId": 125, - "irisImage": "eb8da683-8d33-4757-af24-f4b7f62fa422", - "level": 2, - "liquifyOffsetX": 0.2, - "liquifyOffsetY": 0.1, - "liquifyStrength": 0.2, - "maxRadiusFactor": 0.45, - "minVisibility": 0, - "radiusScale": 2, - "type": "MakeupIrisV6", - "version": 10, - "visMethod": 0 - }, - { - "alpha": 0.3, - "componentID": 125003, - "enabled": true, - "entityId": 125, - "level": 2, - "mode": "multiply", - "type": "BlendMode", - "version": 234 - }, - { - "alignPoints": [ - 64 - ], - "componentID": 125004, - "enabled": true, - "entityId": 125, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "genderBinding": "", - "isAllFrameFaceDetect": false, - "isRefine": true, - "isWaitFirstFrameDetect": false, - "level": 2, - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "type": "FaceTracking", - "xAxisRotateTrack": true, - "xAxisScale": true, - "xAxisTrack": true, - "yAxisRotateTrack": true, - "yAxisScale": true, - "yAxisTrack": true, - "zAxisRotateTrack": true, - "version": 2 - } - ] - }, - { - "id": 166, - "name": "唇彩", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 166, - "componentID": 166001, - "level": 2 - }, - { - "closeMouseMask": "", - "componentID": 166002, - "enabled": true, - "entityId": 166, - "level": 2, - "lipsColor": "", - "lipsImage": "1fa85099-a615-4915-978f-58500ae94683", - "lipsImageCrop": "cropImage/zc_crop.png", - "lipsImageCropRect": { - "bottom": 1440, - "left": 590, - "right": 966, - "top": 1242 - }, - "lipsLut": "", - "lipsMask": "Default", - "lipsMaskCrop": "cropImage/default_mask_crop.png", - "lipsMaskCropRect": { - "bottom": 2048, - "left": 0, - "right": 1536, - "top": 0 - }, - "lipsMaskEnum": 0, - "lipsTextureType": "Default", - "lipsType": "Image", - "minVisibility": 0, - "openMouseMask": "", - "type": "MakeupLipsV6", - "version": 25, - "visMethod": 0 - }, - { - "alpha": 0.9, - "componentID": 166003, - "enabled": true, - "entityId": 166, - "level": 2, - "mode": "multiply", - "type": "BlendMode", - "version": 10 - }, - { - "alignPoints": [ - 64 - ], - "componentID": 166004, - "enabled": true, - "entityId": 166, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "genderBinding": "", - "isAllFrameFaceDetect": false, - "isRefine": true, - "isWaitFirstFrameDetect": false, - "level": 2, - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "type": "FaceTracking", - "xAxisRotateTrack": true, - "xAxisScale": true, - "xAxisTrack": true, - "yAxisRotateTrack": true, - "yAxisScale": true, - "yAxisTrack": true, - "zAxisRotateTrack": true, - "version": 2 - } - ] - }, - { - "id": 253, - "name": "滤镜", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 253, - "componentID": 253001, - "level": 2 - }, - { - "componentID": 253002, - "enabled": true, - "entityId": 253, - "intensity": 0.7, - "level": 1, - "src": "9cd97270-3f58-4bd4-a33a-9e111204a2ff", - "type": "LUTFilter", - "version": 225 - }, - { - "eAlignMode": 0, - "startOffset": 0, - "duration": 2000000, - "endOffset": 0, - "loopCount": 0, - "type": "TimeOffset", - "enabled": true, - "entityId": 253, - "componentID": 253003, - "version": 5, - "level": 1 - } - ] - } - ], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 0, - "x": 0, - "y": 0, - "z": 0 - }, - "entityId": 17, - "componentID": 17001, - "type": "ScreenTransform", - "enabled": true, - "version": 2, - "objectEnabled": true, - "level": 2 - }, - { - "componentID": 17002, - "enabled": true, - "entityId": 17, - "renderTargetKey": "RenderTarget", - "type": "Camera", - "version": 2, - "level": 2 - } - ] - } - ], - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 0, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 16, - "componentID": 16001, - "type": "ScreenTransform", - "enabled": true, - "version": 10, - "level": 2 - }, - { - "enableRotation": true, - "resetWhenStartRecord": true, - "type": "ExtraSetting", - "enabled": true, - "version": 1, - "entityId": 16, - "componentID": 16002, - "level": 4 - } - ], - "enabled": true, - "version": 0 - }, - "resources": { - "items": [ - { - "type": "folder", - "commandMap": {}, - "key": "7eca898b-cfd1-4ef4-8beb-5e4515827529", - "label": "root", - "path": "./", - "level": 2 - }, - { - "type": "default", - "commandMap": {}, - "key": "655900a5-467e-4c49-8236-0a6760d71330", - "label": "_DS_Store", - "path": "_DS_Store", - "level": 2 - }, - { - "type": "default", - "commandMap": {}, - "key": "0af15db4-d1ca-43a2-891b-7e075f8bf766", - "label": "_DS_Store", - "path": "_DS_Store", - "level": 2 - }, - { - "type": "folder", - "commandMap": {}, - "key": "3661eacd-cb02-411c-85ba-52a87aeeda2c", - "label": "cropImage", - "path": "cropImage", - "level": 2 - }, - { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "reSize": 1, - "key": "3f633bfd-b1a4-4090-b97c-4681bb61081b", - "label": "default_mask_crop.png", - "path": "cropImage/default_mask_crop.png", - "level": 2, - "actualSize": 2727, - "resolution": { - "height": 511, - "width": 383 - }, - "width": 383, - "height": 511 - }, - { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "reSize": 1, - "key": "2d0bea07-35d8-4a32-9b83-080b23d3a37e", - "label": "jm2_crop.png", - "path": "cropImage/jm2_crop.png", - "level": 2, - "actualSize": 13411, - "resolution": { - "height": 84, - "width": 300 - }, - "width": 300, - "height": 84 - }, - { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "reSize": 1, - "key": "bfeb1111-e79e-4039-9577-e07bf1d092fb", - "label": "mm_crop.png", - "path": "cropImage/mm_crop.png", - "level": 2, - "actualSize": 26563, - "resolution": { - "height": 75, - "width": 404 - }, - "width": 404, - "height": 75 - }, - { - "type": "ImageData", - "commandMap": {}, - "key": "7df8cd66-4dd1-4591-9173-f1aafb4eab81", - "label": "yy_crop.png", - "path": "cropImage/yy_crop.png", - "level": 2, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "actualSize": 75809, - "resolution": { - "height": 155, - "width": 443 - }, - "width": 443, - "height": 155 - }, - { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "reSize": 1, - "key": "c7222883-7df1-4d57-92b3-e825c8c7e794", - "label": "yylp_crop.png", - "path": "cropImage/yylp_crop.png", - "level": 2, - "actualSize": 2794, - "resolution": { - "height": 42, - "width": 205 - }, - "width": 205, - "height": 42 - }, - { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "reSize": 1, - "key": "1fa85099-a615-4915-978f-58500ae94683", - "label": "zc_crop.png", - "path": "cropImage/zc_crop.png", - "level": 2, - "actualSize": 17628, - "resolution": { - "height": 99, - "width": 188 - }, - "width": 188, - "height": 99 - }, - { - "type": "TextureData", - "commandMap": {}, - "key": "DeviceCameraTexture", - "path": "DeviceCameraTexture.tex", - "label": "DeviceCameraTexture.tex", - "level": 2 - }, - { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "reSize": 1, - "key": "9cd97270-3f58-4bd4-a33a-9e111204a2ff", - "label": "fenbai.png", - "path": "fenbai.png", - "level": 2, - "actualSize": 3007, - "resolution": { - "height": 512, - "width": 512 - }, - "width": 512, - "height": 512 - }, - { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "reSize": 1, - "key": "ead8d177-5c88-4881-b982-8d1632f0ecb2", - "label": "jm2.png", - "path": "jm2.png", - "level": 2, - "actualSize": 21940, - "resolution": { - "height": 1024, - "width": 768 - }, - "width": 768, - "height": 1024 - }, - { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "reSize": 1, - "key": "761f3b71-5db4-4810-b981-ae3501bb843f", - "label": "mm.png", - "path": "mm.png", - "level": 2, - "actualSize": 36620, - "resolution": { - "height": 1024, - "width": 768 - }, - "width": 768, - "height": 1024 - }, - { - "type": "RenderTarget", - "commandMap": {}, - "inputColor": "#ffffffff", - "sizeType": 0, - "compatibilityMode": true, - "depthType": "DEPTH24", - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "NEAREST", - "minFilter": "NEAREST", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "useForDisplay": false, - "width": 0, - "height": 0, - "key": "RenderTarget", - "path": "RenderTarget.rdt", - "label": "RenderTarget.rdt", - "inputKey": "DeviceCameraTexture", - "input": "DeviceCameraTexture", - "level": 2 - }, - { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "reSize": 1, - "key": "c852cc4b-6584-4754-a609-a05397b4582c", - "label": "sh.png", - "path": "sh.png", - "level": 2, - "actualSize": 215028, - "resolution": { - "height": 1024, - "width": 768 - }, - "width": 768, - "height": 1024 - }, - { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "reSize": 1, - "key": "66e11afc-413d-41ec-a15d-0228404f8345", - "label": "xiurong.png", - "path": "xiurong.png", - "level": 2, - "actualSize": 49853, - "resolution": { - "height": 1024, - "width": 768 - }, - "width": 768, - "height": 1024 - }, - { - "type": "default", - "commandMap": {}, - "key": "0a86f618-478c-4e5e-8d9b-ff871cfe8da2", - "label": "xuemei.2023-12-20-09-29-48-220Z.bak", - "path": "xuemei.2023-12-20-09-29-48-220Z.bak", - "level": 2 - }, - { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "reSize": 1, - "key": "4ef689ca-9816-4a69-8326-98bee98a5a98", - "label": "yy.png", - "path": "yy.png", - "level": 2, - "actualSize": 86409, - "resolution": { - "height": 1024, - "width": 768 - }, - "width": 768, - "height": 1024, - "lastResize": 1, - "lastCompression": 0 - }, - { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "reSize": 1, - "key": "c0c46abf-b90c-4006-83f5-e623544a2055", - "label": "yylp.png", - "path": "yylp.png", - "level": 2, - "actualSize": 8630, - "resolution": { - "height": 1024, - "width": 768 - }, - "width": 768, - "height": 1024 - }, - { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "reSize": 1, - "key": "2443c3c8-4e24-461f-9e59-71242eaadd73", - "label": "zc.png", - "path": "zc.png", - "level": 2, - "actualSize": 28670, - "resolution": { - "height": 1024, - "width": 768 - }, - "width": 768, - "height": 1024 - } - ] - }, - "cloudResourceData": [], - "componentLevel": 4, - "creationTime": "2023-12-11 10:36:10", - "updateTime": "2024-01-12 17:26:27", - "path": "C:/Users/herzhan/Desktop/1.12更新/video_xuemei/", - "downloadMusicList": [] -} \ No newline at end of file diff --git a/application/App-UIKit/makeupMotionRes.bundle/video_makeup_xuemei/xuemei.studio b/application/App-UIKit/makeupMotionRes.bundle/video_makeup_xuemei/xuemei.studio deleted file mode 100644 index c9b1dfba..00000000 --- a/application/App-UIKit/makeupMotionRes.bundle/video_makeup_xuemei/xuemei.studio +++ /dev/null @@ -1,1677 +0,0 @@ -{ - "name": "xuemei", - "author": "Administrator", - "category": 1, - "scene": { - "id": 16, - "name": "拍摄模板", - "children": [ - { - "id": 17, - "name": "2D画板", - "children": [ - { - "id": 18, - "name": "脸妆_腮红", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 18, - "componentID": 18001, - "level": 2 - }, - { - "componentID": 18002, - "enabled": true, - "entityId": 18, - "faceExchangeImageDisableFaceCrop": true, - "faceExchangeImageEnableOpacity": false, - "faceImage": "c852cc4b-6584-4754-a609-a05397b4582c", - "faceMask": "none", - "facePointsFile": "", - "facePointsOption": false, - "level": 2, - "makeupFaceVersion": "v6", - "maskImage": "", - "type": "MakeupFaceV6", - "version": 36, - "visMethod": 0 - }, - { - "alpha": 1, - "componentID": 18003, - "enabled": true, - "entityId": 18, - "level": 2, - "mode": "multiply", - "type": "BlendMode", - "version": 42 - }, - { - "alignPoints": [ - 64 - ], - "componentID": 18004, - "enabled": true, - "entityId": 18, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "genderBinding": "", - "isAllFrameFaceDetect": false, - "isRefine": true, - "isWaitFirstFrameDetect": false, - "level": 2, - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "type": "FaceTracking", - "xAxisRotateTrack": true, - "xAxisScale": true, - "xAxisTrack": true, - "yAxisRotateTrack": true, - "yAxisScale": true, - "yAxisTrack": true, - "zAxisRotateTrack": true, - "version": 2 - } - ] - }, - { - "id": 216, - "name": "脸妆_修容", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 216, - "componentID": 216001, - "level": 2 - }, - { - "componentID": 216002, - "enabled": true, - "entityId": 216, - "faceExchangeImageDisableFaceCrop": true, - "faceExchangeImageEnableOpacity": false, - "faceImage": "5d626ce5-4308-4fa1-ab00-ed780b3f29fc", - "faceMask": "none", - "facePointsFile": "", - "facePointsOption": false, - "level": 2, - "makeupFaceVersion": "v6", - "maskImage": "", - "type": "MakeupFaceV6", - "version": 20, - "visMethod": 0 - }, - { - "alpha": 0.7, - "componentID": 216003, - "enabled": true, - "entityId": 216, - "level": 2, - "mode": "softlight", - "type": "BlendMode", - "version": 281 - }, - { - "alignPoints": [ - 64 - ], - "componentID": 216004, - "enabled": true, - "entityId": 216, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "genderBinding": "", - "isAllFrameFaceDetect": false, - "isRefine": true, - "isWaitFirstFrameDetect": false, - "level": 2, - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "type": "FaceTracking", - "xAxisRotateTrack": true, - "xAxisScale": true, - "xAxisTrack": true, - "yAxisRotateTrack": true, - "yAxisScale": true, - "yAxisTrack": true, - "zAxisRotateTrack": true, - "version": 2 - } - ] - }, - { - "id": 27, - "name": "眉妆", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 27, - "componentID": 27001, - "level": 2 - }, - { - "componentID": 27002, - "cropRect": { - "bottom": 904, - "left": 368, - "right": 1176, - "top": 754 - }, - "enabled": true, - "entityId": 27, - "eyebrowCropImageName": "cropImage/mm_crop.png", - "eyebrowImageName": "bfeb1111-e79e-4039-9577-e07bf1d092fb", - "level": 2, - "minVisibility": 0, - "type": "MakeupEyebrowV6", - "version": 32, - "visMethod": 0 - }, - { - "alpha": 0.9, - "componentID": 27003, - "enabled": true, - "entityId": 27, - "level": 2, - "mode": "multiply", - "type": "BlendMode", - "version": 4 - }, - { - "alignPoints": [ - 64 - ], - "componentID": 27004, - "enabled": true, - "entityId": 27, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "genderBinding": "", - "isAllFrameFaceDetect": false, - "isRefine": true, - "isWaitFirstFrameDetect": false, - "level": 2, - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "type": "FaceTracking", - "xAxisRotateTrack": true, - "xAxisScale": true, - "xAxisTrack": true, - "yAxisRotateTrack": true, - "yAxisScale": true, - "yAxisTrack": true, - "zAxisRotateTrack": true, - "version": 2 - } - ] - }, - { - "id": 19, - "name": "眼妆", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "interactive": false, - "enabled": true, - "entityId": 19, - "componentID": 19001, - "level": 2 - }, - { - "componentID": 19002, - "cropRect": { - "bottom": 1010, - "left": 468, - "right": 1068, - "top": 842 - }, - "enabled": true, - "entityId": 19, - "extraFlag": 0, - "eyeCropImageName": "cropImage/jm2_crop.png", - "eyeImageName": "2d0bea07-35d8-4a32-9b83-080b23d3a37e", - "eyeMeshOptType": 0, - "level": 2, - "minVisibility": 0, - "type": "MakeupEyeV6", - "version": 11, - "visMethod": 0 - }, - { - "alpha": 0.9, - "componentID": 19003, - "enabled": true, - "entityId": 19, - "level": 2, - "mode": "multiply", - "type": "BlendMode", - "version": 4 - }, - { - "alignPoints": [ - 64 - ], - "componentID": 19004, - "eAlignType": 64, - "enabled": true, - "entityId": 19, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "genderBinding": "", - "isAllFrameFaceDetect": false, - "isRefine": true, - "isWaitFirstFrameDetect": false, - "level": 2, - "maxTrackingNum": 5, - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "type": "FaceTracking", - "xAxisRotateTrack": true, - "xAxisScale": true, - "xAxisTrack": true, - "yAxisRotateTrack": true, - "yAxisScale": true, - "yAxisTrack": true, - "zAxisRotateTrack": true, - "zOffset": 0, - "version": 2 - } - ] - }, - { - "id": 187, - "name": "眼妆_高光", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 187, - "componentID": 187001, - "level": 2 - }, - { - "componentID": 187002, - "cropRect": { - "bottom": 1120, - "left": 518, - "right": 1024, - "top": 832 - }, - "enabled": true, - "entityId": 187, - "eyeCropImageName": "cropImage/dzyylp_crop.png", - "eyeImageName": "ef6f38e0-1d6b-4433-9ab5-6a645d6550d8", - "level": 2, - "minVisibility": 0, - "type": "MakeupEyeV6", - "version": 37, - "visMethod": 0 - }, - { - "alpha": 1, - "componentID": 187003, - "enabled": true, - "entityId": 187, - "level": 2, - "mode": "screen", - "type": "BlendMode", - "version": 764 - }, - { - "alignPoints": [ - 64 - ], - "componentID": 187004, - "enabled": true, - "entityId": 187, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "genderBinding": "", - "isAllFrameFaceDetect": false, - "isRefine": true, - "isWaitFirstFrameDetect": false, - "level": 2, - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "type": "FaceTracking", - "xAxisRotateTrack": true, - "xAxisScale": true, - "xAxisTrack": true, - "yAxisRotateTrack": true, - "yAxisScale": true, - "yAxisTrack": true, - "zAxisRotateTrack": true, - "version": 2 - } - ] - }, - { - "id": 108, - "name": "眼妆_眼影", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 108, - "componentID": 108001, - "level": 2 - }, - { - "componentID": 108002, - "cropRect": { - "bottom": 1092, - "left": 328, - "right": 1214, - "top": 782 - }, - "enabled": true, - "entityId": 108, - "eyeCropImageName": "cropImage/yy_crop.png", - "eyeImageName": "7df8cd66-4dd1-4591-9173-f1aafb4eab81", - "level": 2, - "minVisibility": 0, - "type": "MakeupEyeV6", - "version": 54, - "visMethod": 0 - }, - { - "alpha": 0.8, - "componentID": 108003, - "enabled": true, - "entityId": 108, - "level": 2, - "mode": "multiply", - "type": "BlendMode", - "version": 4 - }, - { - "alignPoints": [ - 64 - ], - "componentID": 108004, - "enabled": true, - "entityId": 108, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "genderBinding": "", - "isAllFrameFaceDetect": false, - "isRefine": true, - "isWaitFirstFrameDetect": false, - "level": 2, - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "type": "FaceTracking", - "xAxisRotateTrack": true, - "xAxisScale": true, - "xAxisTrack": true, - "yAxisRotateTrack": true, - "yAxisScale": true, - "yAxisTrack": true, - "zAxisRotateTrack": true, - "version": 2 - } - ] - }, - { - "id": 125, - "name": "美瞳", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 125, - "componentID": 125001, - "level": 2 - }, - { - "componentID": 125002, - "enablePreMultiply": false, - "enableRadiusScale": false, - "enabled": true, - "entityId": 125, - "irisImage": "eb8da683-8d33-4757-af24-f4b7f62fa422", - "level": 2, - "liquifyOffsetX": 0.2, - "liquifyOffsetY": 0.1, - "liquifyStrength": 0.2, - "maxRadiusFactor": 0.45, - "minVisibility": 0, - "radiusScale": 2, - "type": "MakeupIrisV6", - "version": 10, - "visMethod": 0 - }, - { - "alpha": 0.3, - "componentID": 125003, - "enabled": true, - "entityId": 125, - "level": 2, - "mode": "multiply", - "type": "BlendMode", - "version": 234 - }, - { - "alignPoints": [ - 64 - ], - "componentID": 125004, - "enabled": true, - "entityId": 125, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "genderBinding": "", - "isAllFrameFaceDetect": false, - "isRefine": true, - "isWaitFirstFrameDetect": false, - "level": 2, - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "type": "FaceTracking", - "xAxisRotateTrack": true, - "xAxisScale": true, - "xAxisTrack": true, - "yAxisRotateTrack": true, - "yAxisScale": true, - "yAxisTrack": true, - "zAxisRotateTrack": true, - "version": 2 - } - ] - }, - { - "id": 166, - "name": "唇彩", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 166, - "componentID": 166001, - "level": 2 - }, - { - "closeMouseMask": "", - "componentID": 166002, - "enabled": true, - "entityId": 166, - "level": 2, - "lipsColor": "", - "lipsImage": "4ecbc9b9-a603-417f-b4ea-c9994ed0b9df", - "lipsImageCrop": "cropImage/zc_crop.png", - "lipsImageCropRect": { - "bottom": 1440, - "left": 590, - "right": 966, - "top": 1238 - }, - "lipsLut": "", - "lipsMask": "Default", - "lipsMaskCrop": "cropImage/default_mask_crop.png", - "lipsMaskCropRect": { - "bottom": 2048, - "left": 0, - "right": 1536, - "top": 0 - }, - "lipsMaskEnum": 0, - "lipsTextureType": "Default", - "lipsType": "Image", - "minVisibility": 0, - "openMouseMask": "", - "type": "MakeupLipsV6", - "version": 30, - "visMethod": 0 - }, - { - "alpha": 0.9, - "componentID": 166003, - "enabled": true, - "entityId": 166, - "level": 2, - "mode": "multiply", - "type": "BlendMode", - "version": 10 - }, - { - "alignPoints": [ - 64 - ], - "componentID": 166004, - "enabled": true, - "entityId": 166, - "faceIndex": [ - 0, - 1, - 2, - 3, - 4 - ], - "genderBinding": "", - "isAllFrameFaceDetect": false, - "isRefine": true, - "isWaitFirstFrameDetect": false, - "level": 2, - "scalePivotPoint1": 0, - "scalePivotPoint2": 18, - "type": "FaceTracking", - "xAxisRotateTrack": true, - "xAxisScale": true, - "xAxisTrack": true, - "yAxisRotateTrack": true, - "yAxisScale": true, - "yAxisTrack": true, - "zAxisRotateTrack": true, - "version": 2 - } - ] - }, - { - "id": 253, - "name": "滤镜", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 253, - "componentID": 253001, - "level": 2 - }, - { - "componentID": 253002, - "enabled": true, - "entityId": 253, - "intensity": 0.78, - "level": 1, - "src": "9cd97270-3f58-4bd4-a33a-9e111204a2ff", - "type": "LUTFilter", - "version": 296 - }, - { - "eAlignMode": 0, - "startOffset": 0, - "duration": 2000000, - "endOffset": 0, - "loopCount": 0, - "type": "TimeOffset", - "enabled": true, - "entityId": 253, - "componentID": 253003, - "version": 5, - "level": 1 - } - ] - } - ], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 0, - "x": 0, - "y": 0, - "z": 0 - }, - "entityId": 17, - "componentID": 17001, - "type": "ScreenTransform", - "enabled": true, - "version": 2, - "objectEnabled": true, - "level": 2 - }, - { - "componentID": 17002, - "enabled": true, - "entityId": 17, - "renderTargetKey": "RenderTarget", - "type": "Camera", - "version": 2, - "level": 2 - } - ] - } - ], - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 0, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 16, - "componentID": 16001, - "type": "ScreenTransform", - "enabled": true, - "version": 10, - "level": 2 - }, - { - "componentID": 16002, - "enableRotation": true, - "enabled": true, - "entityId": 16, - "level": 4, - "resetWhenStartRecord": true, - "type": "ExtraSetting", - "version": 3, - "needAutoBeauty": true - } - ], - "enabled": true, - "version": 0 - }, - "resources": { - "items": [ - { - "type": "folder", - "commandMap": {}, - "key": "7eca898b-cfd1-4ef4-8beb-5e4515827529", - "label": "root", - "path": "./", - "level": 2 - }, - { - "type": "default", - "commandMap": {}, - "key": "655900a5-467e-4c49-8236-0a6760d71330", - "label": "_DS_Store", - "path": "_DS_Store", - "level": 2 - }, - { - "type": "folder", - "commandMap": {}, - "key": "3661eacd-cb02-411c-85ba-52a87aeeda2c", - "label": "cropImage", - "path": "cropImage", - "level": 2 - }, - { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "reSize": 1, - "key": "3f633bfd-b1a4-4090-b97c-4681bb61081b", - "label": "default_mask_crop.png", - "path": "cropImage/default_mask_crop.png", - "level": 2, - "actualSize": 2727, - "resolution": { - "height": 511, - "width": 383 - }, - "width": 383, - "height": 511 - }, - { - "type": "ImageData", - "commandMap": {}, - "key": "ef6f38e0-1d6b-4433-9ab5-6a645d6550d8", - "label": "dzyylp_crop.png", - "path": "cropImage/dzyylp_crop.png", - "level": 2, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "actualSize": 35337, - "resolution": { - "height": 144, - "width": 253 - }, - "width": 253, - "height": 144 - }, - { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "reSize": 1, - "key": "2d0bea07-35d8-4a32-9b83-080b23d3a37e", - "label": "jm2_crop.png", - "path": "cropImage/jm2_crop.png", - "level": 2, - "actualSize": 13411, - "resolution": { - "height": 84, - "width": 300 - }, - "width": 300, - "height": 84 - }, - { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "reSize": 1, - "key": "bfeb1111-e79e-4039-9577-e07bf1d092fb", - "label": "mm_crop.png", - "path": "cropImage/mm_crop.png", - "level": 2, - "actualSize": 26563, - "resolution": { - "height": 75, - "width": 404 - }, - "width": 404, - "height": 75 - }, - { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "reSize": 1, - "key": "7df8cd66-4dd1-4591-9173-f1aafb4eab81", - "label": "yy_crop.png", - "path": "cropImage/yy_crop.png", - "level": 2, - "actualSize": 75809, - "resolution": { - "height": 155, - "width": 443 - }, - "width": 443, - "height": 155 - }, - { - "type": "ImageData", - "commandMap": {}, - "key": "4ecbc9b9-a603-417f-b4ea-c9994ed0b9df", - "label": "zc_crop.png", - "path": "cropImage/zc_crop.png", - "level": 2, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "actualSize": 18181, - "resolution": { - "height": 101, - "width": 188 - }, - "width": 188, - "height": 101 - }, - { - "type": "TextureData", - "commandMap": {}, - "key": "DeviceCameraTexture", - "path": "DeviceCameraTexture.tex", - "label": "DeviceCameraTexture.tex", - "level": 2 - }, - { - "type": "ImageData", - "commandMap": {}, - "key": "8747bae9-20d2-494b-b3a0-4ff6379d6655", - "label": "dzyylp.png", - "path": "dzyylp.png", - "level": 2, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "actualSize": 47270, - "resolution": { - "height": 1024, - "width": 768 - }, - "width": 768, - "height": 1024 - }, - { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "reSize": 1, - "key": "9cd97270-3f58-4bd4-a33a-9e111204a2ff", - "label": "fenbai.png", - "path": "fenbai.png", - "level": 2, - "actualSize": 3895, - "resolution": { - "height": 512, - "width": 512 - }, - "width": 512, - "height": 512 - }, - { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "reSize": 1, - "key": "ead8d177-5c88-4881-b982-8d1632f0ecb2", - "label": "jm2.png", - "path": "jm2.png", - "level": 2, - "actualSize": 21940, - "resolution": { - "height": 1024, - "width": 768 - }, - "width": 768, - "height": 1024 - }, - { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "reSize": 1, - "key": "761f3b71-5db4-4810-b981-ae3501bb843f", - "label": "mm.png", - "path": "mm.png", - "level": 2, - "actualSize": 36620, - "resolution": { - "height": 1024, - "width": 768 - }, - "width": 768, - "height": 1024 - }, - { - "type": "RenderTarget", - "commandMap": {}, - "inputColor": "#ffffffff", - "sizeType": 0, - "compatibilityMode": true, - "depthType": "DEPTH24", - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "NEAREST", - "minFilter": "NEAREST", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "useForDisplay": false, - "width": 0, - "height": 0, - "key": "RenderTarget", - "path": "RenderTarget.rdt", - "label": "RenderTarget.rdt", - "inputKey": "DeviceCameraTexture", - "input": "DeviceCameraTexture", - "level": 2 - }, - { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "reSize": 1, - "key": "c852cc4b-6584-4754-a609-a05397b4582c", - "label": "sh.png", - "path": "sh.png", - "level": 2, - "actualSize": 215028, - "resolution": { - "height": 1024, - "width": 768 - }, - "width": 768, - "height": 1024 - }, - { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "reSize": 1, - "key": "66e11afc-413d-41ec-a15d-0228404f8345", - "label": "xiurong.png", - "path": "xiurong.png", - "level": 2, - "actualSize": 49853, - "resolution": { - "height": 1024, - "width": 768 - }, - "width": 768, - "height": 1024 - }, - { - "type": "ImageData", - "commandMap": {}, - "key": "5d626ce5-4308-4fa1-ab00-ed780b3f29fc", - "label": "xr.png", - "path": "xr.png", - "level": 2, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "actualSize": 63255, - "resolution": { - "height": 1024, - "width": 768 - }, - "width": 768, - "height": 1024 - }, - { - "type": "default", - "commandMap": {}, - "key": "0a86f618-478c-4e5e-8d9b-ff871cfe8da2", - "label": "xuemei.2023-12-20-09-29-48-220Z.bak", - "path": "xuemei.2023-12-20-09-29-48-220Z.bak", - "level": 2 - }, - { - "type": "default", - "commandMap": {}, - "key": "a7e1a25b-0f82-4fa5-b8fc-3470af63c9e2", - "label": "xuemei.2024-01-17-09-54-42-051Z.bak", - "path": "xuemei.2024-01-17-09-54-42-051Z.bak", - "level": 2 - }, - { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "reSize": 1, - "key": "4ef689ca-9816-4a69-8326-98bee98a5a98", - "label": "yy.png", - "path": "yy.png", - "level": 2, - "actualSize": 87125, - "resolution": { - "height": 1024, - "width": 768 - }, - "width": 768, - "height": 1024, - "lastResize": 1, - "lastCompression": 0 - }, - { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "reSize": 1, - "key": "c0c46abf-b90c-4006-83f5-e623544a2055", - "label": "yylp.png", - "path": "yylp.png", - "level": 2, - "actualSize": 8630, - "resolution": { - "height": 1024, - "width": 768 - }, - "width": 768, - "height": 1024 - }, - { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "reSize": 1, - "key": "2443c3c8-4e24-461f-9e59-71242eaadd73", - "label": "zc.png", - "path": "zc.png", - "level": 2, - "actualSize": 28670, - "resolution": { - "height": 1024, - "width": 768 - }, - "width": 768, - "height": 1024 - } - ] - }, - "cloudResourceData": [], - "componentLevel": 4, - "creationTime": "2023-12-11 10:36:10", - "updateTime": "2024-01-25 14:46:36", - "path": "C:/Users/herzhan/Desktop/demo所有妆容/video_xuemei/", - "downloadMusicList": [] -} \ No newline at end of file diff --git a/application/App-UIKit/makeupMotionRes.bundle/video_makeup_xuemei/yy.png b/application/App-UIKit/makeupMotionRes.bundle/video_makeup_xuemei/yy.png deleted file mode 100644 index c3ed134a..00000000 Binary files a/application/App-UIKit/makeupMotionRes.bundle/video_makeup_xuemei/yy.png and /dev/null differ diff --git a/application/App-UIKit/makeupMotionRes.bundle/video_makeup_xuemei/yylp.png b/application/App-UIKit/makeupMotionRes.bundle/video_makeup_xuemei/yylp.png deleted file mode 100644 index ebd2d64c..00000000 Binary files a/application/App-UIKit/makeupMotionRes.bundle/video_makeup_xuemei/yylp.png and /dev/null differ diff --git a/application/App-UIKit/makeupMotionRes.bundle/video_makeup_xuemei/zc.png b/application/App-UIKit/makeupMotionRes.bundle/video_makeup_xuemei/zc.png deleted file mode 100644 index b257200d..00000000 Binary files a/application/App-UIKit/makeupMotionRes.bundle/video_makeup_xuemei/zc.png and /dev/null differ diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_bluescreen/CustomRender/CustomRender.json b/application/App-UIKit/segmentMotionRes.bundle/video_bluescreen/CustomRender/CustomRender.json deleted file mode 100644 index 94fdecd3..00000000 --- a/application/App-UIKit/segmentMotionRes.bundle/video_bluescreen/CustomRender/CustomRender.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "renderOrder": [ - { - "renderType" : "kCustomShader", - "renderId" : "first", - "vertexPath" : "vs_simple.bin", - "fragmentPath" : "fs_simple.bin", - "nextIds" : ["green_seg_chromakey","green_seg_merge"] - }, - { - "renderType" : "kCustomShader", - "renderId" : "green_seg_chromakey", - "uniform" : { - "green_params" : [ - 0.35, - 1.0, - 1.0, - 1.0 - ], - "tex_rect" : [ - 0.0, - 0.0, - 720.0, - 1280.0 - ], - "average_green" : [ - 0.0, - 1.0, - 0.0, - 0.0 - ] - }, - "vertexPath" : "vs_simple.bin", - "fragmentPath" : "fs_chromakey_v2.bin", - "nextIds" : ["Corrosion","green_seg_merge"] - }, - { - "renderType" : "kCustomShader", - "renderId" : "Corrosion", - "uniform" : { - "tex_rect" : [ - 0.0, - 0.0, - 720.0, - 1280.0 - ], - "corrosion" : [ - 1.0, - 1.0, - 0.0, - 0.0 - ] - }, - "vertexPath" : "vs_simple.bin", - "fragmentPath" : "fs_mask_corrosion.bin", - "nextIds" : ["green_seg_merge"] - }, - { - "renderType" : "kCustomShader", - "renderId" : "green_seg_merge", - "uniform" : { - "tex_rect" : [ - 0.0, - 0.0, - 720.0, - 1280.0 - ], - "merge_params" : [ - 1.0, - 0.1, - 0.08, - 0.7 - ], - "frame_params" : [ - 0.0, - 0.0, - 0.0, - 0.0 - ], - "tex_protect_rect" : [ - 0.0, - 0.0, - 0.0, - 0.0 - ] - }, - "vertexPath" : "vs_simple.bin", - "fragmentPath" : "fs_greenscreen_mask_merge.bin" - } - ] -} diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_bluescreen/CustomRender/fs_chromakey_v2.bin b/application/App-UIKit/segmentMotionRes.bundle/video_bluescreen/CustomRender/fs_chromakey_v2.bin deleted file mode 100644 index 13df35e9..00000000 Binary files a/application/App-UIKit/segmentMotionRes.bundle/video_bluescreen/CustomRender/fs_chromakey_v2.bin and /dev/null differ diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_bluescreen/CustomRender/fs_greenscreen_mask_merge.bin b/application/App-UIKit/segmentMotionRes.bundle/video_bluescreen/CustomRender/fs_greenscreen_mask_merge.bin deleted file mode 100644 index 23784f2f..00000000 Binary files a/application/App-UIKit/segmentMotionRes.bundle/video_bluescreen/CustomRender/fs_greenscreen_mask_merge.bin and /dev/null differ diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_bluescreen/CustomRender/fs_mask_corrosion.bin b/application/App-UIKit/segmentMotionRes.bundle/video_bluescreen/CustomRender/fs_mask_corrosion.bin deleted file mode 100644 index 3ce680bb..00000000 Binary files a/application/App-UIKit/segmentMotionRes.bundle/video_bluescreen/CustomRender/fs_mask_corrosion.bin and /dev/null differ diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_bluescreen/CustomRender/fs_simple.bin b/application/App-UIKit/segmentMotionRes.bundle/video_bluescreen/CustomRender/fs_simple.bin deleted file mode 100644 index 26a480b1..00000000 Binary files a/application/App-UIKit/segmentMotionRes.bundle/video_bluescreen/CustomRender/fs_simple.bin and /dev/null differ diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_bluescreen/CustomRender/vs_simple.bin b/application/App-UIKit/segmentMotionRes.bundle/video_bluescreen/CustomRender/vs_simple.bin deleted file mode 100644 index 3a4cf360..00000000 Binary files a/application/App-UIKit/segmentMotionRes.bundle/video_bluescreen/CustomRender/vs_simple.bin and /dev/null differ diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_bluescreen/DeviceCameraTexture.tex b/application/App-UIKit/segmentMotionRes.bundle/video_bluescreen/DeviceCameraTexture.tex deleted file mode 100644 index 119ca577..00000000 --- a/application/App-UIKit/segmentMotionRes.bundle/video_bluescreen/DeviceCameraTexture.tex +++ /dev/null @@ -1,4 +0,0 @@ -{ - "type": "TextureData", - "key": "DeviceCameraTexture" -} \ No newline at end of file diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_bluescreen/PostEffect.post b/application/App-UIKit/segmentMotionRes.bundle/video_bluescreen/PostEffect.post deleted file mode 100644 index 38f2fe23..00000000 --- a/application/App-UIKit/segmentMotionRes.bundle/video_bluescreen/PostEffect.post +++ /dev/null @@ -1 +0,0 @@ -{"effectType":"blur","subEffectType":"blur","kiraEffectType":"dynamic","effectStrength":8,"starMaxScale":0.5,"starMinScale":0.1,"starScaleTransformation":true,"starScalePeriod":1000,"scaleType":"normal","scaleFrequencyType":"synchronize","scaleFrequency":25,"starScaleRate":0.1,"setScale":false,"probabilityLow":1,"probabilityHigh":1,"minFeatureDistance":3,"fastPointNum":20,"fastThreshold":15,"maxCorners":20,"minDistance":5,"maxFeatureDetectNum":200,"maxKiraNum":20,"seedNum":8,"grayThreshold":5,"stabilityFactor":5,"highLightThreshold":0.3,"shaking":false,"kiraBrightness":1,"alphaChange":true,"maxAlpha":0.5,"minAlpha":0.1,"enableColorful":false,"colorMixPlan":"default","colorNum":4,"colorPath":"","colorBlendMode":"normal","blendMode":"screen","fastNumPercentage":0.8,"clusterDistance":10,"shakeDisPlacement":8,"sleepTime":15,"clusterMaxSize":5,"switchEnvironment":false,"filePaths":[],"brightness":0,"contrast":0,"hue":0,"highlights":0,"sharpness":0,"shadows":0,"saturation":0,"temperature":0,"fade":0,"vignetting":0,"pitu_mode":0,"defocusGamaPath":"","defocusAntigamaPath":"","defocusBinPath":"","defocusMaskPath":"","defocusAlpha":0} \ No newline at end of file diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_bluescreen/RenderTarget.rdt b/application/App-UIKit/segmentMotionRes.bundle/video_bluescreen/RenderTarget.rdt deleted file mode 100644 index a98616e9..00000000 --- a/application/App-UIKit/segmentMotionRes.bundle/video_bluescreen/RenderTarget.rdt +++ /dev/null @@ -1 +0,0 @@ -{"type":"RenderTarget","path":"RenderTarget.rdt","key":"RenderTarget","input":"DeviceCameraTexture"} \ No newline at end of file diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_bluescreen/RenderTarget_camera_1.rdt b/application/App-UIKit/segmentMotionRes.bundle/video_bluescreen/RenderTarget_camera_1.rdt deleted file mode 100644 index db35386a..00000000 --- a/application/App-UIKit/segmentMotionRes.bundle/video_bluescreen/RenderTarget_camera_1.rdt +++ /dev/null @@ -1 +0,0 @@ -{"type":"RenderTarget","key":"RenderTarget1","input":"","width":0,"height":0,"inputType":"RT_InputType_Texture","sizeType":0,"path":"RenderTarget_camera_1.rdt","depthType":"DEPTH24"} \ No newline at end of file diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_bluescreen/RenderTarget_camera_2.rdt b/application/App-UIKit/segmentMotionRes.bundle/video_bluescreen/RenderTarget_camera_2.rdt deleted file mode 100644 index 8b27983f..00000000 --- a/application/App-UIKit/segmentMotionRes.bundle/video_bluescreen/RenderTarget_camera_2.rdt +++ /dev/null @@ -1 +0,0 @@ -{"type":"RenderTarget","key":"RenderTarget2","input":"","width":0,"height":0,"inputType":"RT_InputType_Texture","sizeType":0,"path":"RenderTarget_camera_2.rdt","depthType":"DEPTH24"} \ No newline at end of file diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_bluescreen/defaultBackground.png b/application/App-UIKit/segmentMotionRes.bundle/video_bluescreen/defaultBackground.png deleted file mode 100644 index 29a3a820..00000000 Binary files a/application/App-UIKit/segmentMotionRes.bundle/video_bluescreen/defaultBackground.png and /dev/null differ diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_bluescreen/defaultBackgroundImage.png b/application/App-UIKit/segmentMotionRes.bundle/video_bluescreen/defaultBackgroundImage.png deleted file mode 100644 index 29a3a820..00000000 Binary files a/application/App-UIKit/segmentMotionRes.bundle/video_bluescreen/defaultBackgroundImage.png and /dev/null differ diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_bluescreen/defaultBackgroundVideo.mp4 b/application/App-UIKit/segmentMotionRes.bundle/video_bluescreen/defaultBackgroundVideo.mp4 deleted file mode 100644 index 8a6917d0..00000000 Binary files a/application/App-UIKit/segmentMotionRes.bundle/video_bluescreen/defaultBackgroundVideo.mp4 and /dev/null differ diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_bluescreen/script.js b/application/App-UIKit/segmentMotionRes.bundle/video_bluescreen/script.js deleted file mode 100644 index 955e143f..00000000 --- a/application/App-UIKit/segmentMotionRes.bundle/video_bluescreen/script.js +++ /dev/null @@ -1,101 +0,0 @@ -/*** light-js-config -***/ -// 加载 AEJSBridge.js -light.execute("light://js/AEJSBridge.js"); - -// 素材逻辑函数体 -(function () { - // 定义global对象 - var global = global || (function () {return this;}()); - // 定义素材对象 - var template = global.template || (function () {return {};}()); - // 并挂在global对象下 - global.template = template; - // 定义需要用到的resource - var resourcePool = { - } - //初始化一个jsonObject, - template.uniformJson = { - "uniformMap": { - "green_seg_chromakey": { - "green_params": [0.35, 1.0, 1.0, 1.0], // [similarity, deshadow, corrosion,color] - "tex_rect": [0.0, 0.0, 720.0, 1280.0], - "average_green": [0.0, 1.0, 0.0, 0.0] - }, - "Corrosion": { - "tex_rect": [0.0, 0.0, 720.0, 1280.0], - "corrosion": [1.0, 1.0, 0.0, 0.0] // [corrosion,color] - }, - "green_seg_merge": { - "tex_rect": [0.0, 0.0, 720.0, 1280.0], - "merge_params": [1.0, 0.1, 0.08, 0.7], // [corrosion, despill, smooth, blendWeight] - "frame_params": [0.0, 0.0, 0.0, 0.0], // [isFirstframe, ] - "tex_protect_rect": [0.0, 0.0, 0.0, 0.0] // protect area - } - } - } - // 也挂在global对象下 - global.resourcePool = resourcePool; - - -// // 订阅InputEvent事件 - template.onInputEvent = function(params) { - // //相似度对应similarity, 平滑度对应smooth, 边缘消除强度对应 corrosion, 灰度比例对应 despill, 去阴影对应 deshadow - var GreenSeg_jsonDataParams = params["event.script.lightsdk.GreenScreenSetGreenParamsV2"]; - - if (GreenSeg_jsonDataParams) { - - var similarity_value = GreenSeg_jsonDataParams["green_params_v2"][0]; - var smooth_value = GreenSeg_jsonDataParams["green_params_v2"][1]; - var corrosion_value = GreenSeg_jsonDataParams["green_params_v2"][2]; - var despill_value = GreenSeg_jsonDataParams["green_params_v2"][3]; - var deshadow_value = GreenSeg_jsonDataParams["green_params_v2"][4]; - var color_value = 1.0; - - template.uniformJson.uniformMap.green_seg_chromakey.green_params[0] = similarity_value; - template.uniformJson.uniformMap.green_seg_chromakey.green_params[1] = deshadow_value; - template.uniformJson.uniformMap.green_seg_chromakey.green_params[2] = corrosion_value; // corrosion - template.uniformJson.uniformMap.green_seg_chromakey.green_params[3] = color_value; - template.uniformJson.uniformMap.Corrosion.corrosion[0] = corrosion_value; // corrosion - template.uniformJson.uniformMap.Corrosion.corrosion[1] = color_value; // color - template.uniformJson.uniformMap.green_seg_merge.merge_params[0] = corrosion_value; // corrosion - template.uniformJson.uniformMap.green_seg_merge.merge_params[1] = despill_value; // despill - template.uniformJson.uniformMap.green_seg_merge.merge_params[2] = smooth_value; // smooth - } - // 绿幕保护区域 - var Merge_jsonDataProtectRect = params["event.script.lightsdk.GreenScreenSetProtectRect"]; - - if (Merge_jsonDataProtectRect) { - - template.uniformJson.uniformMap.green_seg_merge.tex_protect_rect[0] = Merge_jsonDataProtectRect["tex_protect_rect"][0]; - template.uniformJson.uniformMap.green_seg_merge.tex_protect_rect[1] = 1.0 - Merge_jsonDataProtectRect["tex_protect_rect"][1]; - template.uniformJson.uniformMap.green_seg_merge.tex_protect_rect[2] = Merge_jsonDataProtectRect["tex_protect_rect"][2]; - template.uniformJson.uniformMap.green_seg_merge.tex_protect_rect[3] = 1.0 - Merge_jsonDataProtectRect["tex_protect_rect"][3]; - } - } - - // 素材初始化, 对应c++的configure - template.onTemplateInit = function (entityManager, eventManager) { - template.customGraph = light.getComponent( - entityManager.getEntityByName("CustomGraph"), - "CustomGraph" - ); - } - // 对应c++的update - template.onFrameUpdate = function (currentTime, entityManager, eventManager) { - //将得到的uniformJson传递到自定义滤镜链中 - var surfaceWidth = light.DeviceUtils.GetSurfaceWidth(entityManager); - var surfaceHeight = light.DeviceUtils.GetSurfaceHeight(entityManager); - - template.uniformJson.uniformMap.green_seg_chromakey.tex_rect[2] = surfaceWidth; - template.uniformJson.uniformMap.green_seg_chromakey.tex_rect[3] = surfaceHeight; - - template.uniformJson.uniformMap.Corrosion.tex_rect[2] = surfaceWidth; - template.uniformJson.uniformMap.Corrosion.tex_rect[3] = surfaceHeight; - - template.uniformJson.uniformMap.green_seg_merge.tex_rect[2] = surfaceWidth; - template.uniformJson.uniformMap.green_seg_merge.tex_rect[3] = surfaceHeight; - - template.customGraph.uniformJson = JSON.stringify(template.uniformJson); - } -}()); diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_bluescreen/template.json b/application/App-UIKit/segmentMotionRes.bundle/video_bluescreen/template.json deleted file mode 100644 index 4046cf2e..00000000 --- a/application/App-UIKit/segmentMotionRes.bundle/video_bluescreen/template.json +++ /dev/null @@ -1,827 +0,0 @@ -{ - "isFragment": false, - "componentLevel": 325, - "madeIn": "LightStudio", - "root": { - "id": 16, - "name": "拍摄模板", - "children": [ - { - "id": 17, - "name": "绿幕抠图画板", - "children": [ - { - "id": 18, - "name": "CustomGraph", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "top": 1, - "bottom": -1, - "left": -1, - "right": 1 - }, - "offset": { - "top": 0, - "bottom": 0, - "left": 0, - "right": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "objectEnabled": true, - "interactive": false, - "enabled": true, - "entityId": 18, - "componentID": 18001, - "level": 2 - }, - { - "componentID": 18002, - "enabled": true, - "entityId": 18, - "level": 325, - "resourcePath": "646212fb-2c67-4a40-8325-ac159a4ee533", - "type": "CustomGraph", - "version": 283 - }, - { - "componentID": 18003, - "enabled": true, - "entityId": 18, - "level": 4, - "scriptPath": "34f323b7-ad28-40a8-b5b5-a65c74e5d147", - "type": "Script", - "version": 45 - }, - { - "type": "EntityIdentifier", - "name": "CustomGraph", - "id": 18, - "originID": 18, - "enabled": true - } - ] - } - ], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "entityId": 17, - "componentID": 17001, - "type": "ScreenTransform", - "enabled": true, - "version": 2, - "objectEnabled": true, - "level": 2 - }, - { - "componentID": 17002, - "enabled": true, - "entityId": 17, - "level": 2, - "renderTargetKey": "RenderTarget", - "type": "Camera", - "version": 6 - }, - { - "type": "EntityIdentifier", - "name": "绿幕抠图画板", - "id": 17, - "originID": 17, - "enabled": true - } - ] - }, - { - "id": 19, - "name": "模糊叠加画板", - "children": [ - { - "id": 22, - "name": "背景贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "eKeepRatio": true, - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 22, - "componentID": 22001, - "type": "ScreenTransform", - "enabled": true, - "version": 390, - "interactive": false, - "level": 2 - }, - { - "componentID": 22002, - "enabled": true, - "entityId": 22, - "level": 1, - "scaleMode": 3, - "src": "CustomBackground", - "type": "Image", - "version": 76 - }, - { - "alpha": 1, - "componentID": 22003, - "enabled": true, - "entityId": 22, - "level": 2, - "mode": "normal", - "type": "BlendMode", - "version": 71 - }, - { - "startOffset": 0, - "duration": 2000000, - "endOffset": -2147483648, - "loopCount": -1, - "type": "TimeOffset", - "enabled": true, - "entityId": 22, - "componentID": 22004, - "level": 1, - "version": 33 - }, - { - "type": "EntityIdentifier", - "name": "背景贴纸", - "id": 22, - "originID": 22, - "enabled": true - } - ] - }, - { - "id": 23, - "name": "抠图贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "eKeepRatio": true, - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 23, - "componentID": 23001, - "type": "ScreenTransform", - "enabled": true, - "version": 902, - "interactive": false, - "level": 2 - }, - { - "componentID": 23002, - "enabled": true, - "entityId": 23, - "level": 1, - "scaleMode": 2, - "src": "RenderTarget", - "type": "Image", - "version": 24 - }, - { - "alpha": 1, - "componentID": 23003, - "enabled": true, - "entityId": 23, - "level": 2, - "mode": "normal", - "type": "BlendMode", - "version": 124 - }, - { - "startOffset": 0, - "duration": 2000000, - "endOffset": -2147483648, - "loopCount": -1, - "type": "TimeOffset", - "enabled": true, - "entityId": 23, - "componentID": 23004, - "level": 1, - "version": null - }, - { - "type": "EntityIdentifier", - "name": "抠图贴纸", - "id": 23, - "originID": 23, - "enabled": true - } - ] - } - ], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "top": 1, - "bottom": -1, - "left": -1, - "right": 1 - }, - "offset": { - "top": 0, - "bottom": 0, - "left": 0, - "right": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "objectEnabled": true, - "interactive": false, - "enabled": true, - "entityId": 19, - "componentID": 19001, - "level": 2 - }, - { - "componentID": 19002, - "duplicateInput": 0, - "enabled": true, - "entityId": 19, - "level": 2, - "renderTargetKey": "RenderTarget2", - "type": "Camera", - "version": 4 - }, - { - "type": "EntityIdentifier", - "name": "模糊叠加画板", - "id": 19, - "originID": 19, - "enabled": true - } - ] - } - ], - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 16, - "componentID": 16001, - "type": "ScreenTransform", - "enabled": true, - "version": 4, - "level": 2 - }, - { - "defaultCameraPosition": 0, - "enableDowngradeAsset": true, - "enableRotation": true, - "needAutoBeauty": false, - "needVoiceDecibel": false, - "resetWhenStartRecord": true, - "supportCameraPosition": 0, - "sync3dRenderEnable": false, - "type": "ExtraSetting", - "enabled": true, - "version": 1, - "entityId": 16, - "componentID": 16002, - "level": 4, - "requireAbility": [] - }, - { - "type": "EntityIdentifier", - "name": "拍摄模板", - "id": 16, - "originID": 16, - "enabled": true - } - ], - "enabled": true, - "version": 0 - }, - "inputSources": { - "RenderTarget": { - "type": "RenderTarget", - "commandMap": {}, - "inputColor": "#ffffffff", - "sizeType": 0, - "compatibilityMode": true, - "depthType": "DEPTH24", - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": false, - "samplerType": "SAMPLER_2D" - }, - "useForDisplay": false, - "key": "RenderTarget", - "label": "RenderTarget.rdt", - "path": "RenderTarget.rdt", - "input": "DeviceCameraTexture", - "level": 2, - "inputKey": "DeviceCameraTexture", - "width": 0, - "height": 0 - }, - "DeviceCameraTexture": { - "type": "TextureData", - "commandMap": {}, - "key": "DeviceCameraTexture", - "label": "DeviceCameraTexture.tex", - "path": "DeviceCameraTexture.tex", - "level": 2 - }, - "646212fb-2c67-4a40-8325-ac159a4ee533": { - "type": "zip", - "commandMap": {}, - "key": "646212fb-2c67-4a40-8325-ac159a4ee533", - "label": "CustomRender.zip", - "path": "CustomRender.zip", - "level": 2 - }, - "34f323b7-ad28-40a8-b5b5-a65c74e5d147": { - "type": "js", - "commandMap": {}, - "key": "34f323b7-ad28-40a8-b5b5-a65c74e5d147", - "label": "script.js", - "path": "script.js", - "level": 2, - "requireAbilities": [] - }, - "RenderTarget2": { - "type": "RenderTarget", - "commandMap": {}, - "inputColor": "#ffffffff", - "sizeType": 0, - "compatibilityMode": true, - "depthType": "DEPTH24", - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": false, - "samplerType": "SAMPLER_2D" - }, - "key": "RenderTarget2", - "label": "RenderTarget_camera_2.rdt", - "path": "RenderTarget_camera_2.rdt", - "input": "", - "inputType": "RT_InputType_Texture", - "level": 2, - "inputKey": "", - "width": 0, - "height": 0 - }, - "CustomBackground": { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "reSize": 1, - "key": "CustomBackground", - "label": "defaultBackground.png", - "path": "defaultBackground.png", - "level": 2, - "actualSize": 42516, - "resolution": { - "height": 1800, - "width": 1200 - }, - "width": 1200, - "height": 1800 - }, - "16a7a2e2-2fb6-4370-b7af-0876c0d003bb": { - "type": "folder", - "commandMap": {}, - "key": "16a7a2e2-2fb6-4370-b7af-0876c0d003bb", - "label": "root", - "path": "./", - "level": 2 - }, - "14a13923-c22e-4fb5-8c5a-bc126207759d": { - "type": "folder", - "commandMap": {}, - "key": "14a13923-c22e-4fb5-8c5a-bc126207759d", - "label": "CustomRender", - "path": "CustomRender", - "level": 2 - }, - "f5802f84-b090-4338-a22a-87f7374bb318": { - "type": "JsonData", - "commandMap": {}, - "key": "f5802f84-b090-4338-a22a-87f7374bb318", - "label": "CustomRender.json", - "path": "CustomRender/CustomRender.json", - "level": 2 - }, - "1e0eef7e-3258-433d-b3fe-f23b968610a0": { - "type": "gltf_bin", - "commandMap": {}, - "key": "1e0eef7e-3258-433d-b3fe-f23b968610a0", - "label": "fs_chromakey.bin", - "path": "CustomRender/fs_chromakey.bin", - "level": 2 - }, - "a190277d-4203-4a1c-bab7-af116218b421": { - "type": "gltf_bin", - "commandMap": {}, - "key": "a190277d-4203-4a1c-bab7-af116218b421", - "label": "vs_simple.bin", - "path": "CustomRender/vs_simple.bin", - "level": 2 - }, - "CustomBackgroundImage": { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "reSize": 1, - "key": "CustomBackgroundImage", - "label": "defaultBackgroundImage.png", - "path": "defaultBackgroundImage.png", - "level": 2, - "actualSize": 42516, - "resolution": { - "height": 1800, - "width": 1200 - }, - "width": 1200, - "height": 1800 - }, - "CustomBackgroundVideo": { - "type": "VideoClipData", - "commandMap": {}, - "loopCount": 0, - "key": "CustomBackgroundVideo", - "label": "defaultBackgroundVideo.mp4", - "path": "defaultBackgroundVideo.mp4", - "duration": 1000000, - "timeRange": { - "startTime": 0, - "duration": 1000000 - }, - "level": 2, - "actualSize": 3907, - "resolution": { - "height": 720, - "width": 1280 - } - }, - "f1fee01b-3cf6-4e52-95e2-820085f9a948": { - "type": "PostEffectData", - "commandMap": {}, - "postEffectOptions": { - "effectType": "blur", - "subEffectType": "blur", - "kiraEffectType": "dynamic", - "effectStrength": 8, - "starMaxScale": 0.5, - "starMinScale": 0.1, - "starScaleTransformation": true, - "starScalePeriod": 1000, - "scaleType": "normal", - "scaleFrequencyType": "synchronize", - "scaleFrequency": 25, - "starScaleRate": 0.1, - "setScale": false, - "probabilityLow": 1, - "probabilityHigh": 1, - "minFeatureDistance": 3, - "fastPointNum": 20, - "fastThreshold": 15, - "maxCorners": 20, - "minDistance": 5, - "maxFeatureDetectNum": 200, - "maxKiraNum": 20, - "seedNum": 8, - "grayThreshold": 5, - "stabilityFactor": 5, - "highLightThreshold": 0.3, - "shaking": false, - "kiraBrightness": 1, - "alphaChange": true, - "maxAlpha": 0.5, - "minAlpha": 0.1, - "enableColorful": false, - "colorMixPlan": "default", - "colorNum": 4, - "colorPath": "", - "colorBlendMode": "normal", - "blendMode": "screen", - "fastNumPercentage": 0.8, - "clusterDistance": 10, - "shakeDisPlacement": 8, - "sleepTime": 15, - "clusterMaxSize": 5, - "switchEnvironment": false, - "filePaths": [], - "brightness": 0, - "contrast": 0, - "hue": 0, - "highlights": 0, - "sharpness": 0, - "shadows": 0, - "saturation": 0, - "temperature": 0, - "fade": 0, - "vignetting": 0, - "pitu_mode": 0, - "defocusGamaPath": "", - "defocusAntigamaPath": "", - "defocusBinPath": "", - "defocusMaskPath": "", - "defocusAlpha": 0 - }, - "key": "f1fee01b-3cf6-4e52-95e2-820085f9a948", - "label": "PostEffect.post", - "path": "PostEffect.post", - "level": 315, - "existingType": "blur" - }, - "RenderTarget1": { - "type": "RenderTarget", - "commandMap": {}, - "inputColor": "#ffffffff", - "sizeType": 0, - "compatibilityMode": true, - "depthType": "DEPTH24", - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": false, - "samplerType": "SAMPLER_2D" - }, - "useForDisplay": false, - "key": "RenderTarget1", - "label": "RenderTarget_camera_1.rdt", - "path": "RenderTarget_camera_1.rdt", - "input": "", - "inputType": "RT_InputType_Texture", - "level": 2, - "inputKey": "", - "width": 0, - "height": 0 - } - }, - "preset": {}, - "properties": { - "layout": { - "width": 720, - "height": 1280 - }, - "boundsTrackerPlaceHolders": [], - "musicIDs": [], - "fonts": [], - "movieConfig": { - "sourceType": 2, - "minClipAssetCount": 1, - "maxClipAssetCount": 999, - "minImageDuration": 1000000, - "maxImageDuration": 10000000, - "minVideoDuration": 2000000, - "minFreezePointInterval": 0, - "preferredCoverTime": 1000000, - "originVolume": 1, - "cropEvents": [ - "SlowRhythmTrail" - ], - "imageCropSpace": 0, - "videoCropSpace": -1, - "disableEventsWhileTransition": true, - "useInternalRhythm": true, - "headProtectDuration": 0 - }, - "materialConfigs": [], - "resourceIDs": [] - } -} \ No newline at end of file diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_bluescreen/template.png b/application/App-UIKit/segmentMotionRes.bundle/video_bluescreen/template.png deleted file mode 100644 index bd97f93c..00000000 Binary files a/application/App-UIKit/segmentMotionRes.bundle/video_bluescreen/template.png and /dev/null differ diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_bluescreen/video_greenscreen.studio b/application/App-UIKit/segmentMotionRes.bundle/video_bluescreen/video_greenscreen.studio deleted file mode 100644 index 49a35e72..00000000 --- a/application/App-UIKit/segmentMotionRes.bundle/video_bluescreen/video_greenscreen.studio +++ /dev/null @@ -1,763 +0,0 @@ -{ - "name": "chromakey", - "author": "brycezhang", - "category": 1, - "scene": { - "id": 16, - "name": "拍摄模板", - "children": [ - { - "id": 17, - "name": "绿幕抠图画板", - "children": [ - { - "id": 18, - "name": "CustomGraph", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "top": 1, - "bottom": -1, - "left": -1, - "right": 1 - }, - "offset": { - "top": 0, - "bottom": 0, - "left": 0, - "right": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "objectEnabled": true, - "interactive": false, - "enabled": true, - "entityId": 18, - "componentID": 18001, - "level": 2 - }, - { - "componentID": 18002, - "enabled": true, - "entityId": 18, - "level": 325, - "resourcePath": "646212fb-2c67-4a40-8325-ac159a4ee533", - "type": "CustomGraph", - "version": 283 - }, - { - "componentID": 18003, - "enabled": true, - "entityId": 18, - "level": 4, - "scriptPath": "34f323b7-ad28-40a8-b5b5-a65c74e5d147", - "type": "Script", - "version": 45 - } - ] - } - ], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 0, - "x": 0, - "y": 0, - "z": 0 - }, - "entityId": 17, - "componentID": 17001, - "type": "ScreenTransform", - "enabled": true, - "version": 2, - "objectEnabled": true, - "level": 2 - }, - { - "componentID": 17002, - "enabled": true, - "entityId": 17, - "level": 2, - "renderTargetKey": "RenderTarget", - "type": "Camera", - "version": 6 - } - ] - }, - { - "id": 19, - "name": "模糊叠加画板", - "children": [ - { - "id": 22, - "name": "背景贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "eKeepRatio": true, - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 22, - "componentID": 22001, - "type": "ScreenTransform", - "enabled": true, - "version": 390, - "interactive": false, - "level": 2 - }, - { - "componentID": 22002, - "enabled": true, - "entityId": 22, - "level": 1, - "scaleMode": 3, - "src": "CustomBackground", - "type": "Image", - "version": 76 - }, - { - "alpha": 1, - "componentID": 22003, - "enabled": true, - "entityId": 22, - "level": 2, - "mode": "normal", - "type": "BlendMode", - "version": 71 - }, - { - "eAlignMode": 2, - "startOffset": 0, - "duration": 2000000, - "endOffset": 0, - "loopCount": -1, - "type": "TimeOffset", - "enabled": true, - "entityId": 22, - "componentID": 22004, - "level": 1, - "version": 33 - } - ] - }, - { - "id": 23, - "name": "抠图贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "eKeepRatio": true, - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 23, - "componentID": 23001, - "type": "ScreenTransform", - "enabled": true, - "version": 902, - "interactive": false, - "level": 2 - }, - { - "componentID": 23002, - "enabled": true, - "entityId": 23, - "level": 1, - "scaleMode": 2, - "src": "RenderTarget", - "type": "Image", - "version": 24 - }, - { - "alpha": 1, - "componentID": 23003, - "enabled": true, - "entityId": 23, - "level": 2, - "mode": "normal", - "type": "BlendMode", - "version": 124 - }, - { - "eAlignMode": 2, - "startOffset": 0, - "duration": 2000000, - "endOffset": 0, - "loopCount": -1, - "type": "TimeOffset", - "enabled": true, - "entityId": 23, - "componentID": 23004, - "level": 1, - "version": null - } - ] - } - ], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "top": 1, - "bottom": -1, - "left": -1, - "right": 1 - }, - "offset": { - "top": 0, - "bottom": 0, - "left": 0, - "right": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "objectEnabled": true, - "interactive": false, - "enabled": true, - "entityId": 19, - "componentID": 19001, - "level": 2 - }, - { - "componentID": 19002, - "duplicateInput": 0, - "enabled": true, - "entityId": 19, - "level": 2, - "renderTargetKey": "RenderTarget2", - "type": "Camera", - "version": 4 - } - ] - } - ], - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 0, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 16, - "componentID": 16001, - "type": "ScreenTransform", - "enabled": true, - "version": 4, - "level": 2 - }, - { - "defaultCameraPosition": 0, - "enableDowngradeAsset": true, - "enableRotation": true, - "needAutoBeauty": false, - "needVoiceDecibel": false, - "resetWhenStartRecord": true, - "supportCameraPosition": 0, - "sync3dRenderEnable": false, - "type": "ExtraSetting", - "enabled": true, - "version": 1, - "entityId": 16, - "componentID": 16002, - "level": 4 - } - ], - "enabled": true, - "version": 0 - }, - "resources": { - "items": [ - { - "type": "folder", - "commandMap": {}, - "key": "16a7a2e2-2fb6-4370-b7af-0876c0d003bb", - "label": "root", - "path": "./", - "level": 2 - }, - { - "type": "folder", - "commandMap": {}, - "key": "14a13923-c22e-4fb5-8c5a-bc126207759d", - "label": "CustomRender", - "path": "CustomRender", - "level": 2 - }, - { - "type": "JsonData", - "commandMap": {}, - "key": "f5802f84-b090-4338-a22a-87f7374bb318", - "label": "CustomRender.json", - "path": "CustomRender/CustomRender.json", - "level": 2 - }, - { - "type": "gltf_bin", - "commandMap": {}, - "key": "1e0eef7e-3258-433d-b3fe-f23b968610a0", - "label": "fs_chromakey.bin", - "path": "CustomRender/fs_chromakey.bin", - "level": 2 - }, - { - "type": "gltf_bin", - "commandMap": {}, - "key": "a190277d-4203-4a1c-bab7-af116218b421", - "label": "vs_simple.bin", - "path": "CustomRender/vs_simple.bin", - "level": 2 - }, - { - "type": "zip", - "commandMap": {}, - "key": "646212fb-2c67-4a40-8325-ac159a4ee533", - "label": "CustomRender.zip", - "path": "CustomRender.zip", - "level": 2 - }, - { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "reSize": 1, - "key": "CustomBackground", - "label": "defaultBackground.png", - "path": "defaultBackground.png", - "level": 2, - "actualSize": 42516, - "resolution": { - "height": 1800, - "width": 1200 - }, - "width": 1200, - "height": 1800 - }, - { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "reSize": 1, - "key": "CustomBackgroundImage", - "label": "defaultBackgroundImage.png", - "path": "defaultBackgroundImage.png", - "level": 2, - "actualSize": 42516, - "resolution": { - "height": 1800, - "width": 1200 - }, - "width": 1200, - "height": 1800 - }, - { - "type": "VideoClipData", - "commandMap": {}, - "loopCount": 0, - "key": "CustomBackgroundVideo", - "label": "defaultBackgroundVideo.mp4", - "path": "defaultBackgroundVideo.mp4", - "duration": 1000000, - "timeRange": { - "startTime": 0, - "duration": 1000000 - }, - "level": 2, - "actualSize": 3907, - "resolution": { - "height": 720, - "width": 1280 - } - }, - { - "type": "TextureData", - "commandMap": {}, - "key": "DeviceCameraTexture", - "label": "DeviceCameraTexture.tex", - "path": "DeviceCameraTexture.tex", - "level": 2 - }, - { - "type": "PostEffectData", - "commandMap": {}, - "postEffectOptions": { - "effectType": "blur", - "subEffectType": "blur", - "kiraEffectType": "dynamic", - "effectStrength": 8, - "starMaxScale": 0.5, - "starMinScale": 0.1, - "starScaleTransformation": true, - "starScalePeriod": 1000, - "scaleType": "normal", - "scaleFrequencyType": "synchronize", - "scaleFrequency": 25, - "starScaleRate": 0.1, - "setScale": false, - "probabilityLow": 1, - "probabilityHigh": 1, - "minFeatureDistance": 3, - "fastPointNum": 20, - "fastThreshold": 15, - "maxCorners": 20, - "minDistance": 5, - "maxFeatureDetectNum": 200, - "maxKiraNum": 20, - "seedNum": 8, - "grayThreshold": 5, - "stabilityFactor": 5, - "highLightThreshold": 0.3, - "shaking": false, - "kiraBrightness": 1, - "alphaChange": true, - "maxAlpha": 0.5, - "minAlpha": 0.1, - "enableColorful": false, - "colorMixPlan": "default", - "colorNum": 4, - "colorPath": "", - "colorBlendMode": "normal", - "blendMode": "screen", - "fastNumPercentage": 0.8, - "clusterDistance": 10, - "shakeDisPlacement": 8, - "sleepTime": 15, - "clusterMaxSize": 5, - "switchEnvironment": false, - "filePaths": [], - "brightness": 0, - "contrast": 0, - "hue": 0, - "highlights": 0, - "sharpness": 0, - "shadows": 0, - "saturation": 0, - "temperature": 0, - "fade": 0, - "vignetting": 0, - "pitu_mode": 0, - "defocusGamaPath": "", - "defocusAntigamaPath": "", - "defocusBinPath": "", - "defocusMaskPath": "", - "defocusAlpha": 0 - }, - "key": "f1fee01b-3cf6-4e52-95e2-820085f9a948", - "label": "PostEffect.post", - "path": "PostEffect.post", - "level": 315, - "existingType": "blur" - }, - { - "type": "RenderTarget", - "commandMap": {}, - "inputColor": "#ffffffff", - "sizeType": 0, - "compatibilityMode": true, - "depthType": "DEPTH24", - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": false, - "samplerType": "SAMPLER_2D" - }, - "useForDisplay": false, - "key": "RenderTarget", - "label": "RenderTarget.rdt", - "path": "RenderTarget.rdt", - "input": "DeviceCameraTexture", - "level": 2, - "inputKey": "DeviceCameraTexture", - "width": 0, - "height": 0 - }, - { - "type": "RenderTarget", - "commandMap": {}, - "inputColor": "#ffffffff", - "sizeType": 0, - "compatibilityMode": true, - "depthType": "DEPTH24", - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": false, - "samplerType": "SAMPLER_2D" - }, - "useForDisplay": false, - "key": "RenderTarget1", - "label": "RenderTarget_camera_1.rdt", - "path": "RenderTarget_camera_1.rdt", - "input": "", - "inputType": "RT_InputType_Texture", - "level": 2, - "inputKey": "", - "width": 0, - "height": 0 - }, - { - "type": "RenderTarget", - "commandMap": {}, - "inputColor": "#ffffffff", - "sizeType": 0, - "compatibilityMode": true, - "depthType": "DEPTH24", - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": false, - "samplerType": "SAMPLER_2D" - }, - "key": "RenderTarget2", - "label": "RenderTarget_camera_2.rdt", - "path": "RenderTarget_camera_2.rdt", - "input": "", - "inputType": "RT_InputType_Texture", - "level": 2, - "inputKey": "", - "width": 0, - "height": 0 - }, - { - "type": "js", - "commandMap": {}, - "key": "34f323b7-ad28-40a8-b5b5-a65c74e5d147", - "label": "script.js", - "path": "script.js", - "level": 2, - "requireAbilities": [] - } - ] - }, - "cloudResourceData": [], - "componentLevel": 325, - "creationTime": "2023-01-04 15:10:42", - "updateTime": "2023-08-29 15:39:16", - "path": "/Users/brycezhang/workspace/xmagic/assets/MotionRes/segmentMotionRes/video_greenscreen/", - "downloadMusicList": [] -} \ No newline at end of file diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_empty_segmentation/BgSegmentation.bg b/application/App-UIKit/segmentMotionRes.bundle/video_empty_segmentation/BgSegmentation.bg deleted file mode 100644 index 24fefed9..00000000 --- a/application/App-UIKit/segmentMotionRes.bundle/video_empty_segmentation/BgSegmentation.bg +++ /dev/null @@ -1,5 +0,0 @@ -{ - "type": "BackgroundSegmentation", - "key": "BackgroundSegmentation", - "input": "" -} \ No newline at end of file diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_empty_segmentation/DeviceCameraTexture.tex b/application/App-UIKit/segmentMotionRes.bundle/video_empty_segmentation/DeviceCameraTexture.tex deleted file mode 100644 index 119ca577..00000000 --- a/application/App-UIKit/segmentMotionRes.bundle/video_empty_segmentation/DeviceCameraTexture.tex +++ /dev/null @@ -1,4 +0,0 @@ -{ - "type": "TextureData", - "key": "DeviceCameraTexture" -} \ No newline at end of file diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_empty_segmentation/RenderTarget.rdt b/application/App-UIKit/segmentMotionRes.bundle/video_empty_segmentation/RenderTarget.rdt deleted file mode 100644 index a98616e9..00000000 --- a/application/App-UIKit/segmentMotionRes.bundle/video_empty_segmentation/RenderTarget.rdt +++ /dev/null @@ -1 +0,0 @@ -{"type":"RenderTarget","path":"RenderTarget.rdt","key":"RenderTarget","input":"DeviceCameraTexture"} \ No newline at end of file diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_empty_segmentation/RenderTarget_Segmentation_1.rdt b/application/App-UIKit/segmentMotionRes.bundle/video_empty_segmentation/RenderTarget_Segmentation_1.rdt deleted file mode 100644 index e0eac56d..00000000 --- a/application/App-UIKit/segmentMotionRes.bundle/video_empty_segmentation/RenderTarget_Segmentation_1.rdt +++ /dev/null @@ -1 +0,0 @@ -{"type":"RenderTarget","key":"RenderTarget1","input":"","width":0,"height":0,"path":"RenderTarget_Segmentation_1.rdt"} \ No newline at end of file diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_empty_segmentation/defaultBackground.png b/application/App-UIKit/segmentMotionRes.bundle/video_empty_segmentation/defaultBackground.png deleted file mode 100644 index 29a3a820..00000000 Binary files a/application/App-UIKit/segmentMotionRes.bundle/video_empty_segmentation/defaultBackground.png and /dev/null differ diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_empty_segmentation/defaultBackgroundImage.png b/application/App-UIKit/segmentMotionRes.bundle/video_empty_segmentation/defaultBackgroundImage.png deleted file mode 100644 index 29a3a820..00000000 Binary files a/application/App-UIKit/segmentMotionRes.bundle/video_empty_segmentation/defaultBackgroundImage.png and /dev/null differ diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_empty_segmentation/defaultBackgroundVideo.mp4 b/application/App-UIKit/segmentMotionRes.bundle/video_empty_segmentation/defaultBackgroundVideo.mp4 deleted file mode 100644 index 8a6917d0..00000000 Binary files a/application/App-UIKit/segmentMotionRes.bundle/video_empty_segmentation/defaultBackgroundVideo.mp4 and /dev/null differ diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_empty_segmentation/template.json b/application/App-UIKit/segmentMotionRes.bundle/video_empty_segmentation/template.json deleted file mode 100644 index 769d8dec..00000000 --- a/application/App-UIKit/segmentMotionRes.bundle/video_empty_segmentation/template.json +++ /dev/null @@ -1,757 +0,0 @@ -{ - "isFragment": false, - "componentLevel": 280, - "madeIn": "LightStudio", - "root": { - "id": 16, - "name": "拍摄模板", - "children": [ - { - "id": 20, - "name": "非美型占位节点", - "children": [], - "enabled": true, - "version": 0, - "forbid": true, - "canNotRemove": true, - "isFirstChildren": true, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 20, - "componentID": 20001, - "level": 2 - }, - { - "beautyStatus": 1, - "componentID": 20002, - "enabled": true, - "entityId": 20, - "level": 280, - "makeupStatus": 1, - "smoothStatus": 0, - "type": "BasicBeautyPlaceHolder", - "version": 4 - }, - { - "type": "EntityIdentifier", - "name": "非美型占位节点", - "id": 20, - "originID": 20, - "enabled": true - } - ] - }, - { - "id": 17, - "name": "2D画板", - "children": [ - { - "id": 18, - "name": "人物分割", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 18, - "componentID": 18001, - "level": 2 - }, - { - "bgAlpha": 1, - "componentID": 18002, - "cutRange": [ - 0, - 0, - 0, - 0 - ], - "enabled": true, - "entityId": 18, - "level": 230, - "maskResource": "73b17b3e-d1fe-4a0a-8264-fc8ac065fec3", - "renderTarget": "RenderTarget1", - "strokeBorderType": "glow", - "strokeColor": "#ffffffff", - "strokeEnable": false, - "strokeGap": 0, - "strokeSpeedLevel": 50, - "strokeTextureColumn": 1, - "strokeTextureResource": "", - "strokeTextureRow": 1, - "strokeWidth": 12, - "type": "Segmentation", - "version": 14 - }, - { - "type": "EntityIdentifier", - "name": "人物分割", - "id": 18, - "originID": 18, - "enabled": true - } - ] - }, - { - "id": 19, - "name": "背景色", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "eKeepRatio": true, - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 19, - "componentID": 19001, - "type": "ScreenTransform", - "enabled": true, - "version": 101, - "level": 2 - }, - { - "componentID": 19002, - "enabled": true, - "entityId": 19, - "scaleMode": 3, - "src": "CustomBackground", - "type": "Image", - "version": 10, - "level": 1 - }, - { - "alpha": 1, - "mode": "normal", - "type": "BlendMode", - "enabled": true, - "entityId": 19, - "componentID": 19003, - "level": 2 - }, - { - "startOffset": 0, - "duration": 2000000, - "endOffset": -2147483648, - "loopCount": -1, - "type": "TimeOffset", - "enabled": true, - "entityId": 19, - "componentID": 19004, - "version": 3, - "level": 1 - }, - { - "type": "EntityIdentifier", - "name": "背景色", - "id": 19, - "originID": 19, - "enabled": true - } - ] - }, - { - "id": 28, - "name": "分割前景", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "eKeepRatio": true, - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 28, - "componentID": 28001, - "type": "ScreenTransform", - "enabled": true, - "version": 2, - "level": 2 - }, - { - "componentID": 28002, - "enabled": true, - "entityId": 28, - "scaleMode": 2, - "src": "RenderTarget1", - "type": "Image", - "version": 2, - "level": 1 - }, - { - "alpha": 1, - "mode": "normal", - "type": "BlendMode", - "enabled": true, - "entityId": 28, - "componentID": 28003, - "level": 2 - }, - { - "startOffset": 0, - "duration": 2000000, - "endOffset": -2147483648, - "loopCount": -1, - "type": "TimeOffset", - "enabled": true, - "entityId": 28, - "componentID": 28004, - "version": null, - "level": 1 - }, - { - "type": "EntityIdentifier", - "name": "分割前景", - "id": 28, - "originID": 28, - "enabled": true - } - ] - }, - { - "id": 21, - "name": "美型占位节点", - "children": [], - "enabled": true, - "version": 0, - "forbid": true, - "canNotRemove": true, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 21, - "componentID": 21001, - "level": 2 - }, - { - "componentID": 21002, - "enabled": true, - "entityId": 21, - "level": 280, - "reshapeStatus": 1, - "type": "BasicReshapePlaceHolder", - "version": 2 - }, - { - "type": "EntityIdentifier", - "name": "美型占位节点", - "id": 21, - "originID": 21, - "enabled": true - } - ] - } - ], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "entityId": 17, - "componentID": 17001, - "type": "ScreenTransform", - "enabled": true, - "version": 2, - "objectEnabled": true, - "level": 2 - }, - { - "componentID": 17002, - "enabled": true, - "entityId": 17, - "renderTargetKey": "RenderTarget", - "type": "Camera", - "version": 2, - "level": 2 - }, - { - "type": "EntityIdentifier", - "name": "2D画板", - "id": 17, - "originID": 17, - "enabled": true - } - ] - } - ], - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 16, - "componentID": 16001, - "type": "ScreenTransform", - "enabled": true, - "version": 44, - "level": 2 - }, - { - "enableRotation": true, - "resetWhenStartRecord": true, - "type": "ExtraSetting", - "enabled": true, - "version": 1, - "entityId": 16, - "componentID": 16002, - "level": 4, - "requireAbility": [] - }, - { - "type": "EntityIdentifier", - "name": "拍摄模板", - "id": 16, - "originID": 16, - "enabled": true - } - ], - "enabled": true, - "version": 0 - }, - "inputSources": { - "RenderTarget": { - "type": "RenderTarget", - "commandMap": {}, - "inputColor": "#ffffffff", - "sizeType": 0, - "compatibilityMode": true, - "depthType": "DEPTH24", - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "NEAREST", - "minFilter": "NEAREST", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "width": 0, - "height": 0, - "key": "RenderTarget", - "path": "RenderTarget.rdt", - "label": "RenderTarget.rdt", - "inputKey": "DeviceCameraTexture", - "input": "DeviceCameraTexture", - "level": 2 - }, - "DeviceCameraTexture": { - "type": "TextureData", - "commandMap": {}, - "key": "DeviceCameraTexture", - "path": "DeviceCameraTexture.tex", - "label": "DeviceCameraTexture.tex", - "level": 2 - }, - "73b17b3e-d1fe-4a0a-8264-fc8ac065fec3": { - "type": "segmentation/bg", - "commandMap": {}, - "key": "73b17b3e-d1fe-4a0a-8264-fc8ac065fec3", - "label": "BgSegmentation.bg", - "path": "BgSegmentation.bg", - "level": 2 - }, - "RenderTarget1": { - "type": "RenderTarget", - "commandMap": {}, - "inputColor": "#ffffffff", - "sizeType": 0, - "compatibilityMode": true, - "depthType": "DEPTH24", - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "NEAREST", - "minFilter": "NEAREST", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "width": 0, - "height": 0, - "key": "RenderTarget1", - "label": "RenderTarget_Segmentation_1.rdt", - "path": "RenderTarget_Segmentation_1.rdt", - "input": "", - "inputKey": "", - "inputType": "RT_InputType_Texture", - "level": 2 - }, - "CustomBackground": { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "CustomBackground", - "label": "defaultBackground.png", - "path": "defaultBackground.png", - "actualSize": 42516, - "resolution": { - "height": 1800, - "width": 1200 - }, - "level": 2, - "width": 1200, - "height": 1800 - }, - "5d323dad-179d-4f95-8bd5-af93668826fe": { - "type": "folder", - "commandMap": {}, - "key": "5d323dad-179d-4f95-8bd5-af93668826fe", - "label": "root", - "path": "./", - "level": 2 - }, - "CustomBackgroundImage": { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "CustomBackgroundImage", - "label": "defaultBackgroundImage.png", - "path": "defaultBackgroundImage.png", - "actualSize": 42516, - "resolution": { - "height": 1800, - "width": 1200 - }, - "level": 2, - "width": 1200, - "height": 1800 - }, - "CustomBackgroundVideo": { - "type": "VideoClipData", - "commandMap": {}, - "loopCount": 0, - "key": "CustomBackgroundVideo", - "label": "defaultBackgroundVideo.mp4", - "path": "defaultBackgroundVideo.mp4", - "duration": 1000000, - "timeRange": { - "startTime": 0, - "duration": 1000000 - }, - "resolution": { - "height": 720, - "width": 1280 - }, - "level": 2, - "actualSize": 3907 - } - }, - "preset": {}, - "properties": { - "layout": { - "width": 720, - "height": 1280 - }, - "boundsTrackerPlaceHolders": [], - "musicIDs": [], - "fonts": [], - "movieConfig": { - "sourceType": 2, - "minClipAssetCount": 1, - "maxClipAssetCount": 999, - "minImageDuration": 1000000, - "maxImageDuration": 10000000, - "minVideoDuration": 2000000, - "minFreezePointInterval": 0, - "preferredCoverTime": 1000000, - "originVolume": 1, - "cropEvents": [ - "SlowRhythmTrail" - ], - "imageCropSpace": 0, - "videoCropSpace": -1, - "disableEventsWhileTransition": true, - "useInternalRhythm": true, - "headProtectDuration": 0 - }, - "materialConfigs": [], - "resourceIDs": [] - } -} \ No newline at end of file diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_empty_segmentation/template.png b/application/App-UIKit/segmentMotionRes.bundle/video_empty_segmentation/template.png deleted file mode 100644 index bd97f93c..00000000 Binary files a/application/App-UIKit/segmentMotionRes.bundle/video_empty_segmentation/template.png and /dev/null differ diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_empty_segmentation/video_empty_segmentation.studio b/application/App-UIKit/segmentMotionRes.bundle/video_empty_segmentation/video_empty_segmentation.studio deleted file mode 100644 index f533b468..00000000 --- a/application/App-UIKit/segmentMotionRes.bundle/video_empty_segmentation/video_empty_segmentation.studio +++ /dev/null @@ -1,684 +0,0 @@ -{ - "name": "video_empty_segmentation", - "author": "zhenli", - "category": 1, - "scene": { - "id": 16, - "name": "拍摄模板", - "children": [ - { - "id": 20, - "name": "非美型占位节点", - "children": [], - "enabled": true, - "version": 0, - "forbid": true, - "canNotRemove": true, - "isFirstChildren": true, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 20, - "componentID": 20001, - "level": 2 - }, - { - "beautyStatus": 1, - "componentID": 20002, - "enabled": true, - "entityId": 20, - "level": 280, - "makeupStatus": 1, - "smoothStatus": 0, - "type": "BasicBeautyPlaceHolder", - "version": 4 - } - ] - }, - { - "id": 17, - "name": "2D画板", - "children": [ - { - "id": 18, - "name": "人物分割", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 18, - "componentID": 18001, - "level": 2 - }, - { - "bgAlpha": 1, - "componentID": 18002, - "cutRange": [ - 0, - 0, - 0, - 0 - ], - "enabled": true, - "entityId": 18, - "level": 230, - "maskResource": "73b17b3e-d1fe-4a0a-8264-fc8ac065fec3", - "renderTarget": "RenderTarget1", - "strokeBorderType": "glow", - "strokeColor": "#ffffffff", - "strokeEnable": false, - "strokeGap": 0, - "strokeSpeedLevel": 50, - "strokeTextureColumn": 1, - "strokeTextureResource": "", - "strokeTextureRow": 1, - "strokeWidth": 12, - "type": "Segmentation", - "version": 14 - } - ] - }, - { - "id": 19, - "name": "背景色", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "eKeepRatio": true, - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 19, - "componentID": 19001, - "type": "ScreenTransform", - "enabled": true, - "version": 101, - "level": 2 - }, - { - "componentID": 19002, - "enabled": true, - "entityId": 19, - "scaleMode": 3, - "src": "CustomBackground", - "type": "Image", - "version": 10, - "level": 1 - }, - { - "alpha": 1, - "mode": "normal", - "type": "BlendMode", - "enabled": true, - "entityId": 19, - "componentID": 19003, - "level": 2 - }, - { - "eAlignMode": 2, - "startOffset": 0, - "duration": 2000000, - "endOffset": 0, - "loopCount": -1, - "type": "TimeOffset", - "enabled": true, - "entityId": 19, - "componentID": 19004, - "version": 3, - "level": 1 - } - ] - }, - { - "id": 28, - "name": "分割前景", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "eKeepRatio": true, - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 28, - "componentID": 28001, - "type": "ScreenTransform", - "enabled": true, - "version": 2, - "level": 2 - }, - { - "componentID": 28002, - "enabled": true, - "entityId": 28, - "scaleMode": 2, - "src": "RenderTarget1", - "type": "Image", - "version": 2, - "level": 1 - }, - { - "alpha": 1, - "mode": "normal", - "type": "BlendMode", - "enabled": true, - "entityId": 28, - "componentID": 28003, - "level": 2 - }, - { - "eAlignMode": 2, - "startOffset": 0, - "duration": 2000000, - "endOffset": 0, - "loopCount": -1, - "type": "TimeOffset", - "enabled": true, - "entityId": 28, - "componentID": 28004, - "version": null, - "level": 1 - } - ] - }, - { - "id": 21, - "name": "美型占位节点", - "children": [], - "enabled": true, - "version": 0, - "forbid": true, - "canNotRemove": true, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 21, - "componentID": 21001, - "level": 2 - }, - { - "componentID": 21002, - "enabled": true, - "entityId": 21, - "level": 280, - "reshapeStatus": 1, - "type": "BasicReshapePlaceHolder", - "version": 2 - } - ] - } - ], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 0, - "x": 0, - "y": 0, - "z": 0 - }, - "entityId": 17, - "componentID": 17001, - "type": "ScreenTransform", - "enabled": true, - "version": 2, - "objectEnabled": true, - "level": 2 - }, - { - "componentID": 17002, - "enabled": true, - "entityId": 17, - "renderTargetKey": "RenderTarget", - "type": "Camera", - "version": 2, - "level": 2 - } - ] - } - ], - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 0, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 16, - "componentID": 16001, - "type": "ScreenTransform", - "enabled": true, - "version": 44, - "level": 2 - }, - { - "enableRotation": true, - "resetWhenStartRecord": true, - "type": "ExtraSetting", - "enabled": true, - "version": 1, - "entityId": 16, - "componentID": 16002, - "level": 4 - } - ], - "enabled": true, - "version": 0 - }, - "resources": { - "items": [ - { - "type": "folder", - "commandMap": {}, - "key": "5d323dad-179d-4f95-8bd5-af93668826fe", - "label": "root", - "path": "./", - "level": 2 - }, - { - "type": "segmentation/bg", - "commandMap": {}, - "key": "73b17b3e-d1fe-4a0a-8264-fc8ac065fec3", - "label": "BgSegmentation.bg", - "path": "BgSegmentation.bg", - "level": 2 - }, - { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "CustomBackground", - "label": "defaultBackground.png", - "path": "defaultBackground.png", - "actualSize": 42516, - "resolution": { - "height": 1800, - "width": 1200 - }, - "level": 2, - "width": 1200, - "height": 1800 - }, - { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "key": "CustomBackgroundImage", - "label": "defaultBackgroundImage.png", - "path": "defaultBackgroundImage.png", - "actualSize": 42516, - "resolution": { - "height": 1800, - "width": 1200 - }, - "level": 2, - "width": 1200, - "height": 1800 - }, - { - "type": "VideoClipData", - "commandMap": {}, - "loopCount": 0, - "key": "CustomBackgroundVideo", - "label": "defaultBackgroundVideo.mp4", - "path": "defaultBackgroundVideo.mp4", - "duration": 1000000, - "timeRange": { - "startTime": 0, - "duration": 1000000 - }, - "resolution": { - "height": 720, - "width": 1280 - }, - "level": 2, - "actualSize": 3907 - }, - { - "type": "TextureData", - "commandMap": {}, - "key": "DeviceCameraTexture", - "path": "DeviceCameraTexture.tex", - "label": "DeviceCameraTexture.tex", - "level": 2 - }, - { - "type": "RenderTarget", - "commandMap": {}, - "inputColor": "#ffffffff", - "sizeType": 0, - "compatibilityMode": true, - "depthType": "DEPTH24", - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "NEAREST", - "minFilter": "NEAREST", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "width": 0, - "height": 0, - "key": "RenderTarget", - "path": "RenderTarget.rdt", - "label": "RenderTarget.rdt", - "inputKey": "DeviceCameraTexture", - "input": "DeviceCameraTexture", - "level": 2 - }, - { - "type": "RenderTarget", - "commandMap": {}, - "inputColor": "#ffffffff", - "sizeType": 0, - "compatibilityMode": true, - "depthType": "DEPTH24", - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "NEAREST", - "minFilter": "NEAREST", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "width": 0, - "height": 0, - "key": "RenderTarget1", - "label": "RenderTarget_Segmentation_1.rdt", - "path": "RenderTarget_Segmentation_1.rdt", - "input": "", - "inputKey": "", - "inputType": "RT_InputType_Texture", - "level": 2 - } - ] - }, - "cloudResourceData": [], - "componentLevel": 280, - "path": "/Users/brycezhang/workspace/xmagic/assets/MotionRes/segmentMotionRes/video_empty_segmentation/", - "updateTime": "2023-12-04 20:29:28" -} \ No newline at end of file diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen/CustomRender.zip b/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen/CustomRender.zip deleted file mode 100644 index 27d75198..00000000 Binary files a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen/CustomRender.zip and /dev/null differ diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen/CustomRender/CustomRender.json b/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen/CustomRender/CustomRender.json deleted file mode 100644 index df42fe9c..00000000 --- a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen/CustomRender/CustomRender.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "renderOrder": [ - { - "renderType": "kCustomShader", - "renderId": "chromakey", - "uniform": { - "key_color": [ - 0.0, - 0.0, - 0.0, - 0.0 - ], - "green_params": [ - 0.413, - 0.5, - 1.0, - 1.0 - ], - "tex_rect":[ - 0.0, - 0.0, - 720.0, - 1280.0 - ], - "tex_protect_rect":[ - 0.0, - 0.0, - 0.0, - 0.0 - ] - }, - "vertexPath": "vs_simple.bin", - "fragmentPath": "fs_chromakey.bin" - } - ] -} diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen/CustomRender/fs_chromakey.bin b/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen/CustomRender/fs_chromakey.bin deleted file mode 100644 index d8beb95b..00000000 Binary files a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen/CustomRender/fs_chromakey.bin and /dev/null differ diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen/CustomRender/vs_simple.bin b/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen/CustomRender/vs_simple.bin deleted file mode 100644 index 3a4cf360..00000000 Binary files a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen/CustomRender/vs_simple.bin and /dev/null differ diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen/DeviceCameraTexture.tex b/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen/DeviceCameraTexture.tex deleted file mode 100644 index 119ca577..00000000 --- a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen/DeviceCameraTexture.tex +++ /dev/null @@ -1,4 +0,0 @@ -{ - "type": "TextureData", - "key": "DeviceCameraTexture" -} \ No newline at end of file diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen/PostEffect.post b/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen/PostEffect.post deleted file mode 100644 index 38f2fe23..00000000 --- a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen/PostEffect.post +++ /dev/null @@ -1 +0,0 @@ -{"effectType":"blur","subEffectType":"blur","kiraEffectType":"dynamic","effectStrength":8,"starMaxScale":0.5,"starMinScale":0.1,"starScaleTransformation":true,"starScalePeriod":1000,"scaleType":"normal","scaleFrequencyType":"synchronize","scaleFrequency":25,"starScaleRate":0.1,"setScale":false,"probabilityLow":1,"probabilityHigh":1,"minFeatureDistance":3,"fastPointNum":20,"fastThreshold":15,"maxCorners":20,"minDistance":5,"maxFeatureDetectNum":200,"maxKiraNum":20,"seedNum":8,"grayThreshold":5,"stabilityFactor":5,"highLightThreshold":0.3,"shaking":false,"kiraBrightness":1,"alphaChange":true,"maxAlpha":0.5,"minAlpha":0.1,"enableColorful":false,"colorMixPlan":"default","colorNum":4,"colorPath":"","colorBlendMode":"normal","blendMode":"screen","fastNumPercentage":0.8,"clusterDistance":10,"shakeDisPlacement":8,"sleepTime":15,"clusterMaxSize":5,"switchEnvironment":false,"filePaths":[],"brightness":0,"contrast":0,"hue":0,"highlights":0,"sharpness":0,"shadows":0,"saturation":0,"temperature":0,"fade":0,"vignetting":0,"pitu_mode":0,"defocusGamaPath":"","defocusAntigamaPath":"","defocusBinPath":"","defocusMaskPath":"","defocusAlpha":0} \ No newline at end of file diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen/RenderTarget.rdt b/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen/RenderTarget.rdt deleted file mode 100644 index a98616e9..00000000 --- a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen/RenderTarget.rdt +++ /dev/null @@ -1 +0,0 @@ -{"type":"RenderTarget","path":"RenderTarget.rdt","key":"RenderTarget","input":"DeviceCameraTexture"} \ No newline at end of file diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen/RenderTarget_camera_1.rdt b/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen/RenderTarget_camera_1.rdt deleted file mode 100644 index db35386a..00000000 --- a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen/RenderTarget_camera_1.rdt +++ /dev/null @@ -1 +0,0 @@ -{"type":"RenderTarget","key":"RenderTarget1","input":"","width":0,"height":0,"inputType":"RT_InputType_Texture","sizeType":0,"path":"RenderTarget_camera_1.rdt","depthType":"DEPTH24"} \ No newline at end of file diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen/RenderTarget_camera_2.rdt b/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen/RenderTarget_camera_2.rdt deleted file mode 100644 index 8b27983f..00000000 --- a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen/RenderTarget_camera_2.rdt +++ /dev/null @@ -1 +0,0 @@ -{"type":"RenderTarget","key":"RenderTarget2","input":"","width":0,"height":0,"inputType":"RT_InputType_Texture","sizeType":0,"path":"RenderTarget_camera_2.rdt","depthType":"DEPTH24"} \ No newline at end of file diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen/defaultBackground.png b/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen/defaultBackground.png deleted file mode 100644 index 29a3a820..00000000 Binary files a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen/defaultBackground.png and /dev/null differ diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen/defaultBackgroundImage.png b/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen/defaultBackgroundImage.png deleted file mode 100644 index 29a3a820..00000000 Binary files a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen/defaultBackgroundImage.png and /dev/null differ diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen/defaultBackgroundVideo.mp4 b/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen/defaultBackgroundVideo.mp4 deleted file mode 100644 index 8a6917d0..00000000 Binary files a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen/defaultBackgroundVideo.mp4 and /dev/null differ diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen/script.js b/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen/script.js deleted file mode 100644 index 9e2ecbc9..00000000 --- a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen/script.js +++ /dev/null @@ -1,78 +0,0 @@ -/*** light-js-config -***/ -// 加载 AEJSBridge.js -light.execute("light://js/AEJSBridge.js"); - -// 素材逻辑函数体 -(function () { - // 定义global对象 - var global = global || (function () {return this;}()); - // 定义素材对象 - var template = global.template || (function () {return {};}()); - // 并挂在global对象下 - global.template = template; - // 定义需要用到的resource - var resourcePool = { - } - //初始化一个jsonObject, - template.uniformJson = { - "uniformMap": { - "chromakey" : { - "key_color" : [0.0, 1.0, 0.0, 0.0], - "green_params": [0.413, 0.5, 1.0, 1.0], - "tex_rect" : [0.0, 0.0, 720.0, 1280.0], - "tex_protect_rect" : [0.0, 0.0, 0.0, 0.0] - } - } - } - // 也挂在global对象下 - global.resourcePool = resourcePool; - - -// // 订阅InputEvent事件 - template.onInputEvent = function(params) { - var jsonData = params["event.script.lightsdk.GreenScreenSetKeyColor"]; - var jsonDataParams = params["event.script.lightsdk.GreenScreenSetGreenParams"]; - var jsonDataProtectRect = params["event.script.lightsdk.GreenScreenSetProtectRect"]; - - if (jsonData) { - // 目前只会改这三个 - template.uniformJson.uniformMap.chromakey.key_color[0] = jsonData["key_color"][0]; - template.uniformJson.uniformMap.chromakey.key_color[1] = jsonData["key_color"][1]; - template.uniformJson.uniformMap.chromakey.key_color[2] = jsonData["key_color"][2]; - } - if(jsonDataParams){ - template.uniformJson.uniformMap.chromakey.green_params[0] = jsonDataParams["green_params"][0]; - template.uniformJson.uniformMap.chromakey.green_params[1] = jsonDataParams["green_params"][1]; - template.uniformJson.uniformMap.chromakey.green_params[2] = jsonDataParams["green_params"][2]; - template.uniformJson.uniformMap.chromakey.green_params[3] = jsonDataParams["green_params"][3]; - } - - if(jsonDataProtectRect){ - template.uniformJson.uniformMap.chromakey.tex_protect_rect[0] = jsonDataProtectRect["tex_protect_rect"][0]; - template.uniformJson.uniformMap.chromakey.tex_protect_rect[1] = 1.0 - jsonDataProtectRect["tex_protect_rect"][1]; - template.uniformJson.uniformMap.chromakey.tex_protect_rect[2] = jsonDataProtectRect["tex_protect_rect"][2]; - template.uniformJson.uniformMap.chromakey.tex_protect_rect[3] = 1.0 - jsonDataProtectRect["tex_protect_rect"][3]; - } - - } - - // 素材初始化, 对应c++的configure - template.onTemplateInit = function (entityManager, eventManager) { - template.customGraph = light.getComponent( - entityManager.getEntityByName("CustomGraph"), - "CustomGraph" - ); - } - // 对应c++的update - template.onFrameUpdate = function (currentTime, entityManager, eventManager) { - //将得到的uniformJson传递到自定义滤镜链中 - var surfaceWidth = light.DeviceUtils.GetSurfaceWidth(entityManager); - var surfaceHeight = light.DeviceUtils.GetSurfaceHeight(entityManager); - - template.uniformJson.uniformMap.chromakey.tex_rect[2] = surfaceWidth; - template.uniformJson.uniformMap.chromakey.tex_rect[3] = surfaceHeight; - - template.customGraph.uniformJson = JSON.stringify(template.uniformJson); - } -}()); diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen/template.json b/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen/template.json deleted file mode 100644 index 4046cf2e..00000000 --- a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen/template.json +++ /dev/null @@ -1,827 +0,0 @@ -{ - "isFragment": false, - "componentLevel": 325, - "madeIn": "LightStudio", - "root": { - "id": 16, - "name": "拍摄模板", - "children": [ - { - "id": 17, - "name": "绿幕抠图画板", - "children": [ - { - "id": 18, - "name": "CustomGraph", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "top": 1, - "bottom": -1, - "left": -1, - "right": 1 - }, - "offset": { - "top": 0, - "bottom": 0, - "left": 0, - "right": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "objectEnabled": true, - "interactive": false, - "enabled": true, - "entityId": 18, - "componentID": 18001, - "level": 2 - }, - { - "componentID": 18002, - "enabled": true, - "entityId": 18, - "level": 325, - "resourcePath": "646212fb-2c67-4a40-8325-ac159a4ee533", - "type": "CustomGraph", - "version": 283 - }, - { - "componentID": 18003, - "enabled": true, - "entityId": 18, - "level": 4, - "scriptPath": "34f323b7-ad28-40a8-b5b5-a65c74e5d147", - "type": "Script", - "version": 45 - }, - { - "type": "EntityIdentifier", - "name": "CustomGraph", - "id": 18, - "originID": 18, - "enabled": true - } - ] - } - ], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "entityId": 17, - "componentID": 17001, - "type": "ScreenTransform", - "enabled": true, - "version": 2, - "objectEnabled": true, - "level": 2 - }, - { - "componentID": 17002, - "enabled": true, - "entityId": 17, - "level": 2, - "renderTargetKey": "RenderTarget", - "type": "Camera", - "version": 6 - }, - { - "type": "EntityIdentifier", - "name": "绿幕抠图画板", - "id": 17, - "originID": 17, - "enabled": true - } - ] - }, - { - "id": 19, - "name": "模糊叠加画板", - "children": [ - { - "id": 22, - "name": "背景贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "eKeepRatio": true, - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 22, - "componentID": 22001, - "type": "ScreenTransform", - "enabled": true, - "version": 390, - "interactive": false, - "level": 2 - }, - { - "componentID": 22002, - "enabled": true, - "entityId": 22, - "level": 1, - "scaleMode": 3, - "src": "CustomBackground", - "type": "Image", - "version": 76 - }, - { - "alpha": 1, - "componentID": 22003, - "enabled": true, - "entityId": 22, - "level": 2, - "mode": "normal", - "type": "BlendMode", - "version": 71 - }, - { - "startOffset": 0, - "duration": 2000000, - "endOffset": -2147483648, - "loopCount": -1, - "type": "TimeOffset", - "enabled": true, - "entityId": 22, - "componentID": 22004, - "level": 1, - "version": 33 - }, - { - "type": "EntityIdentifier", - "name": "背景贴纸", - "id": 22, - "originID": 22, - "enabled": true - } - ] - }, - { - "id": 23, - "name": "抠图贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "eKeepRatio": true, - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 23, - "componentID": 23001, - "type": "ScreenTransform", - "enabled": true, - "version": 902, - "interactive": false, - "level": 2 - }, - { - "componentID": 23002, - "enabled": true, - "entityId": 23, - "level": 1, - "scaleMode": 2, - "src": "RenderTarget", - "type": "Image", - "version": 24 - }, - { - "alpha": 1, - "componentID": 23003, - "enabled": true, - "entityId": 23, - "level": 2, - "mode": "normal", - "type": "BlendMode", - "version": 124 - }, - { - "startOffset": 0, - "duration": 2000000, - "endOffset": -2147483648, - "loopCount": -1, - "type": "TimeOffset", - "enabled": true, - "entityId": 23, - "componentID": 23004, - "level": 1, - "version": null - }, - { - "type": "EntityIdentifier", - "name": "抠图贴纸", - "id": 23, - "originID": 23, - "enabled": true - } - ] - } - ], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "top": 1, - "bottom": -1, - "left": -1, - "right": 1 - }, - "offset": { - "top": 0, - "bottom": 0, - "left": 0, - "right": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "objectEnabled": true, - "interactive": false, - "enabled": true, - "entityId": 19, - "componentID": 19001, - "level": 2 - }, - { - "componentID": 19002, - "duplicateInput": 0, - "enabled": true, - "entityId": 19, - "level": 2, - "renderTargetKey": "RenderTarget2", - "type": "Camera", - "version": 4 - }, - { - "type": "EntityIdentifier", - "name": "模糊叠加画板", - "id": 19, - "originID": 19, - "enabled": true - } - ] - } - ], - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 16, - "componentID": 16001, - "type": "ScreenTransform", - "enabled": true, - "version": 4, - "level": 2 - }, - { - "defaultCameraPosition": 0, - "enableDowngradeAsset": true, - "enableRotation": true, - "needAutoBeauty": false, - "needVoiceDecibel": false, - "resetWhenStartRecord": true, - "supportCameraPosition": 0, - "sync3dRenderEnable": false, - "type": "ExtraSetting", - "enabled": true, - "version": 1, - "entityId": 16, - "componentID": 16002, - "level": 4, - "requireAbility": [] - }, - { - "type": "EntityIdentifier", - "name": "拍摄模板", - "id": 16, - "originID": 16, - "enabled": true - } - ], - "enabled": true, - "version": 0 - }, - "inputSources": { - "RenderTarget": { - "type": "RenderTarget", - "commandMap": {}, - "inputColor": "#ffffffff", - "sizeType": 0, - "compatibilityMode": true, - "depthType": "DEPTH24", - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": false, - "samplerType": "SAMPLER_2D" - }, - "useForDisplay": false, - "key": "RenderTarget", - "label": "RenderTarget.rdt", - "path": "RenderTarget.rdt", - "input": "DeviceCameraTexture", - "level": 2, - "inputKey": "DeviceCameraTexture", - "width": 0, - "height": 0 - }, - "DeviceCameraTexture": { - "type": "TextureData", - "commandMap": {}, - "key": "DeviceCameraTexture", - "label": "DeviceCameraTexture.tex", - "path": "DeviceCameraTexture.tex", - "level": 2 - }, - "646212fb-2c67-4a40-8325-ac159a4ee533": { - "type": "zip", - "commandMap": {}, - "key": "646212fb-2c67-4a40-8325-ac159a4ee533", - "label": "CustomRender.zip", - "path": "CustomRender.zip", - "level": 2 - }, - "34f323b7-ad28-40a8-b5b5-a65c74e5d147": { - "type": "js", - "commandMap": {}, - "key": "34f323b7-ad28-40a8-b5b5-a65c74e5d147", - "label": "script.js", - "path": "script.js", - "level": 2, - "requireAbilities": [] - }, - "RenderTarget2": { - "type": "RenderTarget", - "commandMap": {}, - "inputColor": "#ffffffff", - "sizeType": 0, - "compatibilityMode": true, - "depthType": "DEPTH24", - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": false, - "samplerType": "SAMPLER_2D" - }, - "key": "RenderTarget2", - "label": "RenderTarget_camera_2.rdt", - "path": "RenderTarget_camera_2.rdt", - "input": "", - "inputType": "RT_InputType_Texture", - "level": 2, - "inputKey": "", - "width": 0, - "height": 0 - }, - "CustomBackground": { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "reSize": 1, - "key": "CustomBackground", - "label": "defaultBackground.png", - "path": "defaultBackground.png", - "level": 2, - "actualSize": 42516, - "resolution": { - "height": 1800, - "width": 1200 - }, - "width": 1200, - "height": 1800 - }, - "16a7a2e2-2fb6-4370-b7af-0876c0d003bb": { - "type": "folder", - "commandMap": {}, - "key": "16a7a2e2-2fb6-4370-b7af-0876c0d003bb", - "label": "root", - "path": "./", - "level": 2 - }, - "14a13923-c22e-4fb5-8c5a-bc126207759d": { - "type": "folder", - "commandMap": {}, - "key": "14a13923-c22e-4fb5-8c5a-bc126207759d", - "label": "CustomRender", - "path": "CustomRender", - "level": 2 - }, - "f5802f84-b090-4338-a22a-87f7374bb318": { - "type": "JsonData", - "commandMap": {}, - "key": "f5802f84-b090-4338-a22a-87f7374bb318", - "label": "CustomRender.json", - "path": "CustomRender/CustomRender.json", - "level": 2 - }, - "1e0eef7e-3258-433d-b3fe-f23b968610a0": { - "type": "gltf_bin", - "commandMap": {}, - "key": "1e0eef7e-3258-433d-b3fe-f23b968610a0", - "label": "fs_chromakey.bin", - "path": "CustomRender/fs_chromakey.bin", - "level": 2 - }, - "a190277d-4203-4a1c-bab7-af116218b421": { - "type": "gltf_bin", - "commandMap": {}, - "key": "a190277d-4203-4a1c-bab7-af116218b421", - "label": "vs_simple.bin", - "path": "CustomRender/vs_simple.bin", - "level": 2 - }, - "CustomBackgroundImage": { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "reSize": 1, - "key": "CustomBackgroundImage", - "label": "defaultBackgroundImage.png", - "path": "defaultBackgroundImage.png", - "level": 2, - "actualSize": 42516, - "resolution": { - "height": 1800, - "width": 1200 - }, - "width": 1200, - "height": 1800 - }, - "CustomBackgroundVideo": { - "type": "VideoClipData", - "commandMap": {}, - "loopCount": 0, - "key": "CustomBackgroundVideo", - "label": "defaultBackgroundVideo.mp4", - "path": "defaultBackgroundVideo.mp4", - "duration": 1000000, - "timeRange": { - "startTime": 0, - "duration": 1000000 - }, - "level": 2, - "actualSize": 3907, - "resolution": { - "height": 720, - "width": 1280 - } - }, - "f1fee01b-3cf6-4e52-95e2-820085f9a948": { - "type": "PostEffectData", - "commandMap": {}, - "postEffectOptions": { - "effectType": "blur", - "subEffectType": "blur", - "kiraEffectType": "dynamic", - "effectStrength": 8, - "starMaxScale": 0.5, - "starMinScale": 0.1, - "starScaleTransformation": true, - "starScalePeriod": 1000, - "scaleType": "normal", - "scaleFrequencyType": "synchronize", - "scaleFrequency": 25, - "starScaleRate": 0.1, - "setScale": false, - "probabilityLow": 1, - "probabilityHigh": 1, - "minFeatureDistance": 3, - "fastPointNum": 20, - "fastThreshold": 15, - "maxCorners": 20, - "minDistance": 5, - "maxFeatureDetectNum": 200, - "maxKiraNum": 20, - "seedNum": 8, - "grayThreshold": 5, - "stabilityFactor": 5, - "highLightThreshold": 0.3, - "shaking": false, - "kiraBrightness": 1, - "alphaChange": true, - "maxAlpha": 0.5, - "minAlpha": 0.1, - "enableColorful": false, - "colorMixPlan": "default", - "colorNum": 4, - "colorPath": "", - "colorBlendMode": "normal", - "blendMode": "screen", - "fastNumPercentage": 0.8, - "clusterDistance": 10, - "shakeDisPlacement": 8, - "sleepTime": 15, - "clusterMaxSize": 5, - "switchEnvironment": false, - "filePaths": [], - "brightness": 0, - "contrast": 0, - "hue": 0, - "highlights": 0, - "sharpness": 0, - "shadows": 0, - "saturation": 0, - "temperature": 0, - "fade": 0, - "vignetting": 0, - "pitu_mode": 0, - "defocusGamaPath": "", - "defocusAntigamaPath": "", - "defocusBinPath": "", - "defocusMaskPath": "", - "defocusAlpha": 0 - }, - "key": "f1fee01b-3cf6-4e52-95e2-820085f9a948", - "label": "PostEffect.post", - "path": "PostEffect.post", - "level": 315, - "existingType": "blur" - }, - "RenderTarget1": { - "type": "RenderTarget", - "commandMap": {}, - "inputColor": "#ffffffff", - "sizeType": 0, - "compatibilityMode": true, - "depthType": "DEPTH24", - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": false, - "samplerType": "SAMPLER_2D" - }, - "useForDisplay": false, - "key": "RenderTarget1", - "label": "RenderTarget_camera_1.rdt", - "path": "RenderTarget_camera_1.rdt", - "input": "", - "inputType": "RT_InputType_Texture", - "level": 2, - "inputKey": "", - "width": 0, - "height": 0 - } - }, - "preset": {}, - "properties": { - "layout": { - "width": 720, - "height": 1280 - }, - "boundsTrackerPlaceHolders": [], - "musicIDs": [], - "fonts": [], - "movieConfig": { - "sourceType": 2, - "minClipAssetCount": 1, - "maxClipAssetCount": 999, - "minImageDuration": 1000000, - "maxImageDuration": 10000000, - "minVideoDuration": 2000000, - "minFreezePointInterval": 0, - "preferredCoverTime": 1000000, - "originVolume": 1, - "cropEvents": [ - "SlowRhythmTrail" - ], - "imageCropSpace": 0, - "videoCropSpace": -1, - "disableEventsWhileTransition": true, - "useInternalRhythm": true, - "headProtectDuration": 0 - }, - "materialConfigs": [], - "resourceIDs": [] - } -} \ No newline at end of file diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen/template.png b/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen/template.png deleted file mode 100644 index bd97f93c..00000000 Binary files a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen/template.png and /dev/null differ diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen/video_greenscreen.studio b/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen/video_greenscreen.studio deleted file mode 100644 index 49a35e72..00000000 --- a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen/video_greenscreen.studio +++ /dev/null @@ -1,763 +0,0 @@ -{ - "name": "chromakey", - "author": "brycezhang", - "category": 1, - "scene": { - "id": 16, - "name": "拍摄模板", - "children": [ - { - "id": 17, - "name": "绿幕抠图画板", - "children": [ - { - "id": 18, - "name": "CustomGraph", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "top": 1, - "bottom": -1, - "left": -1, - "right": 1 - }, - "offset": { - "top": 0, - "bottom": 0, - "left": 0, - "right": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "objectEnabled": true, - "interactive": false, - "enabled": true, - "entityId": 18, - "componentID": 18001, - "level": 2 - }, - { - "componentID": 18002, - "enabled": true, - "entityId": 18, - "level": 325, - "resourcePath": "646212fb-2c67-4a40-8325-ac159a4ee533", - "type": "CustomGraph", - "version": 283 - }, - { - "componentID": 18003, - "enabled": true, - "entityId": 18, - "level": 4, - "scriptPath": "34f323b7-ad28-40a8-b5b5-a65c74e5d147", - "type": "Script", - "version": 45 - } - ] - } - ], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 0, - "x": 0, - "y": 0, - "z": 0 - }, - "entityId": 17, - "componentID": 17001, - "type": "ScreenTransform", - "enabled": true, - "version": 2, - "objectEnabled": true, - "level": 2 - }, - { - "componentID": 17002, - "enabled": true, - "entityId": 17, - "level": 2, - "renderTargetKey": "RenderTarget", - "type": "Camera", - "version": 6 - } - ] - }, - { - "id": 19, - "name": "模糊叠加画板", - "children": [ - { - "id": 22, - "name": "背景贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "eKeepRatio": true, - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 22, - "componentID": 22001, - "type": "ScreenTransform", - "enabled": true, - "version": 390, - "interactive": false, - "level": 2 - }, - { - "componentID": 22002, - "enabled": true, - "entityId": 22, - "level": 1, - "scaleMode": 3, - "src": "CustomBackground", - "type": "Image", - "version": 76 - }, - { - "alpha": 1, - "componentID": 22003, - "enabled": true, - "entityId": 22, - "level": 2, - "mode": "normal", - "type": "BlendMode", - "version": 71 - }, - { - "eAlignMode": 2, - "startOffset": 0, - "duration": 2000000, - "endOffset": 0, - "loopCount": -1, - "type": "TimeOffset", - "enabled": true, - "entityId": 22, - "componentID": 22004, - "level": 1, - "version": 33 - } - ] - }, - { - "id": 23, - "name": "抠图贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "eKeepRatio": true, - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 23, - "componentID": 23001, - "type": "ScreenTransform", - "enabled": true, - "version": 902, - "interactive": false, - "level": 2 - }, - { - "componentID": 23002, - "enabled": true, - "entityId": 23, - "level": 1, - "scaleMode": 2, - "src": "RenderTarget", - "type": "Image", - "version": 24 - }, - { - "alpha": 1, - "componentID": 23003, - "enabled": true, - "entityId": 23, - "level": 2, - "mode": "normal", - "type": "BlendMode", - "version": 124 - }, - { - "eAlignMode": 2, - "startOffset": 0, - "duration": 2000000, - "endOffset": 0, - "loopCount": -1, - "type": "TimeOffset", - "enabled": true, - "entityId": 23, - "componentID": 23004, - "level": 1, - "version": null - } - ] - } - ], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "top": 1, - "bottom": -1, - "left": -1, - "right": 1 - }, - "offset": { - "top": 0, - "bottom": 0, - "left": 0, - "right": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "objectEnabled": true, - "interactive": false, - "enabled": true, - "entityId": 19, - "componentID": 19001, - "level": 2 - }, - { - "componentID": 19002, - "duplicateInput": 0, - "enabled": true, - "entityId": 19, - "level": 2, - "renderTargetKey": "RenderTarget2", - "type": "Camera", - "version": 4 - } - ] - } - ], - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 0, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 16, - "componentID": 16001, - "type": "ScreenTransform", - "enabled": true, - "version": 4, - "level": 2 - }, - { - "defaultCameraPosition": 0, - "enableDowngradeAsset": true, - "enableRotation": true, - "needAutoBeauty": false, - "needVoiceDecibel": false, - "resetWhenStartRecord": true, - "supportCameraPosition": 0, - "sync3dRenderEnable": false, - "type": "ExtraSetting", - "enabled": true, - "version": 1, - "entityId": 16, - "componentID": 16002, - "level": 4 - } - ], - "enabled": true, - "version": 0 - }, - "resources": { - "items": [ - { - "type": "folder", - "commandMap": {}, - "key": "16a7a2e2-2fb6-4370-b7af-0876c0d003bb", - "label": "root", - "path": "./", - "level": 2 - }, - { - "type": "folder", - "commandMap": {}, - "key": "14a13923-c22e-4fb5-8c5a-bc126207759d", - "label": "CustomRender", - "path": "CustomRender", - "level": 2 - }, - { - "type": "JsonData", - "commandMap": {}, - "key": "f5802f84-b090-4338-a22a-87f7374bb318", - "label": "CustomRender.json", - "path": "CustomRender/CustomRender.json", - "level": 2 - }, - { - "type": "gltf_bin", - "commandMap": {}, - "key": "1e0eef7e-3258-433d-b3fe-f23b968610a0", - "label": "fs_chromakey.bin", - "path": "CustomRender/fs_chromakey.bin", - "level": 2 - }, - { - "type": "gltf_bin", - "commandMap": {}, - "key": "a190277d-4203-4a1c-bab7-af116218b421", - "label": "vs_simple.bin", - "path": "CustomRender/vs_simple.bin", - "level": 2 - }, - { - "type": "zip", - "commandMap": {}, - "key": "646212fb-2c67-4a40-8325-ac159a4ee533", - "label": "CustomRender.zip", - "path": "CustomRender.zip", - "level": 2 - }, - { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "reSize": 1, - "key": "CustomBackground", - "label": "defaultBackground.png", - "path": "defaultBackground.png", - "level": 2, - "actualSize": 42516, - "resolution": { - "height": 1800, - "width": 1200 - }, - "width": 1200, - "height": 1800 - }, - { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "reSize": 1, - "key": "CustomBackgroundImage", - "label": "defaultBackgroundImage.png", - "path": "defaultBackgroundImage.png", - "level": 2, - "actualSize": 42516, - "resolution": { - "height": 1800, - "width": 1200 - }, - "width": 1200, - "height": 1800 - }, - { - "type": "VideoClipData", - "commandMap": {}, - "loopCount": 0, - "key": "CustomBackgroundVideo", - "label": "defaultBackgroundVideo.mp4", - "path": "defaultBackgroundVideo.mp4", - "duration": 1000000, - "timeRange": { - "startTime": 0, - "duration": 1000000 - }, - "level": 2, - "actualSize": 3907, - "resolution": { - "height": 720, - "width": 1280 - } - }, - { - "type": "TextureData", - "commandMap": {}, - "key": "DeviceCameraTexture", - "label": "DeviceCameraTexture.tex", - "path": "DeviceCameraTexture.tex", - "level": 2 - }, - { - "type": "PostEffectData", - "commandMap": {}, - "postEffectOptions": { - "effectType": "blur", - "subEffectType": "blur", - "kiraEffectType": "dynamic", - "effectStrength": 8, - "starMaxScale": 0.5, - "starMinScale": 0.1, - "starScaleTransformation": true, - "starScalePeriod": 1000, - "scaleType": "normal", - "scaleFrequencyType": "synchronize", - "scaleFrequency": 25, - "starScaleRate": 0.1, - "setScale": false, - "probabilityLow": 1, - "probabilityHigh": 1, - "minFeatureDistance": 3, - "fastPointNum": 20, - "fastThreshold": 15, - "maxCorners": 20, - "minDistance": 5, - "maxFeatureDetectNum": 200, - "maxKiraNum": 20, - "seedNum": 8, - "grayThreshold": 5, - "stabilityFactor": 5, - "highLightThreshold": 0.3, - "shaking": false, - "kiraBrightness": 1, - "alphaChange": true, - "maxAlpha": 0.5, - "minAlpha": 0.1, - "enableColorful": false, - "colorMixPlan": "default", - "colorNum": 4, - "colorPath": "", - "colorBlendMode": "normal", - "blendMode": "screen", - "fastNumPercentage": 0.8, - "clusterDistance": 10, - "shakeDisPlacement": 8, - "sleepTime": 15, - "clusterMaxSize": 5, - "switchEnvironment": false, - "filePaths": [], - "brightness": 0, - "contrast": 0, - "hue": 0, - "highlights": 0, - "sharpness": 0, - "shadows": 0, - "saturation": 0, - "temperature": 0, - "fade": 0, - "vignetting": 0, - "pitu_mode": 0, - "defocusGamaPath": "", - "defocusAntigamaPath": "", - "defocusBinPath": "", - "defocusMaskPath": "", - "defocusAlpha": 0 - }, - "key": "f1fee01b-3cf6-4e52-95e2-820085f9a948", - "label": "PostEffect.post", - "path": "PostEffect.post", - "level": 315, - "existingType": "blur" - }, - { - "type": "RenderTarget", - "commandMap": {}, - "inputColor": "#ffffffff", - "sizeType": 0, - "compatibilityMode": true, - "depthType": "DEPTH24", - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": false, - "samplerType": "SAMPLER_2D" - }, - "useForDisplay": false, - "key": "RenderTarget", - "label": "RenderTarget.rdt", - "path": "RenderTarget.rdt", - "input": "DeviceCameraTexture", - "level": 2, - "inputKey": "DeviceCameraTexture", - "width": 0, - "height": 0 - }, - { - "type": "RenderTarget", - "commandMap": {}, - "inputColor": "#ffffffff", - "sizeType": 0, - "compatibilityMode": true, - "depthType": "DEPTH24", - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": false, - "samplerType": "SAMPLER_2D" - }, - "useForDisplay": false, - "key": "RenderTarget1", - "label": "RenderTarget_camera_1.rdt", - "path": "RenderTarget_camera_1.rdt", - "input": "", - "inputType": "RT_InputType_Texture", - "level": 2, - "inputKey": "", - "width": 0, - "height": 0 - }, - { - "type": "RenderTarget", - "commandMap": {}, - "inputColor": "#ffffffff", - "sizeType": 0, - "compatibilityMode": true, - "depthType": "DEPTH24", - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": false, - "samplerType": "SAMPLER_2D" - }, - "key": "RenderTarget2", - "label": "RenderTarget_camera_2.rdt", - "path": "RenderTarget_camera_2.rdt", - "input": "", - "inputType": "RT_InputType_Texture", - "level": 2, - "inputKey": "", - "width": 0, - "height": 0 - }, - { - "type": "js", - "commandMap": {}, - "key": "34f323b7-ad28-40a8-b5b5-a65c74e5d147", - "label": "script.js", - "path": "script.js", - "level": 2, - "requireAbilities": [] - } - ] - }, - "cloudResourceData": [], - "componentLevel": 325, - "creationTime": "2023-01-04 15:10:42", - "updateTime": "2023-08-29 15:39:16", - "path": "/Users/brycezhang/workspace/xmagic/assets/MotionRes/segmentMotionRes/video_greenscreen/", - "downloadMusicList": [] -} \ No newline at end of file diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_transparent_bg/CustomRender.zip b/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_transparent_bg/CustomRender.zip deleted file mode 100644 index fe7a185d..00000000 Binary files a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_transparent_bg/CustomRender.zip and /dev/null differ diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_transparent_bg/CustomRender/CustomRender.json b/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_transparent_bg/CustomRender/CustomRender.json deleted file mode 100644 index df42fe9c..00000000 --- a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_transparent_bg/CustomRender/CustomRender.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "renderOrder": [ - { - "renderType": "kCustomShader", - "renderId": "chromakey", - "uniform": { - "key_color": [ - 0.0, - 0.0, - 0.0, - 0.0 - ], - "green_params": [ - 0.413, - 0.5, - 1.0, - 1.0 - ], - "tex_rect":[ - 0.0, - 0.0, - 720.0, - 1280.0 - ], - "tex_protect_rect":[ - 0.0, - 0.0, - 0.0, - 0.0 - ] - }, - "vertexPath": "vs_simple.bin", - "fragmentPath": "fs_chromakey.bin" - } - ] -} diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_transparent_bg/CustomRender/fs_chromakey.bin b/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_transparent_bg/CustomRender/fs_chromakey.bin deleted file mode 100644 index d8beb95b..00000000 Binary files a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_transparent_bg/CustomRender/fs_chromakey.bin and /dev/null differ diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_transparent_bg/CustomRender/vs_simple.bin b/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_transparent_bg/CustomRender/vs_simple.bin deleted file mode 100644 index 3a4cf360..00000000 Binary files a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_transparent_bg/CustomRender/vs_simple.bin and /dev/null differ diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_transparent_bg/DeviceCameraTexture.tex b/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_transparent_bg/DeviceCameraTexture.tex deleted file mode 100644 index 119ca577..00000000 --- a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_transparent_bg/DeviceCameraTexture.tex +++ /dev/null @@ -1,4 +0,0 @@ -{ - "type": "TextureData", - "key": "DeviceCameraTexture" -} \ No newline at end of file diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_transparent_bg/PostEffect.post b/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_transparent_bg/PostEffect.post deleted file mode 100644 index 38f2fe23..00000000 --- a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_transparent_bg/PostEffect.post +++ /dev/null @@ -1 +0,0 @@ -{"effectType":"blur","subEffectType":"blur","kiraEffectType":"dynamic","effectStrength":8,"starMaxScale":0.5,"starMinScale":0.1,"starScaleTransformation":true,"starScalePeriod":1000,"scaleType":"normal","scaleFrequencyType":"synchronize","scaleFrequency":25,"starScaleRate":0.1,"setScale":false,"probabilityLow":1,"probabilityHigh":1,"minFeatureDistance":3,"fastPointNum":20,"fastThreshold":15,"maxCorners":20,"minDistance":5,"maxFeatureDetectNum":200,"maxKiraNum":20,"seedNum":8,"grayThreshold":5,"stabilityFactor":5,"highLightThreshold":0.3,"shaking":false,"kiraBrightness":1,"alphaChange":true,"maxAlpha":0.5,"minAlpha":0.1,"enableColorful":false,"colorMixPlan":"default","colorNum":4,"colorPath":"","colorBlendMode":"normal","blendMode":"screen","fastNumPercentage":0.8,"clusterDistance":10,"shakeDisPlacement":8,"sleepTime":15,"clusterMaxSize":5,"switchEnvironment":false,"filePaths":[],"brightness":0,"contrast":0,"hue":0,"highlights":0,"sharpness":0,"shadows":0,"saturation":0,"temperature":0,"fade":0,"vignetting":0,"pitu_mode":0,"defocusGamaPath":"","defocusAntigamaPath":"","defocusBinPath":"","defocusMaskPath":"","defocusAlpha":0} \ No newline at end of file diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_transparent_bg/RenderTarget.rdt b/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_transparent_bg/RenderTarget.rdt deleted file mode 100644 index a98616e9..00000000 --- a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_transparent_bg/RenderTarget.rdt +++ /dev/null @@ -1 +0,0 @@ -{"type":"RenderTarget","path":"RenderTarget.rdt","key":"RenderTarget","input":"DeviceCameraTexture"} \ No newline at end of file diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_transparent_bg/RenderTarget_camera_1.rdt b/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_transparent_bg/RenderTarget_camera_1.rdt deleted file mode 100644 index df6ccfe7..00000000 --- a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_transparent_bg/RenderTarget_camera_1.rdt +++ /dev/null @@ -1 +0,0 @@ -{"type":"RenderTarget","key":"RenderTarget1","input":"EmptyTexture","width":0,"height":0,"inputType":"RT_InputType_Texture","sizeType":0,"path":"RenderTarget_camera_1.rdt","depthType":"DEPTH24"} \ No newline at end of file diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_transparent_bg/RenderTarget_camera_2.rdt b/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_transparent_bg/RenderTarget_camera_2.rdt deleted file mode 100644 index 8b27983f..00000000 --- a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_transparent_bg/RenderTarget_camera_2.rdt +++ /dev/null @@ -1 +0,0 @@ -{"type":"RenderTarget","key":"RenderTarget2","input":"","width":0,"height":0,"inputType":"RT_InputType_Texture","sizeType":0,"path":"RenderTarget_camera_2.rdt","depthType":"DEPTH24"} \ No newline at end of file diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_transparent_bg/script.js b/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_transparent_bg/script.js deleted file mode 100644 index d5906292..00000000 --- a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_transparent_bg/script.js +++ /dev/null @@ -1,79 +0,0 @@ -/*** light-js-config -***/ -// 加载 AEJSBridge.js -light.execute("light://js/AEJSBridge.js"); - -// 素材逻辑函数体 -(function () { - // 定义global对象 - var global = global || (function () {return this;}()); - // 定义素材对象 - var template = global.template || (function () {return {};}()); - // 并挂在global对象下 - global.template = template; - // 定义需要用到的resource - var resourcePool = { - } - //初始化一个jsonObject, - template.uniformJson = { - "uniformMap": { - "chromakey" : { - "key_color" : [0.0, 1.0, 0.0, 0.0], - "green_params": [0.413, 0.5, 1.0, 1.0], - "tex_rect" : [0.0, 0.0, 720.0, 1280.0], - "tex_protect_rect" : [0.0, 0.0, 0.0, 0.0] - } - } - } - // 也挂在global对象下 - global.resourcePool = resourcePool; - - -// // 订阅InputEvent事件 - template.onInputEvent = function(params) { - var jsonData = params["event.script.lightsdk.GreenScreenSetKeyColor"]; - var jsonDataParams = params["event.script.lightsdk.GreenScreenSetGreenParams"]; - var jsonDataProtectRect = params["event.script.lightsdk.GreenScreenSetProtectRect"]; - - if (jsonData) { - // 目前只会改这三个 - template.uniformJson.uniformMap.chromakey.key_color[0] = jsonData["key_color"][0]; - template.uniformJson.uniformMap.chromakey.key_color[1] = jsonData["key_color"][1]; - template.uniformJson.uniformMap.chromakey.key_color[2] = jsonData["key_color"][2]; - } - if(jsonDataParams){ - template.uniformJson.uniformMap.chromakey.green_params[0] = jsonDataParams["green_params"][0]; - template.uniformJson.uniformMap.chromakey.green_params[1] = jsonDataParams["green_params"][1]; - template.uniformJson.uniformMap.chromakey.green_params[2] = jsonDataParams["green_params"][2]; - template.uniformJson.uniformMap.chromakey.green_params[3] = jsonDataParams["green_params"][3]; - } - - if(jsonDataProtectRect){ - template.uniformJson.uniformMap.chromakey.tex_protect_rect[0] = jsonDataProtectRect["tex_protect_rect"][0]; - template.uniformJson.uniformMap.chromakey.tex_protect_rect[1] = 1.0 - jsonDataProtectRect["tex_protect_rect"][1]; - template.uniformJson.uniformMap.chromakey.tex_protect_rect[2] = jsonDataProtectRect["tex_protect_rect"][2]; - template.uniformJson.uniformMap.chromakey.tex_protect_rect[3] = 1.0 - jsonDataProtectRect["tex_protect_rect"][3]; - } - - } - - // 素材初始化, 对应c++的configure - template.onTemplateInit = function (entityManager, eventManager) { - template.customGraph = light.getComponent( - entityManager.getEntityByName("CustomGraph"), - "CustomGraph" - ); - } - // 对应c++的update - template.onFrameUpdate = function (currentTime, entityManager, eventManager) { - //将得到的uniformJson传递到自定义滤镜链中 - var surfaceWidth = light.DeviceUtils.GetSurfaceWidth(entityManager); - var surfaceHeight = light.DeviceUtils.GetSurfaceHeight(entityManager); - - template.uniformJson.uniformMap.chromakey.tex_rect[2] = surfaceWidth; - template.uniformJson.uniformMap.chromakey.tex_rect[3] = surfaceHeight; - - - template.customGraph.uniformJson = JSON.stringify(template.uniformJson); - } -}()); diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_transparent_bg/template.json b/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_transparent_bg/template.json deleted file mode 100644 index 980d5907..00000000 --- a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_transparent_bg/template.json +++ /dev/null @@ -1,731 +0,0 @@ -{ - "isFragment": false, - "componentLevel": 315, - "madeIn": "LightStudio", - "root": { - "id": 16, - "name": "拍摄模板", - "children": [ - { - "id": 17, - "name": "绿幕抠图画板", - "children": [ - { - "id": 18, - "name": "CustomGraph", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "top": 1, - "bottom": -1, - "left": -1, - "right": 1 - }, - "offset": { - "top": 0, - "bottom": 0, - "left": 0, - "right": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "objectEnabled": true, - "interactive": false, - "enabled": true, - "entityId": 18, - "componentID": 18001, - "level": 2 - }, - { - "componentID": 18002, - "enabled": true, - "entityId": 18, - "level": 325, - "resourcePath": "646212fb-2c67-4a40-8325-ac159a4ee533", - "type": "CustomGraph", - "version": 283 - }, - { - "componentID": 18003, - "enabled": true, - "entityId": 18, - "level": 4, - "scriptPath": "34f323b7-ad28-40a8-b5b5-a65c74e5d147", - "type": "Script", - "version": 45 - }, - { - "type": "EntityIdentifier", - "name": "CustomGraph", - "id": 18, - "originID": 18, - "enabled": true - } - ] - } - ], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "entityId": 17, - "componentID": 17001, - "type": "ScreenTransform", - "enabled": true, - "version": 2, - "objectEnabled": true, - "level": 2 - }, - { - "componentID": 17002, - "enabled": true, - "entityId": 17, - "level": 2, - "renderTargetKey": "RenderTarget", - "type": "Camera", - "version": 22 - }, - { - "type": "EntityIdentifier", - "name": "绿幕抠图画板", - "id": 17, - "originID": 17, - "enabled": true - } - ] - }, - { - "id": 19, - "name": "模糊叠加画板", - "children": [ - { - "id": 23, - "name": "抠图贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "left": -1, - "right": 1, - "top": 1, - "bottom": -1 - }, - "offset": { - "left": 3.9968028886505635e-14, - "right": -3.9968028886505635e-14, - "top": 0, - "bottom": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "eKeepRatio": true, - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "objectEnabled": true, - "entityId": 23, - "componentID": 23001, - "type": "ScreenTransform", - "enabled": true, - "version": 905, - "interactive": false, - "level": 2 - }, - { - "componentID": 23002, - "enabled": true, - "entityId": 23, - "level": 1, - "scaleMode": 2, - "src": "RenderTarget", - "type": "Image", - "version": 28 - }, - { - "alpha": 1, - "componentID": 23003, - "enabled": true, - "entityId": 23, - "level": 2, - "mode": "normal", - "type": "BlendMode", - "version": 148 - }, - { - "startOffset": 0, - "duration": 2000000, - "endOffset": -2147483648, - "loopCount": -1, - "type": "TimeOffset", - "enabled": true, - "entityId": 23, - "componentID": 23004, - "level": 1, - "version": 2 - }, - { - "type": "EntityIdentifier", - "name": "抠图贴纸", - "id": 23, - "originID": 23, - "enabled": true - } - ] - } - ], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "top": 1, - "bottom": -1, - "left": -1, - "right": 1 - }, - "offset": { - "top": 0, - "bottom": 0, - "left": 0, - "right": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "objectEnabled": true, - "interactive": false, - "enabled": true, - "entityId": 19, - "componentID": 19001, - "level": 2 - }, - { - "componentID": 19002, - "duplicateInput": 0, - "enabled": true, - "entityId": 19, - "level": 2, - "renderTargetKey": "RenderTarget1", - "type": "Camera", - "version": 12 - }, - { - "type": "EntityIdentifier", - "name": "模糊叠加画板", - "id": 19, - "originID": 19, - "enabled": true - } - ] - } - ], - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 16, - "componentID": 16001, - "type": "ScreenTransform", - "enabled": true, - "version": 4, - "level": 2 - }, - { - "defaultCameraPosition": 0, - "enableDowngradeAsset": true, - "enableRotation": true, - "needAutoBeauty": false, - "needVoiceDecibel": false, - "resetWhenStartRecord": true, - "supportCameraPosition": 0, - "sync3dRenderEnable": false, - "type": "ExtraSetting", - "enabled": true, - "version": 1, - "entityId": 16, - "componentID": 16002, - "level": 4, - "requireAbility": [] - }, - { - "type": "EntityIdentifier", - "name": "拍摄模板", - "id": 16, - "originID": 16, - "enabled": true - } - ], - "enabled": true, - "version": 0 - }, - "inputSources": { - "RenderTarget": { - "type": "RenderTarget", - "commandMap": {}, - "inputColor": "#ffffffff", - "sizeType": 0, - "compatibilityMode": true, - "depthType": "DEPTH24", - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": false, - "samplerType": "SAMPLER_2D" - }, - "useForDisplay": false, - "key": "RenderTarget", - "label": "RenderTarget.rdt", - "path": "RenderTarget.rdt", - "input": "DeviceCameraTexture", - "level": 2, - "inputKey": "DeviceCameraTexture", - "width": 0, - "height": 0 - }, - "DeviceCameraTexture": { - "type": "TextureData", - "commandMap": {}, - "key": "DeviceCameraTexture", - "label": "DeviceCameraTexture.tex", - "path": "DeviceCameraTexture.tex", - "level": 2 - }, - "34f323b7-ad28-40a8-b5b5-a65c74e5d147": { - "type": "js", - "commandMap": {}, - "key": "34f323b7-ad28-40a8-b5b5-a65c74e5d147", - "label": "script.js", - "path": "script.js", - "level": 2, - "requireAbilities": [] - }, - "RenderTarget1": { - "type": "RenderTarget", - "commandMap": {}, - "inputColor": "#ffffffff", - "sizeType": 0, - "compatibilityMode": true, - "depthType": "DEPTH24", - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": false, - "samplerType": "SAMPLER_2D" - }, - "useForDisplay": false, - "key": "RenderTarget1", - "label": "RenderTarget_camera_1.rdt", - "path": "RenderTarget_camera_1.rdt", - "input": "EmptyTexture", - "level": 2, - "inputKey": "EmptyTexture", - "width": 0, - "height": 0 - }, - "16a7a2e2-2fb6-4370-b7af-0876c0d003bb": { - "type": "folder", - "commandMap": {}, - "key": "16a7a2e2-2fb6-4370-b7af-0876c0d003bb", - "label": "root", - "path": "./", - "level": 2 - }, - "14a13923-c22e-4fb5-8c5a-bc126207759d": { - "type": "folder", - "commandMap": {}, - "key": "14a13923-c22e-4fb5-8c5a-bc126207759d", - "label": "CustomRender", - "path": "CustomRender", - "level": 2 - }, - "f5802f84-b090-4338-a22a-87f7374bb318": { - "type": "JsonData", - "commandMap": {}, - "key": "f5802f84-b090-4338-a22a-87f7374bb318", - "label": "CustomRender.json", - "path": "CustomRender/CustomRender.json", - "level": 2 - }, - "1e0eef7e-3258-433d-b3fe-f23b968610a0": { - "type": "gltf_bin", - "commandMap": {}, - "key": "1e0eef7e-3258-433d-b3fe-f23b968610a0", - "label": "fs_chromakey.bin", - "path": "CustomRender/fs_chromakey.bin", - "level": 2 - }, - "a190277d-4203-4a1c-bab7-af116218b421": { - "type": "gltf_bin", - "commandMap": {}, - "key": "a190277d-4203-4a1c-bab7-af116218b421", - "label": "vs_simple.bin", - "path": "CustomRender/vs_simple.bin", - "level": 2 - }, - "646212fb-2c67-4a40-8325-ac159a4ee533": { - "type": "zip", - "commandMap": {}, - "key": "646212fb-2c67-4a40-8325-ac159a4ee533", - "label": "CustomRender.zip", - "path": "CustomRender.zip", - "level": 2 - }, - "CustomBackground": { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "reSize": 1, - "key": "CustomBackground", - "label": "defaultBackground.png", - "path": "defaultBackground.png", - "level": 2, - "actualSize": 42516, - "resolution": { - "height": 1800, - "width": 1200 - }, - "width": 1200, - "height": 1800 - }, - "CustomBackgroundImage": { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "reSize": 1, - "key": "CustomBackgroundImage", - "label": "defaultBackgroundImage.png", - "path": "defaultBackgroundImage.png", - "level": 2, - "actualSize": 42516, - "resolution": { - "height": 1800, - "width": 1200 - }, - "width": 1200, - "height": 1800 - }, - "CustomBackgroundVideo": { - "type": "VideoClipData", - "commandMap": {}, - "loopCount": 0, - "key": "CustomBackgroundVideo", - "label": "defaultBackgroundVideo.mp4", - "path": "defaultBackgroundVideo.mp4", - "duration": 1000000, - "timeRange": { - "startTime": 0, - "duration": 1000000 - }, - "level": 2, - "actualSize": 3907, - "resolution": { - "height": 720, - "width": 1280 - } - }, - "f1fee01b-3cf6-4e52-95e2-820085f9a948": { - "type": "PostEffectData", - "commandMap": {}, - "postEffectOptions": { - "effectType": "blur", - "subEffectType": "blur", - "kiraEffectType": "dynamic", - "effectStrength": 8, - "starMaxScale": 0.5, - "starMinScale": 0.1, - "starScaleTransformation": true, - "starScalePeriod": 1000, - "scaleType": "normal", - "scaleFrequencyType": "synchronize", - "scaleFrequency": 25, - "starScaleRate": 0.1, - "setScale": false, - "probabilityLow": 1, - "probabilityHigh": 1, - "minFeatureDistance": 3, - "fastPointNum": 20, - "fastThreshold": 15, - "maxCorners": 20, - "minDistance": 5, - "maxFeatureDetectNum": 200, - "maxKiraNum": 20, - "seedNum": 8, - "grayThreshold": 5, - "stabilityFactor": 5, - "highLightThreshold": 0.3, - "shaking": false, - "kiraBrightness": 1, - "alphaChange": true, - "maxAlpha": 0.5, - "minAlpha": 0.1, - "enableColorful": false, - "colorMixPlan": "default", - "colorNum": 4, - "colorPath": "", - "colorBlendMode": "normal", - "blendMode": "screen", - "fastNumPercentage": 0.8, - "clusterDistance": 10, - "shakeDisPlacement": 8, - "sleepTime": 15, - "clusterMaxSize": 5, - "switchEnvironment": false, - "filePaths": [], - "brightness": 0, - "contrast": 0, - "hue": 0, - "highlights": 0, - "sharpness": 0, - "shadows": 0, - "saturation": 0, - "temperature": 0, - "fade": 0, - "vignetting": 0, - "pitu_mode": 0, - "defocusGamaPath": "", - "defocusAntigamaPath": "", - "defocusBinPath": "", - "defocusMaskPath": "", - "defocusAlpha": 0 - }, - "key": "f1fee01b-3cf6-4e52-95e2-820085f9a948", - "label": "PostEffect.post", - "path": "PostEffect.post", - "level": 315, - "existingType": "blur" - }, - "RenderTarget2": { - "type": "RenderTarget", - "commandMap": {}, - "inputColor": "#ffffffff", - "sizeType": 0, - "compatibilityMode": true, - "depthType": "DEPTH24", - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": false, - "samplerType": "SAMPLER_2D" - }, - "key": "RenderTarget2", - "label": "RenderTarget_camera_2.rdt", - "path": "RenderTarget_camera_2.rdt", - "input": "", - "inputType": "RT_InputType_Texture", - "level": 2, - "inputKey": "", - "width": 0, - "height": 0 - } - }, - "preset": {}, - "properties": { - "layout": { - "width": 720, - "height": 1280 - }, - "boundsTrackerPlaceHolders": [], - "musicIDs": [], - "fonts": [], - "movieConfig": { - "sourceType": 2, - "minClipAssetCount": 1, - "maxClipAssetCount": 999, - "minImageDuration": 1000000, - "maxImageDuration": 10000000, - "minVideoDuration": 2000000, - "minFreezePointInterval": 0, - "preferredCoverTime": 1000000, - "originVolume": 1, - "cropEvents": [ - "SlowRhythmTrail" - ], - "imageCropSpace": 0, - "videoCropSpace": -1, - "disableEventsWhileTransition": true, - "useInternalRhythm": true, - "headProtectDuration": 0 - }, - "materialConfigs": [], - "resourceIDs": [] - } -} diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_transparent_bg/template.png b/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_transparent_bg/template.png deleted file mode 100644 index ee52154c..00000000 Binary files a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_transparent_bg/template.png and /dev/null differ diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_transparent_bg/video_greenscreen.studio b/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_transparent_bg/video_greenscreen.studio deleted file mode 100644 index 0366a648..00000000 --- a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_transparent_bg/video_greenscreen.studio +++ /dev/null @@ -1,673 +0,0 @@ -{ - "name": "chromakey", - "author": "brycezhang", - "category": 1, - "scene": { - "id": 16, - "name": "拍摄模板", - "children": [ - { - "id": 17, - "name": "绿幕抠图画板", - "children": [ - { - "id": 18, - "name": "CustomGraph", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "top": 1, - "bottom": -1, - "left": -1, - "right": 1 - }, - "offset": { - "top": 0, - "bottom": 0, - "left": 0, - "right": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "objectEnabled": true, - "interactive": false, - "enabled": true, - "entityId": 18, - "componentID": 18001, - "level": 2 - }, - { - "componentID": 18002, - "enabled": true, - "entityId": 18, - "level": 2, - "resourcePath": "646212fb-2c67-4a40-8325-ac159a4ee533", - "type": "CustomGraph", - "version": 283 - }, - { - "componentID": 18003, - "enabled": true, - "entityId": 18, - "level": 4, - "scriptPath": "34f323b7-ad28-40a8-b5b5-a65c74e5d147", - "type": "Script", - "version": 45 - } - ] - } - ], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 0, - "x": 0, - "y": 0, - "z": 0 - }, - "entityId": 17, - "componentID": 17001, - "type": "ScreenTransform", - "enabled": true, - "version": 2, - "objectEnabled": true, - "level": 2 - }, - { - "componentID": 17002, - "enabled": true, - "entityId": 17, - "level": 2, - "renderTargetKey": "RenderTarget", - "type": "Camera", - "version": 22 - } - ] - }, - { - "id": 19, - "name": "模糊叠加画板", - "children": [ - { - "id": 23, - "name": "抠图贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "left": -1, - "right": 1, - "top": 1, - "bottom": -1 - }, - "offset": { - "left": 3.9968028886505635e-14, - "right": -3.9968028886505635e-14, - "top": 0, - "bottom": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "eKeepRatio": true, - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "objectEnabled": true, - "entityId": 23, - "componentID": 23001, - "type": "ScreenTransform", - "enabled": true, - "version": 905, - "interactive": false, - "level": 2 - }, - { - "componentID": 23002, - "enabled": true, - "entityId": 23, - "level": 1, - "scaleMode": 2, - "src": "RenderTarget", - "type": "Image", - "version": 28 - }, - { - "alpha": 1, - "componentID": 23003, - "enabled": true, - "entityId": 23, - "level": 2, - "mode": "normal", - "type": "BlendMode", - "version": 148 - }, - { - "eAlignMode": 2, - "startOffset": 0, - "duration": 2000000, - "endOffset": 0, - "loopCount": -1, - "type": "TimeOffset", - "enabled": true, - "entityId": 23, - "componentID": 23004, - "level": 1, - "version": 2 - } - ] - } - ], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "top": 1, - "bottom": -1, - "left": -1, - "right": 1 - }, - "offset": { - "top": 0, - "bottom": 0, - "left": 0, - "right": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "objectEnabled": true, - "interactive": false, - "enabled": true, - "entityId": 19, - "componentID": 19001, - "level": 2 - }, - { - "componentID": 19002, - "duplicateInput": 0, - "enabled": true, - "entityId": 19, - "level": 2, - "renderTargetKey": "RenderTarget1", - "type": "Camera", - "version": 12 - } - ] - } - ], - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 0, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 16, - "componentID": 16001, - "type": "ScreenTransform", - "enabled": true, - "version": 4, - "level": 2 - }, - { - "defaultCameraPosition": 0, - "enableDowngradeAsset": true, - "enableRotation": true, - "needAutoBeauty": false, - "needVoiceDecibel": false, - "resetWhenStartRecord": true, - "supportCameraPosition": 0, - "sync3dRenderEnable": false, - "type": "ExtraSetting", - "enabled": true, - "version": 1, - "entityId": 16, - "componentID": 16002, - "level": 4 - } - ], - "enabled": true, - "version": 0 - }, - "resources": { - "items": [ - { - "type": "folder", - "commandMap": {}, - "key": "16a7a2e2-2fb6-4370-b7af-0876c0d003bb", - "label": "root", - "path": "./", - "level": 2 - }, - { - "type": "folder", - "commandMap": {}, - "key": "14a13923-c22e-4fb5-8c5a-bc126207759d", - "label": "CustomRender", - "path": "CustomRender", - "level": 2 - }, - { - "type": "JsonData", - "commandMap": {}, - "key": "f5802f84-b090-4338-a22a-87f7374bb318", - "label": "CustomRender.json", - "path": "CustomRender/CustomRender.json", - "level": 2 - }, - { - "type": "gltf_bin", - "commandMap": {}, - "key": "1e0eef7e-3258-433d-b3fe-f23b968610a0", - "label": "fs_chromakey.bin", - "path": "CustomRender/fs_chromakey.bin", - "level": 2 - }, - { - "type": "gltf_bin", - "commandMap": {}, - "key": "a190277d-4203-4a1c-bab7-af116218b421", - "label": "vs_simple.bin", - "path": "CustomRender/vs_simple.bin", - "level": 2 - }, - { - "type": "zip", - "commandMap": {}, - "key": "646212fb-2c67-4a40-8325-ac159a4ee533", - "label": "CustomRender.zip", - "path": "CustomRender.zip", - "level": 2 - }, - { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "reSize": 1, - "key": "CustomBackground", - "label": "defaultBackground.png", - "path": "defaultBackground.png", - "level": 2, - "actualSize": 42516, - "resolution": { - "height": 1800, - "width": 1200 - }, - "width": 1200, - "height": 1800 - }, - { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "reSize": 1, - "key": "CustomBackgroundImage", - "label": "defaultBackgroundImage.png", - "path": "defaultBackgroundImage.png", - "level": 2, - "actualSize": 42516, - "resolution": { - "height": 1800, - "width": 1200 - }, - "width": 1200, - "height": 1800 - }, - { - "type": "VideoClipData", - "commandMap": {}, - "loopCount": 0, - "key": "CustomBackgroundVideo", - "label": "defaultBackgroundVideo.mp4", - "path": "defaultBackgroundVideo.mp4", - "duration": 1000000, - "timeRange": { - "startTime": 0, - "duration": 1000000 - }, - "level": 2, - "actualSize": 3907, - "resolution": { - "height": 720, - "width": 1280 - } - }, - { - "type": "TextureData", - "commandMap": {}, - "key": "DeviceCameraTexture", - "label": "DeviceCameraTexture.tex", - "path": "DeviceCameraTexture.tex", - "level": 2 - }, - { - "type": "PostEffectData", - "commandMap": {}, - "postEffectOptions": { - "effectType": "blur", - "subEffectType": "blur", - "kiraEffectType": "dynamic", - "effectStrength": 8, - "starMaxScale": 0.5, - "starMinScale": 0.1, - "starScaleTransformation": true, - "starScalePeriod": 1000, - "scaleType": "normal", - "scaleFrequencyType": "synchronize", - "scaleFrequency": 25, - "starScaleRate": 0.1, - "setScale": false, - "probabilityLow": 1, - "probabilityHigh": 1, - "minFeatureDistance": 3, - "fastPointNum": 20, - "fastThreshold": 15, - "maxCorners": 20, - "minDistance": 5, - "maxFeatureDetectNum": 200, - "maxKiraNum": 20, - "seedNum": 8, - "grayThreshold": 5, - "stabilityFactor": 5, - "highLightThreshold": 0.3, - "shaking": false, - "kiraBrightness": 1, - "alphaChange": true, - "maxAlpha": 0.5, - "minAlpha": 0.1, - "enableColorful": false, - "colorMixPlan": "default", - "colorNum": 4, - "colorPath": "", - "colorBlendMode": "normal", - "blendMode": "screen", - "fastNumPercentage": 0.8, - "clusterDistance": 10, - "shakeDisPlacement": 8, - "sleepTime": 15, - "clusterMaxSize": 5, - "switchEnvironment": false, - "filePaths": [], - "brightness": 0, - "contrast": 0, - "hue": 0, - "highlights": 0, - "sharpness": 0, - "shadows": 0, - "saturation": 0, - "temperature": 0, - "fade": 0, - "vignetting": 0, - "pitu_mode": 0, - "defocusGamaPath": "", - "defocusAntigamaPath": "", - "defocusBinPath": "", - "defocusMaskPath": "", - "defocusAlpha": 0 - }, - "key": "f1fee01b-3cf6-4e52-95e2-820085f9a948", - "label": "PostEffect.post", - "path": "PostEffect.post", - "level": 315, - "existingType": "blur" - }, - { - "type": "RenderTarget", - "commandMap": {}, - "inputColor": "#ffffffff", - "sizeType": 0, - "compatibilityMode": true, - "depthType": "DEPTH24", - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": false, - "samplerType": "SAMPLER_2D" - }, - "useForDisplay": false, - "key": "RenderTarget", - "label": "RenderTarget.rdt", - "path": "RenderTarget.rdt", - "input": "DeviceCameraTexture", - "level": 2, - "inputKey": "DeviceCameraTexture", - "width": 0, - "height": 0 - }, - { - "type": "RenderTarget", - "commandMap": {}, - "inputColor": "#ffffffff", - "sizeType": 0, - "compatibilityMode": true, - "depthType": "DEPTH24", - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": false, - "samplerType": "SAMPLER_2D" - }, - "useForDisplay": false, - "key": "RenderTarget1", - "label": "RenderTarget_camera_1.rdt", - "path": "RenderTarget_camera_1.rdt", - "input": "EmptyTexture", - "level": 2, - "inputKey": "EmptyTexture", - "width": 0, - "height": 0 - }, - { - "type": "RenderTarget", - "commandMap": {}, - "inputColor": "#ffffffff", - "sizeType": 0, - "compatibilityMode": true, - "depthType": "DEPTH24", - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": false, - "samplerType": "SAMPLER_2D" - }, - "key": "RenderTarget2", - "label": "RenderTarget_camera_2.rdt", - "path": "RenderTarget_camera_2.rdt", - "input": "", - "inputType": "RT_InputType_Texture", - "level": 2, - "inputKey": "", - "width": 0, - "height": 0 - }, - { - "type": "js", - "commandMap": {}, - "key": "34f323b7-ad28-40a8-b5b5-a65c74e5d147", - "label": "script.js", - "path": "script.js", - "level": 2, - "requireAbilities": [] - } - ] - }, - "cloudResourceData": [], - "componentLevel": 315, - "creationTime": "2023-01-04 15:10:42", - "updateTime": "2024-11-28 14:23:57", - "path": "/Users/wangguang/Desktop/video_greenscreen 2 2/", - "downloadMusicList": [] -} \ No newline at end of file diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2/CustomRender/CustomRender.json b/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2/CustomRender/CustomRender.json deleted file mode 100644 index 79db8bb4..00000000 --- a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2/CustomRender/CustomRender.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "renderOrder": [ - { - "renderType" : "kCustomShader", - "renderId" : "first", - "vertexPath" : "vs_simple.bin", - "fragmentPath" : "fs_simple.bin", - "nextIds" : ["green_seg_chromakey","green_seg_merge"] - }, - { - "renderType" : "kCustomShader", - "renderId" : "green_seg_chromakey", - "uniform" : { - "green_params" : [ - 0.3, - 1.0, - 1.0, - 0.0 - ], - "tex_rect" : [ - 0.0, - 0.0, - 720.0, - 1280.0 - ], - "average_green" : [ - 0.0, - 1.0, - 0.0, - 0.0 - ] - }, - "vertexPath" : "vs_simple.bin", - "fragmentPath" : "fs_chromakey_v2.bin", - "nextIds" : ["Corrosion","green_seg_merge"] - }, - { - "renderType" : "kCustomShader", - "renderId" : "Corrosion", - "uniform" : { - "tex_rect" : [ - 0.0, - 0.0, - 720.0, - 1280.0 - ], - "corrosion" : [ - 1.0, - 0.0, - 0.0, - 0.0 - ] - }, - "vertexPath" : "vs_simple.bin", - "fragmentPath" : "fs_mask_corrosion.bin", - "nextIds" : ["green_seg_merge"] - }, - { - "renderType" : "kCustomShader", - "renderId" : "green_seg_merge", - "uniform" : { - "tex_rect" : [ - 0.0, - 0.0, - 720.0, - 1280.0 - ], - "merge_params" : [ - 1.0, - 0.3, - 0.2, - 0.7 - ], - "frame_params" : [ - 0.0, - 0.0, - 0.0, - 0.0 - ], - "tex_protect_rect" : [ - 0.0, - 0.0, - 0.0, - 0.0 - ] - }, - "vertexPath" : "vs_simple.bin", - "fragmentPath" : "fs_greenscreen_mask_merge.bin" - } - ] -} diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2/CustomRender/fs_chromakey_v2.bin b/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2/CustomRender/fs_chromakey_v2.bin deleted file mode 100644 index 13df35e9..00000000 Binary files a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2/CustomRender/fs_chromakey_v2.bin and /dev/null differ diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2/CustomRender/fs_greenscreen_mask_merge.bin b/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2/CustomRender/fs_greenscreen_mask_merge.bin deleted file mode 100644 index 23784f2f..00000000 Binary files a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2/CustomRender/fs_greenscreen_mask_merge.bin and /dev/null differ diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2/CustomRender/fs_mask_corrosion.bin b/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2/CustomRender/fs_mask_corrosion.bin deleted file mode 100644 index 3ce680bb..00000000 Binary files a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2/CustomRender/fs_mask_corrosion.bin and /dev/null differ diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2/CustomRender/fs_simple.bin b/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2/CustomRender/fs_simple.bin deleted file mode 100644 index 26a480b1..00000000 Binary files a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2/CustomRender/fs_simple.bin and /dev/null differ diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2/CustomRender/vs_simple.bin b/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2/CustomRender/vs_simple.bin deleted file mode 100644 index 3a4cf360..00000000 Binary files a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2/CustomRender/vs_simple.bin and /dev/null differ diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2/DeviceCameraTexture.tex b/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2/DeviceCameraTexture.tex deleted file mode 100644 index 119ca577..00000000 --- a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2/DeviceCameraTexture.tex +++ /dev/null @@ -1,4 +0,0 @@ -{ - "type": "TextureData", - "key": "DeviceCameraTexture" -} \ No newline at end of file diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2/PostEffect.post b/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2/PostEffect.post deleted file mode 100644 index 38f2fe23..00000000 --- a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2/PostEffect.post +++ /dev/null @@ -1 +0,0 @@ -{"effectType":"blur","subEffectType":"blur","kiraEffectType":"dynamic","effectStrength":8,"starMaxScale":0.5,"starMinScale":0.1,"starScaleTransformation":true,"starScalePeriod":1000,"scaleType":"normal","scaleFrequencyType":"synchronize","scaleFrequency":25,"starScaleRate":0.1,"setScale":false,"probabilityLow":1,"probabilityHigh":1,"minFeatureDistance":3,"fastPointNum":20,"fastThreshold":15,"maxCorners":20,"minDistance":5,"maxFeatureDetectNum":200,"maxKiraNum":20,"seedNum":8,"grayThreshold":5,"stabilityFactor":5,"highLightThreshold":0.3,"shaking":false,"kiraBrightness":1,"alphaChange":true,"maxAlpha":0.5,"minAlpha":0.1,"enableColorful":false,"colorMixPlan":"default","colorNum":4,"colorPath":"","colorBlendMode":"normal","blendMode":"screen","fastNumPercentage":0.8,"clusterDistance":10,"shakeDisPlacement":8,"sleepTime":15,"clusterMaxSize":5,"switchEnvironment":false,"filePaths":[],"brightness":0,"contrast":0,"hue":0,"highlights":0,"sharpness":0,"shadows":0,"saturation":0,"temperature":0,"fade":0,"vignetting":0,"pitu_mode":0,"defocusGamaPath":"","defocusAntigamaPath":"","defocusBinPath":"","defocusMaskPath":"","defocusAlpha":0} \ No newline at end of file diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2/RenderTarget.rdt b/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2/RenderTarget.rdt deleted file mode 100644 index a98616e9..00000000 --- a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2/RenderTarget.rdt +++ /dev/null @@ -1 +0,0 @@ -{"type":"RenderTarget","path":"RenderTarget.rdt","key":"RenderTarget","input":"DeviceCameraTexture"} \ No newline at end of file diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2/RenderTarget_camera_1.rdt b/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2/RenderTarget_camera_1.rdt deleted file mode 100644 index db35386a..00000000 --- a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2/RenderTarget_camera_1.rdt +++ /dev/null @@ -1 +0,0 @@ -{"type":"RenderTarget","key":"RenderTarget1","input":"","width":0,"height":0,"inputType":"RT_InputType_Texture","sizeType":0,"path":"RenderTarget_camera_1.rdt","depthType":"DEPTH24"} \ No newline at end of file diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2/RenderTarget_camera_2.rdt b/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2/RenderTarget_camera_2.rdt deleted file mode 100644 index 8b27983f..00000000 --- a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2/RenderTarget_camera_2.rdt +++ /dev/null @@ -1 +0,0 @@ -{"type":"RenderTarget","key":"RenderTarget2","input":"","width":0,"height":0,"inputType":"RT_InputType_Texture","sizeType":0,"path":"RenderTarget_camera_2.rdt","depthType":"DEPTH24"} \ No newline at end of file diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2/defaultBackground.png b/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2/defaultBackground.png deleted file mode 100644 index 29a3a820..00000000 Binary files a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2/defaultBackground.png and /dev/null differ diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2/defaultBackgroundImage.png b/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2/defaultBackgroundImage.png deleted file mode 100644 index 29a3a820..00000000 Binary files a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2/defaultBackgroundImage.png and /dev/null differ diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2/defaultBackgroundVideo.mp4 b/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2/defaultBackgroundVideo.mp4 deleted file mode 100644 index 8a6917d0..00000000 Binary files a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2/defaultBackgroundVideo.mp4 and /dev/null differ diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2/script.js b/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2/script.js deleted file mode 100644 index 77fcd87a..00000000 --- a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2/script.js +++ /dev/null @@ -1,101 +0,0 @@ -/*** light-js-config -***/ -// 加载 AEJSBridge.js -light.execute("light://js/AEJSBridge.js"); - -// 素材逻辑函数体 -(function () { - // 定义global对象 - var global = global || (function () {return this;}()); - // 定义素材对象 - var template = global.template || (function () {return {};}()); - // 并挂在global对象下 - global.template = template; - // 定义需要用到的resource - var resourcePool = { - } - //初始化一个jsonObject, - template.uniformJson = { - "uniformMap": { - "green_seg_chromakey": { - "green_params": [0.3, 1.0, 1.0, 0.0], // [similarity, deshadow, corrosion,color] - "tex_rect": [0.0, 0.0, 720.0, 1280.0], - "average_green": [0.0, 1.0, 0.0, 0.0] - }, - "Corrosion": { - "tex_rect": [0.0, 0.0, 720.0, 1280.0], - "corrosion": [1.0, 0.0, 0.0, 0.0] // [corrosion,color] - }, - "green_seg_merge": { - "tex_rect": [0.0, 0.0, 720.0, 1280.0], - "merge_params": [1.0, 0.3, 0.2, 0.7], // [corrosion, despill, smooth, blendWeight] - "frame_params": [0.0, 0.0, 0.0, 0.0], // [isFirstframe, ] - "tex_protect_rect": [0.0, 0.0, 0.0, 0.0] // protect area - } - } - } - // 也挂在global对象下 - global.resourcePool = resourcePool; - - -// // 订阅InputEvent事件 - template.onInputEvent = function(params) { - // //相似度对应similarity, 平滑度对应smooth, 边缘消除强度对应 corrosion, 灰度比例对应 despill, 去阴影对应 deshadow - var GreenSeg_jsonDataParams = params["event.script.lightsdk.GreenScreenSetGreenParamsV2"]; - - if (GreenSeg_jsonDataParams) { - - var similarity_value = GreenSeg_jsonDataParams["green_params_v2"][0]; - var smooth_value = GreenSeg_jsonDataParams["green_params_v2"][1]; - var corrosion_value = GreenSeg_jsonDataParams["green_params_v2"][2]; - var despill_value = GreenSeg_jsonDataParams["green_params_v2"][3]; - var deshadow_value = GreenSeg_jsonDataParams["green_params_v2"][4]; - var color_value = 0.0;//0.0表示绿幕,1.0表示蓝幕 - - template.uniformJson.uniformMap.green_seg_chromakey.green_params[0] = similarity_value; - template.uniformJson.uniformMap.green_seg_chromakey.green_params[1] = deshadow_value; - template.uniformJson.uniformMap.green_seg_chromakey.green_params[2] = corrosion_value; // corrosion - template.uniformJson.uniformMap.green_seg_chromakey.green_params[3] = color_value; - template.uniformJson.uniformMap.Corrosion.corrosion[0] = corrosion_value; // corrosion - template.uniformJson.uniformMap.Corrosion.corrosion[1] = color_value; // color - template.uniformJson.uniformMap.green_seg_merge.merge_params[0] = corrosion_value; // corrosion - template.uniformJson.uniformMap.green_seg_merge.merge_params[1] = despill_value; // despill - template.uniformJson.uniformMap.green_seg_merge.merge_params[2] = smooth_value; // smooth - } - // 绿幕保护区域 - var Merge_jsonDataProtectRect = params["event.script.lightsdk.GreenScreenSetProtectRect"]; - - if (Merge_jsonDataProtectRect) { - - template.uniformJson.uniformMap.green_seg_merge.tex_protect_rect[0] = Merge_jsonDataProtectRect["tex_protect_rect"][0]; - template.uniformJson.uniformMap.green_seg_merge.tex_protect_rect[1] = 1.0 - Merge_jsonDataProtectRect["tex_protect_rect"][1]; - template.uniformJson.uniformMap.green_seg_merge.tex_protect_rect[2] = Merge_jsonDataProtectRect["tex_protect_rect"][2]; - template.uniformJson.uniformMap.green_seg_merge.tex_protect_rect[3] = 1.0 - Merge_jsonDataProtectRect["tex_protect_rect"][3]; - } - } - - // 素材初始化, 对应c++的configure - template.onTemplateInit = function (entityManager, eventManager) { - template.customGraph = light.getComponent( - entityManager.getEntityByName("CustomGraph"), - "CustomGraph" - ); - } - // 对应c++的update - template.onFrameUpdate = function (currentTime, entityManager, eventManager) { - //将得到的uniformJson传递到自定义滤镜链中 - var surfaceWidth = light.DeviceUtils.GetSurfaceWidth(entityManager); - var surfaceHeight = light.DeviceUtils.GetSurfaceHeight(entityManager); - - template.uniformJson.uniformMap.green_seg_chromakey.tex_rect[2] = surfaceWidth; - template.uniformJson.uniformMap.green_seg_chromakey.tex_rect[3] = surfaceHeight; - - template.uniformJson.uniformMap.Corrosion.tex_rect[2] = surfaceWidth; - template.uniformJson.uniformMap.Corrosion.tex_rect[3] = surfaceHeight; - - template.uniformJson.uniformMap.green_seg_merge.tex_rect[2] = surfaceWidth; - template.uniformJson.uniformMap.green_seg_merge.tex_rect[3] = surfaceHeight; - - template.customGraph.uniformJson = JSON.stringify(template.uniformJson); - } -}()); diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2/template.json b/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2/template.json deleted file mode 100644 index 4046cf2e..00000000 --- a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2/template.json +++ /dev/null @@ -1,827 +0,0 @@ -{ - "isFragment": false, - "componentLevel": 325, - "madeIn": "LightStudio", - "root": { - "id": 16, - "name": "拍摄模板", - "children": [ - { - "id": 17, - "name": "绿幕抠图画板", - "children": [ - { - "id": 18, - "name": "CustomGraph", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "top": 1, - "bottom": -1, - "left": -1, - "right": 1 - }, - "offset": { - "top": 0, - "bottom": 0, - "left": 0, - "right": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "objectEnabled": true, - "interactive": false, - "enabled": true, - "entityId": 18, - "componentID": 18001, - "level": 2 - }, - { - "componentID": 18002, - "enabled": true, - "entityId": 18, - "level": 325, - "resourcePath": "646212fb-2c67-4a40-8325-ac159a4ee533", - "type": "CustomGraph", - "version": 283 - }, - { - "componentID": 18003, - "enabled": true, - "entityId": 18, - "level": 4, - "scriptPath": "34f323b7-ad28-40a8-b5b5-a65c74e5d147", - "type": "Script", - "version": 45 - }, - { - "type": "EntityIdentifier", - "name": "CustomGraph", - "id": 18, - "originID": 18, - "enabled": true - } - ] - } - ], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "entityId": 17, - "componentID": 17001, - "type": "ScreenTransform", - "enabled": true, - "version": 2, - "objectEnabled": true, - "level": 2 - }, - { - "componentID": 17002, - "enabled": true, - "entityId": 17, - "level": 2, - "renderTargetKey": "RenderTarget", - "type": "Camera", - "version": 6 - }, - { - "type": "EntityIdentifier", - "name": "绿幕抠图画板", - "id": 17, - "originID": 17, - "enabled": true - } - ] - }, - { - "id": 19, - "name": "模糊叠加画板", - "children": [ - { - "id": 22, - "name": "背景贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "eKeepRatio": true, - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 22, - "componentID": 22001, - "type": "ScreenTransform", - "enabled": true, - "version": 390, - "interactive": false, - "level": 2 - }, - { - "componentID": 22002, - "enabled": true, - "entityId": 22, - "level": 1, - "scaleMode": 3, - "src": "CustomBackground", - "type": "Image", - "version": 76 - }, - { - "alpha": 1, - "componentID": 22003, - "enabled": true, - "entityId": 22, - "level": 2, - "mode": "normal", - "type": "BlendMode", - "version": 71 - }, - { - "startOffset": 0, - "duration": 2000000, - "endOffset": -2147483648, - "loopCount": -1, - "type": "TimeOffset", - "enabled": true, - "entityId": 22, - "componentID": 22004, - "level": 1, - "version": 33 - }, - { - "type": "EntityIdentifier", - "name": "背景贴纸", - "id": 22, - "originID": 22, - "enabled": true - } - ] - }, - { - "id": 23, - "name": "抠图贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "eKeepRatio": true, - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 23, - "componentID": 23001, - "type": "ScreenTransform", - "enabled": true, - "version": 902, - "interactive": false, - "level": 2 - }, - { - "componentID": 23002, - "enabled": true, - "entityId": 23, - "level": 1, - "scaleMode": 2, - "src": "RenderTarget", - "type": "Image", - "version": 24 - }, - { - "alpha": 1, - "componentID": 23003, - "enabled": true, - "entityId": 23, - "level": 2, - "mode": "normal", - "type": "BlendMode", - "version": 124 - }, - { - "startOffset": 0, - "duration": 2000000, - "endOffset": -2147483648, - "loopCount": -1, - "type": "TimeOffset", - "enabled": true, - "entityId": 23, - "componentID": 23004, - "level": 1, - "version": null - }, - { - "type": "EntityIdentifier", - "name": "抠图贴纸", - "id": 23, - "originID": 23, - "enabled": true - } - ] - } - ], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "top": 1, - "bottom": -1, - "left": -1, - "right": 1 - }, - "offset": { - "top": 0, - "bottom": 0, - "left": 0, - "right": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "objectEnabled": true, - "interactive": false, - "enabled": true, - "entityId": 19, - "componentID": 19001, - "level": 2 - }, - { - "componentID": 19002, - "duplicateInput": 0, - "enabled": true, - "entityId": 19, - "level": 2, - "renderTargetKey": "RenderTarget2", - "type": "Camera", - "version": 4 - }, - { - "type": "EntityIdentifier", - "name": "模糊叠加画板", - "id": 19, - "originID": 19, - "enabled": true - } - ] - } - ], - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 16, - "componentID": 16001, - "type": "ScreenTransform", - "enabled": true, - "version": 4, - "level": 2 - }, - { - "defaultCameraPosition": 0, - "enableDowngradeAsset": true, - "enableRotation": true, - "needAutoBeauty": false, - "needVoiceDecibel": false, - "resetWhenStartRecord": true, - "supportCameraPosition": 0, - "sync3dRenderEnable": false, - "type": "ExtraSetting", - "enabled": true, - "version": 1, - "entityId": 16, - "componentID": 16002, - "level": 4, - "requireAbility": [] - }, - { - "type": "EntityIdentifier", - "name": "拍摄模板", - "id": 16, - "originID": 16, - "enabled": true - } - ], - "enabled": true, - "version": 0 - }, - "inputSources": { - "RenderTarget": { - "type": "RenderTarget", - "commandMap": {}, - "inputColor": "#ffffffff", - "sizeType": 0, - "compatibilityMode": true, - "depthType": "DEPTH24", - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": false, - "samplerType": "SAMPLER_2D" - }, - "useForDisplay": false, - "key": "RenderTarget", - "label": "RenderTarget.rdt", - "path": "RenderTarget.rdt", - "input": "DeviceCameraTexture", - "level": 2, - "inputKey": "DeviceCameraTexture", - "width": 0, - "height": 0 - }, - "DeviceCameraTexture": { - "type": "TextureData", - "commandMap": {}, - "key": "DeviceCameraTexture", - "label": "DeviceCameraTexture.tex", - "path": "DeviceCameraTexture.tex", - "level": 2 - }, - "646212fb-2c67-4a40-8325-ac159a4ee533": { - "type": "zip", - "commandMap": {}, - "key": "646212fb-2c67-4a40-8325-ac159a4ee533", - "label": "CustomRender.zip", - "path": "CustomRender.zip", - "level": 2 - }, - "34f323b7-ad28-40a8-b5b5-a65c74e5d147": { - "type": "js", - "commandMap": {}, - "key": "34f323b7-ad28-40a8-b5b5-a65c74e5d147", - "label": "script.js", - "path": "script.js", - "level": 2, - "requireAbilities": [] - }, - "RenderTarget2": { - "type": "RenderTarget", - "commandMap": {}, - "inputColor": "#ffffffff", - "sizeType": 0, - "compatibilityMode": true, - "depthType": "DEPTH24", - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": false, - "samplerType": "SAMPLER_2D" - }, - "key": "RenderTarget2", - "label": "RenderTarget_camera_2.rdt", - "path": "RenderTarget_camera_2.rdt", - "input": "", - "inputType": "RT_InputType_Texture", - "level": 2, - "inputKey": "", - "width": 0, - "height": 0 - }, - "CustomBackground": { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "reSize": 1, - "key": "CustomBackground", - "label": "defaultBackground.png", - "path": "defaultBackground.png", - "level": 2, - "actualSize": 42516, - "resolution": { - "height": 1800, - "width": 1200 - }, - "width": 1200, - "height": 1800 - }, - "16a7a2e2-2fb6-4370-b7af-0876c0d003bb": { - "type": "folder", - "commandMap": {}, - "key": "16a7a2e2-2fb6-4370-b7af-0876c0d003bb", - "label": "root", - "path": "./", - "level": 2 - }, - "14a13923-c22e-4fb5-8c5a-bc126207759d": { - "type": "folder", - "commandMap": {}, - "key": "14a13923-c22e-4fb5-8c5a-bc126207759d", - "label": "CustomRender", - "path": "CustomRender", - "level": 2 - }, - "f5802f84-b090-4338-a22a-87f7374bb318": { - "type": "JsonData", - "commandMap": {}, - "key": "f5802f84-b090-4338-a22a-87f7374bb318", - "label": "CustomRender.json", - "path": "CustomRender/CustomRender.json", - "level": 2 - }, - "1e0eef7e-3258-433d-b3fe-f23b968610a0": { - "type": "gltf_bin", - "commandMap": {}, - "key": "1e0eef7e-3258-433d-b3fe-f23b968610a0", - "label": "fs_chromakey.bin", - "path": "CustomRender/fs_chromakey.bin", - "level": 2 - }, - "a190277d-4203-4a1c-bab7-af116218b421": { - "type": "gltf_bin", - "commandMap": {}, - "key": "a190277d-4203-4a1c-bab7-af116218b421", - "label": "vs_simple.bin", - "path": "CustomRender/vs_simple.bin", - "level": 2 - }, - "CustomBackgroundImage": { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "reSize": 1, - "key": "CustomBackgroundImage", - "label": "defaultBackgroundImage.png", - "path": "defaultBackgroundImage.png", - "level": 2, - "actualSize": 42516, - "resolution": { - "height": 1800, - "width": 1200 - }, - "width": 1200, - "height": 1800 - }, - "CustomBackgroundVideo": { - "type": "VideoClipData", - "commandMap": {}, - "loopCount": 0, - "key": "CustomBackgroundVideo", - "label": "defaultBackgroundVideo.mp4", - "path": "defaultBackgroundVideo.mp4", - "duration": 1000000, - "timeRange": { - "startTime": 0, - "duration": 1000000 - }, - "level": 2, - "actualSize": 3907, - "resolution": { - "height": 720, - "width": 1280 - } - }, - "f1fee01b-3cf6-4e52-95e2-820085f9a948": { - "type": "PostEffectData", - "commandMap": {}, - "postEffectOptions": { - "effectType": "blur", - "subEffectType": "blur", - "kiraEffectType": "dynamic", - "effectStrength": 8, - "starMaxScale": 0.5, - "starMinScale": 0.1, - "starScaleTransformation": true, - "starScalePeriod": 1000, - "scaleType": "normal", - "scaleFrequencyType": "synchronize", - "scaleFrequency": 25, - "starScaleRate": 0.1, - "setScale": false, - "probabilityLow": 1, - "probabilityHigh": 1, - "minFeatureDistance": 3, - "fastPointNum": 20, - "fastThreshold": 15, - "maxCorners": 20, - "minDistance": 5, - "maxFeatureDetectNum": 200, - "maxKiraNum": 20, - "seedNum": 8, - "grayThreshold": 5, - "stabilityFactor": 5, - "highLightThreshold": 0.3, - "shaking": false, - "kiraBrightness": 1, - "alphaChange": true, - "maxAlpha": 0.5, - "minAlpha": 0.1, - "enableColorful": false, - "colorMixPlan": "default", - "colorNum": 4, - "colorPath": "", - "colorBlendMode": "normal", - "blendMode": "screen", - "fastNumPercentage": 0.8, - "clusterDistance": 10, - "shakeDisPlacement": 8, - "sleepTime": 15, - "clusterMaxSize": 5, - "switchEnvironment": false, - "filePaths": [], - "brightness": 0, - "contrast": 0, - "hue": 0, - "highlights": 0, - "sharpness": 0, - "shadows": 0, - "saturation": 0, - "temperature": 0, - "fade": 0, - "vignetting": 0, - "pitu_mode": 0, - "defocusGamaPath": "", - "defocusAntigamaPath": "", - "defocusBinPath": "", - "defocusMaskPath": "", - "defocusAlpha": 0 - }, - "key": "f1fee01b-3cf6-4e52-95e2-820085f9a948", - "label": "PostEffect.post", - "path": "PostEffect.post", - "level": 315, - "existingType": "blur" - }, - "RenderTarget1": { - "type": "RenderTarget", - "commandMap": {}, - "inputColor": "#ffffffff", - "sizeType": 0, - "compatibilityMode": true, - "depthType": "DEPTH24", - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": false, - "samplerType": "SAMPLER_2D" - }, - "useForDisplay": false, - "key": "RenderTarget1", - "label": "RenderTarget_camera_1.rdt", - "path": "RenderTarget_camera_1.rdt", - "input": "", - "inputType": "RT_InputType_Texture", - "level": 2, - "inputKey": "", - "width": 0, - "height": 0 - } - }, - "preset": {}, - "properties": { - "layout": { - "width": 720, - "height": 1280 - }, - "boundsTrackerPlaceHolders": [], - "musicIDs": [], - "fonts": [], - "movieConfig": { - "sourceType": 2, - "minClipAssetCount": 1, - "maxClipAssetCount": 999, - "minImageDuration": 1000000, - "maxImageDuration": 10000000, - "minVideoDuration": 2000000, - "minFreezePointInterval": 0, - "preferredCoverTime": 1000000, - "originVolume": 1, - "cropEvents": [ - "SlowRhythmTrail" - ], - "imageCropSpace": 0, - "videoCropSpace": -1, - "disableEventsWhileTransition": true, - "useInternalRhythm": true, - "headProtectDuration": 0 - }, - "materialConfigs": [], - "resourceIDs": [] - } -} \ No newline at end of file diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2/template.png b/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2/template.png deleted file mode 100644 index bd97f93c..00000000 Binary files a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2/template.png and /dev/null differ diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2/video_greenscreen.studio b/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2/video_greenscreen.studio deleted file mode 100644 index 49a35e72..00000000 --- a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2/video_greenscreen.studio +++ /dev/null @@ -1,763 +0,0 @@ -{ - "name": "chromakey", - "author": "brycezhang", - "category": 1, - "scene": { - "id": 16, - "name": "拍摄模板", - "children": [ - { - "id": 17, - "name": "绿幕抠图画板", - "children": [ - { - "id": 18, - "name": "CustomGraph", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "top": 1, - "bottom": -1, - "left": -1, - "right": 1 - }, - "offset": { - "top": 0, - "bottom": 0, - "left": 0, - "right": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "objectEnabled": true, - "interactive": false, - "enabled": true, - "entityId": 18, - "componentID": 18001, - "level": 2 - }, - { - "componentID": 18002, - "enabled": true, - "entityId": 18, - "level": 325, - "resourcePath": "646212fb-2c67-4a40-8325-ac159a4ee533", - "type": "CustomGraph", - "version": 283 - }, - { - "componentID": 18003, - "enabled": true, - "entityId": 18, - "level": 4, - "scriptPath": "34f323b7-ad28-40a8-b5b5-a65c74e5d147", - "type": "Script", - "version": 45 - } - ] - } - ], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 0, - "x": 0, - "y": 0, - "z": 0 - }, - "entityId": 17, - "componentID": 17001, - "type": "ScreenTransform", - "enabled": true, - "version": 2, - "objectEnabled": true, - "level": 2 - }, - { - "componentID": 17002, - "enabled": true, - "entityId": 17, - "level": 2, - "renderTargetKey": "RenderTarget", - "type": "Camera", - "version": 6 - } - ] - }, - { - "id": 19, - "name": "模糊叠加画板", - "children": [ - { - "id": 22, - "name": "背景贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "eKeepRatio": true, - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 22, - "componentID": 22001, - "type": "ScreenTransform", - "enabled": true, - "version": 390, - "interactive": false, - "level": 2 - }, - { - "componentID": 22002, - "enabled": true, - "entityId": 22, - "level": 1, - "scaleMode": 3, - "src": "CustomBackground", - "type": "Image", - "version": 76 - }, - { - "alpha": 1, - "componentID": 22003, - "enabled": true, - "entityId": 22, - "level": 2, - "mode": "normal", - "type": "BlendMode", - "version": 71 - }, - { - "eAlignMode": 2, - "startOffset": 0, - "duration": 2000000, - "endOffset": 0, - "loopCount": -1, - "type": "TimeOffset", - "enabled": true, - "entityId": 22, - "componentID": 22004, - "level": 1, - "version": 33 - } - ] - }, - { - "id": 23, - "name": "抠图贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "eKeepRatio": true, - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 23, - "componentID": 23001, - "type": "ScreenTransform", - "enabled": true, - "version": 902, - "interactive": false, - "level": 2 - }, - { - "componentID": 23002, - "enabled": true, - "entityId": 23, - "level": 1, - "scaleMode": 2, - "src": "RenderTarget", - "type": "Image", - "version": 24 - }, - { - "alpha": 1, - "componentID": 23003, - "enabled": true, - "entityId": 23, - "level": 2, - "mode": "normal", - "type": "BlendMode", - "version": 124 - }, - { - "eAlignMode": 2, - "startOffset": 0, - "duration": 2000000, - "endOffset": 0, - "loopCount": -1, - "type": "TimeOffset", - "enabled": true, - "entityId": 23, - "componentID": 23004, - "level": 1, - "version": null - } - ] - } - ], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "top": 1, - "bottom": -1, - "left": -1, - "right": 1 - }, - "offset": { - "top": 0, - "bottom": 0, - "left": 0, - "right": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "objectEnabled": true, - "interactive": false, - "enabled": true, - "entityId": 19, - "componentID": 19001, - "level": 2 - }, - { - "componentID": 19002, - "duplicateInput": 0, - "enabled": true, - "entityId": 19, - "level": 2, - "renderTargetKey": "RenderTarget2", - "type": "Camera", - "version": 4 - } - ] - } - ], - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 0, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 16, - "componentID": 16001, - "type": "ScreenTransform", - "enabled": true, - "version": 4, - "level": 2 - }, - { - "defaultCameraPosition": 0, - "enableDowngradeAsset": true, - "enableRotation": true, - "needAutoBeauty": false, - "needVoiceDecibel": false, - "resetWhenStartRecord": true, - "supportCameraPosition": 0, - "sync3dRenderEnable": false, - "type": "ExtraSetting", - "enabled": true, - "version": 1, - "entityId": 16, - "componentID": 16002, - "level": 4 - } - ], - "enabled": true, - "version": 0 - }, - "resources": { - "items": [ - { - "type": "folder", - "commandMap": {}, - "key": "16a7a2e2-2fb6-4370-b7af-0876c0d003bb", - "label": "root", - "path": "./", - "level": 2 - }, - { - "type": "folder", - "commandMap": {}, - "key": "14a13923-c22e-4fb5-8c5a-bc126207759d", - "label": "CustomRender", - "path": "CustomRender", - "level": 2 - }, - { - "type": "JsonData", - "commandMap": {}, - "key": "f5802f84-b090-4338-a22a-87f7374bb318", - "label": "CustomRender.json", - "path": "CustomRender/CustomRender.json", - "level": 2 - }, - { - "type": "gltf_bin", - "commandMap": {}, - "key": "1e0eef7e-3258-433d-b3fe-f23b968610a0", - "label": "fs_chromakey.bin", - "path": "CustomRender/fs_chromakey.bin", - "level": 2 - }, - { - "type": "gltf_bin", - "commandMap": {}, - "key": "a190277d-4203-4a1c-bab7-af116218b421", - "label": "vs_simple.bin", - "path": "CustomRender/vs_simple.bin", - "level": 2 - }, - { - "type": "zip", - "commandMap": {}, - "key": "646212fb-2c67-4a40-8325-ac159a4ee533", - "label": "CustomRender.zip", - "path": "CustomRender.zip", - "level": 2 - }, - { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "reSize": 1, - "key": "CustomBackground", - "label": "defaultBackground.png", - "path": "defaultBackground.png", - "level": 2, - "actualSize": 42516, - "resolution": { - "height": 1800, - "width": 1200 - }, - "width": 1200, - "height": 1800 - }, - { - "type": "ImageData", - "commandMap": {}, - "compression": 0, - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": true, - "samplerType": "SAMPLER_2D" - }, - "reSize": 1, - "key": "CustomBackgroundImage", - "label": "defaultBackgroundImage.png", - "path": "defaultBackgroundImage.png", - "level": 2, - "actualSize": 42516, - "resolution": { - "height": 1800, - "width": 1200 - }, - "width": 1200, - "height": 1800 - }, - { - "type": "VideoClipData", - "commandMap": {}, - "loopCount": 0, - "key": "CustomBackgroundVideo", - "label": "defaultBackgroundVideo.mp4", - "path": "defaultBackgroundVideo.mp4", - "duration": 1000000, - "timeRange": { - "startTime": 0, - "duration": 1000000 - }, - "level": 2, - "actualSize": 3907, - "resolution": { - "height": 720, - "width": 1280 - } - }, - { - "type": "TextureData", - "commandMap": {}, - "key": "DeviceCameraTexture", - "label": "DeviceCameraTexture.tex", - "path": "DeviceCameraTexture.tex", - "level": 2 - }, - { - "type": "PostEffectData", - "commandMap": {}, - "postEffectOptions": { - "effectType": "blur", - "subEffectType": "blur", - "kiraEffectType": "dynamic", - "effectStrength": 8, - "starMaxScale": 0.5, - "starMinScale": 0.1, - "starScaleTransformation": true, - "starScalePeriod": 1000, - "scaleType": "normal", - "scaleFrequencyType": "synchronize", - "scaleFrequency": 25, - "starScaleRate": 0.1, - "setScale": false, - "probabilityLow": 1, - "probabilityHigh": 1, - "minFeatureDistance": 3, - "fastPointNum": 20, - "fastThreshold": 15, - "maxCorners": 20, - "minDistance": 5, - "maxFeatureDetectNum": 200, - "maxKiraNum": 20, - "seedNum": 8, - "grayThreshold": 5, - "stabilityFactor": 5, - "highLightThreshold": 0.3, - "shaking": false, - "kiraBrightness": 1, - "alphaChange": true, - "maxAlpha": 0.5, - "minAlpha": 0.1, - "enableColorful": false, - "colorMixPlan": "default", - "colorNum": 4, - "colorPath": "", - "colorBlendMode": "normal", - "blendMode": "screen", - "fastNumPercentage": 0.8, - "clusterDistance": 10, - "shakeDisPlacement": 8, - "sleepTime": 15, - "clusterMaxSize": 5, - "switchEnvironment": false, - "filePaths": [], - "brightness": 0, - "contrast": 0, - "hue": 0, - "highlights": 0, - "sharpness": 0, - "shadows": 0, - "saturation": 0, - "temperature": 0, - "fade": 0, - "vignetting": 0, - "pitu_mode": 0, - "defocusGamaPath": "", - "defocusAntigamaPath": "", - "defocusBinPath": "", - "defocusMaskPath": "", - "defocusAlpha": 0 - }, - "key": "f1fee01b-3cf6-4e52-95e2-820085f9a948", - "label": "PostEffect.post", - "path": "PostEffect.post", - "level": 315, - "existingType": "blur" - }, - { - "type": "RenderTarget", - "commandMap": {}, - "inputColor": "#ffffffff", - "sizeType": 0, - "compatibilityMode": true, - "depthType": "DEPTH24", - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": false, - "samplerType": "SAMPLER_2D" - }, - "useForDisplay": false, - "key": "RenderTarget", - "label": "RenderTarget.rdt", - "path": "RenderTarget.rdt", - "input": "DeviceCameraTexture", - "level": 2, - "inputKey": "DeviceCameraTexture", - "width": 0, - "height": 0 - }, - { - "type": "RenderTarget", - "commandMap": {}, - "inputColor": "#ffffffff", - "sizeType": 0, - "compatibilityMode": true, - "depthType": "DEPTH24", - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": false, - "samplerType": "SAMPLER_2D" - }, - "useForDisplay": false, - "key": "RenderTarget1", - "label": "RenderTarget_camera_1.rdt", - "path": "RenderTarget_camera_1.rdt", - "input": "", - "inputType": "RT_InputType_Texture", - "level": 2, - "inputKey": "", - "width": 0, - "height": 0 - }, - { - "type": "RenderTarget", - "commandMap": {}, - "inputColor": "#ffffffff", - "sizeType": 0, - "compatibilityMode": true, - "depthType": "DEPTH24", - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": false, - "samplerType": "SAMPLER_2D" - }, - "key": "RenderTarget2", - "label": "RenderTarget_camera_2.rdt", - "path": "RenderTarget_camera_2.rdt", - "input": "", - "inputType": "RT_InputType_Texture", - "level": 2, - "inputKey": "", - "width": 0, - "height": 0 - }, - { - "type": "js", - "commandMap": {}, - "key": "34f323b7-ad28-40a8-b5b5-a65c74e5d147", - "label": "script.js", - "path": "script.js", - "level": 2, - "requireAbilities": [] - } - ] - }, - "cloudResourceData": [], - "componentLevel": 325, - "creationTime": "2023-01-04 15:10:42", - "updateTime": "2023-08-29 15:39:16", - "path": "/Users/brycezhang/workspace/xmagic/assets/MotionRes/segmentMotionRes/video_greenscreen/", - "downloadMusicList": [] -} \ No newline at end of file diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2_transparent_bg/CustomRender/CustomRender.json b/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2_transparent_bg/CustomRender/CustomRender.json deleted file mode 100644 index 79db8bb4..00000000 --- a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2_transparent_bg/CustomRender/CustomRender.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "renderOrder": [ - { - "renderType" : "kCustomShader", - "renderId" : "first", - "vertexPath" : "vs_simple.bin", - "fragmentPath" : "fs_simple.bin", - "nextIds" : ["green_seg_chromakey","green_seg_merge"] - }, - { - "renderType" : "kCustomShader", - "renderId" : "green_seg_chromakey", - "uniform" : { - "green_params" : [ - 0.3, - 1.0, - 1.0, - 0.0 - ], - "tex_rect" : [ - 0.0, - 0.0, - 720.0, - 1280.0 - ], - "average_green" : [ - 0.0, - 1.0, - 0.0, - 0.0 - ] - }, - "vertexPath" : "vs_simple.bin", - "fragmentPath" : "fs_chromakey_v2.bin", - "nextIds" : ["Corrosion","green_seg_merge"] - }, - { - "renderType" : "kCustomShader", - "renderId" : "Corrosion", - "uniform" : { - "tex_rect" : [ - 0.0, - 0.0, - 720.0, - 1280.0 - ], - "corrosion" : [ - 1.0, - 0.0, - 0.0, - 0.0 - ] - }, - "vertexPath" : "vs_simple.bin", - "fragmentPath" : "fs_mask_corrosion.bin", - "nextIds" : ["green_seg_merge"] - }, - { - "renderType" : "kCustomShader", - "renderId" : "green_seg_merge", - "uniform" : { - "tex_rect" : [ - 0.0, - 0.0, - 720.0, - 1280.0 - ], - "merge_params" : [ - 1.0, - 0.3, - 0.2, - 0.7 - ], - "frame_params" : [ - 0.0, - 0.0, - 0.0, - 0.0 - ], - "tex_protect_rect" : [ - 0.0, - 0.0, - 0.0, - 0.0 - ] - }, - "vertexPath" : "vs_simple.bin", - "fragmentPath" : "fs_greenscreen_mask_merge.bin" - } - ] -} diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2_transparent_bg/CustomRender/fs_chromakey_v2.bin b/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2_transparent_bg/CustomRender/fs_chromakey_v2.bin deleted file mode 100644 index 13df35e9..00000000 Binary files a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2_transparent_bg/CustomRender/fs_chromakey_v2.bin and /dev/null differ diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2_transparent_bg/CustomRender/fs_greenscreen_mask_merge.bin b/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2_transparent_bg/CustomRender/fs_greenscreen_mask_merge.bin deleted file mode 100644 index 23784f2f..00000000 Binary files a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2_transparent_bg/CustomRender/fs_greenscreen_mask_merge.bin and /dev/null differ diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2_transparent_bg/CustomRender/fs_mask_corrosion.bin b/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2_transparent_bg/CustomRender/fs_mask_corrosion.bin deleted file mode 100644 index 3ce680bb..00000000 Binary files a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2_transparent_bg/CustomRender/fs_mask_corrosion.bin and /dev/null differ diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2_transparent_bg/CustomRender/fs_simple.bin b/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2_transparent_bg/CustomRender/fs_simple.bin deleted file mode 100644 index 26a480b1..00000000 Binary files a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2_transparent_bg/CustomRender/fs_simple.bin and /dev/null differ diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2_transparent_bg/CustomRender/vs_simple.bin b/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2_transparent_bg/CustomRender/vs_simple.bin deleted file mode 100644 index 3a4cf360..00000000 Binary files a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2_transparent_bg/CustomRender/vs_simple.bin and /dev/null differ diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2_transparent_bg/DeviceCameraTexture.tex b/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2_transparent_bg/DeviceCameraTexture.tex deleted file mode 100644 index 119ca577..00000000 --- a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2_transparent_bg/DeviceCameraTexture.tex +++ /dev/null @@ -1,4 +0,0 @@ -{ - "type": "TextureData", - "key": "DeviceCameraTexture" -} \ No newline at end of file diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2_transparent_bg/PostEffect.post b/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2_transparent_bg/PostEffect.post deleted file mode 100644 index 38f2fe23..00000000 --- a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2_transparent_bg/PostEffect.post +++ /dev/null @@ -1 +0,0 @@ -{"effectType":"blur","subEffectType":"blur","kiraEffectType":"dynamic","effectStrength":8,"starMaxScale":0.5,"starMinScale":0.1,"starScaleTransformation":true,"starScalePeriod":1000,"scaleType":"normal","scaleFrequencyType":"synchronize","scaleFrequency":25,"starScaleRate":0.1,"setScale":false,"probabilityLow":1,"probabilityHigh":1,"minFeatureDistance":3,"fastPointNum":20,"fastThreshold":15,"maxCorners":20,"minDistance":5,"maxFeatureDetectNum":200,"maxKiraNum":20,"seedNum":8,"grayThreshold":5,"stabilityFactor":5,"highLightThreshold":0.3,"shaking":false,"kiraBrightness":1,"alphaChange":true,"maxAlpha":0.5,"minAlpha":0.1,"enableColorful":false,"colorMixPlan":"default","colorNum":4,"colorPath":"","colorBlendMode":"normal","blendMode":"screen","fastNumPercentage":0.8,"clusterDistance":10,"shakeDisPlacement":8,"sleepTime":15,"clusterMaxSize":5,"switchEnvironment":false,"filePaths":[],"brightness":0,"contrast":0,"hue":0,"highlights":0,"sharpness":0,"shadows":0,"saturation":0,"temperature":0,"fade":0,"vignetting":0,"pitu_mode":0,"defocusGamaPath":"","defocusAntigamaPath":"","defocusBinPath":"","defocusMaskPath":"","defocusAlpha":0} \ No newline at end of file diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2_transparent_bg/RenderTarget.rdt b/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2_transparent_bg/RenderTarget.rdt deleted file mode 100644 index a98616e9..00000000 --- a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2_transparent_bg/RenderTarget.rdt +++ /dev/null @@ -1 +0,0 @@ -{"type":"RenderTarget","path":"RenderTarget.rdt","key":"RenderTarget","input":"DeviceCameraTexture"} \ No newline at end of file diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2_transparent_bg/RenderTarget_camera_1.rdt b/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2_transparent_bg/RenderTarget_camera_1.rdt deleted file mode 100644 index df6ccfe7..00000000 --- a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2_transparent_bg/RenderTarget_camera_1.rdt +++ /dev/null @@ -1 +0,0 @@ -{"type":"RenderTarget","key":"RenderTarget1","input":"EmptyTexture","width":0,"height":0,"inputType":"RT_InputType_Texture","sizeType":0,"path":"RenderTarget_camera_1.rdt","depthType":"DEPTH24"} \ No newline at end of file diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2_transparent_bg/RenderTarget_camera_2.rdt b/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2_transparent_bg/RenderTarget_camera_2.rdt deleted file mode 100644 index 8b27983f..00000000 --- a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2_transparent_bg/RenderTarget_camera_2.rdt +++ /dev/null @@ -1 +0,0 @@ -{"type":"RenderTarget","key":"RenderTarget2","input":"","width":0,"height":0,"inputType":"RT_InputType_Texture","sizeType":0,"path":"RenderTarget_camera_2.rdt","depthType":"DEPTH24"} \ No newline at end of file diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2_transparent_bg/script.js b/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2_transparent_bg/script.js deleted file mode 100644 index b0197f06..00000000 --- a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2_transparent_bg/script.js +++ /dev/null @@ -1,102 +0,0 @@ -/*** light-js-config -***/ -// 加载 AEJSBridge.js -light.execute("light://js/AEJSBridge.js"); - -// 素材逻辑函数体 -(function () { - // 定义global对象 - var global = global || (function () {return this;}()); - // 定义素材对象 - var template = global.template || (function () {return {};}()); - // 并挂在global对象下 - global.template = template; - // 定义需要用到的resource - var resourcePool = { - } - //初始化一个jsonObject, - template.uniformJson = { - "uniformMap": { - "green_seg_chromakey": { - "green_params": [0.3, 1.0, 1.0, 0.0], // [similarity, deshadow, corrosion,color] - "tex_rect": [0.0, 0.0, 720.0, 1280.0], - "average_green": [0.0, 1.0, 0.0, 0.0] - }, - "Corrosion": { - "tex_rect": [0.0, 0.0, 720.0, 1280.0], - "corrosion": [1.0, 0.0, 0.0, 0.0] // [corrosion,color] - }, - "green_seg_merge": { - "tex_rect": [0.0, 0.0, 720.0, 1280.0], - "merge_params": [1.0, 0.3, 0.2, 0.7], // [corrosion, despill, smooth, blendWeight] - "frame_params": [0.0, 0.0, 0.0, 0.0], // [isFirstframe, ] - "tex_protect_rect": [0.0, 0.0, 0.0, 0.0] // protect area - } - } - } - // 也挂在global对象下 - global.resourcePool = resourcePool; - - -// // 订阅InputEvent事件 - template.onInputEvent = function(params) { - // //相似度对应similarity, 平滑度对应smooth, 边缘消除强度对应 corrosion, 灰度比例对应 despill, 去阴影对应 deshadow - var GreenSeg_jsonDataParams = params["event.script.lightsdk.GreenScreenSetGreenParamsV2"]; - - if (GreenSeg_jsonDataParams) { - - var similarity_value = GreenSeg_jsonDataParams["green_params_v2"][0]; - var smooth_value = GreenSeg_jsonDataParams["green_params_v2"][1]; - var corrosion_value = GreenSeg_jsonDataParams["green_params_v2"][2]; - var despill_value = GreenSeg_jsonDataParams["green_params_v2"][3]; - var deshadow_value = GreenSeg_jsonDataParams["green_params_v2"][4]; - var color_value = 0.0;//0.0表示绿幕,1.0表示蓝幕 - - - template.uniformJson.uniformMap.green_seg_chromakey.green_params[0] = similarity_value; - template.uniformJson.uniformMap.green_seg_chromakey.green_params[1] = deshadow_value; - template.uniformJson.uniformMap.green_seg_chromakey.green_params[2] = corrosion_value; // corrosion - template.uniformJson.uniformMap.green_seg_chromakey.green_params[3] = color_value; - template.uniformJson.uniformMap.Corrosion.corrosion[0] = corrosion_value; // corrosion - template.uniformJson.uniformMap.Corrosion.corrosion[1] = color_value; // color - template.uniformJson.uniformMap.green_seg_merge.merge_params[0] = corrosion_value; // corrosion - template.uniformJson.uniformMap.green_seg_merge.merge_params[1] = despill_value; // despill - template.uniformJson.uniformMap.green_seg_merge.merge_params[2] = smooth_value; // smooth - } - // 绿幕保护区域 - var Merge_jsonDataProtectRect = params["event.script.lightsdk.GreenScreenSetProtectRect"]; - - if (Merge_jsonDataProtectRect) { - - template.uniformJson.uniformMap.green_seg_merge.tex_protect_rect[0] = Merge_jsonDataProtectRect["tex_protect_rect"][0]; - template.uniformJson.uniformMap.green_seg_merge.tex_protect_rect[1] = 1.0 - Merge_jsonDataProtectRect["tex_protect_rect"][1]; - template.uniformJson.uniformMap.green_seg_merge.tex_protect_rect[2] = Merge_jsonDataProtectRect["tex_protect_rect"][2]; - template.uniformJson.uniformMap.green_seg_merge.tex_protect_rect[3] = 1.0 - Merge_jsonDataProtectRect["tex_protect_rect"][3]; - } - } - - // 素材初始化, 对应c++的configure - template.onTemplateInit = function (entityManager, eventManager) { - template.customGraph = light.getComponent( - entityManager.getEntityByName("CustomGraph"), - "CustomGraph" - ); - } - // 对应c++的update - template.onFrameUpdate = function (currentTime, entityManager, eventManager) { - //将得到的uniformJson传递到自定义滤镜链中 - var surfaceWidth = light.DeviceUtils.GetSurfaceWidth(entityManager); - var surfaceHeight = light.DeviceUtils.GetSurfaceHeight(entityManager); - - template.uniformJson.uniformMap.green_seg_chromakey.tex_rect[2] = surfaceWidth; - template.uniformJson.uniformMap.green_seg_chromakey.tex_rect[3] = surfaceHeight; - - template.uniformJson.uniformMap.Corrosion.tex_rect[2] = surfaceWidth; - template.uniformJson.uniformMap.Corrosion.tex_rect[3] = surfaceHeight; - - template.uniformJson.uniformMap.green_seg_merge.tex_rect[2] = surfaceWidth; - template.uniformJson.uniformMap.green_seg_merge.tex_rect[3] = surfaceHeight; - - template.customGraph.uniformJson = JSON.stringify(template.uniformJson); - } -}()); diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2_transparent_bg/template.json b/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2_transparent_bg/template.json deleted file mode 100644 index d0927343..00000000 --- a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2_transparent_bg/template.json +++ /dev/null @@ -1,693 +0,0 @@ -{ - "isFragment": false, - "componentLevel": 350, - "madeIn": "LightStudio", - "root": { - "id": 16, - "name": "拍摄模板", - "children": [ - { - "id": 17, - "name": "绿幕抠图画板", - "children": [ - { - "id": 18, - "name": "CustomGraph", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "top": 1, - "bottom": -1, - "left": -1, - "right": 1 - }, - "offset": { - "top": 0, - "bottom": 0, - "left": 0, - "right": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "objectEnabled": true, - "interactive": false, - "enabled": true, - "entityId": 18, - "componentID": 18001, - "level": 350 - }, - { - "componentID": 18002, - "enabled": true, - "entityId": 18, - "level": 325, - "resourcePath": "3420ada8-345d-4495-925c-d047ea933176", - "type": "CustomGraph", - "version": 285 - }, - { - "componentID": 18003, - "enabled": true, - "entityId": 18, - "level": 4, - "scriptPath": "34f323b7-ad28-40a8-b5b5-a65c74e5d147", - "type": "Script", - "version": 45 - }, - { - "type": "EntityIdentifier", - "name": "CustomGraph", - "id": 18, - "originID": 18, - "enabled": true - } - ] - } - ], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "entityId": 17, - "componentID": 17001, - "type": "ScreenTransform", - "enabled": true, - "version": 2, - "objectEnabled": true, - "level": 350 - }, - { - "componentID": 17002, - "enabled": true, - "entityId": 17, - "level": 2, - "renderTargetKey": "RenderTarget", - "type": "Camera", - "version": 6 - }, - { - "type": "EntityIdentifier", - "name": "绿幕抠图画板", - "id": 17, - "originID": 17, - "enabled": true - } - ] - }, - { - "id": 19, - "name": "模糊叠加画板", - "children": [ - { - "id": 23, - "name": "抠图贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "eKeepRatio": true, - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 23, - "componentID": 23001, - "type": "ScreenTransform", - "enabled": true, - "version": 902, - "interactive": false, - "level": 350 - }, - { - "componentID": 23002, - "enabled": true, - "entityId": 23, - "level": 1, - "scaleMode": 2, - "src": "RenderTarget", - "type": "Image", - "version": 24 - }, - { - "alpha": 1, - "componentID": 23003, - "enabled": true, - "entityId": 23, - "level": 2, - "mode": "normal", - "type": "BlendMode", - "version": 124 - }, - { - "startOffset": 0, - "duration": 2000000, - "endOffset": -2147483648, - "loopCount": -1, - "type": "TimeOffset", - "enabled": true, - "entityId": 23, - "componentID": 23004, - "level": 1, - "version": null - }, - { - "type": "EntityIdentifier", - "name": "抠图贴纸", - "id": 23, - "originID": 23, - "enabled": true - } - ] - } - ], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "top": 1, - "bottom": -1, - "left": -1, - "right": 1 - }, - "offset": { - "top": 0, - "bottom": 0, - "left": 0, - "right": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "objectEnabled": true, - "interactive": false, - "enabled": true, - "entityId": 19, - "componentID": 19001, - "level": 350 - }, - { - "componentID": 19002, - "duplicateInput": 0, - "enabled": true, - "entityId": 19, - "level": 2, - "renderTargetKey": "RenderTarget1", - "type": "Camera", - "version": 6 - }, - { - "type": "EntityIdentifier", - "name": "模糊叠加画板", - "id": 19, - "originID": 19, - "enabled": true - } - ] - } - ], - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 16, - "componentID": 16001, - "type": "ScreenTransform", - "enabled": true, - "version": 4, - "level": 350 - }, - { - "defaultCameraPosition": 0, - "enableDowngradeAsset": true, - "enableRotation": true, - "needAutoBeauty": false, - "needVoiceDecibel": false, - "resetWhenStartRecord": true, - "supportCameraPosition": 0, - "sync3dRenderEnable": false, - "type": "ExtraSetting", - "enabled": true, - "version": 1, - "entityId": 16, - "componentID": 16002, - "level": 4, - "requireAbility": [] - }, - { - "type": "EntityIdentifier", - "name": "拍摄模板", - "id": 16, - "originID": 16, - "enabled": true - } - ], - "enabled": true, - "version": 0 - }, - "inputSources": { - "RenderTarget": { - "type": "RenderTarget", - "commandMap": {}, - "inputColor": "#ffffffff", - "sizeType": 0, - "useForDisplay": false, - "compatibilityMode": true, - "depthType": "DEPTH24", - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": false, - "samplerType": "SAMPLER_2D" - }, - "key": "RenderTarget", - "label": "RenderTarget.rdt", - "path": "RenderTarget.rdt", - "input": "DeviceCameraTexture", - "level": 2, - "inputKey": "DeviceCameraTexture", - "width": 0, - "height": 0 - }, - "DeviceCameraTexture": { - "type": "TextureData", - "commandMap": {}, - "key": "DeviceCameraTexture", - "label": "DeviceCameraTexture.tex", - "path": "DeviceCameraTexture.tex", - "level": 2 - }, - "3420ada8-345d-4495-925c-d047ea933176": { - "type": "zip", - "commandMap": {}, - "key": "3420ada8-345d-4495-925c-d047ea933176", - "label": "CustomRender.zip", - "path": "CustomRender.zip", - "level": 2 - }, - "34f323b7-ad28-40a8-b5b5-a65c74e5d147": { - "type": "js", - "commandMap": {}, - "key": "34f323b7-ad28-40a8-b5b5-a65c74e5d147", - "label": "script.js", - "path": "script.js", - "level": 2, - "requireAbilities": [] - }, - "RenderTarget1": { - "type": "RenderTarget", - "commandMap": {}, - "inputColor": "#ffffffff", - "sizeType": 0, - "useForDisplay": false, - "compatibilityMode": true, - "depthType": "DEPTH24", - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": false, - "samplerType": "SAMPLER_2D" - }, - "key": "RenderTarget1", - "label": "RenderTarget_camera_1.rdt", - "path": "RenderTarget_camera_1.rdt", - "input": "EmptyTexture", - "level": 2, - "inputKey": "EmptyTexture", - "width": 0, - "height": 0 - }, - "16a7a2e2-2fb6-4370-b7af-0876c0d003bb": { - "type": "folder", - "commandMap": {}, - "key": "16a7a2e2-2fb6-4370-b7af-0876c0d003bb", - "label": "root", - "path": "./", - "level": 2 - }, - "14a13923-c22e-4fb5-8c5a-bc126207759d": { - "type": "folder", - "commandMap": {}, - "key": "14a13923-c22e-4fb5-8c5a-bc126207759d", - "label": "CustomRender", - "path": "CustomRender", - "level": 2 - }, - "f5802f84-b090-4338-a22a-87f7374bb318": { - "type": "JsonData", - "commandMap": {}, - "key": "f5802f84-b090-4338-a22a-87f7374bb318", - "label": "CustomRender.json", - "path": "CustomRender/CustomRender.json", - "level": 2 - }, - "cab00e03-a779-4075-9141-94600a93b43c": { - "type": "gltf_bin", - "commandMap": {}, - "key": "cab00e03-a779-4075-9141-94600a93b43c", - "label": "fs_chromakey_v2.bin", - "path": "CustomRender/fs_chromakey_v2.bin", - "level": 2 - }, - "16259fa7-9505-48a4-bb63-a526e56057c4": { - "type": "gltf_bin", - "commandMap": {}, - "key": "16259fa7-9505-48a4-bb63-a526e56057c4", - "label": "fs_greenscreen_mask_merge.bin", - "path": "CustomRender/fs_greenscreen_mask_merge.bin", - "level": 2 - }, - "73ea0084-1495-43a5-ae46-443b3eab2862": { - "type": "gltf_bin", - "commandMap": {}, - "key": "73ea0084-1495-43a5-ae46-443b3eab2862", - "label": "fs_mask_corrosion.bin", - "path": "CustomRender/fs_mask_corrosion.bin", - "level": 2 - }, - "107fd185-7f4b-4713-8e2a-de101ac62cd6": { - "type": "gltf_bin", - "commandMap": {}, - "key": "107fd185-7f4b-4713-8e2a-de101ac62cd6", - "label": "fs_simple.bin", - "path": "CustomRender/fs_simple.bin", - "level": 2 - }, - "a190277d-4203-4a1c-bab7-af116218b421": { - "type": "gltf_bin", - "commandMap": {}, - "key": "a190277d-4203-4a1c-bab7-af116218b421", - "label": "vs_simple.bin", - "path": "CustomRender/vs_simple.bin", - "level": 2 - }, - "f1fee01b-3cf6-4e52-95e2-820085f9a948": { - "type": "PostEffectData", - "commandMap": {}, - "postEffectOptions": { - "effectType": "blur", - "subEffectType": "blur", - "kiraEffectType": "dynamic", - "effectStrength": 8, - "starMaxScale": 0.5, - "starMinScale": 0.1, - "starScaleTransformation": true, - "starScalePeriod": 1000, - "scaleType": "normal", - "scaleFrequencyType": "synchronize", - "scaleFrequency": 25, - "starScaleRate": 0.1, - "setScale": false, - "probabilityLow": 1, - "probabilityHigh": 1, - "minFeatureDistance": 3, - "fastPointNum": 20, - "fastThreshold": 15, - "maxCorners": 20, - "minDistance": 5, - "maxFeatureDetectNum": 200, - "maxKiraNum": 20, - "seedNum": 8, - "grayThreshold": 5, - "stabilityFactor": 5, - "highLightThreshold": 0.3, - "shaking": false, - "kiraBrightness": 1, - "alphaChange": true, - "maxAlpha": 0.5, - "minAlpha": 0.1, - "enableColorful": false, - "colorMixPlan": "default", - "colorNum": 4, - "colorPath": "", - "colorBlendMode": "normal", - "blendMode": "screen", - "fastNumPercentage": 0.8, - "clusterDistance": 10, - "shakeDisPlacement": 8, - "sleepTime": 15, - "clusterMaxSize": 5, - "switchEnvironment": false, - "filePaths": [], - "brightness": 0, - "contrast": 0, - "hue": 0, - "highlights": 0, - "sharpness": 0, - "shadows": 0, - "saturation": 0, - "temperature": 0, - "fade": 0, - "vignetting": 0, - "pitu_mode": 0, - "defocusGamaPath": "", - "defocusAntigamaPath": "", - "defocusBinPath": "", - "defocusMaskPath": "", - "defocusAlpha": 0 - }, - "key": "f1fee01b-3cf6-4e52-95e2-820085f9a948", - "label": "PostEffect.post", - "path": "PostEffect.post", - "level": 315, - "existingType": "blur" - }, - "RenderTarget2": { - "type": "RenderTarget", - "commandMap": {}, - "inputColor": "#ffffffff", - "sizeType": 0, - "useForDisplay": false, - "compatibilityMode": true, - "depthType": "DEPTH24", - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": false, - "samplerType": "SAMPLER_2D" - }, - "key": "RenderTarget2", - "label": "RenderTarget_camera_2.rdt", - "path": "RenderTarget_camera_2.rdt", - "input": "", - "inputType": "RT_InputType_Texture", - "level": 2, - "inputKey": "", - "width": 0, - "height": 0 - }, - "a64a7e23-f75d-45e4-8789-1b80f83f858f": { - "type": "default", - "commandMap": {}, - "key": "a64a7e23-f75d-45e4-8789-1b80f83f858f", - "label": "video_greenscreen.2025-06-30-07-13-35-287Z.bak", - "path": "video_greenscreen.2025-06-30-07-13-35-287Z.bak", - "level": 2 - } - }, - "preset": {}, - "properties": { - "layout": { - "width": 720, - "height": 1280 - }, - "boundsTrackerPlaceHolders": [], - "musicIDs": [], - "fonts": [], - "movieConfig": { - "sourceType": 2, - "minClipAssetCount": 1, - "maxClipAssetCount": 999, - "minImageDuration": 1000000, - "maxImageDuration": 10000000, - "minVideoDuration": 2000000, - "minFreezePointInterval": 0, - "preferredCoverTime": 1000000, - "originVolume": 1, - "cropEvents": [ - "SlowRhythmTrail" - ], - "imageCropSpace": 0, - "videoCropSpace": -1, - "disableEventsWhileTransition": true, - "useInternalRhythm": true, - "headProtectDuration": 0 - }, - "materialConfigs": [], - "resourceIDs": [] - } -} \ No newline at end of file diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2_transparent_bg/template.png b/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2_transparent_bg/template.png deleted file mode 100644 index 3185bc92..00000000 Binary files a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2_transparent_bg/template.png and /dev/null differ diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2_transparent_bg/video_greenscreen.studio b/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2_transparent_bg/video_greenscreen.studio deleted file mode 100644 index ae3ada31..00000000 --- a/application/App-UIKit/segmentMotionRes.bundle/video_greenscreen_v2_transparent_bg/video_greenscreen.studio +++ /dev/null @@ -1,635 +0,0 @@ -{ - "name": "chromakey", - "author": "brycezhang", - "category": 1, - "scene": { - "id": 16, - "name": "拍摄模板", - "children": [ - { - "id": 17, - "name": "绿幕抠图画板", - "children": [ - { - "id": 18, - "name": "CustomGraph", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "top": 1, - "bottom": -1, - "left": -1, - "right": 1 - }, - "offset": { - "top": 0, - "bottom": 0, - "left": 0, - "right": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "objectEnabled": true, - "interactive": false, - "enabled": true, - "entityId": 18, - "componentID": 18001, - "level": 350 - }, - { - "componentID": 18002, - "enabled": true, - "entityId": 18, - "level": 325, - "resourcePath": "3420ada8-345d-4495-925c-d047ea933176", - "type": "CustomGraph", - "version": 285 - }, - { - "componentID": 18003, - "enabled": true, - "entityId": 18, - "level": 4, - "scriptPath": "34f323b7-ad28-40a8-b5b5-a65c74e5d147", - "type": "Script", - "version": 45 - } - ] - } - ], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 0, - "x": 0, - "y": 0, - "z": 0 - }, - "entityId": 17, - "componentID": 17001, - "type": "ScreenTransform", - "enabled": true, - "version": 2, - "objectEnabled": true, - "level": 350 - }, - { - "componentID": 17002, - "enabled": true, - "entityId": 17, - "level": 2, - "renderTargetKey": "RenderTarget", - "type": "Camera", - "version": 6 - } - ] - }, - { - "id": 19, - "name": "模糊叠加画板", - "children": [ - { - "id": 23, - "name": "抠图贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "eKeepRatio": true, - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 23, - "componentID": 23001, - "type": "ScreenTransform", - "enabled": true, - "version": 902, - "interactive": false, - "level": 350 - }, - { - "componentID": 23002, - "enabled": true, - "entityId": 23, - "level": 1, - "scaleMode": 2, - "src": "RenderTarget", - "type": "Image", - "version": 24 - }, - { - "alpha": 1, - "componentID": 23003, - "enabled": true, - "entityId": 23, - "level": 2, - "mode": "normal", - "type": "BlendMode", - "version": 124 - }, - { - "eAlignMode": 2, - "startOffset": 0, - "duration": 2000000, - "endOffset": 0, - "loopCount": -1, - "type": "TimeOffset", - "enabled": true, - "entityId": 23, - "componentID": 23004, - "level": 1, - "version": null - } - ] - } - ], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "top": 1, - "bottom": -1, - "left": -1, - "right": 1 - }, - "offset": { - "top": 0, - "bottom": 0, - "left": 0, - "right": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "objectEnabled": true, - "interactive": false, - "enabled": true, - "entityId": 19, - "componentID": 19001, - "level": 350 - }, - { - "componentID": 19002, - "duplicateInput": 0, - "enabled": true, - "entityId": 19, - "level": 2, - "renderTargetKey": "RenderTarget1", - "type": "Camera", - "version": 6 - } - ] - } - ], - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 0, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 16, - "componentID": 16001, - "type": "ScreenTransform", - "enabled": true, - "version": 4, - "level": 350 - }, - { - "defaultCameraPosition": 0, - "enableDowngradeAsset": true, - "enableRotation": true, - "needAutoBeauty": false, - "needVoiceDecibel": false, - "resetWhenStartRecord": true, - "supportCameraPosition": 0, - "sync3dRenderEnable": false, - "type": "ExtraSetting", - "enabled": true, - "version": 1, - "entityId": 16, - "componentID": 16002, - "level": 4 - } - ], - "enabled": true, - "version": 0 - }, - "resources": { - "items": [ - { - "type": "folder", - "commandMap": {}, - "key": "16a7a2e2-2fb6-4370-b7af-0876c0d003bb", - "label": "root", - "path": "./", - "level": 2 - }, - { - "type": "folder", - "commandMap": {}, - "key": "14a13923-c22e-4fb5-8c5a-bc126207759d", - "label": "CustomRender", - "path": "CustomRender", - "level": 2 - }, - { - "type": "JsonData", - "commandMap": {}, - "key": "f5802f84-b090-4338-a22a-87f7374bb318", - "label": "CustomRender.json", - "path": "CustomRender/CustomRender.json", - "level": 2 - }, - { - "type": "gltf_bin", - "commandMap": {}, - "key": "cab00e03-a779-4075-9141-94600a93b43c", - "label": "fs_chromakey_v2.bin", - "path": "CustomRender/fs_chromakey_v2.bin", - "level": 2 - }, - { - "type": "gltf_bin", - "commandMap": {}, - "key": "16259fa7-9505-48a4-bb63-a526e56057c4", - "label": "fs_greenscreen_mask_merge.bin", - "path": "CustomRender/fs_greenscreen_mask_merge.bin", - "level": 2 - }, - { - "type": "gltf_bin", - "commandMap": {}, - "key": "73ea0084-1495-43a5-ae46-443b3eab2862", - "label": "fs_mask_corrosion.bin", - "path": "CustomRender/fs_mask_corrosion.bin", - "level": 2 - }, - { - "type": "gltf_bin", - "commandMap": {}, - "key": "107fd185-7f4b-4713-8e2a-de101ac62cd6", - "label": "fs_simple.bin", - "path": "CustomRender/fs_simple.bin", - "level": 2 - }, - { - "type": "gltf_bin", - "commandMap": {}, - "key": "a190277d-4203-4a1c-bab7-af116218b421", - "label": "vs_simple.bin", - "path": "CustomRender/vs_simple.bin", - "level": 2 - }, - { - "type": "zip", - "commandMap": {}, - "key": "3420ada8-345d-4495-925c-d047ea933176", - "label": "CustomRender.zip", - "path": "CustomRender.zip", - "level": 2 - }, - { - "type": "TextureData", - "commandMap": {}, - "key": "DeviceCameraTexture", - "label": "DeviceCameraTexture.tex", - "path": "DeviceCameraTexture.tex", - "level": 2 - }, - { - "type": "PostEffectData", - "commandMap": {}, - "postEffectOptions": { - "effectType": "blur", - "subEffectType": "blur", - "kiraEffectType": "dynamic", - "effectStrength": 8, - "starMaxScale": 0.5, - "starMinScale": 0.1, - "starScaleTransformation": true, - "starScalePeriod": 1000, - "scaleType": "normal", - "scaleFrequencyType": "synchronize", - "scaleFrequency": 25, - "starScaleRate": 0.1, - "setScale": false, - "probabilityLow": 1, - "probabilityHigh": 1, - "minFeatureDistance": 3, - "fastPointNum": 20, - "fastThreshold": 15, - "maxCorners": 20, - "minDistance": 5, - "maxFeatureDetectNum": 200, - "maxKiraNum": 20, - "seedNum": 8, - "grayThreshold": 5, - "stabilityFactor": 5, - "highLightThreshold": 0.3, - "shaking": false, - "kiraBrightness": 1, - "alphaChange": true, - "maxAlpha": 0.5, - "minAlpha": 0.1, - "enableColorful": false, - "colorMixPlan": "default", - "colorNum": 4, - "colorPath": "", - "colorBlendMode": "normal", - "blendMode": "screen", - "fastNumPercentage": 0.8, - "clusterDistance": 10, - "shakeDisPlacement": 8, - "sleepTime": 15, - "clusterMaxSize": 5, - "switchEnvironment": false, - "filePaths": [], - "brightness": 0, - "contrast": 0, - "hue": 0, - "highlights": 0, - "sharpness": 0, - "shadows": 0, - "saturation": 0, - "temperature": 0, - "fade": 0, - "vignetting": 0, - "pitu_mode": 0, - "defocusGamaPath": "", - "defocusAntigamaPath": "", - "defocusBinPath": "", - "defocusMaskPath": "", - "defocusAlpha": 0 - }, - "key": "f1fee01b-3cf6-4e52-95e2-820085f9a948", - "label": "PostEffect.post", - "path": "PostEffect.post", - "level": 315, - "existingType": "blur" - }, - { - "type": "RenderTarget", - "commandMap": {}, - "inputColor": "#ffffffff", - "sizeType": 0, - "useForDisplay": false, - "compatibilityMode": true, - "depthType": "DEPTH24", - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": false, - "samplerType": "SAMPLER_2D" - }, - "key": "RenderTarget", - "label": "RenderTarget.rdt", - "path": "RenderTarget.rdt", - "input": "DeviceCameraTexture", - "level": 2, - "inputKey": "DeviceCameraTexture", - "width": 0, - "height": 0 - }, - { - "type": "RenderTarget", - "commandMap": {}, - "inputColor": "#ffffffff", - "sizeType": 0, - "useForDisplay": false, - "compatibilityMode": true, - "depthType": "DEPTH24", - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": false, - "samplerType": "SAMPLER_2D" - }, - "key": "RenderTarget1", - "label": "RenderTarget_camera_1.rdt", - "path": "RenderTarget_camera_1.rdt", - "input": "EmptyTexture", - "level": 2, - "inputKey": "EmptyTexture", - "width": 0, - "height": 0 - }, - { - "type": "RenderTarget", - "commandMap": {}, - "inputColor": "#ffffffff", - "sizeType": 0, - "useForDisplay": false, - "compatibilityMode": true, - "depthType": "DEPTH24", - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "LINEAR", - "minFilter": "LINEAR_MIPMAP_LINEAR", - "sRGB": false, - "mipmap": false, - "samplerType": "SAMPLER_2D" - }, - "key": "RenderTarget2", - "label": "RenderTarget_camera_2.rdt", - "path": "RenderTarget_camera_2.rdt", - "input": "", - "inputType": "RT_InputType_Texture", - "level": 2, - "inputKey": "", - "width": 0, - "height": 0 - }, - { - "type": "js", - "commandMap": {}, - "key": "34f323b7-ad28-40a8-b5b5-a65c74e5d147", - "label": "script.js", - "path": "script.js", - "level": 2, - "requireAbilities": [] - }, - { - "type": "default", - "commandMap": {}, - "key": "a64a7e23-f75d-45e4-8789-1b80f83f858f", - "label": "video_greenscreen.2025-06-30-07-13-35-287Z.bak", - "path": "video_greenscreen.2025-06-30-07-13-35-287Z.bak", - "level": 2 - } - ] - }, - "cloudResourceData": [], - "componentLevel": 350, - "creationTime": "2023-01-04 15:10:42", - "updateTime": "2025-06-30 16:18:07", - "path": "/Users/jiangpeng/XMagic/light-sdk-youtu/assets/MotionRes/segmentMotionRes/video_greenscreen_v2_bg/", - "downloadMusicList": [] -} \ No newline at end of file diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_blur_45/BgSegmentation.bg b/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_blur_45/BgSegmentation.bg deleted file mode 100644 index 24fefed9..00000000 --- a/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_blur_45/BgSegmentation.bg +++ /dev/null @@ -1,5 +0,0 @@ -{ - "type": "BackgroundSegmentation", - "key": "BackgroundSegmentation", - "input": "" -} \ No newline at end of file diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_blur_45/DeviceCameraTexture.tex b/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_blur_45/DeviceCameraTexture.tex deleted file mode 100644 index 119ca577..00000000 --- a/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_blur_45/DeviceCameraTexture.tex +++ /dev/null @@ -1,4 +0,0 @@ -{ - "type": "TextureData", - "key": "DeviceCameraTexture" -} \ No newline at end of file diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_blur_45/PostEffect.post b/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_blur_45/PostEffect.post deleted file mode 100644 index 2599294f..00000000 --- a/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_blur_45/PostEffect.post +++ /dev/null @@ -1 +0,0 @@ -{"effectType":"blur","subEffectType":"1","effectStrength":45,"starMaxScale":1,"starMinScale":0,"starScalePeriod":1000,"blendMode":"screen","maxCorners":20,"minDistance":5,"filePaths":[],"brightness":0,"contrast":0,"hue":0,"highlights":0,"sharpness":0,"shadows":0,"saturation":0,"temperature":0} \ No newline at end of file diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_blur_45/RenderTarget.rdt b/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_blur_45/RenderTarget.rdt deleted file mode 100644 index a98616e9..00000000 --- a/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_blur_45/RenderTarget.rdt +++ /dev/null @@ -1 +0,0 @@ -{"type":"RenderTarget","path":"RenderTarget.rdt","key":"RenderTarget","input":"DeviceCameraTexture"} \ No newline at end of file diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_blur_45/RenderTarget_1.rdt b/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_blur_45/RenderTarget_1.rdt deleted file mode 100644 index 7e4b6116..00000000 --- a/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_blur_45/RenderTarget_1.rdt +++ /dev/null @@ -1,5 +0,0 @@ -{ - "type": "RenderTarget", - "key": "RenderTarget", - "input": "DeviceCameraTexture" -} \ No newline at end of file diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_blur_45/material.json b/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_blur_45/material.json deleted file mode 100644 index ca559683..00000000 --- a/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_blur_45/material.json +++ /dev/null @@ -1 +0,0 @@ -{ "materialHint": "" } \ No newline at end of file diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_blur_45/template.json b/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_blur_45/template.json deleted file mode 100644 index 0495d610..00000000 --- a/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_blur_45/template.json +++ /dev/null @@ -1,687 +0,0 @@ -{ - "componentLevel": 280, - "madeIn": "LightStudio", - "root": { - "id": 16, - "name": "video_303wink", - "children": [ - { - "id": 19, - "name": "非美型占位节点", - "children": [], - "enabled": true, - "version": 0, - "forbid": true, - "canNotRemove": true, - "isFirstChildren": true, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 19, - "componentID": 19001, - "level": 1 - }, - { - "beautyStatus": 1, - "componentID": 19002, - "enabled": true, - "entityId": 19, - "level": 280, - "makeupStatus": 1, - "smoothStatus": 0, - "type": "BasicBeautyPlaceHolder", - "version": 4 - }, - { - "type": "EntityIdentifier", - "name": "非美型占位节点", - "id": 19, - "enabled": true - } - ] - }, - { - "id": 17, - "name": "2D画板", - "children": [ - { - "id": 22, - "name": "人物分割", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": false, - "enabled": true, - "entityId": 22, - "componentID": 22001, - "objectEnabled": true, - "level": 1 - }, - { - "componentID": 22002, - "cutRange": [ - 0, - 0, - 0, - 0 - ], - "enabled": true, - "entityId": 22, - "maskResource": "0983e2b4-2c55-487e-a49f-efd241e5aba0", - "renderTarget": "RenderTarget1", - "strokeBorderType": "stroke", - "strokeColor": "#ffffffff", - "strokeEnable": false, - "strokeGap": 0, - "strokeSpeedLevel": 1, - "strokeWidth": 12, - "type": "Segmentation", - "version": 19, - "level": 230 - }, - { - "type": "EntityIdentifier", - "name": "人物分割", - "id": 22, - "enabled": true - } - ] - }, - { - "id": 18, - "name": "后处理", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 18, - "componentID": 18001, - "level": 1 - }, - { - "src": "dc65c6f4-abff-44da-a4c3-71ca91b09449", - "type": "PostEffect", - "enabled": true, - "entityId": 18, - "componentID": 18002, - "level": 280 - }, - { - "type": "EntityIdentifier", - "name": "后处理", - "id": 18, - "enabled": true - } - ] - }, - { - "id": 20, - "name": "分割前景", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "entityId": 20, - "componentID": 20001, - "type": "ScreenTransform", - "enabled": true, - "version": 2, - "objectEnabled": true, - "level": 1 - }, - { - "componentID": 20002, - "enabled": true, - "entityId": 20, - "scaleMode": 3, - "src": "RenderTarget1", - "type": "Image", - "version": 2, - "level": 1 - }, - { - "alpha": 1, - "mode": "normal", - "type": "BlendMode", - "enabled": true, - "entityId": 20, - "componentID": 20003, - "level": 2 - }, - { - "type": "EntityIdentifier", - "name": "分割前景", - "id": 20, - "enabled": true - } - ] - }, - { - "id": 21, - "name": "美型占位节点", - "children": [], - "enabled": true, - "version": 0, - "forbid": true, - "canNotRemove": true, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 21, - "componentID": 21001, - "level": 1 - }, - { - "componentID": 21002, - "enabled": true, - "entityId": 21, - "level": 280, - "reshapeStatus": 1, - "type": "BasicReshapePlaceHolder", - "version": 2 - }, - { - "type": "EntityIdentifier", - "name": "美型占位节点", - "id": 21, - "enabled": true - } - ] - } - ], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "entityId": 17, - "componentID": 17001, - "type": "ScreenTransform", - "enabled": true, - "version": 2, - "objectEnabled": true, - "level": 1 - }, - { - "componentID": 17002, - "enabled": true, - "entityId": 17, - "renderTargetKey": "RenderTarget", - "type": "Camera", - "version": 2, - "level": 2 - }, - { - "type": "EntityIdentifier", - "name": "2D画板", - "id": 17, - "enabled": true - } - ] - } - ], - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "entityId": 16, - "componentID": 16001, - "type": "ScreenTransform", - "enabled": true, - "version": 28, - "objectEnabled": true, - "level": 1 - }, - { - "componentID": 16002, - "entityId": 16, - "type": "ExtraSetting", - "enabled": true, - "version": 1, - "enableRotation": true, - "resetWhenStartRecord": true, - "defaultCameraPosition": 0, - "supportCameraPosition": 0, - "sync3dRenderEnable": false, - "needVoiceDecibel": false, - "needAutoBeauty": false, - "enableDowngradeAsset": true, - "level": 4, - "requireAbility": [] - }, - { - "type": "EntityIdentifier", - "name": "video_303wink", - "id": 16, - "enabled": true - } - ], - "enabled": true, - "version": 0 - }, - "inputSources": { - "RenderTarget": { - "type": "RenderTarget", - "commandMap": {}, - "inputColor": "#ffffffff", - "sizeType": 0, - "compatibilityMode": true, - "depthType": "DEPTH24", - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "NEAREST", - "minFilter": "NEAREST", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "width": 0, - "height": 0, - "key": "RenderTarget", - "path": "RenderTarget.rdt", - "label": "RenderTarget.rdt", - "inputKey": "DeviceCameraTexture", - "input": "DeviceCameraTexture", - "level": 2 - }, - "DeviceCameraTexture": { - "type": "TextureData", - "commandMap": {}, - "key": "DeviceCameraTexture", - "path": "DeviceCameraTexture.tex", - "label": "DeviceCameraTexture.tex", - "level": 2 - }, - "0983e2b4-2c55-487e-a49f-efd241e5aba0": { - "type": "segmentation/bg", - "commandMap": {}, - "key": "0983e2b4-2c55-487e-a49f-efd241e5aba0", - "path": "BgSegmentation.bg", - "label": "BgSegmentation.bg", - "level": 2 - }, - "RenderTarget1": { - "type": "RenderTarget", - "commandMap": {}, - "inputColor": "#ffffffff", - "sizeType": 0, - "compatibilityMode": true, - "depthType": "DEPTH24", - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "NEAREST", - "minFilter": "NEAREST", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "width": 0, - "height": 0, - "key": "RenderTarget1", - "path": "RenderTarget_1.rdt", - "label": "RenderTarget_1.rdt", - "inputKey": "DeviceCameraTexture", - "input": "DeviceCameraTexture", - "level": 2 - }, - "dc65c6f4-abff-44da-a4c3-71ca91b09449": { - "type": "PostEffectData", - "commandMap": {}, - "postEffectOptions": { - "effectType": "blur", - "subEffectType": "1", - "effectStrength": 45, - "starMaxScale": 1, - "starMinScale": 0, - "starScalePeriod": 1000, - "blendMode": "screen", - "maxCorners": 20, - "minDistance": 5, - "filePaths": [], - "brightness": 0, - "contrast": 0, - "hue": 0, - "highlights": 0, - "sharpness": 0, - "shadows": 0, - "saturation": 0, - "temperature": 0 - }, - "key": "dc65c6f4-abff-44da-a4c3-71ca91b09449", - "label": "PostEffect.post", - "path": "PostEffect.post", - "existingType": "blur", - "level": 2 - }, - "3ebb3336-06fa-49d1-aa4f-059eb0bf3e87": { - "type": "folder", - "commandMap": {}, - "key": "3ebb3336-06fa-49d1-aa4f-059eb0bf3e87", - "label": "root", - "path": "./", - "level": 2 - }, - "e2e93543-196e-46a6-8ca0-11bc070dfe38": { - "type": "JsonData", - "commandMap": {}, - "key": "e2e93543-196e-46a6-8ca0-11bc070dfe38", - "label": "material.json", - "path": "material.json", - "level": 2 - }, - "dff483a1-20b7-4a3f-9d61-9eca43263195": { - "type": "default", - "commandMap": {}, - "key": "dff483a1-20b7-4a3f-9d61-9eca43263195", - "label": "template.2021-12-09-08-23-48-950Z.bak", - "path": "template.2021-12-09-08-23-48-950Z.bak", - "level": 2 - } - }, - "preset": {}, - "properties": { - "layout": { - "width": 720, - "height": 1280 - }, - "boundsTrackerPlaceHolders": [], - "musicIDs": [], - "fonts": [], - "movieConfig": { - "sourceType": 2, - "minClipAssetCount": 1, - "maxClipAssetCount": 999, - "minImageDuration": 1000000, - "maxImageDuration": 10000000, - "minVideoDuration": 2000000, - "preferredCoverTime": 1000000, - "originVolume": 1, - "cropEvents": [ - "SlowRhythmTrail" - ], - "imageCropSpace": 0, - "videoCropSpace": -1, - "disableEventsWhileTransition": true - }, - "materialConfigs": [], - "resourceIDs": [] - } -} \ No newline at end of file diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_blur_45/template.png b/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_blur_45/template.png deleted file mode 100644 index 3c1dbc31..00000000 Binary files a/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_blur_45/template.png and /dev/null differ diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_blur_45/template.studio b/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_blur_45/template.studio deleted file mode 100644 index 57add0b1..00000000 --- a/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_blur_45/template.studio +++ /dev/null @@ -1,623 +0,0 @@ -{ - "name": "video_303wink", - "author": "chenjialei", - "category": 1, - "scene": { - "id": 16, - "name": "video_303wink", - "children": [ - { - "id": 19, - "name": "非美型占位节点", - "children": [], - "enabled": true, - "version": 0, - "forbid": true, - "canNotRemove": true, - "isFirstChildren": true, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 19, - "componentID": 19001, - "level": 1 - }, - { - "beautyStatus": 1, - "componentID": 19002, - "enabled": true, - "entityId": 19, - "level": 280, - "makeupStatus": 1, - "smoothStatus": 0, - "type": "BasicBeautyPlaceHolder", - "version": 4 - } - ] - }, - { - "id": 17, - "name": "2D画板", - "children": [ - { - "id": 22, - "name": "人物分割", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": false, - "enabled": true, - "entityId": 22, - "componentID": 22001, - "objectEnabled": true, - "level": 1 - }, - { - "componentID": 22002, - "cutRange": [ - 0, - 0, - 0, - 0 - ], - "enabled": true, - "entityId": 22, - "maskResource": "0983e2b4-2c55-487e-a49f-efd241e5aba0", - "renderTarget": "RenderTarget1", - "strokeBorderType": "stroke", - "strokeColor": "#ffffffff", - "strokeEnable": false, - "strokeGap": 0, - "strokeSpeedLevel": 1, - "strokeWidth": 12, - "type": "Segmentation", - "version": 19, - "level": 230 - } - ] - }, - { - "id": 18, - "name": "后处理", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 18, - "componentID": 18001, - "level": 1 - }, - { - "src": "dc65c6f4-abff-44da-a4c3-71ca91b09449", - "type": "PostEffect", - "enabled": true, - "entityId": 18, - "componentID": 18002, - "level": 280 - } - ] - }, - { - "id": 20, - "name": "分割前景", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "entityId": 20, - "componentID": 20001, - "type": "ScreenTransform", - "enabled": true, - "version": 2, - "objectEnabled": true, - "level": 1 - }, - { - "componentID": 20002, - "enabled": true, - "entityId": 20, - "scaleMode": 3, - "src": "RenderTarget1", - "type": "Image", - "version": 2, - "level": 1 - }, - { - "alpha": 1, - "mode": "normal", - "type": "BlendMode", - "enabled": true, - "entityId": 20, - "componentID": 20003, - "level": 2 - } - ] - }, - { - "id": 21, - "name": "美型占位节点", - "children": [], - "enabled": true, - "version": 0, - "forbid": true, - "canNotRemove": true, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 21, - "componentID": 21001, - "level": 1 - }, - { - "componentID": 21002, - "enabled": true, - "entityId": 21, - "level": 280, - "reshapeStatus": 1, - "type": "BasicReshapePlaceHolder", - "version": 2 - } - ] - } - ], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 0, - "x": 0, - "y": 0, - "z": 0 - }, - "entityId": 17, - "componentID": 17001, - "type": "ScreenTransform", - "enabled": true, - "version": 2, - "objectEnabled": true, - "level": 1 - }, - { - "componentID": 17002, - "enabled": true, - "entityId": 17, - "renderTargetKey": "RenderTarget", - "type": "Camera", - "version": 2, - "level": 2 - } - ] - } - ], - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 0, - "x": 0, - "y": 0, - "z": 0 - }, - "entityId": 16, - "componentID": 16001, - "type": "ScreenTransform", - "enabled": true, - "version": 28, - "objectEnabled": true, - "level": 1 - }, - { - "componentID": 16002, - "entityId": 16, - "type": "ExtraSetting", - "enabled": true, - "version": 1, - "enableRotation": true, - "resetWhenStartRecord": true, - "defaultCameraPosition": 0, - "supportCameraPosition": 0, - "sync3dRenderEnable": false, - "needVoiceDecibel": false, - "needAutoBeauty": false, - "enableDowngradeAsset": true, - "level": 4 - } - ], - "enabled": true, - "version": 0 - }, - "resources": { - "items": [ - { - "type": "folder", - "commandMap": {}, - "key": "3ebb3336-06fa-49d1-aa4f-059eb0bf3e87", - "label": "root", - "path": "./", - "level": 2 - }, - { - "type": "segmentation/bg", - "commandMap": {}, - "key": "0983e2b4-2c55-487e-a49f-efd241e5aba0", - "path": "BgSegmentation.bg", - "label": "BgSegmentation.bg", - "level": 2 - }, - { - "type": "TextureData", - "commandMap": {}, - "key": "DeviceCameraTexture", - "path": "DeviceCameraTexture.tex", - "label": "DeviceCameraTexture.tex", - "level": 2 - }, - { - "type": "JsonData", - "commandMap": {}, - "key": "e2e93543-196e-46a6-8ca0-11bc070dfe38", - "label": "material.json", - "path": "material.json", - "level": 2 - }, - { - "type": "PostEffectData", - "commandMap": {}, - "postEffectOptions": { - "effectType": "blur", - "subEffectType": "1", - "effectStrength": 45, - "starMaxScale": 1, - "starMinScale": 0, - "starScalePeriod": 1000, - "blendMode": "screen", - "maxCorners": 20, - "minDistance": 5, - "filePaths": [], - "brightness": 0, - "contrast": 0, - "hue": 0, - "highlights": 0, - "sharpness": 0, - "shadows": 0, - "saturation": 0, - "temperature": 0 - }, - "key": "dc65c6f4-abff-44da-a4c3-71ca91b09449", - "label": "PostEffect.post", - "path": "PostEffect.post", - "existingType": "blur", - "level": 2 - }, - { - "type": "RenderTarget", - "commandMap": {}, - "inputColor": "#ffffffff", - "sizeType": 0, - "compatibilityMode": true, - "depthType": "DEPTH24", - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "NEAREST", - "minFilter": "NEAREST", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "width": 0, - "height": 0, - "key": "RenderTarget", - "path": "RenderTarget.rdt", - "label": "RenderTarget.rdt", - "inputKey": "DeviceCameraTexture", - "input": "DeviceCameraTexture", - "level": 2 - }, - { - "type": "RenderTarget", - "commandMap": {}, - "inputColor": "#ffffffff", - "sizeType": 0, - "compatibilityMode": true, - "depthType": "DEPTH24", - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "NEAREST", - "minFilter": "NEAREST", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "width": 0, - "height": 0, - "key": "RenderTarget1", - "path": "RenderTarget_1.rdt", - "label": "RenderTarget_1.rdt", - "inputKey": "DeviceCameraTexture", - "input": "DeviceCameraTexture", - "level": 2 - }, - { - "type": "default", - "commandMap": {}, - "key": "dff483a1-20b7-4a3f-9d61-9eca43263195", - "label": "template.2021-12-09-08-23-48-950Z.bak", - "path": "template.2021-12-09-08-23-48-950Z.bak", - "level": 2 - } - ] - }, - "cloudResourceData": [], - "componentLevel": 280, - "path": "/Users/paddyjiang/git_projects/Tencent-Effect-Materials/MotionRes/segmentMotionRes/video_segmentation_blur_45/", - "updateTime": "2021-12-09 16:24:18" -} \ No newline at end of file diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_blur_75/BgSegmentation.bg b/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_blur_75/BgSegmentation.bg deleted file mode 100644 index 24fefed9..00000000 --- a/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_blur_75/BgSegmentation.bg +++ /dev/null @@ -1,5 +0,0 @@ -{ - "type": "BackgroundSegmentation", - "key": "BackgroundSegmentation", - "input": "" -} \ No newline at end of file diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_blur_75/DeviceCameraTexture.tex b/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_blur_75/DeviceCameraTexture.tex deleted file mode 100644 index 119ca577..00000000 --- a/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_blur_75/DeviceCameraTexture.tex +++ /dev/null @@ -1,4 +0,0 @@ -{ - "type": "TextureData", - "key": "DeviceCameraTexture" -} \ No newline at end of file diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_blur_75/PostEffect.post b/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_blur_75/PostEffect.post deleted file mode 100644 index da66565c..00000000 --- a/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_blur_75/PostEffect.post +++ /dev/null @@ -1 +0,0 @@ -{"effectType":"blur","subEffectType":"1","effectStrength":75,"starMaxScale":1,"starMinScale":0,"starScalePeriod":1000,"blendMode":"screen","maxCorners":20,"minDistance":5,"filePaths":[],"brightness":0,"contrast":0,"hue":0,"highlights":0,"sharpness":0,"shadows":0,"saturation":0,"temperature":0} \ No newline at end of file diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_blur_75/RenderTarget.rdt b/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_blur_75/RenderTarget.rdt deleted file mode 100644 index a98616e9..00000000 --- a/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_blur_75/RenderTarget.rdt +++ /dev/null @@ -1 +0,0 @@ -{"type":"RenderTarget","path":"RenderTarget.rdt","key":"RenderTarget","input":"DeviceCameraTexture"} \ No newline at end of file diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_blur_75/RenderTarget_1.rdt b/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_blur_75/RenderTarget_1.rdt deleted file mode 100644 index 7e4b6116..00000000 --- a/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_blur_75/RenderTarget_1.rdt +++ /dev/null @@ -1,5 +0,0 @@ -{ - "type": "RenderTarget", - "key": "RenderTarget", - "input": "DeviceCameraTexture" -} \ No newline at end of file diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_blur_75/material.json b/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_blur_75/material.json deleted file mode 100644 index ca559683..00000000 --- a/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_blur_75/material.json +++ /dev/null @@ -1 +0,0 @@ -{ "materialHint": "" } \ No newline at end of file diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_blur_75/template.json b/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_blur_75/template.json deleted file mode 100644 index 03e1c58b..00000000 --- a/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_blur_75/template.json +++ /dev/null @@ -1,687 +0,0 @@ -{ - "componentLevel": 280, - "madeIn": "LightStudio", - "root": { - "id": 16, - "name": "video_303wink", - "children": [ - { - "id": 19, - "name": "非美型占位节点", - "children": [], - "enabled": true, - "version": 0, - "forbid": true, - "canNotRemove": true, - "isFirstChildren": true, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 19, - "componentID": 19001, - "level": 1 - }, - { - "beautyStatus": 1, - "componentID": 19002, - "enabled": true, - "entityId": 19, - "level": 280, - "makeupStatus": 1, - "smoothStatus": 0, - "type": "BasicBeautyPlaceHolder", - "version": 4 - }, - { - "type": "EntityIdentifier", - "name": "非美型占位节点", - "id": 19, - "enabled": true - } - ] - }, - { - "id": 17, - "name": "2D画板", - "children": [ - { - "id": 22, - "name": "人物分割", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": false, - "enabled": true, - "entityId": 22, - "componentID": 22001, - "objectEnabled": true, - "level": 1 - }, - { - "componentID": 22002, - "cutRange": [ - 0, - 0, - 0, - 0 - ], - "enabled": true, - "entityId": 22, - "maskResource": "0983e2b4-2c55-487e-a49f-efd241e5aba0", - "renderTarget": "RenderTarget1", - "strokeBorderType": "stroke", - "strokeColor": "#ffffffff", - "strokeEnable": false, - "strokeGap": 0, - "strokeSpeedLevel": 1, - "strokeWidth": 12, - "type": "Segmentation", - "version": 19, - "level": 230 - }, - { - "type": "EntityIdentifier", - "name": "人物分割", - "id": 22, - "enabled": true - } - ] - }, - { - "id": 18, - "name": "后处理", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 18, - "componentID": 18001, - "level": 1 - }, - { - "src": "dc65c6f4-abff-44da-a4c3-71ca91b09449", - "type": "PostEffect", - "enabled": true, - "entityId": 18, - "componentID": 18002, - "level": 280 - }, - { - "type": "EntityIdentifier", - "name": "后处理", - "id": 18, - "enabled": true - } - ] - }, - { - "id": 20, - "name": "分割前景", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "entityId": 20, - "componentID": 20001, - "type": "ScreenTransform", - "enabled": true, - "version": 2, - "objectEnabled": true, - "level": 1 - }, - { - "componentID": 20002, - "enabled": true, - "entityId": 20, - "scaleMode": 3, - "src": "RenderTarget1", - "type": "Image", - "version": 2, - "level": 1 - }, - { - "alpha": 1, - "mode": "normal", - "type": "BlendMode", - "enabled": true, - "entityId": 20, - "componentID": 20003, - "level": 2 - }, - { - "type": "EntityIdentifier", - "name": "分割前景", - "id": 20, - "enabled": true - } - ] - }, - { - "id": 21, - "name": "美型占位节点", - "children": [], - "enabled": true, - "version": 0, - "forbid": true, - "canNotRemove": true, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 21, - "componentID": 21001, - "level": 1 - }, - { - "componentID": 21002, - "enabled": true, - "entityId": 21, - "level": 280, - "reshapeStatus": 1, - "type": "BasicReshapePlaceHolder", - "version": 2 - }, - { - "type": "EntityIdentifier", - "name": "美型占位节点", - "id": 21, - "enabled": true - } - ] - } - ], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "entityId": 17, - "componentID": 17001, - "type": "ScreenTransform", - "enabled": true, - "version": 2, - "objectEnabled": true, - "level": 1 - }, - { - "componentID": 17002, - "enabled": true, - "entityId": 17, - "renderTargetKey": "RenderTarget", - "type": "Camera", - "version": 2, - "level": 2 - }, - { - "type": "EntityIdentifier", - "name": "2D画板", - "id": 17, - "enabled": true - } - ] - } - ], - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "entityId": 16, - "componentID": 16001, - "type": "ScreenTransform", - "enabled": true, - "version": 30, - "objectEnabled": true, - "level": 1 - }, - { - "componentID": 16002, - "entityId": 16, - "type": "ExtraSetting", - "enabled": true, - "version": 1, - "enableRotation": true, - "resetWhenStartRecord": true, - "defaultCameraPosition": 0, - "supportCameraPosition": 0, - "sync3dRenderEnable": false, - "needVoiceDecibel": false, - "needAutoBeauty": false, - "enableDowngradeAsset": true, - "level": 4, - "requireAbility": [] - }, - { - "type": "EntityIdentifier", - "name": "video_303wink", - "id": 16, - "enabled": true - } - ], - "enabled": true, - "version": 0 - }, - "inputSources": { - "RenderTarget": { - "type": "RenderTarget", - "commandMap": {}, - "inputColor": "#ffffffff", - "sizeType": 0, - "compatibilityMode": true, - "depthType": "DEPTH24", - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "NEAREST", - "minFilter": "NEAREST", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "width": 0, - "height": 0, - "key": "RenderTarget", - "path": "RenderTarget.rdt", - "label": "RenderTarget.rdt", - "inputKey": "DeviceCameraTexture", - "input": "DeviceCameraTexture", - "level": 2 - }, - "DeviceCameraTexture": { - "type": "TextureData", - "commandMap": {}, - "key": "DeviceCameraTexture", - "path": "DeviceCameraTexture.tex", - "label": "DeviceCameraTexture.tex", - "level": 2 - }, - "0983e2b4-2c55-487e-a49f-efd241e5aba0": { - "type": "segmentation/bg", - "commandMap": {}, - "key": "0983e2b4-2c55-487e-a49f-efd241e5aba0", - "path": "BgSegmentation.bg", - "label": "BgSegmentation.bg", - "level": 2 - }, - "RenderTarget1": { - "type": "RenderTarget", - "commandMap": {}, - "inputColor": "#ffffffff", - "sizeType": 0, - "compatibilityMode": true, - "depthType": "DEPTH24", - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "NEAREST", - "minFilter": "NEAREST", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "width": 0, - "height": 0, - "key": "RenderTarget1", - "path": "RenderTarget_1.rdt", - "label": "RenderTarget_1.rdt", - "inputKey": "DeviceCameraTexture", - "input": "DeviceCameraTexture", - "level": 2 - }, - "dc65c6f4-abff-44da-a4c3-71ca91b09449": { - "type": "PostEffectData", - "commandMap": {}, - "postEffectOptions": { - "effectType": "blur", - "subEffectType": "1", - "effectStrength": 75, - "starMaxScale": 1, - "starMinScale": 0, - "starScalePeriod": 1000, - "blendMode": "screen", - "maxCorners": 20, - "minDistance": 5, - "filePaths": [], - "brightness": 0, - "contrast": 0, - "hue": 0, - "highlights": 0, - "sharpness": 0, - "shadows": 0, - "saturation": 0, - "temperature": 0 - }, - "key": "dc65c6f4-abff-44da-a4c3-71ca91b09449", - "label": "PostEffect.post", - "path": "PostEffect.post", - "existingType": "blur", - "level": 2 - }, - "3ebb3336-06fa-49d1-aa4f-059eb0bf3e87": { - "type": "folder", - "commandMap": {}, - "key": "3ebb3336-06fa-49d1-aa4f-059eb0bf3e87", - "label": "root", - "path": "./", - "level": 2 - }, - "e2e93543-196e-46a6-8ca0-11bc070dfe38": { - "type": "JsonData", - "commandMap": {}, - "key": "e2e93543-196e-46a6-8ca0-11bc070dfe38", - "label": "material.json", - "path": "material.json", - "level": 2 - }, - "e790393e-01cc-4b61-a1f9-ce6d3e376e74": { - "type": "default", - "commandMap": {}, - "key": "e790393e-01cc-4b61-a1f9-ce6d3e376e74", - "label": "template.2021-12-09-08-24-55-314Z.bak", - "path": "template.2021-12-09-08-24-55-314Z.bak", - "level": 2 - } - }, - "preset": {}, - "properties": { - "layout": { - "width": 720, - "height": 1280 - }, - "boundsTrackerPlaceHolders": [], - "musicIDs": [], - "fonts": [], - "movieConfig": { - "sourceType": 2, - "minClipAssetCount": 1, - "maxClipAssetCount": 999, - "minImageDuration": 1000000, - "maxImageDuration": 10000000, - "minVideoDuration": 2000000, - "preferredCoverTime": 1000000, - "originVolume": 1, - "cropEvents": [ - "SlowRhythmTrail" - ], - "imageCropSpace": 0, - "videoCropSpace": -1, - "disableEventsWhileTransition": true - }, - "materialConfigs": [], - "resourceIDs": [] - } -} \ No newline at end of file diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_blur_75/template.png b/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_blur_75/template.png deleted file mode 100644 index 842e3566..00000000 Binary files a/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_blur_75/template.png and /dev/null differ diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_blur_75/template.studio b/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_blur_75/template.studio deleted file mode 100644 index ca7732ab..00000000 --- a/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_blur_75/template.studio +++ /dev/null @@ -1,623 +0,0 @@ -{ - "name": "video_303wink", - "author": "chenjialei", - "category": 1, - "scene": { - "id": 16, - "name": "video_303wink", - "children": [ - { - "id": 19, - "name": "非美型占位节点", - "children": [], - "enabled": true, - "version": 0, - "forbid": true, - "canNotRemove": true, - "isFirstChildren": true, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 19, - "componentID": 19001, - "level": 1 - }, - { - "beautyStatus": 1, - "componentID": 19002, - "enabled": true, - "entityId": 19, - "level": 280, - "makeupStatus": 1, - "smoothStatus": 0, - "type": "BasicBeautyPlaceHolder", - "version": 4 - } - ] - }, - { - "id": 17, - "name": "2D画板", - "children": [ - { - "id": 22, - "name": "人物分割", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": false, - "enabled": true, - "entityId": 22, - "componentID": 22001, - "objectEnabled": true, - "level": 1 - }, - { - "componentID": 22002, - "cutRange": [ - 0, - 0, - 0, - 0 - ], - "enabled": true, - "entityId": 22, - "maskResource": "0983e2b4-2c55-487e-a49f-efd241e5aba0", - "renderTarget": "RenderTarget1", - "strokeBorderType": "stroke", - "strokeColor": "#ffffffff", - "strokeEnable": false, - "strokeGap": 0, - "strokeSpeedLevel": 1, - "strokeWidth": 12, - "type": "Segmentation", - "version": 19, - "level": 230 - } - ] - }, - { - "id": 18, - "name": "后处理", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 18, - "componentID": 18001, - "level": 1 - }, - { - "src": "dc65c6f4-abff-44da-a4c3-71ca91b09449", - "type": "PostEffect", - "enabled": true, - "entityId": 18, - "componentID": 18002, - "level": 280 - } - ] - }, - { - "id": 20, - "name": "分割前景", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "entityId": 20, - "componentID": 20001, - "type": "ScreenTransform", - "enabled": true, - "version": 2, - "objectEnabled": true, - "level": 1 - }, - { - "componentID": 20002, - "enabled": true, - "entityId": 20, - "scaleMode": 3, - "src": "RenderTarget1", - "type": "Image", - "version": 2, - "level": 1 - }, - { - "alpha": 1, - "mode": "normal", - "type": "BlendMode", - "enabled": true, - "entityId": 20, - "componentID": 20003, - "level": 2 - } - ] - }, - { - "id": 21, - "name": "美型占位节点", - "children": [], - "enabled": true, - "version": 0, - "forbid": true, - "canNotRemove": true, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 21, - "componentID": 21001, - "level": 1 - }, - { - "componentID": 21002, - "enabled": true, - "entityId": 21, - "level": 280, - "reshapeStatus": 1, - "type": "BasicReshapePlaceHolder", - "version": 2 - } - ] - } - ], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 0, - "x": 0, - "y": 0, - "z": 0 - }, - "entityId": 17, - "componentID": 17001, - "type": "ScreenTransform", - "enabled": true, - "version": 2, - "objectEnabled": true, - "level": 1 - }, - { - "componentID": 17002, - "enabled": true, - "entityId": 17, - "renderTargetKey": "RenderTarget", - "type": "Camera", - "version": 2, - "level": 2 - } - ] - } - ], - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 0, - "x": 0, - "y": 0, - "z": 0 - }, - "entityId": 16, - "componentID": 16001, - "type": "ScreenTransform", - "enabled": true, - "version": 30, - "objectEnabled": true, - "level": 1 - }, - { - "componentID": 16002, - "entityId": 16, - "type": "ExtraSetting", - "enabled": true, - "version": 1, - "enableRotation": true, - "resetWhenStartRecord": true, - "defaultCameraPosition": 0, - "supportCameraPosition": 0, - "sync3dRenderEnable": false, - "needVoiceDecibel": false, - "needAutoBeauty": false, - "enableDowngradeAsset": true, - "level": 4 - } - ], - "enabled": true, - "version": 0 - }, - "resources": { - "items": [ - { - "type": "folder", - "commandMap": {}, - "key": "3ebb3336-06fa-49d1-aa4f-059eb0bf3e87", - "label": "root", - "path": "./", - "level": 2 - }, - { - "type": "segmentation/bg", - "commandMap": {}, - "key": "0983e2b4-2c55-487e-a49f-efd241e5aba0", - "path": "BgSegmentation.bg", - "label": "BgSegmentation.bg", - "level": 2 - }, - { - "type": "TextureData", - "commandMap": {}, - "key": "DeviceCameraTexture", - "path": "DeviceCameraTexture.tex", - "label": "DeviceCameraTexture.tex", - "level": 2 - }, - { - "type": "JsonData", - "commandMap": {}, - "key": "e2e93543-196e-46a6-8ca0-11bc070dfe38", - "label": "material.json", - "path": "material.json", - "level": 2 - }, - { - "type": "PostEffectData", - "commandMap": {}, - "postEffectOptions": { - "effectType": "blur", - "subEffectType": "1", - "effectStrength": 75, - "starMaxScale": 1, - "starMinScale": 0, - "starScalePeriod": 1000, - "blendMode": "screen", - "maxCorners": 20, - "minDistance": 5, - "filePaths": [], - "brightness": 0, - "contrast": 0, - "hue": 0, - "highlights": 0, - "sharpness": 0, - "shadows": 0, - "saturation": 0, - "temperature": 0 - }, - "key": "dc65c6f4-abff-44da-a4c3-71ca91b09449", - "label": "PostEffect.post", - "path": "PostEffect.post", - "existingType": "blur", - "level": 2 - }, - { - "type": "RenderTarget", - "commandMap": {}, - "inputColor": "#ffffffff", - "sizeType": 0, - "compatibilityMode": true, - "depthType": "DEPTH24", - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "NEAREST", - "minFilter": "NEAREST", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "width": 0, - "height": 0, - "key": "RenderTarget", - "path": "RenderTarget.rdt", - "label": "RenderTarget.rdt", - "inputKey": "DeviceCameraTexture", - "input": "DeviceCameraTexture", - "level": 2 - }, - { - "type": "RenderTarget", - "commandMap": {}, - "inputColor": "#ffffffff", - "sizeType": 0, - "compatibilityMode": true, - "depthType": "DEPTH24", - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "NEAREST", - "minFilter": "NEAREST", - "sRGB": true, - "samplerType": "SAMPLER_2D" - }, - "width": 0, - "height": 0, - "key": "RenderTarget1", - "path": "RenderTarget_1.rdt", - "label": "RenderTarget_1.rdt", - "inputKey": "DeviceCameraTexture", - "input": "DeviceCameraTexture", - "level": 2 - }, - { - "type": "default", - "commandMap": {}, - "key": "e790393e-01cc-4b61-a1f9-ce6d3e376e74", - "label": "template.2021-12-09-08-24-55-314Z.bak", - "path": "template.2021-12-09-08-24-55-314Z.bak", - "level": 2 - } - ] - }, - "cloudResourceData": [], - "componentLevel": 280, - "path": "/Users/paddyjiang/git_projects/Tencent-Effect-Materials/MotionRes/segmentMotionRes/video_segmentation_blur_75/", - "updateTime": "2021-12-09 16:25:24" -} \ No newline at end of file diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_transparent_bg/DeviceCameraTexture.tex b/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_transparent_bg/DeviceCameraTexture.tex deleted file mode 100644 index 119ca577..00000000 --- a/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_transparent_bg/DeviceCameraTexture.tex +++ /dev/null @@ -1,4 +0,0 @@ -{ - "type": "TextureData", - "key": "DeviceCameraTexture" -} \ No newline at end of file diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_transparent_bg/RenderTarget.rdt b/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_transparent_bg/RenderTarget.rdt deleted file mode 100644 index a98616e9..00000000 --- a/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_transparent_bg/RenderTarget.rdt +++ /dev/null @@ -1 +0,0 @@ -{"type":"RenderTarget","path":"RenderTarget.rdt","key":"RenderTarget","input":"DeviceCameraTexture"} \ No newline at end of file diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_transparent_bg/RenderTarget_AITexture_1.rdt b/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_transparent_bg/RenderTarget_AITexture_1.rdt deleted file mode 100644 index 85f9a395..00000000 --- a/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_transparent_bg/RenderTarget_AITexture_1.rdt +++ /dev/null @@ -1 +0,0 @@ -{"type":"RenderTarget","key":"RenderTarget1","input":"","width":0,"height":0,"inputType":"RT_InputType_Texture","sizeType":0,"path":"RenderTarget_AITexture_1.rdt","depthType":"DEPTH24"} \ No newline at end of file diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_transparent_bg/RenderTarget_Segmentation_2.rdt b/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_transparent_bg/RenderTarget_Segmentation_2.rdt deleted file mode 100644 index cd9cb4c8..00000000 --- a/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_transparent_bg/RenderTarget_Segmentation_2.rdt +++ /dev/null @@ -1 +0,0 @@ -{"type":"RenderTarget","key":"RenderTarget2","input":"","width":0,"height":0,"inputType":"RT_InputType_Texture","sizeType":0,"path":"RenderTarget_Segmentation_2.rdt","depthType":"DEPTH24"} \ No newline at end of file diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_transparent_bg/template.json b/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_transparent_bg/template.json deleted file mode 100644 index bb6437db..00000000 --- a/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_transparent_bg/template.json +++ /dev/null @@ -1,712 +0,0 @@ -{ - "isFragment": false, - "componentLevel": 350, - "madeIn": "LightStudio", - "root": { - "id": 16, - "name": "拍摄模板", - "children": [ - { - "id": 33, - "name": "非美型占位节点", - "children": [], - "enabled": true, - "version": 0, - "forbid": true, - "canNotRemove": true, - "isFirstChildren": true, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 33, - "componentID": 33001, - "level": 350 - }, - { - "beautyStatus": 1, - "componentID": 33002, - "enabled": true, - "entityId": 33, - "level": 280, - "makeupStatus": 1, - "smoothStatus": 0, - "type": "BasicBeautyPlaceHolder", - "version": 4 - }, - { - "type": "EntityIdentifier", - "name": "非美型占位节点", - "id": 33, - "originID": 33, - "enabled": true - } - ] - }, - { - "id": 17, - "name": "2D画板", - "children": [ - { - "id": 18, - "name": "AITexture", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 18, - "componentID": 18001, - "level": 350 - }, - { - "aiType": "BG_SEG_AGENT", - "isRealTimeResult": true, - "renderTargetList": [ - "RenderTarget1" - ], - "type": "AITextureComponent", - "enabled": true, - "entityId": 18, - "componentID": 18002, - "level": 265 - }, - { - "type": "EntityIdentifier", - "name": "AITexture", - "id": 18, - "originID": 18, - "enabled": true - } - ] - }, - { - "id": 19, - "name": "分割", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 19, - "componentID": 19001, - "level": 350 - }, - { - "bgAlpha": 0, - "componentID": 19002, - "cutRange": [ - 0, - 0, - 0, - 0 - ], - "enabled": true, - "entityId": 19, - "level": 230, - "maskResource": "RenderTarget1", - "renderTarget": "RenderTarget2", - "strokeBorderType": "glow", - "strokeColor": "#ffffffff", - "strokeEnable": false, - "strokeGap": 0, - "strokeSpeedLevel": 50, - "strokeTextureColumn": 1, - "strokeTextureResource": "", - "strokeTextureRow": 1, - "strokeWidth": 1, - "type": "Segmentation", - "version": 12 - }, - { - "type": "EntityIdentifier", - "name": "分割", - "id": 19, - "originID": 19, - "enabled": true - } - ] - }, - { - "id": 20, - "name": "前景贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "eKeepRatio": true, - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 20, - "componentID": 20001, - "type": "ScreenTransform", - "enabled": true, - "version": 2, - "level": 350 - }, - { - "componentID": 20002, - "enabled": true, - "entityId": 20, - "level": 1, - "scaleMode": 2, - "src": "RenderTarget2", - "type": "Image", - "version": 14 - }, - { - "alpha": 1, - "mode": "normal", - "type": "BlendMode", - "enabled": true, - "entityId": 20, - "componentID": 20003, - "level": 2 - }, - { - "startOffset": 0, - "duration": 2000000, - "endOffset": -2147483648, - "loopCount": -1, - "type": "TimeOffset", - "enabled": true, - "entityId": 20, - "componentID": 20004, - "level": 1, - "version": null - }, - { - "type": "EntityIdentifier", - "name": "前景贴纸", - "id": 20, - "originID": 20, - "enabled": true - } - ] - }, - { - "id": 40, - "name": "美型占位节点", - "children": [], - "enabled": true, - "version": 0, - "forbid": true, - "canNotRemove": true, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 40, - "componentID": 40001, - "level": 350 - }, - { - "componentID": 40002, - "enabled": true, - "entityId": 40, - "level": 280, - "reshapeStatus": 1, - "type": "BasicReshapePlaceHolder", - "version": 2 - }, - { - "type": "EntityIdentifier", - "name": "美型占位节点", - "id": 40, - "originID": 40, - "enabled": true - } - ] - } - ], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "entityId": 17, - "componentID": 17001, - "type": "ScreenTransform", - "enabled": true, - "version": 2, - "objectEnabled": true, - "level": 350 - }, - { - "componentID": 17002, - "enabled": true, - "entityId": 17, - "renderTargetKey": "RenderTarget", - "type": "Camera", - "version": 2, - "level": 2 - }, - { - "type": "EntityIdentifier", - "name": "2D画板", - "id": 17, - "originID": 17, - "enabled": true - } - ] - } - ], - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 16, - "componentID": 16001, - "type": "ScreenTransform", - "enabled": true, - "version": 10, - "level": 350 - }, - { - "defaultCameraPosition": 0, - "enableDowngradeAsset": true, - "enableRotation": true, - "needAutoBeauty": false, - "needVoiceDecibel": false, - "resetWhenStartRecord": true, - "supportCameraPosition": 0, - "sync3dRenderEnable": false, - "type": "ExtraSetting", - "enabled": true, - "version": 1, - "entityId": 16, - "componentID": 16002, - "level": 4, - "requireAbility": [] - }, - { - "type": "EntityIdentifier", - "name": "拍摄模板", - "id": 16, - "originID": 16, - "enabled": true - } - ], - "enabled": true, - "version": 0 - }, - "inputSources": { - "RenderTarget": { - "type": "RenderTarget", - "commandMap": {}, - "inputColor": "#ffffffff", - "sizeType": 0, - "useForDisplay": false, - "compatibilityMode": true, - "depthType": "DEPTH24", - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "NEAREST", - "minFilter": "NEAREST", - "sRGB": false, - "mipmap": false, - "samplerType": "SAMPLER_2D" - }, - "key": "RenderTarget", - "path": "RenderTarget.rdt", - "label": "RenderTarget.rdt", - "inputKey": "DeviceCameraTexture", - "input": "DeviceCameraTexture", - "level": 2, - "width": 0, - "height": 0 - }, - "DeviceCameraTexture": { - "type": "TextureData", - "commandMap": {}, - "key": "DeviceCameraTexture", - "path": "DeviceCameraTexture.tex", - "label": "DeviceCameraTexture.tex", - "level": 2 - }, - "RenderTarget1": { - "type": "RenderTarget", - "commandMap": {}, - "inputColor": "#ffffffff", - "sizeType": 0, - "useForDisplay": false, - "compatibilityMode": true, - "depthType": "DEPTH24", - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "NEAREST", - "minFilter": "NEAREST", - "sRGB": false, - "mipmap": false, - "samplerType": "SAMPLER_2D" - }, - "key": "RenderTarget1", - "label": "RenderTarget_AITexture_1.rdt", - "path": "RenderTarget_AITexture_1.rdt", - "input": "", - "inputType": "RT_InputType_Texture", - "level": 2, - "inputKey": "", - "width": 0, - "height": 0 - }, - "RenderTarget2": { - "type": "RenderTarget", - "commandMap": {}, - "inputColor": "#ffffffff", - "sizeType": 0, - "useForDisplay": false, - "compatibilityMode": true, - "depthType": "DEPTH24", - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "NEAREST", - "minFilter": "NEAREST", - "sRGB": false, - "mipmap": false, - "samplerType": "SAMPLER_2D" - }, - "key": "RenderTarget2", - "label": "RenderTarget_Segmentation_2.rdt", - "path": "RenderTarget_Segmentation_2.rdt", - "input": "", - "inputType": "RT_InputType_Texture", - "level": 2, - "inputKey": "", - "width": 0, - "height": 0 - }, - "232d13ab-69f6-400b-8b7d-20f18e6394f9": { - "type": "folder", - "commandMap": {}, - "key": "232d13ab-69f6-400b-8b7d-20f18e6394f9", - "label": "root", - "path": "./", - "level": 2 - }, - "eb93467d-2baa-46fc-9f2e-f351e9376d15": { - "type": "default", - "commandMap": {}, - "key": "eb93467d-2baa-46fc-9f2e-f351e9376d15", - "label": "video_segmentation_transparent_bg.2023-04-26-08-02-41-884Z.bak", - "path": "video_segmentation_transparent_bg.2023-04-26-08-02-41-884Z.bak", - "level": 2 - } - }, - "preset": {}, - "properties": { - "layout": { - "width": 720, - "height": 1280 - }, - "boundsTrackerPlaceHolders": [], - "musicIDs": [], - "fonts": [], - "movieConfig": { - "sourceType": 2, - "minClipAssetCount": 1, - "maxClipAssetCount": 999, - "minImageDuration": 1000000, - "maxImageDuration": 10000000, - "minVideoDuration": 2000000, - "minFreezePointInterval": 0, - "preferredCoverTime": 1000000, - "originVolume": 1, - "cropEvents": [ - "SlowRhythmTrail" - ], - "imageCropSpace": 0, - "videoCropSpace": -1, - "disableEventsWhileTransition": true, - "useInternalRhythm": true, - "headProtectDuration": 0 - }, - "materialConfigs": [], - "resourceIDs": [] - } -} \ No newline at end of file diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_transparent_bg/template.png b/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_transparent_bg/template.png deleted file mode 100644 index 3c1dbc31..00000000 Binary files a/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_transparent_bg/template.png and /dev/null differ diff --git a/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_transparent_bg/video_segmentation_transparent_bg.studio b/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_transparent_bg/video_segmentation_transparent_bg.studio deleted file mode 100644 index 2b4675a4..00000000 --- a/application/App-UIKit/segmentMotionRes.bundle/video_segmentation_transparent_bg/video_segmentation_transparent_bg.studio +++ /dev/null @@ -1,640 +0,0 @@ -{ - "name": "video_segmentation_transparent_bg", - "author": "paddyjiang", - "category": 1, - "scene": { - "id": 16, - "name": "拍摄模板", - "children": [ - { - "id": 33, - "name": "非美型占位节点", - "children": [], - "enabled": true, - "version": 0, - "forbid": true, - "canNotRemove": true, - "isFirstChildren": true, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 33, - "componentID": 33001, - "level": 350 - }, - { - "beautyStatus": 1, - "componentID": 33002, - "enabled": true, - "entityId": 33, - "level": 280, - "makeupStatus": 1, - "smoothStatus": 0, - "type": "BasicBeautyPlaceHolder", - "version": 4 - } - ] - }, - { - "id": 17, - "name": "2D画板", - "children": [ - { - "id": 18, - "name": "AITexture", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 18, - "componentID": 18001, - "level": 350 - }, - { - "aiType": "BG_SEG_AGENT", - "isRealTimeResult": true, - "renderTargetList": [ - "RenderTarget1" - ], - "type": "AITextureComponent", - "enabled": true, - "entityId": 18, - "componentID": 18002, - "level": 265 - } - ] - }, - { - "id": 19, - "name": "分割", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 19, - "componentID": 19001, - "level": 350 - }, - { - "bgAlpha": 0, - "componentID": 19002, - "cutRange": [ - 0, - 0, - 0, - 0 - ], - "enabled": true, - "entityId": 19, - "level": 230, - "maskResource": "RenderTarget1", - "renderTarget": "RenderTarget2", - "strokeBorderType": "glow", - "strokeColor": "#ffffffff", - "strokeEnable": false, - "strokeGap": 0, - "strokeSpeedLevel": 50, - "strokeTextureColumn": 1, - "strokeTextureResource": "", - "strokeTextureRow": 1, - "strokeWidth": 1, - "type": "Segmentation", - "version": 12 - } - ] - }, - { - "id": 20, - "name": "前景贴纸", - "children": [], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": true, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "eKeepRatio": true, - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 1, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 20, - "componentID": 20001, - "type": "ScreenTransform", - "enabled": true, - "version": 2, - "level": 350 - }, - { - "componentID": 20002, - "enabled": true, - "entityId": 20, - "level": 1, - "scaleMode": 2, - "src": "RenderTarget2", - "type": "Image", - "version": 14 - }, - { - "alpha": 1, - "mode": "normal", - "type": "BlendMode", - "enabled": true, - "entityId": 20, - "componentID": 20003, - "level": 2 - }, - { - "eAlignMode": 2, - "startOffset": 0, - "duration": 2000000, - "endOffset": 0, - "loopCount": -1, - "type": "TimeOffset", - "enabled": true, - "entityId": 20, - "componentID": 20004, - "level": 1, - "version": null - } - ] - }, - { - "id": 40, - "name": "美型占位节点", - "children": [], - "enabled": true, - "version": 0, - "forbid": true, - "canNotRemove": true, - "components": [ - { - "type": "ScreenTransform", - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "rotation": { - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1, - "eKeepRatio": true - }, - "eEuler": { - "x": 0, - "y": 0, - "z": 0 - }, - "anchor": { - "left": 0, - "right": 0, - "top": 0, - "bottom": 0 - }, - "offset": { - "left": -360, - "right": 360, - "top": 640, - "bottom": -640 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 0, - "eFixSize": 3, - "eEditingMode": 0, - "eKeepRatio": true, - "objectEnabled": true, - "enabled": true, - "entityId": 40, - "componentID": 40001, - "level": 350 - }, - { - "componentID": 40002, - "enabled": true, - "entityId": 40, - "level": 280, - "reshapeStatus": 1, - "type": "BasicReshapePlaceHolder", - "version": 2 - } - ] - } - ], - "enabled": true, - "version": 0, - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 0, - "x": 0, - "y": 0, - "z": 0 - }, - "entityId": 17, - "componentID": 17001, - "type": "ScreenTransform", - "enabled": true, - "version": 2, - "objectEnabled": true, - "level": 350 - }, - { - "componentID": 17002, - "enabled": true, - "entityId": 17, - "renderTargetKey": "RenderTarget", - "type": "Camera", - "version": 2, - "level": 2 - } - ] - } - ], - "components": [ - { - "anchor": { - "bottom": -1, - "left": -1, - "right": 1, - "top": 1 - }, - "offset": { - "bottom": 0, - "left": 0, - "right": 0, - "top": 0 - }, - "pivot": { - "x": 0, - "y": 0 - }, - "ePinToEdge": 15, - "eFixSize": 0, - "eEditingMode": 1, - "eKeepRatio": false, - "position": { - "x": 0, - "y": 0, - "z": 0 - }, - "scale": { - "x": 1, - "y": 1, - "z": 1 - }, - "rotation": { - "w": 0, - "x": 0, - "y": 0, - "z": 0 - }, - "objectEnabled": true, - "entityId": 16, - "componentID": 16001, - "type": "ScreenTransform", - "enabled": true, - "version": 10, - "level": 350 - }, - { - "defaultCameraPosition": 0, - "enableDowngradeAsset": true, - "enableRotation": true, - "needAutoBeauty": false, - "needVoiceDecibel": false, - "resetWhenStartRecord": true, - "supportCameraPosition": 0, - "sync3dRenderEnable": false, - "type": "ExtraSetting", - "enabled": true, - "version": 1, - "entityId": 16, - "componentID": 16002, - "level": 4 - } - ], - "enabled": true, - "version": 0 - }, - "resources": { - "items": [ - { - "type": "folder", - "commandMap": {}, - "key": "232d13ab-69f6-400b-8b7d-20f18e6394f9", - "label": "root", - "path": "./", - "level": 2 - }, - { - "type": "TextureData", - "commandMap": {}, - "key": "DeviceCameraTexture", - "path": "DeviceCameraTexture.tex", - "label": "DeviceCameraTexture.tex", - "level": 2 - }, - { - "type": "RenderTarget", - "commandMap": {}, - "inputColor": "#ffffffff", - "sizeType": 0, - "useForDisplay": false, - "compatibilityMode": true, - "depthType": "DEPTH24", - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "NEAREST", - "minFilter": "NEAREST", - "sRGB": false, - "mipmap": false, - "samplerType": "SAMPLER_2D" - }, - "key": "RenderTarget", - "path": "RenderTarget.rdt", - "label": "RenderTarget.rdt", - "inputKey": "DeviceCameraTexture", - "input": "DeviceCameraTexture", - "level": 2, - "width": 0, - "height": 0 - }, - { - "type": "RenderTarget", - "commandMap": {}, - "inputColor": "#ffffffff", - "sizeType": 0, - "useForDisplay": false, - "compatibilityMode": true, - "depthType": "DEPTH24", - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "NEAREST", - "minFilter": "NEAREST", - "sRGB": false, - "mipmap": false, - "samplerType": "SAMPLER_2D" - }, - "key": "RenderTarget1", - "label": "RenderTarget_AITexture_1.rdt", - "path": "RenderTarget_AITexture_1.rdt", - "input": "", - "inputType": "RT_InputType_Texture", - "level": 2, - "inputKey": "", - "width": 0, - "height": 0 - }, - { - "type": "RenderTarget", - "commandMap": {}, - "inputColor": "#ffffffff", - "sizeType": 0, - "useForDisplay": false, - "compatibilityMode": true, - "depthType": "DEPTH24", - "textureOptions": { - "wrapS": "REPEAT", - "wrapT": "REPEAT", - "magFilter": "NEAREST", - "minFilter": "NEAREST", - "sRGB": false, - "mipmap": false, - "samplerType": "SAMPLER_2D" - }, - "key": "RenderTarget2", - "label": "RenderTarget_Segmentation_2.rdt", - "path": "RenderTarget_Segmentation_2.rdt", - "input": "", - "inputType": "RT_InputType_Texture", - "level": 2, - "inputKey": "", - "width": 0, - "height": 0 - }, - { - "type": "default", - "commandMap": {}, - "key": "eb93467d-2baa-46fc-9f2e-f351e9376d15", - "label": "video_segmentation_transparent_bg.2023-04-26-08-02-41-884Z.bak", - "path": "video_segmentation_transparent_bg.2023-04-26-08-02-41-884Z.bak", - "level": 2 - } - ] - }, - "cloudResourceData": [], - "componentLevel": 350, - "creationTime": "2021-12-27 15:45:52", - "updateTime": "2023-04-26 16:13:39", - "path": "/Users/jiangpeng/git_projects/light-sdk-youtu/assets/MotionRes/segmentMotionRes/video_segmentation_transparent_bg/", - "downloadMusicList": [] -} \ No newline at end of file diff --git a/application/Debug/GenerateTestUserSig.swift b/application/Debug/GenerateTestUserSig.swift index b3c52760..3ed296ac 100644 --- a/application/Debug/GenerateTestUserSig.swift +++ b/application/Debug/GenerateTestUserSig.swift @@ -1,13 +1,13 @@ // // GenerateTestUserSig.swift -// TUILiveKitApp +// RTCube // // Created by abyyxwang on 2021/5/7. // Copyright © 2021 Tencent. All rights reserved. // -import Foundation import CommonCrypto +import Foundation import zlib /** @@ -37,23 +37,28 @@ let EXPIRETIME: Int = 604_800 */ let SECRETKEY = "" -let BEAUTY_LICENSE_KEY = "" +let APP_STORE_ID = "" + +let IOAAPPKEY = "" +let IOAAPPID = "" -let BEAUTY_LICENSE_URL = "" +let PUSH_BUSINESS_ID: Int32 = 0 -let PLAYER_LICENSE_KEY = "" +let SERVERLESSURL = "" +let TEST_SERVERLESSURL = "" -let PLAYER_LICENSE_URL = "" +let APAAS_APP_ID = "" +let DEBUG_SDKAPPID: Int = SDKAPPID +let DEBUG_SECRETKEY = SECRETKEY class GenerateTestUserSig { - - class func genTestUserSig(identifier: String) -> String { + class func genTestUserSig(identifier: String, sdkAppId: Int, secretKey: String) -> String { let current = CFAbsoluteTimeGetCurrent() + kCFAbsoluteTimeIntervalSince1970 - let TLSTime: CLong = CLong(floor(current)) + let TLSTime = CLong(floor(current)) var obj: [String: Any] = [ "TLS.ver": "2.0", "TLS.identifier": identifier, - "TLS.sdkappid": SDKAPPID, + "TLS.sdkappid": sdkAppId, "TLS.expire": EXPIRETIME, "TLS.time": TLSTime, ] @@ -64,28 +69,28 @@ class GenerateTestUserSig { "TLS.expire", ] var stringToSign = "" - keyOrder.forEach { (key) in + for key in keyOrder { if let value = obj[key] { stringToSign += "\(key):\(value)\n" } } print("string to sign: \(stringToSign)") - let sig = hmac(stringToSign) + let sig = hmac(stringToSign, secretKey: secretKey) obj["TLS.sig"] = sig print("sig: \(String(describing: sig))") guard let jsonData = try? JSONSerialization.data(withJSONObject: obj, options: .sortedKeys) else { return "" } - - let bytes = jsonData.withUnsafeBytes { (result) -> UnsafePointer in - if let baseAddress = result.bindMemory(to: Bytef.self).baseAddress{ + + let bytes = jsonData.withUnsafeBytes { result -> UnsafePointer in + if let baseAddress = result.bindMemory(to: Bytef.self).baseAddress { return baseAddress - }else{ + } else { return UnsafePointer("") } } - let srcLen: uLongf = uLongf(jsonData.count) + let srcLen = uLongf(jsonData.count) let upperBound: uLong = compressBound(srcLen) - let capacity: Int = Int(upperBound) - let dest: UnsafeMutablePointer = UnsafeMutablePointer.allocate(capacity: capacity) + let capacity = Int(upperBound) + let dest = UnsafeMutablePointer.allocate(capacity: capacity) var destLen = upperBound let ret = compress2(dest, &destLen, bytes, srcLen, Z_BEST_SPEED) if ret != Z_OK { @@ -94,30 +99,30 @@ class GenerateTestUserSig { return "" } let count = Int(destLen) - let result = self.base64URL(data: Data(bytesNoCopy: dest, count: count, deallocator: .free)) + let result = base64URL(data: Data(bytesNoCopy: dest, count: count, deallocator: .free)) return result } - - class func hmac(_ plainText: String) -> String? { - let cKey = SECRETKEY.cString(using: .ascii) + + class func hmac(_ plainText: String, secretKey: String) -> String? { + let cKey = secretKey.cString(using: .ascii) let cData = plainText.cString(using: .ascii) - - let cKeyLen = SECRETKEY.lengthOfBytes(using: .ascii) + + let cKeyLen = secretKey.lengthOfBytes(using: .ascii) let cDataLen = plainText.lengthOfBytes(using: .ascii) - + var cHMAC = [CUnsignedChar](repeating: 0, count: Int(CC_SHA256_DIGEST_LENGTH)) - cHMAC.withUnsafeMutableBufferPointer { (bufferPointer) in + cHMAC.withUnsafeMutableBufferPointer { bufferPointer in CCHmac(CCHmacAlgorithm(kCCHmacAlgSHA256), cKey, cKeyLen, cData, cDataLen, bufferPointer.baseAddress) } - + let data = Data(cHMAC) return data.base64EncodedString(options: []) } - + class func base64URL(data: Data) -> String { let result = data.base64EncodedString() var final = "" - result.forEach { (char) in + for char in result { switch char { case "+": final += "*" diff --git a/application/Podfile b/application/Podfile index 1691274d..d2b5db20 100644 --- a/application/Podfile +++ b/application/Podfile @@ -1,45 +1,46 @@ -source 'https://cdn.cocoapods.org/' -# Uncomment the next line to define a global platform for your project platform :ios, '14.0' +source 'https://cdn.cocoapods.org/' -target 'App-UIKit' do - # Comment the next line if you don't want to use dynamic frameworks +# ── Unified TXLiteAVSDK version ── +TXLITEAVSDK_VERSION = '13.2.20652' + +# ── Shared dependency definition ── +def shared_pods use_frameworks! - # Pods for UIKitApp-UIKit - pod 'SnapKit' - pod 'SensorsAnalyticsSDK' - - pod 'TUICallKit_Swift', :path=>'../call/TUICallKit_Swift.podspec' - pod 'TUIRoomKit', :path=>'../room/TUIRoomKit.podspec' - pod 'TUILiveKit', :path=>'../live/TUILiveKit.podspec' - pod 'AtomicX', :path=>'../atomic_x/AtomicX.podspec' - - pod 'AtomicXCore' - pod 'Kingfisher' - - pod 'SVGAPlayer', '~> 2.3' + + # ── Third-party open source libraries ── + pod 'Alamofire', '5.0.0' + pod 'SnapKit', '5.0.1' + pod 'Kingfisher', '6.3.1' + pod 'Toast-Swift' + + # ── Shell project local pods ── + pod 'Login', :path => 'login/Login.podspec' + pod 'AppAssembly', :path => 'assembly/AppAssembly.podspec' + + # Remote SDK + pod 'TXLiteAVSDK_Professional', TXLITEAVSDK_VERSION + pod 'TUICore' + + pod 'MJRefresh', '3.7.5' + +end + +target 'RTCubeLab' do + shared_pods + + # Screen-sharing broadcast extension Podfile config + target 'RTCubeLabReplayExtension' do + inherit! :search_paths + pod 'TXLiteAVSDK_Professional/ReplayKitExt', TXLITEAVSDK_VERSION + end end post_install do |installer| installer.pods_project.targets.each do |target| target.build_configurations.each do |config| - config.build_settings['ENABLE_BITCODE'] = 'NO' - config.build_settings['EXPANDED_CODE_SIGN_IDENTITY'] = "" - config.build_settings['CODE_SIGNING_REQUIRED'] = "NO" - config.build_settings['CODE_SIGNING_ALLOWED'] = "NO" - config.build_settings['GENERATE_INFOPLIST_FILE'] = "NO" config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '14.0' - config.build_settings['OTHER_SWIFT_FLAGS'] = '$(inherited) -D DEV_MODE' - end - shell_script_path = "Pods/Target Support Files/#{target.name}/#{target.name}-frameworks.sh" - if File::exist?(shell_script_path) - shell_script_input_lines = File.readlines(shell_script_path) - shell_script_output_lines = shell_script_input_lines.map { |line| line.sub("source=\"$(readlink \"${source}\")\"", "source=\"$(readlink -f \"${source}\")\"") } - File.open(shell_script_path, 'w') do |f| - shell_script_output_lines.each do |line| - f.write line - end - end + config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO' end end end diff --git a/application/Podfile.lock b/application/Podfile.lock new file mode 100644 index 00000000..443b2a51 --- /dev/null +++ b/application/Podfile.lock @@ -0,0 +1,491 @@ +PODS: + - AFNetworking (4.0.1): + - AFNetworking/NSURLSession (= 4.0.1) + - AFNetworking/Reachability (= 4.0.1) + - AFNetworking/Security (= 4.0.1) + - AFNetworking/Serialization (= 4.0.1) + - AFNetworking/UIKit (= 4.0.1) + - AFNetworking/NSURLSession (4.0.1): + - AFNetworking/Reachability + - AFNetworking/Security + - AFNetworking/Serialization + - AFNetworking/Reachability (4.0.1) + - AFNetworking/Security (4.0.1) + - AFNetworking/Serialization (4.0.1) + - AFNetworking/UIKit (4.0.1): + - AFNetworking/NSURLSession + - AIConversationKit (1.0.0): + - AIConversationKit/Professional (= 1.0.0) + - Kingfisher + - Masonry + - RTCCommon + - SDWebImage + - SnapKit + - TUICore + - AIConversationKit/Professional (1.0.0): + - Kingfisher + - Masonry + - RTCCommon + - SDWebImage + - SnapKit + - TUICore + - TXLiteAVSDK_Professional + - Alamofire (5.0.0) + - AppAssembly/Full (1.0.0): + - AIConversationKit + - Alamofire + - AtomicX + - AtomicXCore + - JXPagingView/Paging (= 2.1.2) + - JXSegmentedView (= 1.3.0) + - Login/Full + - RTCCommon + - SnapKit + - TencentEffect + - TIMAppKit + - Toast-Swift + - TUICallKit_Swift + - TUICore + - TUILiveKit + - TUIRoomKit + - VodPlay + - XiaoShiPinApp + - AtomicX (1.0.0): + - AtomicXCore + - Kingfisher + - RTCRoomEngine/Professional + - SnapKit + - TUICore + - TXIMSDK_Plus_iOS_XCFramework (>= 8.8.7357) + - TXLiteAVSDK_Professional + - AtomicXCore (3.0.5): + - RTCRoomEngine/Professional + - TXLiteAVSDK_Professional (>= 13.1.20454) + - BeautySettingKit (0.1.0): + - ZipArchive + - Bugly (2.7.49.1) + - CloudHuiYanSDK_FW (1.0.0): + - CloudHuiYanSDK_FW/Framework (= 1.0.0) + - CloudHuiYanSDK_FW/Resources (= 1.0.0) + - CloudHuiYanSDK_FW/Framework (1.0.0) + - CloudHuiYanSDK_FW/Resources (1.0.0) + - ITLogin (1.0.0) + - JXPagingView/Paging (2.1.2) + - JXSegmentedView (1.3.0) + - Kingfisher (6.3.1) + - LiteAVPrivacy (1.0.0): + - Masonry + - RTCRoomEngine/Professional + - SDWebImage + - TUICore + - TXIMSDK_Plus_iOS_XCFramework + - TXLiteAVSDK_Professional + - Login/Full (1.0.0): + - Alamofire + - AtomicX + - ITLogin + - Kingfisher + - SnapKit + - Toast-Swift + - TUICore + - Masonry (1.1.0) + - MBProgressHUD (1.2.0) + - MJRefresh (3.7.5) + - Protobuf (3.22.5) + - QCloudCore/WithoutMTA (6.5.3) + - QCloudCOSXML/Slim (6.5.3): + - QCloudCore/WithoutMTA (= 6.5.3) + - QCloudQuic (6.3.9): + - QCloudQuic/Default (= 6.3.9) + - QCloudQuic/Default (6.3.9) + - ReactiveObjC (3.1.1) + - RTCCommon (1.3.6) + - RTCExperienceRoom (1.0.1): + - RTCCommon + - SnapKit + - TXLiteAVSDK_Professional + - RTCRoomEngine/Professional (3.4.0): + - TXIMSDK_Plus_iOS_XCFramework + - TXLiteAVSDK_Professional (>= 11.7.15304) + - SDWebImage (5.21.7): + - SDWebImage/Core (= 5.21.7) + - SDWebImage/Core (5.21.7) + - SensorsAnalyticsSDK (5.0.9): + - SensorsAnalyticsSDK/Core (= 5.0.9) + - SensorsAnalyticsSDK/Core (5.0.9) + - SnapKit (5.0.1) + - SSZipArchive (2.4.3) + - SuperPlayer/Professional (3.7.8): + - Masonry + - SDWebImage + - TUICore + - TXLiteAVSDK_Professional + - TCEffectPlayer (3.2.249): + - TCMediaX + - TCEffectPlayerKit/Beauty (3.0.0): + - TCEffectPlayer + - TCMediaX + - TUICore + - TCMediaX (3.0.246) + - TEBeautyKit (4.2.0.21): + - Masonry + - SSZipArchive + - TEBeautyKit/S1-07 (= 4.2.0.21) + - TEBeautyKit/S1-07 (4.2.0.21): + - Masonry + - SSZipArchive + - TencentEffect_S1-07 + - TEBeautyKitWrapper (1.0.0): + - SnapKit + - TEBeautyKit + - TUICore + - TencentEffect (0.1.0): + - AFNetworking + - LiteAVPrivacy + - Masonry + - SDWebImage + - SSZipArchive + - TEBeautyKit + - TUICore + - YYModel + - TencentEffect_S1-07 (4.2.0.21): + - TencentEffect_S1-07/Default (= 4.2.0.21) + - TencentEffect_S1-07/Default (4.2.0.21) + - TIMAppKit (1.0.0): + - ReactiveObjC + - TIMCommon + - TUIChat + - TUIContact + - TUIConversation + - TUICore + - TIMCommon (1.0.0): + - Masonry + - ReactiveObjC + - SDWebImage + - TUICore + - Toast-Swift (5.1.1) + - TUICallKit_Swift (1.0.0): + - AtomicX + - AtomicXCore + - TUICallKit_Swift/Professional (= 1.0.0) + - TUICore + - TUICallKit_Swift/Professional (1.0.0): + - AtomicX + - AtomicXCore + - RTCRoomEngine/Professional + - TUICore + - TXLiteAVSDK_Professional + - TUIChat (1.0.0): + - ReactiveObjC + - SDWebImage + - TIMCommon + - TUICore + - TUIContact (1.0.0): + - ReactiveObjC + - TIMCommon + - TUICore + - TUIConversation (1.0.0): + - ReactiveObjC + - TIMCommon + - TUICore + - TUICore (1.0.0): + - SDWebImage + - TUICore/ImSDK_Plus (= 1.0.0) + - TUICore/Base (1.0.0): + - SDWebImage + - TUICore/ImSDK_Plus (1.0.0): + - SDWebImage + - TUICore/Base + - TXIMSDK_Plus_iOS_XCFramework + - TUILiveKit (1.0.0): + - AtomicX + - Kingfisher + - MJRefresh + - Protobuf (~> 3.22.1) + - SnapKit + - TUICore + - TUILiveKit/Professional (= 1.0.0) + - TXIMSDK_Plus_iOS_XCFramework (>= 8.7.7021) + - TUILiveKit/Professional (1.0.0): + - AtomicX + - AtomicXCore + - Kingfisher + - MJRefresh + - Protobuf (~> 3.22.1) + - RTCRoomEngine/Professional + - SnapKit + - TUICore + - TXIMSDK_Plus_iOS_XCFramework (>= 8.7.7021) + - TUIPlayerCore/Professional (2.1.3): + - TXLiteAVSDK_Professional (>= 11.4.0) + - TUIPlayerShortVideo/Professional (2.1.3): + - Masonry + - SDWebImage + - TUIPlayerCore/Professional + - TUIRoomKit (4.0.0): + - AtomicX + - AtomicXCore + - Kingfisher + - SnapKit + - TXLiteAVSDK_Professional + - TXIMSDK_Plus_iOS_XCFramework (8.9.7537) + - TXLiteAVSDK_Professional (13.2.20652): + - TXLiteAVSDK_Professional/Professional (= 13.2.20652) + - TXLiteAVSDK_Professional/Professional (13.2.20652) + - TXLiteAVSDK_Professional/ReplayKitExt (13.2.20652) + - UGCKit (0.1.0): + - BeautySettingKit + - TUICore + - UGCKit/Professional (= 0.1.0) + - xmagickit + - UGCKit/Professional (0.1.0): + - BeautySettingKit + - TUICore + - xmagickit + - VideoAdvanceExtension (1.0.0): + - TUICore + - VideoAdvanceExtension/Professional (= 1.0.0) + - VideoAdvanceExtension/Professional (1.0.0): + - RTCRoomEngine/Professional + - TUICore + - VodPlay (3.1.1): + - AFNetworking + - Masonry + - MBProgressHUD (= 1.2.0) + - MJRefresh (= 3.7.5) + - SDWebImage + - SuperPlayer/Professional + - TUICore + - TUIPlayerCore/Professional + - TUIPlayerShortVideo/Professional + - XiaoShiPinApp (3.1.1): + - AFNetworking + - BeautySettingKit + - Masonry + - MBProgressHUD (= 1.2.0) + - MJRefresh (= 3.7.5) + - QCloudCOSXML/Slim + - QCloudQuic + - SDWebImage + - TUICore + - UGCKit + - xmagickit + - xmagickit (0.1.0): + - Masonry + - SDWebImage + - SSZipArchive + - TEBeautyKit + - TUICore + - YYModel (1.0.4) + - ZipArchive (1.4.0) + +DEPENDENCIES: + - AIConversationKit/Professional (from `../../../iOS/Module/AIConversation/AIConversationKit/AIConversationKit.podspec`) + - Alamofire (= 5.0.0) + - AppAssembly/Full (from `assembly/AppAssembly.podspec`) + - AtomicX (from `../../../client_uikit/atomic-x/ios/atomic_x/AtomicX.podspec`) + - AtomicXCore (from `../../../../tuikit_engine/atomicx/swift/AtomicXCore/AtomicXCore.podspec`) + - BeautySettingKit (from `../../../iOS/Module/Effect/BeautySettingKit/BeautySettingKit.podspec`) + - Bugly (from `../sdk/Bugly/Bugly.podspec`) + - CloudHuiYanSDK_FW (from `../sdk/CloudHuiYanSDK_FW/CloudHuiYanSDK_FW.podspec`) + - ITLogin (from `../sdk/ITLogin/ITLogin.podspec`) + - JXPagingView/Paging (= 2.1.2) + - JXSegmentedView (= 1.3.0) + - Kingfisher (= 6.3.1) + - LiteAVPrivacy (from `../../../iOS/Basic/Business/Privacy/`) + - Login/Full (from `login/Login.podspec`) + - MJRefresh (= 3.7.5) + - RTCExperienceRoom (from `../../../iOS/Module/RTCExperienceRoom/RTCExperienceRoom/RTCExperienceRoom.podspec`) + - RTCRoomEngine/Professional (from `../../../../tuikit_engine/RTCRoomEngine.podspec`) + - SensorsAnalyticsSDK + - SnapKit (= 5.0.1) + - SuperPlayer/Professional (from `../../../iOS/Module/Player/SuperPlayerKit/SuperPlayer.podspec`) + - TCEffectPlayer (from `https://mediacloud-76607.gzc.vod.tencent-cloud.com/MediaX/iOS/podspec/release/3.2/249/TCEffectPlayer.podspec`) + - TCEffectPlayerKit/Beauty (from `../../../client_uikit/atomic-x/ios/atomic_x/Sources/TCEffectPlayerKit/TCEffectPlayerKit.podspec`) + - TCMediaX (from `https://mediacloud-76607.gzc.vod.tencent-cloud.com/MediaX/iOS/podspec/release/3.0.246/TCMediaX.podspec`) + - TEBeautyKit/S1-07 (from `https://mediacloud-76607.gzc.vod.tencent-cloud.com/TencentEffect/iOS/TEBeautyKit/latest/TEBeautyKit.podspec`) + - TEBeautyKitWrapper (from `../../../client_uikit/atomic-x/ios/TEBeautyKit`) + - TencentEffect (from `../../../iOS/Module/Effect/TencentEffect/TencentEffect.podspec`) + - TIMAppKit (from `../../../tui-components/iOS/TIMAppKit/`) + - TIMCommon (from `../../../tui-components/iOS/TIMCommon/`) + - Toast-Swift + - TUICallKit_Swift/Professional (from `../../../client_uikit/atomic-x/ios/call/`) + - TUIChat (from `../../../tui-components/iOS/TUIChat/`) + - TUIContact (from `../../../tui-components/iOS/TUIContact/`) + - TUIConversation (from `../../../tui-components/iOS/TUIConversation/`) + - TUICore (from `../../../tui-components/iOS/TUICore/`) + - TUILiveKit (from `../../../client_uikit/atomic-x/ios/live/TUILiveKit.podspec`) + - TUIPlayerCore/Professional (from `../../../iOS/Module/Player/TUIShortVideoView/TUIPlayerCoreSDK/TUIPlayerCore.podspec`) + - TUIPlayerShortVideo/Professional (from `../../../iOS/Module/Player/TUIShortVideoView/TUIPlayerShortVideoSDK/TUIPlayerShortVideo.podspec`) + - TUIRoomKit (from `../../../client_uikit/atomic-x/ios/room/TUIRoomKit.podspec`) + - TXLiteAVSDK_Professional (= 13.2.20652) + - TXLiteAVSDK_Professional/ReplayKitExt (= 13.2.20652) + - UGCKit/Professional (from `../../../iOS/Module/UGSV/UGCKit/UGCKit.podspec`) + - VideoAdvanceExtension (from `../../../client_uikit/atomic-x/ios/atomic_x/Sources/VideoAdvanceExtension/VideoAdvanceExtension.podspec`) + - VodPlay (from `../../../iOS/Module/Player/VodPlay/VodPlay.podspec`) + - XiaoShiPinApp (from `../../../iOS/Module/UGSV/XiaoShiPinApp/XiaoShiPinApp.podspec`) + - xmagickit (from `../../../iOS/Module/Effect/xmagickit/xmagickit.podspec`) + +SPEC REPOS: + trunk: + - AFNetworking + - Alamofire + - JXPagingView + - JXSegmentedView + - Kingfisher + - Masonry + - MBProgressHUD + - MJRefresh + - Protobuf + - QCloudCore + - QCloudCOSXML + - QCloudQuic + - ReactiveObjC + - RTCCommon + - SDWebImage + - SensorsAnalyticsSDK + - SnapKit + - SSZipArchive + - TencentEffect_S1-07 + - Toast-Swift + - TXIMSDK_Plus_iOS_XCFramework + - TXLiteAVSDK_Professional + - YYModel + - ZipArchive + +EXTERNAL SOURCES: + AIConversationKit: + :path: "../../../iOS/Module/AIConversation/AIConversationKit/AIConversationKit.podspec" + AppAssembly: + :path: assembly/AppAssembly.podspec + AtomicX: + :path: "../../../client_uikit/atomic-x/ios/atomic_x/AtomicX.podspec" + AtomicXCore: + :path: "../../../../tuikit_engine/atomicx/swift/AtomicXCore/AtomicXCore.podspec" + BeautySettingKit: + :path: "../../../iOS/Module/Effect/BeautySettingKit/BeautySettingKit.podspec" + Bugly: + :path: "../sdk/Bugly/Bugly.podspec" + CloudHuiYanSDK_FW: + :path: "../sdk/CloudHuiYanSDK_FW/CloudHuiYanSDK_FW.podspec" + ITLogin: + :path: "../sdk/ITLogin/ITLogin.podspec" + LiteAVPrivacy: + :path: "../../../iOS/Basic/Business/Privacy/" + Login: + :path: login/Login.podspec + RTCExperienceRoom: + :path: "../../../iOS/Module/RTCExperienceRoom/RTCExperienceRoom/RTCExperienceRoom.podspec" + RTCRoomEngine: + :path: "../../../../tuikit_engine/RTCRoomEngine.podspec" + SuperPlayer: + :path: "../../../iOS/Module/Player/SuperPlayerKit/SuperPlayer.podspec" + TCEffectPlayer: + :podspec: https://mediacloud-76607.gzc.vod.tencent-cloud.com/MediaX/iOS/podspec/release/3.2/249/TCEffectPlayer.podspec + TCEffectPlayerKit: + :path: "../../../client_uikit/atomic-x/ios/atomic_x/Sources/TCEffectPlayerKit/TCEffectPlayerKit.podspec" + TCMediaX: + :podspec: https://mediacloud-76607.gzc.vod.tencent-cloud.com/MediaX/iOS/podspec/release/3.0.246/TCMediaX.podspec + TEBeautyKit: + :podspec: https://mediacloud-76607.gzc.vod.tencent-cloud.com/TencentEffect/iOS/TEBeautyKit/latest/TEBeautyKit.podspec + TEBeautyKitWrapper: + :path: "../../../client_uikit/atomic-x/ios/TEBeautyKit" + TencentEffect: + :path: "../../../iOS/Module/Effect/TencentEffect/TencentEffect.podspec" + TIMAppKit: + :path: "../../../tui-components/iOS/TIMAppKit/" + TIMCommon: + :path: "../../../tui-components/iOS/TIMCommon/" + TUICallKit_Swift: + :path: "../../../client_uikit/atomic-x/ios/call/" + TUIChat: + :path: "../../../tui-components/iOS/TUIChat/" + TUIContact: + :path: "../../../tui-components/iOS/TUIContact/" + TUIConversation: + :path: "../../../tui-components/iOS/TUIConversation/" + TUICore: + :path: "../../../tui-components/iOS/TUICore/" + TUILiveKit: + :path: "../../../client_uikit/atomic-x/ios/live/TUILiveKit.podspec" + TUIPlayerCore: + :path: "../../../iOS/Module/Player/TUIShortVideoView/TUIPlayerCoreSDK/TUIPlayerCore.podspec" + TUIPlayerShortVideo: + :path: "../../../iOS/Module/Player/TUIShortVideoView/TUIPlayerShortVideoSDK/TUIPlayerShortVideo.podspec" + TUIRoomKit: + :path: "../../../client_uikit/atomic-x/ios/room/TUIRoomKit.podspec" + UGCKit: + :path: "../../../iOS/Module/UGSV/UGCKit/UGCKit.podspec" + VideoAdvanceExtension: + :path: "../../../client_uikit/atomic-x/ios/atomic_x/Sources/VideoAdvanceExtension/VideoAdvanceExtension.podspec" + VodPlay: + :path: "../../../iOS/Module/Player/VodPlay/VodPlay.podspec" + XiaoShiPinApp: + :path: "../../../iOS/Module/UGSV/XiaoShiPinApp/XiaoShiPinApp.podspec" + xmagickit: + :path: "../../../iOS/Module/Effect/xmagickit/xmagickit.podspec" + +SPEC CHECKSUMS: + AFNetworking: 3bd23d814e976cd148d7d44c3ab78017b744cd58 + AIConversationKit: 93eda5ecb947e24dc52586c850e5bfc25f8b19ba + Alamofire: 58ff2bfb8daaacaa233d5c36e37b10a5248f59b1 + AppAssembly: 9b6ce726e913ab55c77392cda3c15f4b79daea0a + AtomicX: 20c47ae62de97979f8cf83b1b3b791f7cc42b7f6 + AtomicXCore: 0ec38d6915cc05a6622277fb5ab904add168df5a + BeautySettingKit: c32527c5f4f9816315c024d30b13da4349f873e9 + Bugly: 12ccee18548153acc01d43c0d1b803b40f48332d + CloudHuiYanSDK_FW: 85bcf6d12d89df82c72cd0ce4a44e1b91a5fba50 + ITLogin: b4f8d0f79ea6b72ca0aef5e2a620fcbb59ee3cbb + JXPagingView: 90924b364a2ff7e94db534fad1fa50925ff69ee4 + JXSegmentedView: fec0d335355b6e019c494fe2e030bde8a36d2df6 + Kingfisher: 016c8b653a35add51dd34a3aba36b580041acc74 + LiteAVPrivacy: c65753ed01ffe94c776dcc5dcd5a20ec3cf06cea + Login: dc1c9ae7ce95bc17d375099be7faa09ee23a583a + Masonry: 678fab65091a9290e40e2832a55e7ab731aad201 + MBProgressHUD: 3ee5efcc380f6a79a7cc9b363dd669c5e1ae7406 + MJRefresh: fdf5e979eb406a0341468932d1dfc8b7f9fce961 + Protobuf: bcec8c9430002f8d11c8a08f964b3ebcdd060536 + QCloudCore: 463b8c0c99fdc48a1c9cc637ee5466a1e5cf0c6e + QCloudCOSXML: b092a768b1f290235ca99205123d12e5e8f389b4 + QCloudQuic: 81e2c29fa8122c1d5e8323a90349683e52c8e101 + ReactiveObjC: 011caa393aa0383245f2dcf9bf02e86b80b36040 + RTCCommon: 728b0a48a0f41ebcfc4c5989883abee7f737d54a + RTCExperienceRoom: 78c96e1523d0681b783eff42c5637cabef70dfd6 + RTCRoomEngine: d8827cf8c8b92689a42e0e938b43624cedac39aa + SDWebImage: e9fc87c1aab89a8ab1bbd74eba378c6f53be8abf + SensorsAnalyticsSDK: 1d507720d598ca47636bd478c2009b3cb6b6857e + SnapKit: 97b92857e3df3a0c71833cce143274bf6ef8e5eb + SSZipArchive: fe6a26b2a54d5a0890f2567b5cc6de5caa600aef + SuperPlayer: 89f9627e490a82f72c38cf87da2ae0ee7b71ae4b + TCEffectPlayer: 7419722350d67795a8d9be1d6e066121a6335ecd + TCEffectPlayerKit: c15bdc734b2379bce6a6d021f725e3aaed6e2486 + TCMediaX: 50c1d93086c1b0975c78414c91ec021d89b62d28 + TEBeautyKit: 579f67bc5b5e58c02fcc8849610b3ca87796078f + TEBeautyKitWrapper: 0bc18b9c5fe977263a23cb8162f6376064936e21 + TencentEffect: e85b81d489cfd778e62794da40ba0e229aba1f7a + TencentEffect_S1-07: ba6f3e4e25ff20f9b27a8535c67aa8e668079e31 + TIMAppKit: b728dfd15697bf06e2acffaf4a2fe60f391362e1 + TIMCommon: d20a09979bb1e4fe312b6e8e1b72a954179172ac + Toast-Swift: 7a03a532afe3a560d4044bc7c237e2864d295173 + TUICallKit_Swift: 21f1c9c61001aa2584c7b7440868ea1c20bdcbd7 + TUIChat: 78caca39a558383d1f20db352b950357f5aaac36 + TUIContact: 59d8395d9fcc07a38fea5c84a21f05faccfe5f98 + TUIConversation: 3640d9d67973e7701992d9616306c31b58c6942c + TUICore: 160f1aba276b6be341b664bc806d8309cad72075 + TUILiveKit: 7fdf53c7e05a1179f9225c29efde40e361819ead + TUIPlayerCore: 7d9e733df414e1d3f3dbd8b982bdb7aefbc6e479 + TUIPlayerShortVideo: d060add4637ff0ea462d87b1d36819a1a3ed5aaf + TUIRoomKit: 6182dd1074aff300f095b0bd163fe583d4bd1e54 + TXIMSDK_Plus_iOS_XCFramework: 3e5178c57fe2475fa68cf891982b38af68f071d5 + TXLiteAVSDK_Professional: e792e6084a208ecef6196c5f28237ad8078b4d7c + UGCKit: 2766bf3b2be2d8ce735160d9631f8b9cbc90ad7c + VideoAdvanceExtension: 11a73dede15c278edce309f79b600be07cbc4e65 + VodPlay: 86cbe5e0350de5c01e46b4c3f427203f1fd20f7e + XiaoShiPinApp: aed3275d6b972fa8bc52b7b3d877c47443ab5bc5 + xmagickit: 5d04087fbdcb141a47821e13493e64b60dd64be5 + YYModel: 2a7fdd96aaa4b86a824e26d0c517de8928c04b30 + ZipArchive: e25a4373192673e3229ac8d6e9f64a3e5713c966 + +PODFILE CHECKSUM: 908ac8aea873fcbc8096840dc540008d84f35646 + +COCOAPODS: 1.16.2 diff --git a/application/README.cn.md b/application/README.cn.md new file mode 100644 index 00000000..168c5403 --- /dev/null +++ b/application/README.cn.md @@ -0,0 +1,99 @@ +# RTCube + +[English](README.md) | 简体中文 + +## 概述 + +RTCube 是一款功能强大的 UI 组件库,它基于腾讯云 `AtomicXCore` SDK 构建。`AtomicXCore` 整合了腾讯云实时音视频(TRTC)、即时通信(IM)、音视频通话(TUICallEngine) 和房间管理(TUIRoomEngine) 的核心能力,提供了状态驱动的(State-driven)API 设计。 + +RTCube 在 `AtomicXCore` 提供的核心能力之上,为您提供了一套预制的用户界面(UI),使您无需关心复杂的后端逻辑和状态管理,即可快速为您的 iOS 应用集成视频互动直播、语音聊天室、音视频通话等功能。 + +## 功能特性 + +RTCube 基于 `AtomicXCore` 提供了以下核心业务场景的完整 UI 实现: + + * **视频/语音直播 (Live Streaming):** + + * **直播列表管理:** 拉取直播列表。 + * **开播与观看:** 创建直播间、加入直播。 + * **麦位管理:** 支持麦位管理,观众上麦/下麦。 + * **主播连麦 (Co-hosting):** 支持主播与主播(跨房)连麦。 + * **主播 PK (Battle):** 支持主播间 PK 互动。 + * **互动功能:** + * **礼物:** 支持发送和接收礼物。 + * **点赞:** 支持直播间点赞。 + * **弹幕:** 支持发送和接收弹幕消息。 + + * **音视频通话 (Calling):** + + * **基础通话:** 支持 1v1 及多人音视频通话。 + * **通话管理:** 支持接听、拒绝、挂断。 + * **设备管理:** 支持通话中的摄像头和麦克风控制。 + * **通话记录:** 支持查询和删除通话记录。 + + * **多人会议 (Room):** + + * **快速会议:** 支持一键创建/加入多人会议。 + * **邀请入会:** 支持邀请成员加入当前会议。 + * **会中管控:** 支持主持人对成员的音视频、麦位、成员列表进行管理。 + * **共享屏幕:** 支持会中屏幕共享。 + +## 快速开始 + +### 1. 环境准备 + + * Xcode 14.0 或更高版本 + * iOS 14.0 或更高版本 + * CocoaPods(请确保已安装) + +### 2. 克隆仓库 + +```bash +git clone https://github.com/Tencent-RTC/TUIKit_iOS.git +``` + +### 3. 安装依赖 + +`RTCube` 依赖 `TUILiveKit`、`TUICallKit`、`TUIRoomKit` 等多个组件库。您需要使用 CocoaPods 来安装这些依赖。 + +```bash +cd TUIKit_iOS/application +pod install +``` + +### 4. 运行项目 + +使用 Xcode 打开生成的 `RTCube.xcworkspace` 文件,在 `application/Debug/GenerateTestUserSig.swift` 中配置您的腾讯云 `SDKAPPID`、`UserID` 和 `UserSig`,然后编译并运行 `RTCubeLab` scheme。 + +## 架构 + +`RTCube` 的架构设计遵循分层原则: + +1. **TUILiveKit / TUICallKit / TUIRoomKit (UI 层):** + + * 提供预制的、可复用的 UI 组件。 + * 负责视图(View)的展示和用户交互。 + * 订阅 `AtomicXCore` 中的 `Store` 来获取状态并更新 UI。 + * 调用 `AtomicXCore` 中的 `Store` 方法来响应用户操作。 + +2. **AtomicXCore (核心层):** + + * **Stores:** (如 `LiveListStore`, `CallListStore`, `ConversationListStore`) 负责管理业务逻辑和状态(State)。 + * **Core Views:** (如 `LiveCoreView`, `ParticipantView`) 提供了驱动视频渲染的无 UI 视图容器。 + * **Engine 封装:** 封装了底层的 `RTCRoomEngine`, `TUICallEngine` 和 `IMSDK`,提供统一的 API。 + +3. **Tencent Cloud SDK (引擎层):** + + * `RTCRoomEngine` & `TUICallEngine`: 提供底层的实时音视频能力。 + * `IMSDK`: 提供即时通讯能力。 + +## 文档 + +* [AtomicXCore 文档](https://tencent-rtc.github.io/TUIKit_iOS/documentation/atomicxcore) +* [官方文档 - 快速集成指南](https://cloud.tencent.com/document/product/647/106536) + +## 许可证 + +本项目遵循 [MIT 许可证](https://www.google.com/search?q=LICENSE)。 + +----- diff --git a/application/README.md b/application/README.md new file mode 100644 index 00000000..7f522775 --- /dev/null +++ b/application/README.md @@ -0,0 +1,99 @@ +# RTCube + +English | [简体中文](README.cn.md) + +## Overview + +RTCube is a powerful UI component library built on top of the Tencent Cloud `AtomicXCore` SDK. `AtomicXCore` consolidates the core capabilities of Tencent Cloud Real-Time Communication (TRTC), Instant Messaging (IM), Audio/Video Calling (TUICallEngine), and Room Management (TUIRoomEngine), offering a state-driven API design. + +On top of the core capabilities provided by `AtomicXCore`, RTCube delivers a set of ready-to-use user interfaces (UI), allowing you to quickly integrate interactive video live streaming, voice chat rooms, audio/video calling, and more into your iOS application—without worrying about complex backend logic or state management. + +## Features + +Based on `AtomicXCore`, RTCube provides complete UI implementations for the following core business scenarios: + + * **Video/Voice Live Streaming:** + + * **Live List Management:** Fetch the list of live streams. + * **Go Live & Watch:** Create live rooms and join live streams. + * **Seat Management:** Manage seats; audience members can take or leave the mic. + * **Co-hosting:** Support cross-room co-hosting between hosts. + * **Host Battle (PK):** Support interactive PK between hosts. + * **Interactive Features:** + * **Gifts:** Send and receive gifts. + * **Likes:** Send likes in the live room. + * **Barrage (Danmaku):** Send and receive barrage messages. + + * **Audio/Video Calling:** + + * **Basic Calls:** Support 1v1 and multi-party audio/video calls. + * **Call Management:** Support answering, rejecting, and hanging up calls. + * **Device Management:** Control the camera and microphone during calls. + * **Call History:** Query and delete call records. + + * **Multi-party Meetings (Room):** + + * **Quick Meetings:** One-click creation and joining of multi-party meetings. + * **Invite to Meeting:** Invite members to join the current meeting. + * **In-meeting Controls:** Hosts can manage members' audio/video, seats, and member list. + * **Screen Sharing:** Support screen sharing during meetings. + +## Quick Start + +### 1. Prerequisites + + * Xcode 14.0 or later + * iOS 14.0 or later + * CocoaPods (please ensure it is installed) + +### 2. Clone the Repository + +```bash +git clone https://github.com/Tencent-RTC/TUIKit_iOS.git +``` + +### 3. Install Dependencies + +`RTCube` depends on several component libraries including `TUILiveKit`, `TUICallKit`, and `TUIRoomKit`. You need to use CocoaPods to install these dependencies. + +```bash +cd TUIKit_iOS/application +pod install +``` + +### 4. Run the Project + +Open the generated `RTCube.xcworkspace` file with Xcode, configure your Tencent Cloud `SDKAPPID`, `UserID`, and `UserSig` in `application/Debug/GenerateTestUserSig.swift`, then build and run the `RTCubeLab` scheme. + +## Architecture + +The architecture of `RTCube` follows a layered design: + +1. **TUILiveKit / TUICallKit / TUIRoomKit (UI Layer):** + + * Provides prebuilt, reusable UI components. + * Handles view presentation and user interaction. + * Subscribes to `Store`s in `AtomicXCore` to retrieve state and update the UI. + * Calls `Store` methods in `AtomicXCore` to respond to user actions. + +2. **AtomicXCore (Core Layer):** + + * **Stores:** (e.g., `LiveListStore`, `CallListStore`, `ConversationListStore`) Manage business logic and state. + * **Core Views:** (e.g., `LiveCoreView`, `ParticipantView`) Provide UI-less view containers that drive video rendering. + * **Engine Wrappers:** Wrap the underlying `RTCRoomEngine`, `TUICallEngine`, and `IMSDK`, providing a unified API. + +3. **Tencent Cloud SDK (Engine Layer):** + + * `RTCRoomEngine` & `TUICallEngine`: Provide low-level real-time audio/video capabilities. + * `IMSDK`: Provides instant messaging capabilities. + +## Documentation + +* [AtomicXCore Documentation](https://tencent-rtc.github.io/TUIKit_iOS/documentation/atomicxcore) +* [Official Documentation - Quick Integration Guide](https://cloud.tencent.com/document/product/647/106536) + +## License + +This project is licensed under the [MIT License](https://www.google.com/search?q=LICENSE). + +----- diff --git a/application/RTCube.xcodeproj/project.pbxproj b/application/RTCube.xcodeproj/project.pbxproj new file mode 100644 index 00000000..ef8989a5 --- /dev/null +++ b/application/RTCube.xcodeproj/project.pbxproj @@ -0,0 +1,1303 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 56; + objects = { + +/* Begin PBXBuildFile section */ + 0284EE280D8F978F1FB16AEB /* PrivacyPersonalAuthViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 49BF93043A7600A91429DCB4 /* PrivacyPersonalAuthViewController.swift */; }; + 419DD9657FFD6C2A21278939 /* PrivacyDataCollectionViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8EFDC389C49473CB3F9877C8 /* PrivacyDataCollectionViewController.swift */; }; + 4908A1B68B8E2DCA58614C51 /* PrivacyAuthDetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8FB791ADDD68B6208D2AF0B1 /* PrivacyAuthDetailViewController.swift */; }; + 49F98C61FE3BBDC6C36FF195 /* AppAnalytics.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD4ADCA4B9FE7C9ADB83FD68 /* AppAnalytics.swift */; }; + 6E5CDB206869988566E91AC0 /* PrivacyLocalized.strings in Resources */ = {isa = PBXBuildFile; fileRef = AF9F9AC8A206A1D31F8C3DF6 /* PrivacyLocalized.strings */; }; + 87173B0F3D1C1722FEC5150C /* PrivacyMyInfoViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D99E452DA3178F16A5759428 /* PrivacyMyInfoViewController.swift */; }; + 971D2F196DEE3C8BC470FC04 /* AvatarPickerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0F7536B416CDE69AACA73EA8 /* AvatarPickerViewController.swift */; }; + A1F73AD1D13E775750839498 /* PrivacyCenterViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D466A5A284E7A9CB84410DF /* PrivacyCenterViewController.swift */; }; + A33D9853F682E9C5A3086331 /* PrivacySystemAuthViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42018FAA990A1E7E62C515DF /* PrivacySystemAuthViewController.swift */; }; + A8D7E71A7C31001CEC737C58 /* PrivacyAssets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C84E95DCE99E2F890D9505DE /* PrivacyAssets.xcassets */; }; + B95E23E478F9AE21BBF97462 /* PrivacyWebViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D144472BD0A98D274A0AE821 /* PrivacyWebViewController.swift */; }; + BEC5BDC1C1C2C9AFE6F350E9 /* PrivacyEntry.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3990EFE8D632F509A9FDF9C6 /* PrivacyEntry.swift */; }; + C657EE532F61698F00D01990 /* MainLocalized.strings in Resources */ = {isa = PBXBuildFile; fileRef = C657EE302F61698F00D01990 /* MainLocalized.strings */; }; + C657EE552F61698F00D01990 /* EntranceStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = C657EE3D2F61698F00D01990 /* EntranceStore.swift */; }; + C657EE562F61698F00D01990 /* EntranceState.swift in Sources */ = {isa = PBXBuildFile; fileRef = C657EE3C2F61698F00D01990 /* EntranceState.swift */; }; + C657EE572F61698F00D01990 /* ResolvedModule.swift in Sources */ = {isa = PBXBuildFile; fileRef = C657EE2C2F61698F00D01990 /* ResolvedModule.swift */; }; + C657EE592F61698F00D01990 /* LeftAlignedFlowLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = C657EE392F61698F00D01990 /* LeftAlignedFlowLayout.swift */; }; + C657EE5A2F61698F00D01990 /* EntranceReportView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C657EE382F61698F00D01990 /* EntranceReportView.swift */; }; + C657EE5B2F61698F00D01990 /* EntranceViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C657EE3E2F61698F00D01990 /* EntranceViewController.swift */; }; + C657EE5C2F61698F00D01990 /* EntranceCollectionCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = C657EE362F61698F00D01990 /* EntranceCollectionCell.swift */; }; + C657EE5E2F61698F00D01990 /* EntranceFooterView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C657EE372F61698F00D01990 /* EntranceFooterView.swift */; }; + C657EE5F2F61698F00D01990 /* MainNavigationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C657EE3A2F61698F00D01990 /* MainNavigationView.swift */; }; + C657EE602F61698F00D01990 /* MainLocalized.swift in Sources */ = {isa = PBXBuildFile; fileRef = C657EE312F61698F00D01990 /* MainLocalized.swift */; }; + C657EE612F61698F00D01990 /* ModuleRegistry.swift in Sources */ = {isa = PBXBuildFile; fileRef = C657EE3F2F61698F00D01990 /* ModuleRegistry.swift */; }; + C657EE622F61698F00D01990 /* ModulePermissionService.swift in Sources */ = {isa = PBXBuildFile; fileRef = C657EE342F61698F00D01990 /* ModulePermissionService.swift */; }; + C6CC00032F8B00000047AD91 /* ContactUsConstants.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6CC00042F8B00000047AD91 /* ContactUsConstants.swift */; }; + C6CU00032F8A00000047AD91 /* ContactUsService.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6CU00072F8A00000047AD91 /* ContactUsService.swift */; }; + C6CU00062F8A00000047AD91 /* ContactUsButtonView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6CU00082F8A00000047AD91 /* ContactUsButtonView.swift */; }; + C6E1A8632F6A4CAB0047AD91 /* LayoutDefine.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6E1A8602F6A4CAB0047AD91 /* LayoutDefine.swift */; }; + C6E1A8642F6A521D0047AD91 /* GenerateTestUserSig.swift in Sources */ = {isa = PBXBuildFile; fileRef = C657D1002F5AD40200D01990 /* GenerateTestUserSig.swift */; }; + C6E1A8662F6A52330047AD91 /* LanguageSelectViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6LANG0042F5B000000D01990 /* LanguageSelectViewController.swift */; }; + C6E1A8682F6A523E0047AD91 /* LanguageEntry.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6LANG0032F5B000000D01990 /* LanguageEntry.swift */; }; + C6E1BE9C2F7137B00047AD91 /* ProfileUpdateInfoView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6E1BE7B2F7137B00047AD91 /* ProfileUpdateInfoView.swift */; }; + C6E1BE9D2F7137B00047AD91 /* ProfileInfoModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6E1BE6C2F7137B00047AD91 /* ProfileInfoModel.swift */; }; + C6E1BE9E2F7137B00047AD91 /* ProfileDatePickerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6E1BE792F7137B00047AD91 /* ProfileDatePickerView.swift */; }; + C6E1BE9F2F7137B00047AD91 /* MineAboutResignViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6E1BE742F7137B00047AD91 /* MineAboutResignViewController.swift */; }; + C6E1BEA02F7137B00047AD91 /* MineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6E1BE772F7137B00047AD91 /* MineViewController.swift */; }; + C6E1BEA12F7137B00047AD91 /* MineEntry.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6E1BE7D2F7137B00047AD91 /* MineEntry.swift */; }; + C6E1BEA22F7137B00047AD91 /* ProfileController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6E1BE782F7137B00047AD91 /* ProfileController.swift */; }; + C6E1BEA32F7137B00047AD91 /* MineLocalized.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6E1BE712F7137B00047AD91 /* MineLocalized.swift */; }; + C6E1BEA42F7137B00047AD91 /* MineRootView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6E1BE762F7137B00047AD91 /* MineRootView.swift */; }; + C6E1BEA52F7137B00047AD91 /* MineViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6E1BE6B2F7137B00047AD91 /* MineViewModel.swift */; }; + C6E1BEA62F7137B00047AD91 /* MineAboutViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6E1BE752F7137B00047AD91 /* MineAboutViewController.swift */; }; + C6E1BEA72F7137B00047AD91 /* ProfileTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6E1BE7A2F7137B00047AD91 /* ProfileTableViewCell.swift */; }; + C6E1BEA82F7137B00047AD91 /* MineLocalized.strings in Resources */ = {isa = PBXBuildFile; fileRef = C6E1BE702F7137B00047AD91 /* MineLocalized.strings */; }; + C6E1CD2D2F7272E90047AD91 /* ContactUsTipsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6E1CD262F7272E90047AD91 /* ContactUsTipsView.swift */; }; + C6E1CD2E2F7272E90047AD91 /* OverseasNavigationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6E1CD2B2F7272E90047AD91 /* OverseasNavigationView.swift */; }; + C6E1CD2F2F7272E90047AD91 /* OverseasHomeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6E1CD292F7272E90047AD91 /* OverseasHomeViewController.swift */; }; + C6E1CD302F7272E90047AD91 /* OverseasFooterView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6E1CD282F7272E90047AD91 /* OverseasFooterView.swift */; }; + C6E1CD312F7272E90047AD91 /* OverseasCollectionCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6E1CD272F7272E90047AD91 /* OverseasCollectionCell.swift */; }; + C6E1CD322F7272E90047AD91 /* OverseasMainViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6E1CD2A2F7272E90047AD91 /* OverseasMainViewController.swift */; }; + C6E1CD412F73E9380047AD91 /* SafetyReminderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6E1CD3F2F73E9380047AD91 /* SafetyReminderView.swift */; }; + C6E1CD492F7509FA0047AD91 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = C6E1CD452F7509FA0047AD91 /* Localizable.strings */; }; + C6E1D74B2F7BA7BF0047AD91 /* EnvironmentOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6E1D74A2F7BA7BF0047AD91 /* EnvironmentOperation.swift */; }; + C6E1DEA42F7E56D60047AD91 /* RTCExperienceRoomButtonView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6E1DEA12F7E447B0047AD91 /* RTCExperienceRoomButtonView.swift */; }; + C6E402702F67FCD0003F5BAF /* Double+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6E4026B2F67FCD0003F5BAF /* Double+Extension.swift */; }; + C6E402712F67FCD0003F5BAF /* CGFloat+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6E4026A2F67FCD0003F5BAF /* CGFloat+Extension.swift */; }; + C6E402752F67FCD0003F5BAF /* Int+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6E4026C2F67FCD0003F5BAF /* Int+Extension.swift */; }; + C6LOG0022F7B000000000001 /* LogUploadView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6LOG0052F7B000000000001 /* LogUploadView.swift */; }; + C6LOG0022F7B000000000002 /* LogUploadManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6LOG0052F7B000000000002 /* LogUploadManager.swift */; }; + C6LOG0022F7B000000000003 /* AppLogger.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6LOG0052F7B000000000003 /* AppLogger.swift */; }; + C6MA00032F6BEE0000D01990 /* MainAssets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C6MA00042F6BEE0000D01990 /* MainAssets.xcassets */; }; + C6PU00032FA200000047AD91 /* PushLifecycleHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6PU00002FA200000047AD91 /* PushLifecycleHandler.swift */; }; + D1000001 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = A2000001 /* AppDelegate.swift */; }; + D1000002 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = A2000002 /* SceneDelegate.swift */; }; + D1000004 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A2000004 /* Assets.xcassets */; }; + D1000005 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A2000005 /* LaunchScreen.storyboard */; }; + D1000008 /* Privacy.plist in Resources */ = {isa = PBXBuildFile; fileRef = A2000008 /* Privacy.plist */; }; + D1POD001 /* Pods_RTCubeLab.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D2POD001 /* Pods_RTCubeLab.framework */; }; + DA417280BB54CD6CB271FFA3 /* PrivacyLocalized.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB44959E079EDF323374DEF8 /* PrivacyLocalized.swift */; }; + DD100001 /* LaunchImage@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = AA200001 /* LaunchImage@2x.png */; }; + DD100002 /* LaunchImage@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = AA200002 /* LaunchImage@3x.png */; }; + DD100003 /* LaunchImage_en@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = AA200003 /* LaunchImage_en@2x.png */; }; + DD100004 /* LaunchImage_en@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = AA200004 /* LaunchImage_en@3x.png */; }; + F130FF523DBF611A368FC6F2 /* PrivacyConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = 691FEFEA09A9D09059CFDB15 /* PrivacyConfig.swift */; }; + G1LR0001 /* SampleHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = E2RP0002 /* SampleHandler.m */; }; + G1LR0002 /* ReplayKitLocalized.m in Sources */ = {isa = PBXBuildFile; fileRef = E2RP0004 /* ReplayKitLocalized.m */; }; + G1LR0003 /* ReplayKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E2RP0010 /* ReplayKit.framework */; }; + G1LR0004 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = E2RP0005 /* InfoPlist.strings */; }; + G1LR0005 /* ReplayKitLocalized.strings in Resources */ = {isa = PBXBuildFile; fileRef = E2RP0007 /* ReplayKitLocalized.strings */; }; + G1LR0006 /* RTCubeLabReplayExtension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = G2LR0011 /* RTCubeLabReplayExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; + G1LRPOD1 /* Pods_RTCubeLabReplayExtension.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = G2LRPOD1 /* Pods_RTCubeLabReplayExtension.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + E4RP0003 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = A8000001 /* Project object */; + proxyType = 1; + remoteGlobalIDString = G5LR0001; + remoteInfo = RTCubeLabReplayExtension; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + E3RP0003 /* Embed App Extensions */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 13; + files = ( + G1LR0006 /* RTCubeLabReplayExtension.appex in Embed App Extensions */, + ); + name = "Embed App Extensions"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 0F7536B416CDE69AACA73EA8 /* AvatarPickerViewController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = AvatarPickerViewController.swift; sourceTree = ""; }; + 15D970CC75ED231D13B6776F /* Pods-RTCube.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RTCube.release.xcconfig"; path = "Target Support Files/Pods-RTCube/Pods-RTCube.release.xcconfig"; sourceTree = ""; }; + 266AA9F3126066FF1D6249C1 /* Pods_RTCube.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RTCube.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 3990EFE8D632F509A9FDF9C6 /* PrivacyEntry.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PrivacyEntry.swift; sourceTree = ""; }; + 42018FAA990A1E7E62C515DF /* PrivacySystemAuthViewController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PrivacySystemAuthViewController.swift; sourceTree = ""; }; + 49BF93043A7600A91429DCB4 /* PrivacyPersonalAuthViewController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PrivacyPersonalAuthViewController.swift; sourceTree = ""; }; + 5A163071A443E0101007ED4F /* en */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/PrivacyLocalized.strings; sourceTree = ""; }; + 691FEFEA09A9D09059CFDB15 /* PrivacyConfig.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PrivacyConfig.swift; sourceTree = ""; }; + 6D466A5A284E7A9CB84410DF /* PrivacyCenterViewController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PrivacyCenterViewController.swift; sourceTree = ""; }; + 86EFD8E2A21A29EEBC7E21F1 /* Pods-RTCube.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RTCube.debug.xcconfig"; path = "Target Support Files/Pods-RTCube/Pods-RTCube.debug.xcconfig"; sourceTree = ""; }; + 8EFDC389C49473CB3F9877C8 /* PrivacyDataCollectionViewController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PrivacyDataCollectionViewController.swift; sourceTree = ""; }; + 8FB791ADDD68B6208D2AF0B1 /* PrivacyAuthDetailViewController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PrivacyAuthDetailViewController.swift; sourceTree = ""; }; + A2000001 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + A2000002 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; + A2000004 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + A2000005 /* LaunchScreen.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = ""; }; + A2000006 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + A2000008 /* Privacy.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Privacy.plist; sourceTree = ""; }; + AA200001 /* LaunchImage@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "LaunchImage@2x.png"; sourceTree = ""; }; + AA200002 /* LaunchImage@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "LaunchImage@3x.png"; sourceTree = ""; }; + AA200003 /* LaunchImage_en@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "LaunchImage_en@2x.png"; sourceTree = ""; }; + AA200004 /* LaunchImage_en@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "LaunchImage_en@3x.png"; sourceTree = ""; }; + AA200005 /* TencentRTCLaunchImage@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "TencentRTCLaunchImage@2x.png"; sourceTree = ""; }; + AA200006 /* TencentRTCLaunchImage@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "TencentRTCLaunchImage@3x.png"; sourceTree = ""; }; + AA200007 /* TencentRTCLaunchScreen.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = TencentRTCLaunchScreen.storyboard; sourceTree = ""; }; + B07DE4046FE4F9AE86071688 /* zh-Hans */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/PrivacyLocalized.strings"; sourceTree = ""; }; + B2POD001 /* Pods_TencentRTC.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_TencentRTC.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + B2XCC001 /* Pods-TencentRTC.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TencentRTC.debug.xcconfig"; path = "Target Support Files/Pods-TencentRTC/Pods-TencentRTC.debug.xcconfig"; sourceTree = ""; }; + B2XCC002 /* Pods-TencentRTC.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TencentRTC.release.xcconfig"; path = "Target Support Files/Pods-TencentRTC/Pods-TencentRTC.release.xcconfig"; sourceTree = ""; }; + C657D1002F5AD40200D01990 /* GenerateTestUserSig.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GenerateTestUserSig.swift; sourceTree = ""; }; + C657EE2C2F61698F00D01990 /* ResolvedModule.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ResolvedModule.swift; sourceTree = ""; }; + C657EE2E2F61698F00D01990 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/MainLocalized.strings; sourceTree = ""; }; + C657EE2F2F61698F00D01990 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/MainLocalized.strings"; sourceTree = ""; }; + C657EE312F61698F00D01990 /* MainLocalized.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainLocalized.swift; sourceTree = ""; }; + C657EE342F61698F00D01990 /* ModulePermissionService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ModulePermissionService.swift; sourceTree = ""; }; + C657EE362F61698F00D01990 /* EntranceCollectionCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EntranceCollectionCell.swift; sourceTree = ""; }; + C657EE372F61698F00D01990 /* EntranceFooterView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EntranceFooterView.swift; sourceTree = ""; }; + C657EE382F61698F00D01990 /* EntranceReportView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EntranceReportView.swift; sourceTree = ""; }; + C657EE392F61698F00D01990 /* LeftAlignedFlowLayout.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LeftAlignedFlowLayout.swift; sourceTree = ""; }; + C657EE3A2F61698F00D01990 /* MainNavigationView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainNavigationView.swift; sourceTree = ""; }; + C657EE3C2F61698F00D01990 /* EntranceState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EntranceState.swift; sourceTree = ""; }; + C657EE3D2F61698F00D01990 /* EntranceStore.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EntranceStore.swift; sourceTree = ""; }; + C657EE3E2F61698F00D01990 /* EntranceViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EntranceViewController.swift; sourceTree = ""; }; + C657EE3F2F61698F00D01990 /* ModuleRegistry.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ModuleRegistry.swift; sourceTree = ""; }; + C6CC00042F8B00000047AD91 /* ContactUsConstants.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContactUsConstants.swift; sourceTree = ""; }; + C6CU00072F8A00000047AD91 /* ContactUsService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContactUsService.swift; sourceTree = ""; }; + C6CU00082F8A00000047AD91 /* ContactUsButtonView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContactUsButtonView.swift; sourceTree = ""; }; + C6E1A8602F6A4CAB0047AD91 /* LayoutDefine.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LayoutDefine.swift; sourceTree = ""; }; + C6E1BE6B2F7137B00047AD91 /* MineViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineViewModel.swift; sourceTree = ""; }; + C6E1BE6C2F7137B00047AD91 /* ProfileInfoModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileInfoModel.swift; sourceTree = ""; }; + C6E1BE6E2F7137B00047AD91 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/MineLocalized.strings; sourceTree = ""; }; + C6E1BE6F2F7137B00047AD91 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/MineLocalized.strings"; sourceTree = ""; }; + C6E1BE712F7137B00047AD91 /* MineLocalized.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineLocalized.swift; sourceTree = ""; }; + C6E1BE742F7137B00047AD91 /* MineAboutResignViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineAboutResignViewController.swift; sourceTree = ""; }; + C6E1BE752F7137B00047AD91 /* MineAboutViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineAboutViewController.swift; sourceTree = ""; }; + C6E1BE762F7137B00047AD91 /* MineRootView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineRootView.swift; sourceTree = ""; }; + C6E1BE772F7137B00047AD91 /* MineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineViewController.swift; sourceTree = ""; }; + C6E1BE782F7137B00047AD91 /* ProfileController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileController.swift; sourceTree = ""; }; + C6E1BE792F7137B00047AD91 /* ProfileDatePickerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileDatePickerView.swift; sourceTree = ""; }; + C6E1BE7A2F7137B00047AD91 /* ProfileTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileTableViewCell.swift; sourceTree = ""; }; + C6E1BE7B2F7137B00047AD91 /* ProfileUpdateInfoView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileUpdateInfoView.swift; sourceTree = ""; }; + C6E1BE7D2F7137B00047AD91 /* MineEntry.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineEntry.swift; sourceTree = ""; }; + C6E1CD262F7272E90047AD91 /* ContactUsTipsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContactUsTipsView.swift; sourceTree = ""; }; + C6E1CD272F7272E90047AD91 /* OverseasCollectionCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OverseasCollectionCell.swift; sourceTree = ""; }; + C6E1CD282F7272E90047AD91 /* OverseasFooterView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OverseasFooterView.swift; sourceTree = ""; }; + C6E1CD292F7272E90047AD91 /* OverseasHomeViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OverseasHomeViewController.swift; sourceTree = ""; }; + C6E1CD2A2F7272E90047AD91 /* OverseasMainViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OverseasMainViewController.swift; sourceTree = ""; }; + C6E1CD2B2F7272E90047AD91 /* OverseasNavigationView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OverseasNavigationView.swift; sourceTree = ""; }; + C6E1CD3F2F73E9380047AD91 /* SafetyReminderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SafetyReminderView.swift; sourceTree = ""; }; + C6E1CD432F7509FA0047AD91 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; }; + C6E1CD442F7509FA0047AD91 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/Localizable.strings"; sourceTree = ""; }; + C6E1D74A2F7BA7BF0047AD91 /* EnvironmentOperation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnvironmentOperation.swift; sourceTree = ""; }; + C6E1DEA12F7E447B0047AD91 /* RTCExperienceRoomButtonView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RTCExperienceRoomButtonView.swift; sourceTree = ""; }; + C6E4026A2F67FCD0003F5BAF /* CGFloat+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CGFloat+Extension.swift"; sourceTree = ""; }; + C6E4026B2F67FCD0003F5BAF /* Double+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Double+Extension.swift"; sourceTree = ""; }; + C6E4026C2F67FCD0003F5BAF /* Int+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Int+Extension.swift"; sourceTree = ""; }; + C6LANG0032F5B000000D01990 /* LanguageEntry.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LanguageEntry.swift; sourceTree = ""; }; + C6LANG0042F5B000000D01990 /* LanguageSelectViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LanguageSelectViewController.swift; sourceTree = ""; }; + C6LOG0052F7B000000000001 /* LogUploadView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LogUploadView.swift; sourceTree = ""; }; + C6LOG0052F7B000000000002 /* LogUploadManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LogUploadManager.swift; sourceTree = ""; }; + C6LOG0052F7B000000000003 /* AppLogger.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppLogger.swift; sourceTree = ""; }; + C6MA00042F6BEE0000D01990 /* MainAssets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = MainAssets.xcassets; sourceTree = ""; }; + C6PU00002FA200000047AD91 /* PushLifecycleHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PushLifecycleHandler.swift; sourceTree = ""; }; + C84E95DCE99E2F890D9505DE /* PrivacyAssets.xcassets */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = folder.assetcatalog; path = PrivacyAssets.xcassets; sourceTree = ""; }; + CD4ADCA4B9FE7C9ADB83FD68 /* AppAnalytics.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = AppAnalytics.swift; sourceTree = ""; }; + D144472BD0A98D274A0AE821 /* PrivacyWebViewController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PrivacyWebViewController.swift; sourceTree = ""; }; + D2000010 /* RTCubeLab.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RTCubeLab.app; sourceTree = BUILT_PRODUCTS_DIR; }; + D2POD001 /* Pods_RTCubeLab.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RTCubeLab.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D2XCC001 /* Pods-RTCubeLab.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RTCubeLab.debug.xcconfig"; path = "Target Support Files/Pods-RTCubeLab/Pods-RTCubeLab.debug.xcconfig"; sourceTree = ""; }; + D2XCC002 /* Pods-RTCubeLab.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RTCubeLab.release.xcconfig"; path = "Target Support Files/Pods-RTCubeLab/Pods-RTCubeLab.release.xcconfig"; sourceTree = ""; }; + D99E452DA3178F16A5759428 /* PrivacyMyInfoViewController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PrivacyMyInfoViewController.swift; sourceTree = ""; }; + E2RP0001 /* SampleHandler.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SampleHandler.h; sourceTree = ""; }; + E2RP0002 /* SampleHandler.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SampleHandler.m; sourceTree = ""; }; + E2RP0003 /* ReplayKit2Define.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ReplayKit2Define.h; sourceTree = ""; }; + E2RP0004 /* ReplayKitLocalized.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ReplayKitLocalized.m; sourceTree = ""; }; + E2RP0005A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; + E2RP0005B /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/InfoPlist.strings"; sourceTree = ""; }; + E2RP0006 /* ReplayKitLocalized.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ReplayKitLocalized.h; sourceTree = ""; }; + E2RP0007A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/ReplayKitLocalized.strings; sourceTree = ""; }; + E2RP0007B /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/ReplayKitLocalized.strings"; sourceTree = ""; }; + E2RP0009 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + E2RP0010 /* ReplayKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ReplayKit.framework; path = System/Library/Frameworks/ReplayKit.framework; sourceTree = SDKROOT; }; + E2RPPOD1 /* Pods_RTCubeReplayExtension.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RTCubeReplayExtension.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + E2RPXCC1 /* Pods-RTCubeReplayExtension.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RTCubeReplayExtension.debug.xcconfig"; path = "Target Support Files/Pods-RTCubeReplayExtension/Pods-RTCubeReplayExtension.debug.xcconfig"; sourceTree = ""; }; + E2RPXCC2 /* Pods-RTCubeReplayExtension.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RTCubeReplayExtension.release.xcconfig"; path = "Target Support Files/Pods-RTCubeReplayExtension/Pods-RTCubeReplayExtension.release.xcconfig"; sourceTree = ""; }; + EB44959E079EDF323374DEF8 /* PrivacyLocalized.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PrivacyLocalized.swift; sourceTree = ""; }; + F2TRPOD1 /* Pods_TencentRTCReplayExtension.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_TencentRTCReplayExtension.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + F2TRXCC1 /* Pods-TencentRTCReplayExtension.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TencentRTCReplayExtension.debug.xcconfig"; path = "Target Support Files/Pods-TencentRTCReplayExtension/Pods-TencentRTCReplayExtension.debug.xcconfig"; sourceTree = ""; }; + F2TRXCC2 /* Pods-TencentRTCReplayExtension.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TencentRTCReplayExtension.release.xcconfig"; path = "Target Support Files/Pods-TencentRTCReplayExtension/Pods-TencentRTCReplayExtension.release.xcconfig"; sourceTree = ""; }; + G2LR0011 /* RTCubeLabReplayExtension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = RTCubeLabReplayExtension.appex; sourceTree = BUILT_PRODUCTS_DIR; }; + G2LRPOD1 /* Pods_RTCubeLabReplayExtension.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RTCubeLabReplayExtension.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + G2LRXCC1 /* Pods-RTCubeLabReplayExtension.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RTCubeLabReplayExtension.debug.xcconfig"; path = "Target Support Files/Pods-RTCubeLabReplayExtension/Pods-RTCubeLabReplayExtension.debug.xcconfig"; sourceTree = ""; }; + G2LRXCC2 /* Pods-RTCubeLabReplayExtension.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RTCubeLabReplayExtension.release.xcconfig"; path = "Target Support Files/Pods-RTCubeLabReplayExtension/Pods-RTCubeLabReplayExtension.release.xcconfig"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + D3000001 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + D1POD001 /* Pods_RTCubeLab.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + G3LR0010 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + G1LR0003 /* ReplayKit.framework in Frameworks */, + G1LRPOD1 /* Pods_RTCubeLabReplayExtension.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 132E663850DAF5D1CEA2C7B8 /* Extension */ = { + isa = PBXGroup; + children = ( + EB44959E079EDF323374DEF8 /* PrivacyLocalized.swift */, + ); + path = Extension; + sourceTree = ""; + }; + 305F2B036A85F1BC69393956 /* privacy */ = { + isa = PBXGroup; + children = ( + 54A8038B926B5A9B0B09C6D6 /* Views */, + 691FEFEA09A9D09059CFDB15 /* PrivacyConfig.swift */, + 132E663850DAF5D1CEA2C7B8 /* Extension */, + 3990EFE8D632F509A9FDF9C6 /* PrivacyEntry.swift */, + 479877459A238D0F5E10C87E /* Resource */, + ); + name = privacy; + path = privacy; + sourceTree = SOURCE_ROOT; + }; + 479877459A238D0F5E10C87E /* Resource */ = { + isa = PBXGroup; + children = ( + B2DBA967144904163FAFA38D /* Localized */, + CB4623FEB0089548F0826FEB /* Assets */, + ); + path = Resource; + sourceTree = ""; + }; + 54A8038B926B5A9B0B09C6D6 /* Views */ = { + isa = PBXGroup; + children = ( + 42018FAA990A1E7E62C515DF /* PrivacySystemAuthViewController.swift */, + 6D466A5A284E7A9CB84410DF /* PrivacyCenterViewController.swift */, + D144472BD0A98D274A0AE821 /* PrivacyWebViewController.swift */, + 8FB791ADDD68B6208D2AF0B1 /* PrivacyAuthDetailViewController.swift */, + D99E452DA3178F16A5759428 /* PrivacyMyInfoViewController.swift */, + 49BF93043A7600A91429DCB4 /* PrivacyPersonalAuthViewController.swift */, + 8EFDC389C49473CB3F9877C8 /* PrivacyDataCollectionViewController.swift */, + ); + path = Views; + sourceTree = ""; + }; + 8555B580658FBDED03118B18 /* Pods */ = { + isa = PBXGroup; + children = ( + 86EFD8E2A21A29EEBC7E21F1 /* Pods-RTCube.debug.xcconfig */, + 15D970CC75ED231D13B6776F /* Pods-RTCube.release.xcconfig */, + B2XCC001 /* Pods-TencentRTC.debug.xcconfig */, + B2XCC002 /* Pods-TencentRTC.release.xcconfig */, + D2XCC001 /* Pods-RTCubeLab.debug.xcconfig */, + D2XCC002 /* Pods-RTCubeLab.release.xcconfig */, + E2RPXCC1 /* Pods-RTCubeReplayExtension.debug.xcconfig */, + E2RPXCC2 /* Pods-RTCubeReplayExtension.release.xcconfig */, + F2TRXCC1 /* Pods-TencentRTCReplayExtension.debug.xcconfig */, + F2TRXCC2 /* Pods-TencentRTCReplayExtension.release.xcconfig */, + G2LRXCC1 /* Pods-RTCubeLabReplayExtension.debug.xcconfig */, + G2LRXCC2 /* Pods-RTCubeLabReplayExtension.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + A4000001 = { + isa = PBXGroup; + children = ( + C6E1BE7F2F7137B00047AD91 /* mine */, + C657EE412F61698F00D01990 /* main */, + C657D1012F5AD40200D01990 /* Debug */, + C6LANG0052F5B000000D01990 /* language */, + A4000002 /* RTCube */, + E4RPGRP1 /* RTCubeReplayExtension */, + A4000003 /* Products */, + 8555B580658FBDED03118B18 /* Pods */, + E6F5DFA6ECF5DFB603D78B10 /* Frameworks */, + 305F2B036A85F1BC69393956 /* privacy */, + ); + sourceTree = ""; + }; + A4000002 /* RTCube */ = { + isa = PBXGroup; + children = ( + C6E1CD472F7509FA0047AD91 /* Resource */, + A2000001 /* AppDelegate.swift */, + A2000002 /* SceneDelegate.swift */, + C6E1D74A2F7BA7BF0047AD91 /* EnvironmentOperation.swift */, + A400000E /* Extension */, + C6LOG0062F7B000000000000 /* Log */, + A2000004 /* Assets.xcassets */, + A2000005 /* LaunchScreen.storyboard */, + AA200007 /* TencentRTCLaunchScreen.storyboard */, + A2000006 /* Info.plist */, + A2000008 /* Privacy.plist */, + AA8F5A67E0678288044DFB20 /* Analytics */, + ); + path = RTCube; + sourceTree = ""; + }; + A4000003 /* Products */ = { + isa = PBXGroup; + children = ( + D2000010 /* RTCubeLab.app */, + G2LR0011 /* RTCubeLabReplayExtension.appex */, + ); + name = Products; + sourceTree = ""; + }; + A400000E /* Extension */ = { + isa = PBXGroup; + children = ( + C6E1A8602F6A4CAB0047AD91 /* LayoutDefine.swift */, + C6E4026A2F67FCD0003F5BAF /* CGFloat+Extension.swift */, + C6E4026B2F67FCD0003F5BAF /* Double+Extension.swift */, + C6E4026C2F67FCD0003F5BAF /* Int+Extension.swift */, + C6PU00002FA200000047AD91 /* PushLifecycleHandler.swift */, + ); + path = Extension; + sourceTree = ""; + }; + AA8F5A67E0678288044DFB20 /* Analytics */ = { + isa = PBXGroup; + children = ( + CD4ADCA4B9FE7C9ADB83FD68 /* AppAnalytics.swift */, + ); + path = Analytics; + sourceTree = ""; + }; + B2DBA967144904163FAFA38D /* Localized */ = { + isa = PBXGroup; + children = ( + AF9F9AC8A206A1D31F8C3DF6 /* PrivacyLocalized.strings */, + ); + path = Localized; + sourceTree = ""; + }; + C657D1012F5AD40200D01990 /* Debug */ = { + isa = PBXGroup; + children = ( + C657D1002F5AD40200D01990 /* GenerateTestUserSig.swift */, + ); + path = Debug; + sourceTree = ""; + }; + C657EE2D2F61698F00D01990 /* Shared */ = { + isa = PBXGroup; + children = ( + C6SH00012F61698F00D01990 /* Model */, + C6SH00022F61698F00D01990 /* Views */, + C657EE3F2F61698F00D01990 /* ModuleRegistry.swift */, + ); + path = Shared; + sourceTree = ""; + }; + C657EE322F61698F00D01990 /* Localized */ = { + isa = PBXGroup; + children = ( + C657EE302F61698F00D01990 /* MainLocalized.strings */, + C657EE312F61698F00D01990 /* MainLocalized.swift */, + ); + path = Localized; + sourceTree = ""; + }; + C657EE332F61698F00D01990 /* Resource */ = { + isa = PBXGroup; + children = ( + C6MA00052F6BEE0000D01990 /* Assets */, + C657EE322F61698F00D01990 /* Localized */, + ); + path = Resource; + sourceTree = ""; + }; + C657EE352F61698F00D01990 /* Service */ = { + isa = PBXGroup; + children = ( + C657EE342F61698F00D01990 /* ModulePermissionService.swift */, + ); + path = Service; + sourceTree = ""; + }; + C657EE3B2F61698F00D01990 /* Domestic */ = { + isa = PBXGroup; + children = ( + C657EE352F61698F00D01990 /* Service */, + C6DM00012F61698F00D01990 /* Views */, + C657EE3C2F61698F00D01990 /* EntranceState.swift */, + C657EE3D2F61698F00D01990 /* EntranceStore.swift */, + ); + path = Domestic; + sourceTree = ""; + }; + C657EE412F61698F00D01990 /* main */ = { + isa = PBXGroup; + children = ( + C657EE2D2F61698F00D01990 /* Shared */, + C657EE3B2F61698F00D01990 /* Domestic */, + C6E1CD2C2F7272E90047AD91 /* Overseas */, + C657EE332F61698F00D01990 /* Resource */, + C657EE3E2F61698F00D01990 /* EntranceViewController.swift */, + C6E1CD292F7272E90047AD91 /* OverseasHomeViewController.swift */, + ); + name = main; + path = main; + sourceTree = SOURCE_ROOT; + }; + C6DM00012F61698F00D01990 /* Views */ = { + isa = PBXGroup; + children = ( + C6E1CD3F2F73E9380047AD91 /* SafetyReminderView.swift */, + C657EE362F61698F00D01990 /* EntranceCollectionCell.swift */, + C657EE372F61698F00D01990 /* EntranceFooterView.swift */, + C657EE382F61698F00D01990 /* EntranceReportView.swift */, + C657EE392F61698F00D01990 /* LeftAlignedFlowLayout.swift */, + ); + path = Views; + sourceTree = ""; + }; + C6E1BE6D2F7137B00047AD91 /* Model */ = { + isa = PBXGroup; + children = ( + C6E1BE6B2F7137B00047AD91 /* MineViewModel.swift */, + C6E1BE6C2F7137B00047AD91 /* ProfileInfoModel.swift */, + ); + path = Model; + sourceTree = ""; + }; + C6E1BE722F7137B00047AD91 /* Localized */ = { + isa = PBXGroup; + children = ( + C6E1BE702F7137B00047AD91 /* MineLocalized.strings */, + C6E1BE712F7137B00047AD91 /* MineLocalized.swift */, + ); + path = Localized; + sourceTree = ""; + }; + C6E1BE732F7137B00047AD91 /* Resource */ = { + isa = PBXGroup; + children = ( + C6E1BE722F7137B00047AD91 /* Localized */, + ); + path = Resource; + sourceTree = ""; + }; + C6E1BE7C2F7137B00047AD91 /* Views */ = { + isa = PBXGroup; + children = ( + C6E1DEA12F7E447B0047AD91 /* RTCExperienceRoomButtonView.swift */, + C6E1BE742F7137B00047AD91 /* MineAboutResignViewController.swift */, + C6E1BE752F7137B00047AD91 /* MineAboutViewController.swift */, + C6E1BE762F7137B00047AD91 /* MineRootView.swift */, + C6E1BE772F7137B00047AD91 /* MineViewController.swift */, + C6E1BE782F7137B00047AD91 /* ProfileController.swift */, + C6E1BE792F7137B00047AD91 /* ProfileDatePickerView.swift */, + C6E1BE7A2F7137B00047AD91 /* ProfileTableViewCell.swift */, + C6E1BE7B2F7137B00047AD91 /* ProfileUpdateInfoView.swift */, + 0F7536B416CDE69AACA73EA8 /* AvatarPickerViewController.swift */, + ); + path = Views; + sourceTree = ""; + }; + C6E1BE7F2F7137B00047AD91 /* mine */ = { + isa = PBXGroup; + children = ( + C6E1BE6D2F7137B00047AD91 /* Model */, + C6E1BE732F7137B00047AD91 /* Resource */, + C6E1BE7C2F7137B00047AD91 /* Views */, + C6E1BE7D2F7137B00047AD91 /* MineEntry.swift */, + ); + name = mine; + path = mine; + sourceTree = SOURCE_ROOT; + }; + C6E1CD2C2F7272E90047AD91 /* Overseas */ = { + isa = PBXGroup; + children = ( + C6CU00082F8A00000047AD91 /* ContactUsButtonView.swift */, + C6CC00042F8B00000047AD91 /* ContactUsConstants.swift */, + C6CU00072F8A00000047AD91 /* ContactUsService.swift */, + C6E1CD262F7272E90047AD91 /* ContactUsTipsView.swift */, + C6E1CD272F7272E90047AD91 /* OverseasCollectionCell.swift */, + C6E1CD282F7272E90047AD91 /* OverseasFooterView.swift */, + C6E1CD2A2F7272E90047AD91 /* OverseasMainViewController.swift */, + C6E1CD2B2F7272E90047AD91 /* OverseasNavigationView.swift */, + ); + path = Overseas; + sourceTree = ""; + }; + C6E1CD462F7509FA0047AD91 /* Localized */ = { + isa = PBXGroup; + children = ( + C6E1CD452F7509FA0047AD91 /* Localizable.strings */, + ); + path = Localized; + sourceTree = ""; + }; + C6E1CD472F7509FA0047AD91 /* Resource */ = { + isa = PBXGroup; + children = ( + C6E1CD462F7509FA0047AD91 /* Localized */, + AA200001 /* LaunchImage@2x.png */, + AA200002 /* LaunchImage@3x.png */, + AA200003 /* LaunchImage_en@2x.png */, + AA200004 /* LaunchImage_en@3x.png */, + AA200005 /* TencentRTCLaunchImage@2x.png */, + AA200006 /* TencentRTCLaunchImage@3x.png */, + ); + path = Resource; + sourceTree = ""; + }; + C6LANG0052F5B000000D01990 /* language */ = { + isa = PBXGroup; + children = ( + C6LANG0032F5B000000D01990 /* LanguageEntry.swift */, + C6LANG0042F5B000000D01990 /* LanguageSelectViewController.swift */, + ); + name = language; + path = language; + sourceTree = SOURCE_ROOT; + }; + C6LOG0062F7B000000000000 /* Log */ = { + isa = PBXGroup; + children = ( + C6LOG0052F7B000000000001 /* LogUploadView.swift */, + C6LOG0052F7B000000000002 /* LogUploadManager.swift */, + C6LOG0052F7B000000000003 /* AppLogger.swift */, + ); + path = Log; + sourceTree = ""; + }; + C6MA00052F6BEE0000D01990 /* Assets */ = { + isa = PBXGroup; + children = ( + C6MA00042F6BEE0000D01990 /* MainAssets.xcassets */, + ); + path = Assets; + sourceTree = ""; + }; + C6SH00012F61698F00D01990 /* Model */ = { + isa = PBXGroup; + children = ( + C657EE2C2F61698F00D01990 /* ResolvedModule.swift */, + ); + path = Model; + sourceTree = ""; + }; + C6SH00022F61698F00D01990 /* Views */ = { + isa = PBXGroup; + children = ( + C657EE3A2F61698F00D01990 /* MainNavigationView.swift */, + ); + path = Views; + sourceTree = ""; + }; + CB4623FEB0089548F0826FEB /* Assets */ = { + isa = PBXGroup; + children = ( + C84E95DCE99E2F890D9505DE /* PrivacyAssets.xcassets */, + ); + path = Assets; + sourceTree = ""; + }; + E4RPGRP1 /* RTCubeReplayExtension */ = { + isa = PBXGroup; + children = ( + E2RP0001 /* SampleHandler.h */, + E2RP0002 /* SampleHandler.m */, + E2RP0003 /* ReplayKit2Define.h */, + E2RP0009 /* Info.plist */, + E4RPGRP2 /* Localized */, + E2RP0005 /* InfoPlist.strings */, + ); + name = RTCubeReplayExtension; + path = RTCubeReplayExtension; + sourceTree = SOURCE_ROOT; + }; + E4RPGRP2 /* Localized */ = { + isa = PBXGroup; + children = ( + E2RP0006 /* ReplayKitLocalized.h */, + E2RP0004 /* ReplayKitLocalized.m */, + E2RP0007 /* ReplayKitLocalized.strings */, + ); + path = Localized; + sourceTree = ""; + }; + E6F5DFA6ECF5DFB603D78B10 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 266AA9F3126066FF1D6249C1 /* Pods_RTCube.framework */, + B2POD001 /* Pods_TencentRTC.framework */, + D2POD001 /* Pods_RTCubeLab.framework */, + E2RPPOD1 /* Pods_RTCubeReplayExtension.framework */, + F2TRPOD1 /* Pods_TencentRTCReplayExtension.framework */, + G2LRPOD1 /* Pods_RTCubeLabReplayExtension.framework */, + E2RP0010 /* ReplayKit.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + AAA3A92BA414DEBE504EF37E /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + E760054B7314910D173441A4 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + D5000001 /* RTCubeLab */ = { + isa = PBXNativeTarget; + buildConfigurationList = D7000003 /* Build configuration list for PBXNativeTarget "RTCubeLab" */; + buildPhases = ( + D6SCP001 /* [CP] Check Pods Manifest.lock */, + D6000001 /* Sources */, + D3000001 /* Frameworks */, + D6000002 /* Resources */, + D6SCP002 /* [CP] Embed Pods Frameworks */, + D6SCP003 /* [CP] Copy Pods Resources */, + E3RP0003 /* Embed App Extensions */, + AAA3A92BA414DEBE504EF37E /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + E4RPDEP3 /* PBXTargetDependency */, + ); + name = RTCubeLab; + productName = RTCubeLab; + productReference = D2000010 /* RTCubeLab.app */; + productType = "com.apple.product-type.application"; + }; + G5LR0001 /* RTCubeLabReplayExtension */ = { + isa = PBXNativeTarget; + buildConfigurationList = G7LR0001 /* Build configuration list for PBXNativeTarget "RTCubeLabReplayExtension" */; + buildPhases = ( + G6LRSCP1 /* [CP] Check Pods Manifest.lock */, + G6LR0001 /* Sources */, + G3LR0010 /* Frameworks */, + G6LR0002 /* Resources */, + E760054B7314910D173441A4 /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = RTCubeLabReplayExtension; + productName = RTCubeLabReplayExtension; + productReference = G2LR0011 /* RTCubeLabReplayExtension.appex */; + productType = "com.apple.product-type.app-extension"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + A8000001 /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastSwiftUpdateCheck = 1540; + LastUpgradeCheck = 1540; + TargetAttributes = { + D5000001 = { + CreatedOnToolsVersion = 15.4; + }; + G5LR0001 = { + CreatedOnToolsVersion = 15.4; + }; + }; + }; + buildConfigurationList = A7000001 /* Build configuration list for PBXProject "RTCube" */; + compatibilityVersion = "Xcode 14.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + "zh-Hans", + ); + mainGroup = A4000001; + productRefGroup = A4000003 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + D5000001 /* RTCubeLab */, + G5LR0001 /* RTCubeLabReplayExtension */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + D6000002 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + D1000004 /* Assets.xcassets in Resources */, + C657EE532F61698F00D01990 /* MainLocalized.strings in Resources */, + D1000005 /* LaunchScreen.storyboard in Resources */, + C6E1CD492F7509FA0047AD91 /* Localizable.strings in Resources */, + D1000008 /* Privacy.plist in Resources */, + C6MA00032F6BEE0000D01990 /* MainAssets.xcassets in Resources */, + C6E1BEA82F7137B00047AD91 /* MineLocalized.strings in Resources */, + DD100001 /* LaunchImage@2x.png in Resources */, + DD100002 /* LaunchImage@3x.png in Resources */, + DD100003 /* LaunchImage_en@2x.png in Resources */, + DD100004 /* LaunchImage_en@3x.png in Resources */, + 6E5CDB206869988566E91AC0 /* PrivacyLocalized.strings in Resources */, + A8D7E71A7C31001CEC737C58 /* PrivacyAssets.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + G6LR0002 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + G1LR0004 /* InfoPlist.strings in Resources */, + G1LR0005 /* ReplayKitLocalized.strings in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + D6SCP001 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-RTCubeLab-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + D6SCP002 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-RTCubeLab/Pods-RTCubeLab-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-RTCubeLab/Pods-RTCubeLab-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-RTCubeLab/Pods-RTCubeLab-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + D6SCP003 /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-RTCubeLab/Pods-RTCubeLab-resources-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Copy Pods Resources"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-RTCubeLab/Pods-RTCubeLab-resources-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-RTCubeLab/Pods-RTCubeLab-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; + G6LRSCP1 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-RTCubeLabReplayExtension-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + D6000001 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + D1000001 /* AppDelegate.swift in Sources */, + C6E1A8662F6A52330047AD91 /* LanguageSelectViewController.swift in Sources */, + D1000002 /* SceneDelegate.swift in Sources */, + C6E402702F67FCD0003F5BAF /* Double+Extension.swift in Sources */, + C6E402712F67FCD0003F5BAF /* CGFloat+Extension.swift in Sources */, + C6E402752F67FCD0003F5BAF /* Int+Extension.swift in Sources */, + C6LOG0022F7B000000000001 /* LogUploadView.swift in Sources */, + C6E1CD412F73E9380047AD91 /* SafetyReminderView.swift in Sources */, + C6LOG0022F7B000000000002 /* LogUploadManager.swift in Sources */, + C6LOG0022F7B000000000003 /* AppLogger.swift in Sources */, + C657EE552F61698F00D01990 /* EntranceStore.swift in Sources */, + C6E1CD2D2F7272E90047AD91 /* ContactUsTipsView.swift in Sources */, + C6CU00032F8A00000047AD91 /* ContactUsService.swift in Sources */, + C6CC00032F8B00000047AD91 /* ContactUsConstants.swift in Sources */, + C6CU00062F8A00000047AD91 /* ContactUsButtonView.swift in Sources */, + C6E1D74B2F7BA7BF0047AD91 /* EnvironmentOperation.swift in Sources */, + C6E1CD2E2F7272E90047AD91 /* OverseasNavigationView.swift in Sources */, + C6E1CD2F2F7272E90047AD91 /* OverseasHomeViewController.swift in Sources */, + C6E1CD302F7272E90047AD91 /* OverseasFooterView.swift in Sources */, + C6E1CD312F7272E90047AD91 /* OverseasCollectionCell.swift in Sources */, + C6E1CD322F7272E90047AD91 /* OverseasMainViewController.swift in Sources */, + C657EE562F61698F00D01990 /* EntranceState.swift in Sources */, + C657EE572F61698F00D01990 /* ResolvedModule.swift in Sources */, + C657EE592F61698F00D01990 /* LeftAlignedFlowLayout.swift in Sources */, + C6E1BE9C2F7137B00047AD91 /* ProfileUpdateInfoView.swift in Sources */, + C6E1BE9D2F7137B00047AD91 /* ProfileInfoModel.swift in Sources */, + C6E1BE9E2F7137B00047AD91 /* ProfileDatePickerView.swift in Sources */, + C6E1BE9F2F7137B00047AD91 /* MineAboutResignViewController.swift in Sources */, + C6E1BEA02F7137B00047AD91 /* MineViewController.swift in Sources */, + C6E1BEA12F7137B00047AD91 /* MineEntry.swift in Sources */, + C6E1BEA22F7137B00047AD91 /* ProfileController.swift in Sources */, + C6E1BEA32F7137B00047AD91 /* MineLocalized.swift in Sources */, + C6E1BEA42F7137B00047AD91 /* MineRootView.swift in Sources */, + C6E1BEA52F7137B00047AD91 /* MineViewModel.swift in Sources */, + C6E1BEA62F7137B00047AD91 /* MineAboutViewController.swift in Sources */, + C6E1BEA72F7137B00047AD91 /* ProfileTableViewCell.swift in Sources */, + C657EE5A2F61698F00D01990 /* EntranceReportView.swift in Sources */, + C657EE5B2F61698F00D01990 /* EntranceViewController.swift in Sources */, + C657EE5C2F61698F00D01990 /* EntranceCollectionCell.swift in Sources */, + C657EE5E2F61698F00D01990 /* EntranceFooterView.swift in Sources */, + C6E1A8642F6A521D0047AD91 /* GenerateTestUserSig.swift in Sources */, + C6E1A8632F6A4CAB0047AD91 /* LayoutDefine.swift in Sources */, + C6PU00032FA200000047AD91 /* PushLifecycleHandler.swift in Sources */, + C6E1A8682F6A523E0047AD91 /* LanguageEntry.swift in Sources */, + C657EE5F2F61698F00D01990 /* MainNavigationView.swift in Sources */, + C6E1DEA42F7E56D60047AD91 /* RTCExperienceRoomButtonView.swift in Sources */, + C657EE602F61698F00D01990 /* MainLocalized.swift in Sources */, + C657EE612F61698F00D01990 /* ModuleRegistry.swift in Sources */, + C657EE622F61698F00D01990 /* ModulePermissionService.swift in Sources */, + 971D2F196DEE3C8BC470FC04 /* AvatarPickerViewController.swift in Sources */, + A33D9853F682E9C5A3086331 /* PrivacySystemAuthViewController.swift in Sources */, + F130FF523DBF611A368FC6F2 /* PrivacyConfig.swift in Sources */, + A1F73AD1D13E775750839498 /* PrivacyCenterViewController.swift in Sources */, + DA417280BB54CD6CB271FFA3 /* PrivacyLocalized.swift in Sources */, + B95E23E478F9AE21BBF97462 /* PrivacyWebViewController.swift in Sources */, + 4908A1B68B8E2DCA58614C51 /* PrivacyAuthDetailViewController.swift in Sources */, + 87173B0F3D1C1722FEC5150C /* PrivacyMyInfoViewController.swift in Sources */, + 0284EE280D8F978F1FB16AEB /* PrivacyPersonalAuthViewController.swift in Sources */, + 419DD9657FFD6C2A21278939 /* PrivacyDataCollectionViewController.swift in Sources */, + BEC5BDC1C1C2C9AFE6F350E9 /* PrivacyEntry.swift in Sources */, + 49F98C61FE3BBDC6C36FF195 /* AppAnalytics.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + G6LR0001 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + G1LR0001 /* SampleHandler.m in Sources */, + G1LR0002 /* ReplayKitLocalized.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + E4RPDEP3 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = G5LR0001 /* RTCubeLabReplayExtension */; + targetProxy = E4RP0003 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + AF9F9AC8A206A1D31F8C3DF6 /* PrivacyLocalized.strings */ = { + isa = PBXVariantGroup; + children = ( + 5A163071A443E0101007ED4F /* en */, + B07DE4046FE4F9AE86071688 /* zh-Hans */, + ); + name = PrivacyLocalized.strings; + sourceTree = ""; + }; + C657EE302F61698F00D01990 /* MainLocalized.strings */ = { + isa = PBXVariantGroup; + children = ( + C657EE2E2F61698F00D01990 /* en */, + C657EE2F2F61698F00D01990 /* zh-Hans */, + ); + name = MainLocalized.strings; + sourceTree = ""; + }; + C6E1BE702F7137B00047AD91 /* MineLocalized.strings */ = { + isa = PBXVariantGroup; + children = ( + C6E1BE6E2F7137B00047AD91 /* en */, + C6E1BE6F2F7137B00047AD91 /* zh-Hans */, + ); + name = MineLocalized.strings; + sourceTree = ""; + }; + C6E1CD452F7509FA0047AD91 /* Localizable.strings */ = { + isa = PBXVariantGroup; + children = ( + C6E1CD432F7509FA0047AD91 /* en */, + C6E1CD442F7509FA0047AD91 /* zh-Hans */, + ); + name = Localizable.strings; + sourceTree = ""; + }; + E2RP0005 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + E2RP0005A /* en */, + E2RP0005B /* zh-Hans */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; + E2RP0007 /* ReplayKitLocalized.strings */ = { + isa = PBXVariantGroup; + children = ( + E2RP0007A /* en */, + E2RP0007B /* zh-Hans */, + ); + name = ReplayKitLocalized.strings; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + A9000001 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu17; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 14.0; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + A9000002 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu17; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 14.0; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + D9000003 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = D2XCC001 /* Pods-RTCubeLab.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CODE_SIGN_STYLE = Manual; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = ""; + "DEVELOPMENT_TEAM[sdk=iphoneos*]" = F8A3GH6Q4W; + GCC_PREPROCESSOR_DEFINITIONS = ( + "$(inherited)", + "RTCUBE_LOCAL_BUILD=1", + "RTCUBE_LAB=1", + "OPEN_SOURCE=1", + ); + GENERATE_INFOPLIST_FILE = NO; + INFOPLIST_FILE = RTCube/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.aby.livekit.demo; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "All-In-One-APP"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited) RTCUBE_LOCAL_BUILD RTCUBE_LAB OPEN_SOURCE"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = 1; + }; + name = Debug; + }; + D9000004 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = D2XCC002 /* Pods-RTCubeLab.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CODE_SIGN_STYLE = Manual; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = ""; + "DEVELOPMENT_TEAM[sdk=iphoneos*]" = F8A3GH6Q4W; + GENERATE_INFOPLIST_FILE = NO; + INFOPLIST_FILE = RTCube/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.aby.livekit.demo; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "All-In-One-APP"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) RTCUBE_LOCAL_BUILD RTCUBE_LAB"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = 1; + }; + name = Release; + }; + G9LR0001 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = G2LRXCC1 /* Pods-RTCubeLabReplayExtension.debug.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = "iPhone Developer"; + CODE_SIGN_STYLE = Manual; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = F8A3GH6Q4W; + "DEVELOPMENT_TEAM[sdk=iphoneos*]" = F8A3GH6Q4W; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = RTCubeReplayExtension/Info.plist; + INFOPLIST_KEY_CFBundleDisplayName = TRTC; + INFOPLIST_KEY_NSHumanReadableCopyright = ""; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@executable_path/../../Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.aby.livekit.demo.replay; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = "All-In-One-APP"; + "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "All-In-One-APP"; + SKIP_INSTALL = YES; + SWIFT_EMIT_LOC_STRINGS = YES; + TARGETED_DEVICE_FAMILY = 1; + }; + name = Debug; + }; + G9LR0002 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = G2LRXCC2 /* Pods-RTCubeLabReplayExtension.release.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = "iPhone Developer"; + CODE_SIGN_STYLE = Manual; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = F8A3GH6Q4W; + "DEVELOPMENT_TEAM[sdk=iphoneos*]" = F8A3GH6Q4W; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = RTCubeReplayExtension/Info.plist; + INFOPLIST_KEY_CFBundleDisplayName = TRTC; + INFOPLIST_KEY_NSHumanReadableCopyright = ""; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@executable_path/../../Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.aby.livekit.demo.replay; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = "All-In-One-APP"; + "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "All-In-One-APP"; + SKIP_INSTALL = YES; + SWIFT_EMIT_LOC_STRINGS = YES; + TARGETED_DEVICE_FAMILY = 1; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + A7000001 /* Build configuration list for PBXProject "RTCube" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A9000001 /* Debug */, + A9000002 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + D7000003 /* Build configuration list for PBXNativeTarget "RTCubeLab" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + D9000003 /* Debug */, + D9000004 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + G7LR0001 /* Build configuration list for PBXNativeTarget "RTCubeLabReplayExtension" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + G9LR0001 /* Debug */, + G9LR0002 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = A8000001 /* Project object */; +} diff --git a/application/App-UIKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/application/RTCube.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 100% rename from application/App-UIKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to application/RTCube.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/application/RTCube.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/application/RTCube.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 00000000..18d98100 --- /dev/null +++ b/application/RTCube.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/application/RTCube.xcodeproj/xcshareddata/xcschemes/RTCubeLab.xcscheme b/application/RTCube.xcodeproj/xcshareddata/xcschemes/RTCubeLab.xcscheme new file mode 100644 index 00000000..382b2130 --- /dev/null +++ b/application/RTCube.xcodeproj/xcshareddata/xcschemes/RTCubeLab.xcscheme @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/application/RTCube.xcodeproj/xcuserdata/gg.xcuserdatad/xcschemes/xcschememanagement.plist b/application/RTCube.xcodeproj/xcuserdata/gg.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 00000000..9a2f18d5 --- /dev/null +++ b/application/RTCube.xcodeproj/xcuserdata/gg.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,19 @@ + + + + + SchemeUserState + + RTCubeLab.xcscheme_^#shared#^_ + + orderHint + 0 + + RTCubeLabReplayExtension.xcscheme_^#shared#^_ + + orderHint + 36 + + + + diff --git a/application/App-UIKit.xcworkspace/contents.xcworkspacedata b/application/RTCube.xcworkspace/contents.xcworkspacedata similarity index 79% rename from application/App-UIKit.xcworkspace/contents.xcworkspacedata rename to application/RTCube.xcworkspace/contents.xcworkspacedata index 8ee0021b..baf4bb3d 100644 --- a/application/App-UIKit.xcworkspace/contents.xcworkspacedata +++ b/application/RTCube.xcworkspace/contents.xcworkspacedata @@ -2,7 +2,7 @@ + location = "group:RTCube.xcodeproj"> diff --git a/application/RTCube.xcworkspace/xcuserdata/gg.xcuserdatad/UserInterfaceState.xcuserstate b/application/RTCube.xcworkspace/xcuserdata/gg.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 00000000..be5cd764 Binary files /dev/null and b/application/RTCube.xcworkspace/xcuserdata/gg.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/application/RTCube/Analytics/AppAnalytics.swift b/application/RTCube/Analytics/AppAnalytics.swift new file mode 100644 index 00000000..000f01ed --- /dev/null +++ b/application/RTCube/Analytics/AppAnalytics.swift @@ -0,0 +1,26 @@ +// +// AppAnalytics.swift +// RTCube (Open Source) +// + +import Foundation +import UIKit + +public enum AppAnalytics { + public static func start(launchOptions: [UIApplication.LaunchOptionsKey: Any]?) { + // No-op in open source build. + } + + @discardableResult + public static func handleSchemeURL(_ url: URL) -> Bool { + return false + } + + public static func bindUser(_ userId: String) { + // No-op in open source build. + } + + public static func trackMainClick(eventName: String, mainEvent: String, loginType: String) { + // No-op in open source build. + } +} diff --git a/application/RTCube/AppDelegate.swift b/application/RTCube/AppDelegate.swift new file mode 100644 index 00000000..1d89de4d --- /dev/null +++ b/application/RTCube/AppDelegate.swift @@ -0,0 +1,353 @@ +// +// AppDelegate.swift +// RTCube +// + +import AtomicX +#if !OPEN_SOURCE +import Bugly +#endif +import Login +import Network +#if !OPEN_SOURCE +import TCMediaX +import TEBeautyKitWrapper +#endif +import TUICore +import TXLiteAVSDK_Professional +import UIKit +import UserNotifications +#if !OPEN_SOURCE +import XMagic +import YTCommonXMagic +#endif + +@main +class AppDelegate: UIResponder, UIApplicationDelegate { + private var networkMonitor: NWPathMonitor? + + @objc var window: UIWindow? { + for scene in UIApplication.shared.connectedScenes where scene.activationState == .foregroundActive { + guard let windowScene = scene as? UIWindowScene else { continue } + if let keyWindow = windowScene.windows.first(where: { $0.isKeyWindow }) { + return keyWindow + } + if let firstWindow = windowScene.windows.first { + return firstWindow + } + } + for scene in UIApplication.shared.connectedScenes { + if let windowScene = scene as? UIWindowScene, + let w = windowScene.windows.first + { + return w + } + } + return nil + } + + // MARK: - Application Lifecycle + + func application(_ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool + { + #if DEBUG + setenv("METAL_DEVICE_WRAPPER_TYPE", "1", 1) + #endif + + syncAppLanguageToTUIGlobalization() + + ThemeStore.shared.setMode(.light) + + AppLifecycleRegistry.shared.applicationDidFinishLaunching(application) + + setupLicence() + startNetworkMonitorForLicence() + + registerPushLifecycleHandler() + registerRemoteNotifications(with: application) + + setupIMListeners() + + #if !OPEN_SOURCE + registerBuglyIfNeeded() + #endif + + registerAnalytics(with: launchOptions) + + setupNavigationBarAppearance() + + return true + } + + // MARK: - Orientation Control + + static var allowedOrientations: UIInterfaceOrientationMask = .portrait + + func application(_ application: UIApplication, + supportedInterfaceOrientationsFor window: UIWindow?) -> UIInterfaceOrientationMask + { + return AppDelegate.allowedOrientations + } + + // MARK: - UISceneSession Lifecycle + + func application(_ application: UIApplication, + configurationForConnecting connectingSceneSession: UISceneSession, + options: UIScene.ConnectionOptions) -> UISceneConfiguration + { + return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) + } + + func application(_ application: UIApplication, + didDiscardSceneSessions sceneSessions: Set) {} + + // MARK: - URL Handling + + func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey: Any] = [:]) -> Bool { + if AppLifecycleRegistry.shared.handleOpenURL(url, options: options) { + return true + } + #if !DEBUG + if AppAnalytics.handleSchemeURL(url) { + return true + } + #endif + return false + } + + func application(_ application: UIApplication, handleOpen url: URL) -> Bool { + return AppLifecycleRegistry.shared.handleOpenURL(url) + } +} + +extension AppDelegate { + func syncAppLanguageToTUIGlobalization() { + guard let appLanguage = Bundle.main.preferredLocalizations.first else { return } + let tuiLanguage: String + if appLanguage.hasPrefix("zh") { + if appLanguage.contains("Hant") || appLanguage.contains("TW") || appLanguage.contains("HK") { + tuiLanguage = "zh-Hant" + } else { + tuiLanguage = "zh-Hans" + } + } else if appLanguage.hasPrefix("ar") { + tuiLanguage = "ar" + } else { + tuiLanguage = "en" + } + TUIGlobalization.setPreferredLanguage(tuiLanguage) + } +} + +extension AppDelegate { + /// + /// - `TXLiveBase.setLicenceURL(LICENSEURL, key: LICENSEURLKEY)` + /// - `TXUGCBase.setLicenceURL(LICENSEURL_SHORTVIDEO, key: LICENSEKEY_SHORTVIDEO)` + /// + private func setupLicence() { + #if !OPEN_SOURCE + V2TXLivePremier.setLicence(LIVE_LICENSE_URL, key: LIVE_LICENSE_KEY) + TXLiveBase.setLicenceURL(LIVE_LICENSE_URL, key: LIVE_LICENSE_KEY) + TXUGCBase.setLicenceURL(TENCENT_EFFECT_LICENSE_URL, key: TENCENT_EFFECT_LICENSE_KEY) +// TUIBeautyKit.initialize(licenseUrl: TENCENT_EFFECT_LICENSE_URL, +// licenseKey: TENCENT_EFFECT_LICENSE_KEY, +// beautyLevel: .S1_07) + TCMediaXBase.getInstance().setDelegate(self) + TCMediaXBase.getInstance().setLicenceURL(TENCENT_EFFECT_LICENSE_URL, key: TENCENT_EFFECT_LICENSE_KEY) + #endif + } + + private func startNetworkMonitorForLicence() { + networkMonitor = NWPathMonitor() + let queue = DispatchQueue(label: "com.rtcube.NetworkMonitor") + networkMonitor?.pathUpdateHandler = { path in + if path.status == .satisfied { + DispatchQueue.main.async { + #if !OPEN_SOURCE + V2TXLivePremier.setLicence(LIVE_LICENSE_URL, key: LIVE_LICENSE_KEY) + TELicenseCheck.setTELicense(TENCENT_EFFECT_LICENSE_URL, key: TENCENT_EFFECT_LICENSE_KEY) { _, _ in } + #endif + } + } + } + networkMonitor?.start(queue: queue) + } +} + +extension AppDelegate { + private func registerPushLifecycleHandler() { + PushLifecycleHandler.shared.businessID = PUSH_BUSINESS_ID + AppLifecycleRegistry.shared.register(PushLifecycleHandler.shared) + } + + private func registerRemoteNotifications(with application: UIApplication) { + let notificationCenter = UNUserNotificationCenter.current() + notificationCenter.requestAuthorization(options: [.alert, .badge, .sound]) { isGranted, error in + DispatchQueue.main.async { + if error == nil, isGranted { + AppLogger.App.info(" 用户允许了推送权限") + } else { + AppLogger.App.info(" 用户拒绝了推送权限") + } + } + } + application.registerForRemoteNotifications() + } + + func application(_ application: UIApplication, + didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) + { + AppLogger.App.info(" didRegisterForRemoteNotificationsWithDeviceToken success") + AppLifecycleRegistry.shared.applicationDidRegisterForRemoteNotifications(deviceToken: deviceToken) + } + + func application(_ application: UIApplication, + didFailToRegisterForRemoteNotificationsWithError error: Error) + { + AppLogger.App.info(" didFailToRegisterForRemoteNotificationsWithError: \(error)") + } +} + +extension AppDelegate: V2TIMConversationListener, V2TIMAPNSListener { + private func setupIMListeners() { + V2TIMManager.sharedInstance().setAPNSListener(apnsListener: self) + V2TIMManager.sharedInstance().addConversationListener(listener: self) + } + + // MARK: V2TIMConversationListener + + func onTotalUnreadMessageCountChanged(totalUnreadCount: UInt64) { + } + + // MARK: V2TIMAPNSListener + + func onSetAPPUnreadCount() -> UInt32 { + return 0 + } +} + +extension AppDelegate { + func clearAllNotifications() { + UNUserNotificationCenter.current().removeAllDeliveredNotifications() + UNUserNotificationCenter.current().removeAllPendingNotificationRequests() + } +} + +#if !OPEN_SOURCE +extension AppDelegate { + private func registerBuglyIfNeeded() { + #if RTCUBE_LAB || !DEBUG + let buglyConfig = BuglyConfig(appId: BUGLY_APP_ID, appKey: BUGLY_APP_KEY) + #if DEBUG + buglyConfig.debugMode = true + #endif + let userId = TUILogin.getUserID() ?? "" + buglyConfig.userIdentifier = userId + Bugly.start(with: buglyConfig) + #endif + } + + func updateBuglyUserIdentifier(_ userId: String) { + #if RTCUBE_LAB || !DEBUG + Bugly.updateUserIdentifier(userId) + #endif + } +} +#endif + +extension AppDelegate { + private func registerAnalytics(with launchOptions: [UIApplication.LaunchOptionsKey: Any]?) { + #if !DEBUG + AppAnalytics.start(launchOptions: launchOptions) + #endif + } +} + +extension AppDelegate { + private func setupNavigationBarAppearance() { + let tokens = ThemeStore.shared + let appearance = UINavigationBarAppearance() + appearance.backgroundColor = tokens.colorTokens.bgColorTopBar + appearance.shadowImage = UIImage() + appearance.shadowColor = nil + appearance.titleTextAttributes = [ + .font: tokens.typographyTokens.Regular18, + .foregroundColor: tokens.colorTokens.textColorPrimary, + ] + UINavigationBar.appearance().standardAppearance = appearance + UINavigationBar.appearance().scrollEdgeAppearance = appearance + } +} + +extension AppDelegate { + func checkAppUpdateVersion() { + #if !DEBUG || !RTCUBE_LAB + checkStoreVersion(appID: APP_STORE_ID) + #endif + } + + private func checkStoreVersion(appID: String) { + let urlStr = "https://itunes.apple.com/cn/lookup?id=" + appID + guard let url = URL(string: urlStr) else { return } + let request = URLRequest(url: url) + let task = URLSession.shared.dataTask(with: request) { [weak self] data, _, _ in + guard let self = self, let data = data else { return } + guard let json = try? JSONSerialization.jsonObject(with: data) as? [String: Any], + let results = json["results"] as? [[String: Any]], + let appInfo = results.first, + let storeVersion = appInfo["version"] as? String else { return } + AppLogger.App.info(" App Store version: \(storeVersion)") + if self.isStoreVersionNewer(storeVersion) { + DispatchQueue.main.async { + self.showUpdateAlert(appID: appID) + } + } + } + task.resume() + } + + private func isStoreVersionNewer(_ storeVersion: String) -> Bool { + let currentVersion = Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as? String ?? "" + AppLogger.App.info(" Current version: \(currentVersion)") + return storeVersion.compare(currentVersion, options: .numeric) == .orderedDescending + } + + private func showUpdateAlert(appID: String) { + let title = MainLocalize("Demo.TRTC.Home.prompt") + let message = MainLocalize("Demo.TRTC.Home.newversionpublic") + let alert = UIAlertController(title: title, message: message, preferredStyle: .alert) + + let updateAction = UIAlertAction(title: MainLocalize("Demo.TRTC.Home.updatenow"), style: .default) { [weak self] _ in + self?.openAppStore(appID: appID) + } + let laterAction = UIAlertAction(title: MainLocalize("Demo.TRTC.Home.later"), style: .cancel) + + alert.addAction(updateAction) + alert.addAction(laterAction) + + if let windowScene = UIApplication.shared.connectedScenes.first as? UIWindowScene, + let keyWindow = windowScene.windows.first(where: { $0.isKeyWindow }), + let rootVC = keyWindow.rootViewController + { + rootVC.present(alert, animated: true) + } + } + + private func openAppStore(appID: String) { + guard let url = URL(string: "https://itunes.apple.com/us/app/id\(appID)?ls=1&mt=8") else { return } + UIApplication.shared.open(url) + } +} + +#if !OPEN_SOURCE +extension AppDelegate: TCMediaXBaseDelegate { + func onLicenseCheckCallback(_ errcode: Int32, withParam param: [AnyHashable: Any]) { + if errcode == TCMediaXLicenceCheckErrorCode.TMXLicenseCheckOk.rawValue { + debugPrint("Tencent Effect license check success.") + } else { + debugPrint("Tencent Effect license check failed.") + } + } +} +#endif diff --git a/application/App-UIKit/Assets.xcassets/AccentColor.colorset/Contents.json b/application/RTCube/Assets.xcassets/AccentColor.colorset/Contents.json similarity index 100% rename from application/App-UIKit/Assets.xcassets/AccentColor.colorset/Contents.json rename to application/RTCube/Assets.xcassets/AccentColor.colorset/Contents.json diff --git a/application/RTCube/Assets.xcassets/AppIcon.appiconset/Contents.json b/application/RTCube/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 00000000..5e200bee --- /dev/null +++ b/application/RTCube/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,62 @@ +{ + "images": [ + { + "filename": "Icon-Notification@2x.png", + "idiom": "iphone", + "scale": "2x", + "size": "20x20" + }, + { + "filename": "Icon-Notification@3x.png", + "idiom": "iphone", + "scale": "3x", + "size": "20x20" + }, + { + "filename": "Icon-Small@2x.png", + "idiom": "iphone", + "scale": "2x", + "size": "29x29" + }, + { + "filename": "Icon-Small@3x.png", + "idiom": "iphone", + "scale": "3x", + "size": "29x29" + }, + { + "filename": "Icon-Small-40@2x.png", + "idiom": "iphone", + "scale": "2x", + "size": "40x40" + }, + { + "filename": "Icon-Small-40@3x.png", + "idiom": "iphone", + "scale": "3x", + "size": "40x40" + }, + { + "filename": "Icon-60@2x.png", + "idiom": "iphone", + "scale": "2x", + "size": "60x60" + }, + { + "filename": "Icon-60@3x.png", + "idiom": "iphone", + "scale": "3x", + "size": "60x60" + }, + { + "filename": "icon.png", + "idiom": "ios-marketing", + "scale": "1x", + "size": "1024x1024" + } + ], + "info": { + "author": "xcode", + "version": 1 + } +} diff --git a/application/App-UIKit/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png b/application/RTCube/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png similarity index 100% rename from application/App-UIKit/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png rename to application/RTCube/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png diff --git a/application/App-UIKit/Assets.xcassets/AppIcon.appiconset/Icon-60@3x.png b/application/RTCube/Assets.xcassets/AppIcon.appiconset/Icon-60@3x.png similarity index 100% rename from application/App-UIKit/Assets.xcassets/AppIcon.appiconset/Icon-60@3x.png rename to application/RTCube/Assets.xcassets/AppIcon.appiconset/Icon-60@3x.png diff --git a/application/App-UIKit/Assets.xcassets/AppIcon.appiconset/Icon-Notification@2x.png b/application/RTCube/Assets.xcassets/AppIcon.appiconset/Icon-Notification@2x.png similarity index 100% rename from application/App-UIKit/Assets.xcassets/AppIcon.appiconset/Icon-Notification@2x.png rename to application/RTCube/Assets.xcassets/AppIcon.appiconset/Icon-Notification@2x.png diff --git a/application/App-UIKit/Assets.xcassets/AppIcon.appiconset/Icon-Notification@3x.png b/application/RTCube/Assets.xcassets/AppIcon.appiconset/Icon-Notification@3x.png similarity index 100% rename from application/App-UIKit/Assets.xcassets/AppIcon.appiconset/Icon-Notification@3x.png rename to application/RTCube/Assets.xcassets/AppIcon.appiconset/Icon-Notification@3x.png diff --git a/application/App-UIKit/Assets.xcassets/AppIcon.appiconset/Icon-Small-40@2x.png b/application/RTCube/Assets.xcassets/AppIcon.appiconset/Icon-Small-40@2x.png similarity index 100% rename from application/App-UIKit/Assets.xcassets/AppIcon.appiconset/Icon-Small-40@2x.png rename to application/RTCube/Assets.xcassets/AppIcon.appiconset/Icon-Small-40@2x.png diff --git a/application/App-UIKit/Assets.xcassets/AppIcon.appiconset/Icon-Small-40@3x.png b/application/RTCube/Assets.xcassets/AppIcon.appiconset/Icon-Small-40@3x.png similarity index 100% rename from application/App-UIKit/Assets.xcassets/AppIcon.appiconset/Icon-Small-40@3x.png rename to application/RTCube/Assets.xcassets/AppIcon.appiconset/Icon-Small-40@3x.png diff --git a/application/App-UIKit/Assets.xcassets/AppIcon.appiconset/Icon-Small@2x.png b/application/RTCube/Assets.xcassets/AppIcon.appiconset/Icon-Small@2x.png similarity index 100% rename from application/App-UIKit/Assets.xcassets/AppIcon.appiconset/Icon-Small@2x.png rename to application/RTCube/Assets.xcassets/AppIcon.appiconset/Icon-Small@2x.png diff --git a/application/App-UIKit/Assets.xcassets/AppIcon.appiconset/Icon-Small@3x.png b/application/RTCube/Assets.xcassets/AppIcon.appiconset/Icon-Small@3x.png similarity index 100% rename from application/App-UIKit/Assets.xcassets/AppIcon.appiconset/Icon-Small@3x.png rename to application/RTCube/Assets.xcassets/AppIcon.appiconset/Icon-Small@3x.png diff --git a/application/App-UIKit/Assets.xcassets/AppIcon.appiconset/icon.png b/application/RTCube/Assets.xcassets/AppIcon.appiconset/icon.png similarity index 100% rename from application/App-UIKit/Assets.xcassets/AppIcon.appiconset/icon.png rename to application/RTCube/Assets.xcassets/AppIcon.appiconset/icon.png diff --git a/application/RTCube/Assets.xcassets/AppIconTencentRTC.appiconset/1024_1024.png b/application/RTCube/Assets.xcassets/AppIconTencentRTC.appiconset/1024_1024.png new file mode 100644 index 00000000..f31ddd89 Binary files /dev/null and b/application/RTCube/Assets.xcassets/AppIconTencentRTC.appiconset/1024_1024.png differ diff --git a/application/RTCube/Assets.xcassets/AppIconTencentRTC.appiconset/Contents.json b/application/RTCube/Assets.xcassets/AppIconTencentRTC.appiconset/Contents.json new file mode 100644 index 00000000..f803f451 --- /dev/null +++ b/application/RTCube/Assets.xcassets/AppIconTencentRTC.appiconset/Contents.json @@ -0,0 +1,14 @@ +{ + "images": [ + { + "filename": "1024_1024.png", + "idiom": "universal", + "platform": "ios", + "size": "1024x1024" + } + ], + "info": { + "author": "xcode", + "version": 1 + } +} diff --git a/application/App-UIKit/Assets.xcassets/Contents.json b/application/RTCube/Assets.xcassets/Contents.json similarity index 100% rename from application/App-UIKit/Assets.xcassets/Contents.json rename to application/RTCube/Assets.xcassets/Contents.json diff --git a/application/RTCube/EnvironmentOperation.swift b/application/RTCube/EnvironmentOperation.swift new file mode 100644 index 00000000..830b46c1 --- /dev/null +++ b/application/RTCube/EnvironmentOperation.swift @@ -0,0 +1,56 @@ +// +// File.swift +// RTCubeLab +// +// Created by gg on 2026/3/31. +// + +import ImSDK_Plus +import RTCRoomEngine +import TXLiteAVSDK_Professional + +enum EnvironmentOperation { + static func switchEnvironment(testEnv: Bool) { + switchIMEnvironment(enableTest: testEnv) + setNetEnv(isTestEnv: testEnv) + } + + private static func switchIMEnvironment(enableTest: Bool) { + var jsonObject = [String: Any]() + jsonObject["api"] = "setTestEnvironment" + var params = [String: Any]() + params["enableRoomTestEnv"] = enableTest + jsonObject["params"] = params + + if let jsonData = try? JSONSerialization.data(withJSONObject: jsonObject, options: []), + let jsonString = String(data: jsonData, encoding: .utf8) + { + TUIRoomEngine.sharedInstance().callExperimentalAPI(jsonStr: jsonString) { _ in } + } + + V2TIMManager.sharedInstance().callExperimentalAPI( + api: "setTestEnvironment", + param: NSNumber(value: enableTest) + ) { _ in } fail: { _, _ in } + } + + private static func setNetEnv(isTestEnv: Bool) { + let setNetEnv: [String: Any] = [ + "api": "setNetEnv", + "params": [ + "env": isTestEnv ? 1 : 0, + ], + ] + callExperimentalAPI(json: setNetEnv) + } + + @discardableResult + private static func callExperimentalAPI(json: [String: Any]) -> String? { + if let jsonData = try? JSONSerialization.data(withJSONObject: json, options: []), + let jsonString = String(data: jsonData, encoding: .utf8) + { + return TRTCCloud.sharedInstance().callExperimentalAPI(jsonString) + } + return nil + } +} diff --git a/application/RTCube/Extension/CGFloat+Extension.swift b/application/RTCube/Extension/CGFloat+Extension.swift new file mode 100644 index 00000000..c1bdfe09 --- /dev/null +++ b/application/RTCube/Extension/CGFloat+Extension.swift @@ -0,0 +1,21 @@ +// +// CGFloat+Extension.swift +// RTCube +// + +import UIKit + +let screenWidth = UIScreen.main.bounds.width +let screenHeight = UIScreen.main.bounds.height + +extension CGFloat { + func scale375() -> CGFloat { + return self * UIScreen.main.bounds.width / 375.0 + } + func scale375Width() -> CGFloat { + return scale375() + } + func scale375Height() -> CGFloat { + return self * UIScreen.main.bounds.height / 812.0 + } +} diff --git a/application/RTCube/Extension/Double+Extension.swift b/application/RTCube/Extension/Double+Extension.swift new file mode 100644 index 00000000..d2dd9cb2 --- /dev/null +++ b/application/RTCube/Extension/Double+Extension.swift @@ -0,0 +1,18 @@ +// +// Double+Extension.swift +// RTCube +// + +import UIKit + +extension Double { + func scale375() -> CGFloat { + return CGFloat(self).scale375() + } + func scale375Width() -> CGFloat { + return CGFloat(self).scale375Width() + } + func scale375Height() -> CGFloat { + return CGFloat(self).scale375Height() + } +} diff --git a/application/RTCube/Extension/Int+Extension.swift b/application/RTCube/Extension/Int+Extension.swift new file mode 100644 index 00000000..7acd0ac6 --- /dev/null +++ b/application/RTCube/Extension/Int+Extension.swift @@ -0,0 +1,18 @@ +// +// Int+Extension.swift +// RTCube +// + +import UIKit + +extension Int { + func scale375() -> CGFloat { + return CGFloat(self).scale375() + } + func scale375Width() -> CGFloat { + return CGFloat(self).scale375Width() + } + func scale375Height() -> CGFloat { + return CGFloat(self).scale375Height() + } +} diff --git a/application/RTCube/Extension/LayoutDefine.swift b/application/RTCube/Extension/LayoutDefine.swift new file mode 100644 index 00000000..6bf8039f --- /dev/null +++ b/application/RTCube/Extension/LayoutDefine.swift @@ -0,0 +1,66 @@ +// +// LayoutDefine.swift +// login +// + +import UIKit + +let ScreenWidth = UIScreen.main.bounds.width +let ScreenHeight = UIScreen.main.bounds.height + +let kDeviceIsIphoneX: Bool = { + if UIDevice.current.userInterfaceIdiom == .pad { + return false + } + let size = UIScreen.main.bounds.size + let notchValue = Int(size.width / size.height * 100) + if notchValue == 216 || notchValue == 46 { + return true + } + return false +}() + +let kDeviceSafeTopHeight: CGFloat = { + if kDeviceIsIphoneX { + return 44 + } else { + return 20 + } +}() + +let kDeviceSafeBottomHeight: CGFloat = { + if kDeviceIsIphoneX { + return 34 + } else { + return 0 + } +}() + +func convertPixel(w: CGFloat) -> CGFloat { + return w / 375.0 * ScreenWidth +} + +func convertPixel(h: CGFloat) -> CGFloat { + return h / 812.0 * ScreenHeight +} + +func statusBarHeight() -> CGFloat { + var statusBarHeight: CGFloat = 0 + if #available(iOS 13.0, *) { + let scene = UIApplication.shared.connectedScenes.first + guard let windowScene = scene as? UIWindowScene else { return 0 } + guard let statusBarManager = windowScene.statusBarManager else { return 0 } + statusBarHeight = statusBarManager.statusBarFrame.height + } else { + statusBarHeight = UIApplication.shared.statusBarFrame.height + } + return statusBarHeight +} + +func navigationBarHeight() -> CGFloat { + return 44.0 +} + +func navigationFullHeight() -> CGFloat { + return statusBarHeight() + navigationBarHeight() +} diff --git a/application/RTCube/Extension/PushLifecycleHandler.swift b/application/RTCube/Extension/PushLifecycleHandler.swift new file mode 100644 index 00000000..e2fc1331 --- /dev/null +++ b/application/RTCube/Extension/PushLifecycleHandler.swift @@ -0,0 +1,36 @@ +// +// PushLifecycleHandler.swift +// RTCube +// + +import ImSDK_Plus +import Login + +public final class PushLifecycleHandler: NSObject, AppLifecycleHandler { + public static let shared = PushLifecycleHandler() + private override init() {} + + public var businessID: Int32 = 0 + + private var deviceToken: Data? + + // MARK: - AppLifecycleHandler + + public func applicationDidRegisterForRemoteNotifications(deviceToken: Data) { + self.deviceToken = deviceToken + } + + public func reportDeviceToken() { + guard let deviceToken = deviceToken else { return } + + let config = V2TIMAPNSConfig() + config.token = deviceToken + config.businessID = businessID + + V2TIMManager.sharedInstance().setAPNS(config: config, succ: { + debugPrint("setAPNS success") + }, fail: { code, message in + debugPrint("setAPNS failed, code: \(code), message: \(message ?? "")") + }) + } +} diff --git a/application/RTCube/Info.plist b/application/RTCube/Info.plist new file mode 100644 index 00000000..b2fa0d0f --- /dev/null +++ b/application/RTCube/Info.plist @@ -0,0 +1,77 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSRequiresIPhoneOS + + NSAppTransportSecurity + + NSAllowsArbitraryLoads + + + NSCameraUsageDescription + 腾讯云音视频需要访问您的相机权限,开启后用于视频互动、视频通话、多人视频通话、多人音视频房间、短视频制作、扫码、会话房间等功能。 + NSMicrophoneUsageDescription + 腾讯云音视频需要访问您的麦克风权限,开启后用于一起合唱、Karaoke、语音聊天室、语音沙龙、视频互动、语音通话、多人语音通话、视频通话、多人视频通话、多人音视频房间、短视频制作、会话聊天等功能,并且开启后录制的视频才会有声音。 + NSPhotoLibraryAddUsageDescription + 腾讯云音视频需要访问您的相册存储权限,开启后才能保存编辑的文件 + NSPhotoLibraryUsageDescription + 腾讯云音视频需要访问您的相册权限,开启后才能编辑、保存视频或者图片文件。 + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + UISceneConfigurations + + UIWindowSceneSessionRoleApplication + + + UISceneConfigurationName + Default Configuration + UISceneDelegateClassName + $(PRODUCT_MODULE_NAME).SceneDelegate + + + + + UIBackgroundModes + + audio + voip + + UILaunchStoryboardName + LaunchScreen + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/application/RTCube/LaunchScreen.storyboard b/application/RTCube/LaunchScreen.storyboard new file mode 100644 index 00000000..8ef04e9b --- /dev/null +++ b/application/RTCube/LaunchScreen.storyboard @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/application/RTCube/Log/AppLogger.swift b/application/RTCube/Log/AppLogger.swift new file mode 100644 index 00000000..9ae35c5b --- /dev/null +++ b/application/RTCube/Log/AppLogger.swift @@ -0,0 +1,22 @@ +// +// AppLogger.swift +// RTCube +// + +import Foundation +import AtomicX + +// MARK: - Loggable + Debug + +extension Loggable { + static func debug(file: String = #file, line: Int = #line, _ messages: String...) { + #if DEBUG + let fileName = (file as NSString).lastPathComponent + debugPrint("[DEBUG][\(moduleName)][\(fileName):\(line)] \(messages.joined())") + #endif + } +} + +enum AppLogger { + enum App: Loggable { static var moduleName: String { "App" } } +} diff --git a/application/RTCube/Log/LogUploadManager.swift b/application/RTCube/Log/LogUploadManager.swift new file mode 100644 index 00000000..19ac24ff --- /dev/null +++ b/application/RTCube/Log/LogUploadManager.swift @@ -0,0 +1,163 @@ +// +// LogUploadManager.swift +// RTCube +// + +import UIKit + +// MARK: - FileModel + +class FileModel { + var fileName: String + var filePath: String + + init(fileName: String, filePath: String) { + self.fileName = fileName + self.filePath = filePath + } +} + +// MARK: - LogUploadManager + +public class LogUploadManager: NSObject { + + public static let sharedInstance: LogUploadManager = { + let instance = LogUploadManager() + if let currentWindow = LogUploadManager.getCurrentWindow() { + currentWindow.addSubview(instance.logUploadView) + } + return instance + }() + + private var fileModelArray: [FileModel] = [] + + // MARK: - Public + + public func startUpload(withSuccessHandler success: (() -> Void)?, + withCancelHandler cancelled: (() -> Void)?) { + showLogUploadView() + + logUploadView.shareHandler = { [weak self] row in + guard let self = self, row < self.fileModelArray.count else { return } + let fileModel = self.fileModelArray[row] + let shareObj = URL(fileURLWithPath: fileModel.filePath) + let activityView = UIActivityViewController(activityItems: [shareObj], applicationActivities: nil) + guard let curVC = LogUploadManager.getCurrentViewController() else { return } + curVC.present(activityView, animated: true) { + self.logUploadView.isHidden = true + success?() + } + } + + logUploadView.cancelHandler = { [weak self] in + guard let self = self else { return } + self.logUploadView.isHidden = true + cancelled?() + } + } + + // MARK: - Private + + private lazy var logUploadView: LogUploadView = { + let uploadView = LogUploadView() + uploadView.frame = CGRect(x: 0, y: 0, width: ScreenWidth, height: ScreenHeight) + uploadView.delegate = self + uploadView.dataSource = self + uploadView.isHidden = true + return uploadView + }() + + private func showLogUploadView() { + var fileArray: [FileModel] = [] + + guard let documentsPath = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true).first else { return } + let logPath = (documentsPath as NSString).appendingPathComponent("log") + + guard let libraryPath = NSSearchPathForDirectoriesInDomains(.libraryDirectory, .userDomainMask, true).first else { return } + let cachePath = (libraryPath as NSString).appendingPathComponent("Caches/com_tencent_imsdk_log") + + let clogFiles = getFilesFromDirectory(atPath: logPath, withExtension: ".clog") + fileArray += clogFiles + + let xlogFiles = getFilesFromDirectory(atPath: logPath, withExtension: ".xlog") + fileArray += xlogFiles + + let imXlogFiles = getFilesFromDirectory(atPath: cachePath, withExtension: ".xlog") + fileArray += imXlogFiles + + fileModelArray = fileArray + logUploadView.reloadAllComponents() + logUploadView.alpha = 0.1 + UIView.animate(withDuration: 0.5) { + self.logUploadView.isHidden = false + self.logUploadView.alpha = 1 + } + } + + private func getFilesFromDirectory(atPath path: String, withExtension fileExtension: String) -> [FileModel] { + let fileManager = FileManager.default + var files: [FileModel] = [] + do { + let contents = try fileManager.contentsOfDirectory(atPath: path) + for fileName in contents where fileName.hasSuffix(fileExtension) { + let filePath = (path as NSString).appendingPathComponent(fileName) + files.append(FileModel(fileName: fileName, filePath: filePath)) + } + } catch { + AppLogger.App.warn(" Error listing directory: \(error.localizedDescription)") + } + return files + } + + private static func getCurrentWindow() -> UIWindow? { + if #available(iOS 13.0, *) { + return UIApplication.shared.connectedScenes + .compactMap { $0 as? UIWindowScene } + .flatMap { $0.windows } + .first { $0.isKeyWindow } + } else { + return UIApplication.shared.keyWindow + } + } + + private static func getCurrentViewController() -> UIViewController? { + guard let rootVC = getCurrentWindow()?.rootViewController else { return nil } + return topViewController(of: rootVC) + } + + private static func topViewController(of viewController: UIViewController) -> UIViewController { + if let nav = viewController as? UINavigationController, + let visibleVC = nav.visibleViewController { + return topViewController(of: visibleVC) + } + if let tab = viewController as? UITabBarController, + let selectedVC = tab.selectedViewController { + return topViewController(of: selectedVC) + } + if let presented = viewController.presentedViewController { + return topViewController(of: presented) + } + return viewController + } +} + +// MARK: - LogUploadViewDataSource + +extension LogUploadManager: LogUploadViewDataSource { + func numberOfComponents(in logUploadView: LogUploadView) -> Int { + return 1 + } + + func logUploadView(_ logUploadView: LogUploadView, numberOfRowsInComponent component: Int) -> Int { + return fileModelArray.count + } +} + +// MARK: - LogUploadViewDelegate + +extension LogUploadManager: LogUploadViewDelegate { + func logUploadView(_ logUploadView: LogUploadView, titleForRow row: Int, forComponent component: Int) -> String? { + guard row < fileModelArray.count else { return nil } + return fileModelArray[row].fileName + } +} diff --git a/application/RTCube/Log/LogUploadView.swift b/application/RTCube/Log/LogUploadView.swift new file mode 100644 index 00000000..5836def1 --- /dev/null +++ b/application/RTCube/Log/LogUploadView.swift @@ -0,0 +1,206 @@ +// +// LogUploadView.swift +// RTCube +// + +import UIKit +import AtomicX +import SnapKit + +// MARK: - LogUploadViewDataSource + +protocol LogUploadViewDataSource: AnyObject { + func numberOfComponents(in logUploadView: LogUploadView) -> Int + func logUploadView(_ logUploadView: LogUploadView, numberOfRowsInComponent component: Int) -> Int +} + +// MARK: - LogUploadViewDelegate + +@objc protocol LogUploadViewDelegate: AnyObject { + @objc optional func logUploadView(_ logUploadView: LogUploadView, didSelectRow row: Int, inComponent component: Int) + @objc optional func logUploadView(_ logUploadView: LogUploadView, titleForRow row: Int, forComponent component: Int) -> String? +} + +// MARK: - LogUploadView + +class LogUploadView: UIView { + + weak var dataSource: LogUploadViewDataSource? + weak var delegate: LogUploadViewDelegate? + + var shareHandler: (_ row: Int) -> Void = { _ in } + var cancelHandler: () -> Void = {} + + // MARK: - Subviews + + private let logPickerView: UIPickerView = { + let pickView = UIPickerView() + return pickView + }() + + private let containerView: UIView = { + let view = UIView(frame: .zero) + view.backgroundColor = ThemeStore.shared.colorTokens.bgColorOperate + return view + }() + + private let shareButton: UIButton = { + let button = UIButton(type: .system) + button.titleLabel?.font = .systemFont(ofSize: 14, weight: .semibold) + button.setTitle(NSLocalizedString("LogUpload.Share", comment: "分享"), for: .normal) + return button + }() + + private let shareLogTitle: UILabel = { + let label = UILabel() + label.text = NSLocalizedString("LogUpload.ShareLog", comment: "分享日志") + label.font = .systemFont(ofSize: 14, weight: .medium) + return label + }() + + private let cancelButton: UIButton = { + let button = UIButton(type: .system) + button.setTitle(NSLocalizedString("LogUpload.Cancel", comment: "取消"), for: .normal) + button.titleLabel?.font = .systemFont(ofSize: 14, weight: .semibold) + return button + }() + + private let backButton: UIButton = { + let button = UIButton(type: .system) + return button + }() + + // MARK: - Init + + init() { + super.init(frame: .zero) + logPickerView.dataSource = self + logPickerView.delegate = self + backgroundColor = UIColor(red: 0, green: 0, blue: 0, alpha: 0.4) + } + + @available(*, unavailable) + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + // MARK: - Layout + + private var isViewReady = false + + override func didMoveToWindow() { + super.didMoveToWindow() + guard !isViewReady else { return } + isViewReady = true + constructViewHierarchy() + activateConstraints() + bindInteraction() + } + + private func constructViewHierarchy() { + addSubview(containerView) + addSubview(backButton) + containerView.addSubview(cancelButton) + containerView.addSubview(shareLogTitle) + containerView.addSubview(shareButton) + containerView.addSubview(logPickerView) + } + + private func activateConstraints() { + let containerHeight = ScreenHeight / 2 + containerView.snp.makeConstraints { make in + make.height.equalTo(containerHeight) + make.bottom.left.right.equalToSuperview() + } + shareLogTitle.snp.makeConstraints { make in + make.centerX.equalToSuperview() + make.centerY.equalTo(cancelButton) + } + backButton.snp.makeConstraints { make in + make.top.left.right.equalToSuperview() + make.bottom.equalTo(containerView.snp.top) + } + logPickerView.snp.makeConstraints { make in + make.top.equalToSuperview().offset(44) + make.bottom.left.right.equalToSuperview() + } + cancelButton.snp.makeConstraints { make in + make.left.equalToSuperview().offset(16) + make.bottom.equalTo(logPickerView.snp.top) + make.top.equalToSuperview() + make.width.equalTo(60) + } + shareButton.snp.makeConstraints { make in + make.right.equalToSuperview().offset(-16) + make.bottom.equalTo(logPickerView.snp.top) + make.top.equalToSuperview() + make.width.equalTo(60) + } + } + + private func bindInteraction() { + shareButton.addTarget(self, action: #selector(shareButtonClicked), for: .touchUpInside) + cancelButton.addTarget(self, action: #selector(cancelButtonClicked), for: .touchUpInside) + backButton.addTarget(self, action: #selector(cancelButtonClicked), for: .touchUpInside) + } + + // MARK: - Public + + func reloadAllComponents() { + logPickerView.reloadAllComponents() + } + + func reloadComponent(in row: Int) { + logPickerView.reloadComponent(row) + } +} + +// MARK: - UIPickerViewDataSource + +extension LogUploadView: UIPickerViewDataSource { + func numberOfComponents(in pickerView: UIPickerView) -> Int { + return dataSource?.numberOfComponents(in: self) ?? 0 + } + + func pickerView(_ pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int { + return dataSource?.logUploadView(self, numberOfRowsInComponent: component) ?? 0 + } +} + +// MARK: - UIPickerViewDelegate + +extension LogUploadView: UIPickerViewDelegate { + func pickerView(_ pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int) { + delegate?.logUploadView?(self, didSelectRow: row, inComponent: component) + } + + func pickerView(_ pickerView: UIPickerView, titleForRow row: Int, forComponent component: Int) -> String? { + return delegate?.logUploadView?(self, titleForRow: row, forComponent: component) + } + + func pickerView(_ pickerView: UIPickerView, + viewForRow row: Int, + forComponent component: Int, + reusing view: UIView?) -> UIView { + let label = (view as? UILabel) ?? UILabel() + label.textAlignment = .center + label.font = .systemFont(ofSize: 16) + label.textColor = ThemeStore.shared.colorTokens.textColorPrimary + label.text = delegate?.logUploadView?(self, titleForRow: row, forComponent: component) + label.adjustsFontSizeToFitWidth = true + label.minimumScaleFactor = 0.6 + return label + } +} + +// MARK: - Actions + +extension LogUploadView { + @objc private func shareButtonClicked() { + shareHandler(logPickerView.selectedRow(inComponent: 0)) + } + + @objc private func cancelButtonClicked() { + cancelHandler() + } +} diff --git a/application/RTCube/Privacy.plist b/application/RTCube/Privacy.plist new file mode 100644 index 00000000..e2dcd832 --- /dev/null +++ b/application/RTCube/Privacy.plist @@ -0,0 +1,91 @@ + + + + + privacySummaryURL + https://privacy.qq.com/document/preview/55d060f5059945dcb49ac844edc93889 + privacyURL + https://privacy.qq.com/document/preview/5f422b2fed97475dbfbb9a38aaf00fd9 + userProtocolURL + https://rule.tencent.com/rule/preview/2b809db2-e870-4f20-8443-d319fdfb6a12 + dataCollectionURL + https://privacy.qq.com/document/preview/d1b6939dc49d4e83b084dbdfe1f2cdda + thirdShareURL + https://privacy.qq.com/document/preview/10d30e3998d440629a8cdf5d95efae39 + version + 0 + dataCollection + + + type + avatar + desc + 用于完成注册及使用腾讯云音视频功能 + desc_en + For registration and using Tencent Cloud Media Services features + + + type + name + desc + 用于完成注册及使用腾讯云音视频功能 + desc_en + For registration and using Tencent Cloud Media Services features + + + type + phone + desc + 用于完成注册、登陆 + desc_en + For registration and login + + + type + email + desc + 用于完成注册、登陆 + desc_en + For registration and login + + + thirdShare + + + name + 腾讯Bugly + company + 深圳市腾讯计算机系统有限公司 + info + APP崩溃堆栈信息、系统名称、系统版本以及使用的软件版本信息 + purpose + 提供App稳定性监控和崩溃问题追踪 + method + 嵌入SDK,相关事件发生时由SDK主动收集传输用户信息 + scene + APP崩溃、卡顿 + privacy + https://privacy.qq.com/document/preview/fc748b3d96224fdb825ea79e132c1a56 + + + personalAuth + + info + + avatar + name + id + phone + email + + auth + + camera + microphone + apns + beauty + photos + + + + diff --git a/application/RTCube/RTCubeApp_AppStoreRelease.entitlements b/application/RTCube/RTCubeApp_AppStoreRelease.entitlements new file mode 100644 index 00000000..903def2a --- /dev/null +++ b/application/RTCube/RTCubeApp_AppStoreRelease.entitlements @@ -0,0 +1,8 @@ + + + + + aps-environment + development + + diff --git a/application/App-UIKit/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/application/RTCube/Resource/LaunchImage@2x.png similarity index 100% rename from application/App-UIKit/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png rename to application/RTCube/Resource/LaunchImage@2x.png diff --git a/application/App-UIKit/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/application/RTCube/Resource/LaunchImage@3x.png similarity index 100% rename from application/App-UIKit/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png rename to application/RTCube/Resource/LaunchImage@3x.png diff --git a/application/App-UIKit/Assets.xcassets/LaunchImage_en.imageset/LaunchImage_en@2x.png b/application/RTCube/Resource/LaunchImage_en@2x.png similarity index 100% rename from application/App-UIKit/Assets.xcassets/LaunchImage_en.imageset/LaunchImage_en@2x.png rename to application/RTCube/Resource/LaunchImage_en@2x.png diff --git a/application/App-UIKit/Assets.xcassets/LaunchImage_en.imageset/LaunchImage_en@3x.png b/application/RTCube/Resource/LaunchImage_en@3x.png similarity index 100% rename from application/App-UIKit/Assets.xcassets/LaunchImage_en.imageset/LaunchImage_en@3x.png rename to application/RTCube/Resource/LaunchImage_en@3x.png diff --git a/application/RTCube/Resource/Localized/en.lproj/Localizable.strings b/application/RTCube/Resource/Localized/en.lproj/Localizable.strings new file mode 100644 index 00000000..be2a2904 --- /dev/null +++ b/application/RTCube/Resource/Localized/en.lproj/Localizable.strings @@ -0,0 +1,10 @@ +/* + Localizable.strings + RTCube + + Migrated from iOS/Basic/Business/BusinessService/Source/Common/Resource/Localized/en.lproj/BussnessCommonLocalized.strings +*/ + +"LogUpload.ShareLog" = "Share and Upload Logs"; +"LogUpload.Share" = "share"; +"LogUpload.Cancel" = "cancel"; diff --git a/application/RTCube/Resource/Localized/zh-Hans.lproj/Localizable.strings b/application/RTCube/Resource/Localized/zh-Hans.lproj/Localizable.strings new file mode 100644 index 00000000..b87a78c7 --- /dev/null +++ b/application/RTCube/Resource/Localized/zh-Hans.lproj/Localizable.strings @@ -0,0 +1,10 @@ +/* + Localizable.strings + RTCube + + 从 iOS/Basic/Business/BusinessService/Source/Common/Resource/Localized/zh-Hans.lproj/BussnessCommonLocalized.strings 迁移 +*/ + +"LogUpload.ShareLog" = "分享上传日志"; +"LogUpload.Share" = "分享"; +"LogUpload.Cancel" = "取消"; diff --git a/application/RTCube/Resource/TencentRTCLaunchImage@2x.png b/application/RTCube/Resource/TencentRTCLaunchImage@2x.png new file mode 100644 index 00000000..76f1bb10 Binary files /dev/null and b/application/RTCube/Resource/TencentRTCLaunchImage@2x.png differ diff --git a/application/RTCube/Resource/TencentRTCLaunchImage@3x.png b/application/RTCube/Resource/TencentRTCLaunchImage@3x.png new file mode 100644 index 00000000..a35414b9 Binary files /dev/null and b/application/RTCube/Resource/TencentRTCLaunchImage@3x.png differ diff --git a/application/RTCube/SceneDelegate.swift b/application/RTCube/SceneDelegate.swift new file mode 100644 index 00000000..06e3932e --- /dev/null +++ b/application/RTCube/SceneDelegate.swift @@ -0,0 +1,151 @@ +// +// SceneDelegate.swift +// RTCube / TencentRTC / RTCubeLab +// + +import AtomicX +import Login +import UIKit + +class SceneDelegate: UIResponder, UIWindowSceneDelegate { + var window: UIWindow? + private var loginVC: UIViewController? + + func scene(_ scene: UIScene, + willConnectTo session: UISceneSession, + options connectionOptions: UIScene.ConnectionOptions) + { + guard let windowScene = (scene as? UIWindowScene) else { return } + window = UIWindow(windowScene: windowScene) + + #if RTCUBE_OVERSEAS + let rootVC = OverseasHomeViewController() + #else + let rootVC = EntranceViewController() + #endif + let navController = UINavigationController(rootViewController: rootVC) + window?.rootViewController = navController + window?.makeKeyAndVisible() + + initializeLoginModule() + showLogin(animated: false) + } + + func sceneDidDisconnect(_ scene: UIScene) {} + func sceneDidBecomeActive(_ scene: UIScene) {} + func sceneWillResignActive(_ scene: UIScene) {} + + func sceneWillEnterForeground(_ scene: UIScene) { + ThemeStore.shared.refreshSystemThemeIfNeeded() + + if let appDelegate = UIApplication.shared.delegate as? AppDelegate { + appDelegate.clearAllNotifications() + } + AppLifecycleRegistry.shared.applicationWillEnterForeground(UIApplication.shared) + } + + func sceneDidEnterBackground(_ scene: UIScene) { + AppLifecycleRegistry.shared.applicationDidEnterBackground(UIApplication.shared) + } +} + +extension SceneDelegate { + func showLogin(animated: Bool = true) { + let mode: LoginMode + #if OPEN_SOURCE + mode = .debugAuth + #elseif RTCUBE_LAB + mode = .menu + #elseif RTCUBE_OVERSEAS + mode = .emailVerify + #else + mode = .phoneVerify + #endif + + loginVC = LoginEntry.shared.launch(mode: mode) { [weak self] result in + guard let self = self else { return } + switch result { + case .success(let loginResult): + AppLogger.App.info(" 登录成功: \(loginResult.userModel.userId)") + PushLifecycleHandler.shared.reportDeviceToken() + + let appDelegate = UIApplication.shared.delegate as? AppDelegate + #if !OPEN_SOURCE + appDelegate?.updateBuglyUserIdentifier(loginResult.userModel.userId) + #endif + + AppAnalytics.bindUser(loginResult.userModel.userId) + + if self.loginVC?.presentingViewController != nil { + DispatchQueue.main.asyncAfter(deadline: .now() + 1) { [weak self] in + guard let self = self else { return } + self.loginVC?.dismiss(animated: true) { + guard let appDelegate = UIApplication.shared.delegate as? AppDelegate else { return } + appDelegate.checkAppUpdateVersion() + } + } + } else { + appDelegate?.checkAppUpdateVersion() + } + case .failure(let error): + if case .tokenExpired = error { + guard let loginVC = loginVC else { return } + loginVC.modalPresentationStyle = .fullScreen + window?.rootViewController?.present(loginVC, animated: false) + AppLogger.App.info(" 自动登录失败,拉起登录页面") + } else { + AppLogger.App.info(" 登录失败/取消: \(error)") + } + } + } + loginVC?.modalPresentationStyle = .fullScreen + + if !LoginEntry.shared.hasLoggedIn { + if let loginVC = loginVC { + window?.rootViewController?.present(loginVC, animated: animated) + } + } + } + + private func initializeLoginModule() { + LoginEntry.shared.initialize( + baseUrl: SERVERLESSURL, + testBaseUrl: TEST_SERVERLESSURL, + sdkAppId: SDKAPPID, + secretKey: SECRETKEY, + debugSdkAppId: DEBUG_SDKAPPID, + debugSecretKey: DEBUG_SECRETKEY, + isSetupService: true, + apaasAppId: APAAS_APP_ID, + ioaAppKey: IOAAPPKEY, + ioaAppId: IOAAPPID + ) + + LoginEntry.shared.userSigGenerator = { identifier, sdkAppId, secretKey in + GenerateTestUserSig.genTestUserSig(identifier: identifier, sdkAppId: sdkAppId, secretKey: secretKey) + } + + LoginEntry.shared.privacyLinkHandler = { linkType, viewController in + let pageType: PrivacyPageType + switch linkType { + case "privacy": + pageType = .privacy + case "privacySummary": + pageType = .privacySummary + case "agreement": + pageType = .agreement + default: + return + } + PrivacyEntry.pushPrivacyPage(pageType, from: viewController) + } + + LoginEntry.shared.onEnvironmentChanged = { env in + EnvironmentOperation.switchEnvironment(testEnv: env == .test) + } + + LoginEntry.shared.onPassiveLogout = { [weak self] in + self?.showLogin() + } + } +} diff --git a/application/RTCube/TencentRTCDebug.entitlements b/application/RTCube/TencentRTCDebug.entitlements new file mode 100644 index 00000000..903def2a --- /dev/null +++ b/application/RTCube/TencentRTCDebug.entitlements @@ -0,0 +1,8 @@ + + + + + aps-environment + development + + diff --git a/application/RTCube/TencentRTCLaunchScreen.storyboard b/application/RTCube/TencentRTCLaunchScreen.storyboard new file mode 100644 index 00000000..68d8fefe --- /dev/null +++ b/application/RTCube/TencentRTCLaunchScreen.storyboard @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/application/RTCube/TencentRTCRelease.entitlements b/application/RTCube/TencentRTCRelease.entitlements new file mode 100644 index 00000000..903def2a --- /dev/null +++ b/application/RTCube/TencentRTCRelease.entitlements @@ -0,0 +1,8 @@ + + + + + aps-environment + development + + diff --git a/application/RTCubeReplayExtension/Info.plist b/application/RTCubeReplayExtension/Info.plist new file mode 100644 index 00000000..1e099727 --- /dev/null +++ b/application/RTCubeReplayExtension/Info.plist @@ -0,0 +1,15 @@ + + + + + NSExtension + + NSExtensionPointIdentifier + com.apple.broadcast-services-upload + NSExtensionPrincipalClass + SampleHandler + RPBroadcastProcessMode + RPBroadcastProcessModeSampleBuffer + + + diff --git a/application/RTCubeReplayExtension/Localized/English.lproj/ReplayKitLocalized.strings b/application/RTCubeReplayExtension/Localized/English.lproj/ReplayKitLocalized.strings new file mode 100644 index 00000000..d146cdb7 --- /dev/null +++ b/application/RTCubeReplayExtension/Localized/English.lproj/ReplayKitLocalized.strings @@ -0,0 +1,7 @@ +/* + ReplayKitLocalized.strings + TXLiteAVDemo + + Created by adams on 2021/3/22. + Copyright © 2021 Tencent. All rights reserved. +*/ diff --git a/application/RTCubeReplayExtension/Localized/ReplayKitLocalized.h b/application/RTCubeReplayExtension/Localized/ReplayKitLocalized.h new file mode 100644 index 00000000..b0577cba --- /dev/null +++ b/application/RTCubeReplayExtension/Localized/ReplayKitLocalized.h @@ -0,0 +1,42 @@ +// +// ReplayKitLocalized.h +// TXLiteAVDemo +// +// Created by adams on 2021/3/22. +// Copyright © 2021 Tencent. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN +#pragma mark - Base + +extern NSString *replayKitLocalizeFromTable(NSString *key, NSString *table); +extern NSString *replayKitLocalizeFromTableAndCommon(NSString *key, + NSString *common, + NSString *table); + +#pragma mark - Replace String +extern NSString *replayKitLocalizeReplaceXX(NSString *origin, + NSString *xxx_replace); +extern NSString *replayKitLocalizeReplace(NSString *origin, + NSString *xxx_replace, + NSString *yyy_replace); +extern NSString *replayKitLocalizeReplaceThreeCharacter(NSString *origin, + NSString *xxx_replace, + NSString *yyy_replace, + NSString *zzz_replace); +extern NSString *replayKitLocalizeReplaceFourCharacter(NSString *origin, + NSString *xxx_replace, + NSString *yyy_replace, + NSString *zzz_replace, + NSString *mmm_replace); +extern NSString *replayKitLocalizeReplaceFiveCharacter( + NSString *origin, NSString *xxx_replace, NSString *yyy_replace, + NSString *zzz_replace, NSString *mmm_replace, NSString *nnn_replace); + +#pragma mark - ReplayKit +extern NSString *const replayKit_Localize_TableName; +extern NSString *replayKitLocalize(NSString *key); + +NS_ASSUME_NONNULL_END diff --git a/application/RTCubeReplayExtension/Localized/ReplayKitLocalized.m b/application/RTCubeReplayExtension/Localized/ReplayKitLocalized.m new file mode 100644 index 00000000..a6dc258f --- /dev/null +++ b/application/RTCubeReplayExtension/Localized/ReplayKitLocalized.m @@ -0,0 +1,81 @@ +// +// ReplayKitLocalized.m +// TXLiteAVDemo +// +// Created by adams on 2021/3/22. +// Copyright © 2021 Tencent. All rights reserved. +// + +#import "ReplayKitLocalized.h" + +#pragma mark - Base +NSString *replayKitLocalizeFromTable(NSString *key, NSString *table) { + return [NSBundle.mainBundle localizedStringForKey:key value:@"" table:table]; +} + +NSString *replayKitLocalizeFromTableAndCommon(NSString *key, NSString *common, + NSString *table) { + return replayKitLocalizeFromTable(key, table); +} + +#pragma mark - Replace String +NSString *replayKitLocalizeReplaceXX(NSString *origin, NSString *xxx_replace) { + return [origin stringByReplacingOccurrencesOfString:@"xxx" + withString:xxx_replace]; +} + +NSString *replayKitLocalizeReplace(NSString *origin, NSString *xxx_replace, + NSString *yyy_replace) { + return [[origin stringByReplacingOccurrencesOfString:@"xxx" + withString:xxx_replace] + stringByReplacingOccurrencesOfString:@"yyy" + withString:yyy_replace]; +} + +NSString *replayKitLocalizeReplaceThreeCharacter(NSString *origin, + NSString *xxx_replace, + NSString *yyy_replace, + NSString *zzz_replace) { + return [[[origin stringByReplacingOccurrencesOfString:@"xxx" + withString:xxx_replace] + stringByReplacingOccurrencesOfString:@"yyy" + withString:yyy_replace] + stringByReplacingOccurrencesOfString:@"zzz" + withString:zzz_replace]; +} + +NSString *replayKitLocalizeReplaceFourCharacter(NSString *origin, + NSString *xxx_replace, + NSString *yyy_replace, + NSString *zzz_replace, + NSString *mmm_replace) { + return [[[[origin stringByReplacingOccurrencesOfString:@"xxx" + withString:xxx_replace] + stringByReplacingOccurrencesOfString:@"yyy" + withString:yyy_replace] + stringByReplacingOccurrencesOfString:@"zzz" + withString:zzz_replace] + stringByReplacingOccurrencesOfString:@"mmm" + withString:mmm_replace]; +} + +NSString *replayKitLocalizeReplaceFiveCharacter( + NSString *origin, NSString *xxx_replace, NSString *yyy_replace, + NSString *zzz_replace, NSString *mmm_replace, NSString *nnn_replace) { + return [[[[[origin stringByReplacingOccurrencesOfString:@"xxx" + withString:xxx_replace] + stringByReplacingOccurrencesOfString:@"yyy" + withString:yyy_replace] + stringByReplacingOccurrencesOfString:@"zzz" + withString:zzz_replace] + stringByReplacingOccurrencesOfString:@"mmm" + withString:mmm_replace] + stringByReplacingOccurrencesOfString:@"nnn" + withString:nnn_replace]; +} + +#pragma mark - ReplayKit +NSString *const replayKit_Localize_TableName = @"ReplayKitLocalized"; +NSString *replayKitLocalize(NSString *key) { + return replayKitLocalizeFromTable(key, replayKit_Localize_TableName); +} diff --git a/application/RTCubeReplayExtension/Localized/en.lproj/InfoPlist.strings b/application/RTCubeReplayExtension/Localized/en.lproj/InfoPlist.strings new file mode 100644 index 00000000..e6f468c7 --- /dev/null +++ b/application/RTCubeReplayExtension/Localized/en.lproj/InfoPlist.strings @@ -0,0 +1,9 @@ +/* + InfoPlist.strings + TXLiteAVDemo + + Created by adams on 2021/3/24. + Copyright © 2021 Tencent. All rights reserved. +*/ + +CFBundleDisplayName = "Tencent Cloud Media Services"; diff --git a/application/RTCubeReplayExtension/Localized/en.lproj/ReplayKitLocalized.strings b/application/RTCubeReplayExtension/Localized/en.lproj/ReplayKitLocalized.strings new file mode 100644 index 00000000..ab2f4084 --- /dev/null +++ b/application/RTCubeReplayExtension/Localized/en.lproj/ReplayKitLocalized.strings @@ -0,0 +1,21 @@ +/* + ReplayKitLocalized.strings + TXLiteAVDemo + + Created by adams on 2021/3/22. + Copyright © 2021 Tencent. All rights reserved. +*/ + +"ReplayKitUpload.SampleHandler.tencentcloudpushstream" = "Stream Screen Recording"; +"ReplayKitUpload.SampleHandler.pushstreamstop" = "Push stopped"; +"ReplayKitUpload.SampleHandler.exchangeerror" = "Switch failed"; +"ReplayKitUpload.SampleHandler.replaystart" = "Screen recording has started. Return to Cloud Video Toolkit -> MLVB -> Push (Screen Recording) to set the push URL, page orientation, and definition. "; +"ReplayKitUpload.SampleHandler.replaystop" = "Screen recording paused"; +"ReplayKitUpload.SampleHandler.replayrestored" = "Screen recording resumed"; +"ReplayKitUpload.SampleHandler.replayend" = "Screen recording ended"; +"ReplayKitUpload.SampleHandler.replayfailed" = "Push failed. Please try again."; +"ReplayKitUpload.SampleHandler.connectsuccess" = "Connected. Start pushing."; +"ReplayKitUpload.SampleHandler.networkuplink" = "Insufficient upstream bandwidth"; +"ReplayKitUpload.SampleHandler.screenshareend" = "Screen sharing ended"; +"ReplayKitUpload.SampleHandler.applicationtodisconnect" = "Disconnected"; +"ReplayKitUpload.SampleHandler.integrationerror" = "Integration error (inconsistent SDK version)"; diff --git a/application/RTCubeReplayExtension/Localized/zh-Hans.lproj/InfoPlist.strings b/application/RTCubeReplayExtension/Localized/zh-Hans.lproj/InfoPlist.strings new file mode 100644 index 00000000..f7b305e3 --- /dev/null +++ b/application/RTCubeReplayExtension/Localized/zh-Hans.lproj/InfoPlist.strings @@ -0,0 +1,9 @@ +/* + InfoPlist.strings + TXLiteAVDemo + + Created by adams on 2021/3/24. + Copyright © 2021 Tencent. All rights reserved. +*/ + +CFBundleDisplayName = "腾讯云音视频"; diff --git a/application/RTCubeReplayExtension/Localized/zh-Hans.lproj/ReplayKitLocalized.strings b/application/RTCubeReplayExtension/Localized/zh-Hans.lproj/ReplayKitLocalized.strings new file mode 100644 index 00000000..4a23ad16 --- /dev/null +++ b/application/RTCubeReplayExtension/Localized/zh-Hans.lproj/ReplayKitLocalized.strings @@ -0,0 +1,21 @@ +/* + ReplayKitLocalized.strings + TXLiteAVDemo + + Created by adams on 2021/3/22. + Copyright © 2021 Tencent. All rights reserved. +*/ + +"ReplayKitUpload.SampleHandler.tencentcloudpushstream" = "腾讯云录屏推流"; +"ReplayKitUpload.SampleHandler.pushstreamstop" = "推流已停止"; +"ReplayKitUpload.SampleHandler.exchangeerror" = "切换失败"; +"ReplayKitUpload.SampleHandler.replaystart" = "录屏已开始,请从这里点击回到Demo->直播->录屏推流->设置推流URL与横竖屏和清晰度"; +"ReplayKitUpload.SampleHandler.replaystop" = "录屏已暂停"; +"ReplayKitUpload.SampleHandler.replayrestored" = "录屏已恢复"; +"ReplayKitUpload.SampleHandler.replayend" = "录屏已结束"; +"ReplayKitUpload.SampleHandler.replayfailed" = "推流失败!请换个姿势再来一次"; +"ReplayKitUpload.SampleHandler.connectsuccess" = "连接成功!开始推流"; +"ReplayKitUpload.SampleHandler.networkuplink" = "网络上行带宽不足"; +"ReplayKitUpload.SampleHandler.screenshareend" = "屏幕共享已结束"; +"ReplayKitUpload.SampleHandler.applicationtodisconnect" = "应用断开"; +"ReplayKitUpload.SampleHandler.integrationerror" = "集成错误(SDK 版本号不相符合)"; diff --git a/application/RTCubeReplayExtension/ReplayKit2Define.h b/application/RTCubeReplayExtension/ReplayKit2Define.h new file mode 100644 index 00000000..2a346f7c --- /dev/null +++ b/application/RTCubeReplayExtension/ReplayKit2Define.h @@ -0,0 +1,46 @@ +// +// Replaykit2Define.h +// TXLiteAVDemo +// +// Created by rushanting on 2018/3/26. +// Copyright © 2018年 Tencent. All rights reserved. +// + +#ifndef Replaykit2Define_h +#define Replaykit2Define_h + +#define kReplayKitUseAppGroup 0 +#define kReplayKit2AppGroupId @"group.com.tencent.liteav.RPLiveStreamRelease" +#define kReplayKit2PasteboardName @"group.com.tencent.replaykit2.pasteboard" +#define kReplayKitIPCPort 31753 + +#define kDarvinNotificationNamePushStart CFSTR("Darwin_ReplayKit2_Push_Start") +#define kDarvinNotificaiotnNamePushStop CFSTR("Darwin_ReplayKit2_Push_Stop") +#define kDarvinNotificaiotnNameRotationChange \ + CFSTR("Darwin_ReplayKit2_Rotate_Change") + +#define kCocoaNotificationNameReplayKit2Stop @"Cocoa_ReplayKit2_Stop" + +#define kLocalNotificationTypeKey @"LocalNotificationType" +#define kLocalNotificationTypeReplaykit2 @"LocalNotificationReplaykit2" + +#define kReplayKit2UploadingKey @"replaykit2Uploading" +#define kReplayKit2Uploading @"uploading" +#define kReplayKit2Stop @"stop" + +#define kReplayKit2PushUrlKey @"replaykit2RtmpURL" + +#define kReplayKit2RotateKey @"replaykit2Rotation" +#define kReplayKit2Portrait @"replaykit2Portrait" +#define kReplayKit2Lanscape @"replaykit2Lanscape" + +#define kReplayKit2ResolutionKey @"replaykit2Resolution" +#define kResolutionSD @"SD" +#define kResolutionHD @"HD" +#define kResolutionFHD @"FHD" +#define kDarvinNotificaiotnNameResolutionChange \ + CFSTR("Darwin_ReplayKit2_Resolution_Change") + +#define kReplayKit2UserDefaultRoomidKey @"roomID" + +#endif /* Replaykit2Define_h */ diff --git a/application/RTCubeReplayExtension/SampleHandler.h b/application/RTCubeReplayExtension/SampleHandler.h new file mode 100644 index 00000000..dbcdc6a2 --- /dev/null +++ b/application/RTCubeReplayExtension/SampleHandler.h @@ -0,0 +1,13 @@ +// +// SampleHandler.h +// ReplaykitUpload +// +// Created by annidyfeng on 2018/5/24. +// Copyright © 2018年 Tencent. All rights reserved. +// + +#import + +@interface SampleHandler : RPBroadcastSampleHandler + +@end diff --git a/application/RTCubeReplayExtension/SampleHandler.m b/application/RTCubeReplayExtension/SampleHandler.m new file mode 100644 index 00000000..8eb6a3e6 --- /dev/null +++ b/application/RTCubeReplayExtension/SampleHandler.m @@ -0,0 +1,276 @@ +// +// SampleHandler.m +// ReplayKit2Upload +// +// Created by rushanting on 2018/3/26. +// Copyright © 2018年 Tencent. All rights reserved. +// + +#import "SampleHandler.h" +#import "ReplayKit2Define.h" +#import "ReplayKitLocalized.h" +#import +#import +#import +#import + +static NSString *gRtmpUrl; +static SampleHandler *gDelegate; // retain delegate +static NSString *gResolution; + +@interface SampleHandler () + +@end + +@implementation SampleHandler + +- (instancetype)init { + self = [super init]; + +#if kReplayKitUseAppGroup + + [[NSNotificationCenter defaultCenter] + addObserver:self + selector:@selector(handleReplayKit2PushStopNotification:) + name:@"Cocoa_ReplayKit2_Push_Stop" + object:nil]; + + CFNotificationCenterAddObserver( + CFNotificationCenterGetDarwinNotifyCenter(), + (__bridge const void *)(self), onDarwinReplayKit2PushStart, + kDarvinNotificationNamePushStart, NULL, + CFNotificationSuspensionBehaviorDeliverImmediately); + + CFNotificationCenterAddObserver( + CFNotificationCenterGetDarwinNotifyCenter(), + (__bridge const void *)(self), onDarwinReplayKit2PushStop, + kDarvinNotificaiotnNamePushStop, NULL, + CFNotificationSuspensionBehaviorDeliverImmediately); + + CFNotificationCenterAddObserver( + CFNotificationCenterGetDarwinNotifyCenter(), + (__bridge const void *)(self), onDarwinReplayKit2RotateChange, + kDarvinNotificaiotnNameRotationChange, NULL, + CFNotificationSuspensionBehaviorDeliverImmediately); + CFNotificationCenterAddObserver( + CFNotificationCenterGetDarwinNotifyCenter(), + (__bridge const void *)(self), onDarwinReplayKit2ResolutionChange, + kDarvinNotificaiotnNameResolutionChange, NULL, + CFNotificationSuspensionBehaviorDeliverImmediately); +#else + +#endif + return self; +} + +- (void)dealloc { +#if kReplayKitUseAppGroup + [[NSNotificationCenter defaultCenter] removeObserver:self]; + CFNotificationCenterRemoveObserver( + CFNotificationCenterGetDarwinNotifyCenter(), + (__bridge const void *)(self), kDarvinNotificationNamePushStart, NULL); + CFNotificationCenterRemoveObserver( + CFNotificationCenterGetDarwinNotifyCenter(), + (__bridge const void *)(self), kDarvinNotificaiotnNamePushStop, NULL); + CFNotificationCenterRemoveObserver( + CFNotificationCenterGetDarwinNotifyCenter(), + (__bridge const void *)(self), kDarvinNotificaiotnNameRotationChange, + NULL); + CFNotificationCenterRemoveObserver( + CFNotificationCenterGetDarwinNotifyCenter(), + (__bridge const void *)(self), kDarvinNotificaiotnNameResolutionChange, + NULL); +#endif +} + +static void onDarwinReplayKit2PushStart(CFNotificationCenterRef center, + void *observer, CFStringRef name, + const void *object, + CFDictionaryRef userInfo) { + dispatch_after( + dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * NSEC_PER_SEC)), + dispatch_get_main_queue(), ^{ + [[NSNotificationCenter defaultCenter] + postNotificationName:@"Cocoa_ReplayKit2_Push_Start" + object:nil]; + }); +} + +static void onDarwinReplayKit2PushStop(CFNotificationCenterRef center, + void *observer, CFStringRef name, + const void *object, + CFDictionaryRef userInfo) { + + [[NSNotificationCenter defaultCenter] + postNotificationName:@"Cocoa_ReplayKit2_Push_Stop" + object:nil]; +} + +static void onDarwinReplayKit2RotateChange(CFNotificationCenterRef center, + void *observer, CFStringRef name, + const void *object, + CFDictionaryRef userInfo) { + // 用剪贴板传值会有同步问题,加些延迟去避免。正式应用建议配置appgroup,使用NSUserDefault的方式传值 + dispatch_after( + dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * NSEC_PER_SEC)), + dispatch_get_main_queue(), ^{ + [[NSNotificationCenter defaultCenter] + postNotificationName:@"Cocoa_ReplayKit2_Rotate_Change" + object:nil]; + }); +} + +static void onDarwinReplayKit2ResolutionChange(CFNotificationCenterRef center, + void *observer, CFStringRef name, + const void *object, + CFDictionaryRef userInfo) { + dispatch_after( + dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * NSEC_PER_SEC)), + dispatch_get_main_queue(), ^{ + [[NSNotificationCenter defaultCenter] + postNotificationName:@"Cocoa_ReplayKit2_Resolution_Change" + object:nil]; + }); +} + +- (void)handleReplayKit2PushStopNotification:(NSNotification *)noti { + [self sendLocalNotificationToHostAppWithTitle: + replayKitLocalize( + @"ReplayKitUpload.SampleHandler.tencentcloudpushstream") + msg:replayKitLocalize( + @"ReplayKitUpload." + @"SampleHandler." + @"pushstreamstop") + userInfo:nil]; +} + +- (void)sendLocalNotificationToHostAppWithTitle:(NSString *)title + msg:(NSString *)msg + userInfo:(NSDictionary *)userInfo { + UNUserNotificationCenter *center = + [UNUserNotificationCenter currentNotificationCenter]; + + UNMutableNotificationContent *content = + [[UNMutableNotificationContent alloc] init]; + content.title = [NSString localizedUserNotificationStringForKey:title + arguments:nil]; + content.body = [NSString localizedUserNotificationStringForKey:msg + arguments:nil]; + content.sound = [UNNotificationSound defaultSound]; + content.userInfo = userInfo; + + // 在 设定时间 后推送本地推送 + UNTimeIntervalNotificationTrigger *trigger = + [UNTimeIntervalNotificationTrigger triggerWithTimeInterval:0.1f + repeats:NO]; + + UNNotificationRequest *request = + [UNNotificationRequest requestWithIdentifier:@"ReplayKit2Demo" + content:content + trigger:trigger]; + + // 添加推送成功后的处理! + [center addNotificationRequest:request + withCompletionHandler:^(NSError *_Nullable error){ + + }]; +} + +- (void)broadcastStartedWithSetupInfo: + (NSDictionary *)setupInfo { + [self + sendLocalNotificationToHostAppWithTitle: + replayKitLocalize( + @"ReplayKitUpload.SampleHandler.tencentcloudpushstream") + msg:replayKitLocalize( + @"ReplayKitUpload." + @"SampleHandler.replaystart") + userInfo:@{ + kReplayKit2UploadingKey : + kReplayKit2Uploading + }]; + + [[TXReplayKitExt sharedInstance] setupWithAppGroup:kReplayKit2AppGroupId + delegate:self]; +} + +- (void)broadcastPaused { + // User has requested to pause the broadcast. Samples will stop being + // delivered. + NSLog(@"broadcastPaused"); + + [self sendLocalNotificationToHostAppWithTitle: + replayKitLocalize( + @"ReplayKitUpload.SampleHandler.tencentcloudpushstream") + msg:replayKitLocalize( + @"ReplayKitUpload." + @"SampleHandler.replaystop") + userInfo:nil]; +} + +- (void)broadcastResumed { + // User has requested to resume the broadcast. Samples delivery will resume. + NSLog(@"broadcastResumed"); + + [self sendLocalNotificationToHostAppWithTitle: + replayKitLocalize( + @"ReplayKitUpload.SampleHandler.tencentcloudpushstream") + msg:replayKitLocalize( + @"ReplayKitUpload." + @"SampleHandler." + @"replayrestored") + userInfo:nil]; +} + +- (void)broadcastFinished { + // User has requested to finish the broadcast. + NSLog(@"broadcastFinished"); + [self + sendLocalNotificationToHostAppWithTitle: + replayKitLocalize( + @"ReplayKitUpload.SampleHandler.tencentcloudpushstream") + msg:replayKitLocalize( + @"ReplayKitUpload." + @"SampleHandler.replayend") + userInfo:@{ + kReplayKit2UploadingKey : kReplayKit2Stop + }]; + + [[TXReplayKitExt sharedInstance] broadcastFinished]; +} + +- (void)processSampleBuffer:(CMSampleBufferRef)sampleBuffer + withType:(RPSampleBufferType)sampleBufferType { + @synchronized(self) { + [[TXReplayKitExt sharedInstance] sendSampleBuffer:sampleBuffer + withType:sampleBufferType]; + } +} + +- (void)onNetStatus:(NSDictionary *)param { +} + +#pragma mark - TXReplayKitExtDelegate +- (void)broadcastFinished:(TXReplayKitExt *)broadcast + reason:(TXReplayKitExtReason)reason { + NSString *tip = @""; + switch (reason) { + case TXReplayKitExtReasonRequestedByMain: + tip = replayKitLocalize(@"ReplayKitUpload.SampleHandler.screenshareend"); + break; + case TXReplayKitExtReasonDisconnected: + tip = replayKitLocalize( + @"ReplayKitUpload.SampleHandler.applicationtodisconnect"); + break; + case TXReplayKitExtReasonVersionMismatch: + tip = replayKitLocalize(@"ReplayKitUpload.SampleHandler.integrationerror"); + break; + } + + NSError *error = + [NSError errorWithDomain:NSStringFromClass(self.class) + code:0 + userInfo:@{NSLocalizedFailureReasonErrorKey : tip}]; + [self finishBroadcastWithError:error]; +} +@end diff --git a/application/RTCubeReplayExtension/en.lproj/InfoPlist.strings b/application/RTCubeReplayExtension/en.lproj/InfoPlist.strings new file mode 100644 index 00000000..2ae7c77c --- /dev/null +++ b/application/RTCubeReplayExtension/en.lproj/InfoPlist.strings @@ -0,0 +1,8 @@ +/* + File.strings + TXLiteAVDemo + + Created by adams on 2021/3/24. + Copyright © 2021 Tencent. All rights reserved. +*/ +CFBundleDisplayName = "TCToolkit"; diff --git a/application/RTCubeReplayExtension/zh-Hans.lproj/InfoPlist.strings b/application/RTCubeReplayExtension/zh-Hans.lproj/InfoPlist.strings new file mode 100644 index 00000000..3d5b7f78 --- /dev/null +++ b/application/RTCubeReplayExtension/zh-Hans.lproj/InfoPlist.strings @@ -0,0 +1,8 @@ +/* + File.strings + TXLiteAVDemo + + Created by adams on 2021/3/24. + Copyright © 2021 Tencent. All rights reserved. +*/ +CFBundleDisplayName = "腾讯云工具包"; diff --git a/application/assembly/AppAssembly+CallGuard.swift b/application/assembly/AppAssembly+CallGuard.swift new file mode 100644 index 00000000..e9db585b --- /dev/null +++ b/application/assembly/AppAssembly+CallGuard.swift @@ -0,0 +1,29 @@ +// +// AppAssembly+CallGuard.swift +// AppAssembly +// + +import AtomicXCore +import Toast_Swift +import UIKit + +extension AppAssembly { + + // MARK: - Call Status Guard + + var canStartNewRoom: Bool { + CallStore.shared.state.value.selfInfo.status == .none + } + + func showCannotStartRoomToast() { + guard let window = Self.keyWindow else { return } + window.makeToast(AssemblyLocalize("Demo.TRTC.Common.cannotStartRoomDuringCall")) + } + + private static var keyWindow: UIWindow? { + UIApplication.shared.connectedScenes + .compactMap { $0 as? UIWindowScene } + .flatMap { $0.windows } + .first { $0.isKeyWindow } + } +} diff --git a/application/assembly/AppAssembly.podspec b/application/assembly/AppAssembly.podspec new file mode 100644 index 00000000..91a4ac66 --- /dev/null +++ b/application/assembly/AppAssembly.podspec @@ -0,0 +1,56 @@ +Pod::Spec.new do |spec| + spec.name = 'AppAssembly' + spec.version = '1.0.0' + spec.platform = :ios + spec.ios.deployment_target = '13.0' + spec.license = { :type => 'MIT', :file => 'LICENSE' } + spec.homepage = 'https://cloud.tencent.com/document/product/269/3794' + spec.documentation_url = 'https://cloud.tencent.com/document/product/269/9147' + spec.authors = 'tencent video cloud' + spec.summary = 'RT-Cube App Assembly — 业务模块装配层,提供首页场景列表' + + spec.static_framework = true + spec.xcconfig = { 'VALID_ARCHS' => 'armv7 arm64 x86_64' } + spec.swift_version = '5.0' + + spec.source = { :path => './' } + + spec.dependency 'TUICore' + spec.dependency 'RTCCommon' + spec.dependency 'Alamofire' + spec.dependency 'SnapKit' + spec.dependency 'AtomicX' + spec.dependency 'AtomicXCore' + + # live + spec.dependency 'TUILiveKit' # live + + # call + spec.dependency 'TUICallKit_Swift' # call + spec.dependency 'JXSegmentedView', '1.3.0' # call + spec.dependency 'JXPagingView/Paging', '2.1.2' # call + spec.dependency 'Toast-Swift' # call + + # room + spec.dependency 'TUIRoomKit' # room + + spec.default_subspecs = 'OpenSource' + + spec.subspec 'OpenSource' do |ss| + modules = %w[Resource Call Live VoiceRoom Room Interpretation ScenesApplication] + + ss.dependency 'Login/OpenSource' + + ss.source_files = [ + '*.swift', + 'Extension/**/*.{swift,h,m}', + 'Modules/Interface/**/*.{swift,h,m}', + 'Modules/AtomicXCoreLogin.swift', + *modules.map { |m| "Modules/#{m}/**/*.{swift,h,m}" }, + ] + ss.resource_bundles = { + 'AppAssemblyBundle' => modules.map { |m| "Modules/#{m}/**/*.{xcassets,strings,json}" }, + } + end + +end diff --git a/application/assembly/AppAssembly.swift b/application/assembly/AppAssembly.swift new file mode 100644 index 00000000..59cc33ed --- /dev/null +++ b/application/assembly/AppAssembly.swift @@ -0,0 +1,89 @@ +// +// AppAssembly.swift +// AppAssembly +// + +import UIKit + +// MARK: - AppTarget + +public enum AppTarget { + case domestic + case overseas + case lab +} + +// MARK: - PrivacyAction + +public enum PrivacyAction { + case showAntifraudReminder + case showScreenShareAntifraud(completion: (Bool) -> Void) + case checkRealNameAuth(userId: String, token: String, completion: (Bool, String) -> Void) + case showFaceIdTokenVerify(userId: String, token: String, completion: (Bool, String) -> Void) + case showLiveTimeLimitAlert + case showLiveRemainingOneMinToast + case showHighRiskIPAlert + case showLiveTimeOutAlert(onDismiss: () -> Void) +} + +// MARK: - AppAssembly + +public final class AppAssembly { + + public static let shared = AppAssembly() + private init() {} + + public var privacyActionHandler: ((PrivacyAction) -> Void)? + + // MARK: - Public API + + public func allModuleProviders(target: AppTarget) -> [ModuleProvider] { + var providers: [ModuleProvider] = [] + + switch target { + case .overseas: + providers.append(CallModule.standard(target: target)) + #if APPASSEMBLY_FULL + providers.append(AIConversationModule.standard) + providers.append(InterpretationModule.standard) + #endif + providers.append(RoomModule.standard) + providers.append(LiveModule.standard) + #if APPASSEMBLY_FULL + providers.append(ChatModule.standard) + providers.append(BeautyModule.standard) + providers.append(PlayerModule.standard) + providers.append(UGSVModule.standard) + #endif + case .domestic, .lab: + providers.append(CallModule.standard(target: target)) + providers.append(LiveModule.standard) + providers.append(RoomModule.standard) + #if APPASSEMBLY_FULL + providers.append(ChatModule.standard) + providers.append(AIConversationModule.standard) + providers.append(InterpretationModule.standard) + #endif + providers.append(VoiceRoomModule.standard) + #if APPASSEMBLY_FULL + providers.append(BeautyModule.standard) + providers.append(PlayerModule.standard) + providers.append(UGSVModule.standard) + #endif + providers.append(ScenesApplicationModule.standard) + } + + return providers + } + + public func registerLifecycleHandlers() { + // AppLifecycleRegistry.shared.register(LicenceLifecycleHandler.shared) + // + // AppLifecycleRegistry.shared.register(NotificationLifecycleHandler.shared) + // + // AppLifecycleRegistry.shared.register(SensorsLifecycleHandler.shared) + + debugPrint("[AppAssembly] registerLifecycleHandlers - 阶段 5 完成后启用实际 handler 注册") + } + +} diff --git a/application/assembly/Extension/LayoutDefine.swift b/application/assembly/Extension/LayoutDefine.swift new file mode 100644 index 00000000..6bf8039f --- /dev/null +++ b/application/assembly/Extension/LayoutDefine.swift @@ -0,0 +1,66 @@ +// +// LayoutDefine.swift +// login +// + +import UIKit + +let ScreenWidth = UIScreen.main.bounds.width +let ScreenHeight = UIScreen.main.bounds.height + +let kDeviceIsIphoneX: Bool = { + if UIDevice.current.userInterfaceIdiom == .pad { + return false + } + let size = UIScreen.main.bounds.size + let notchValue = Int(size.width / size.height * 100) + if notchValue == 216 || notchValue == 46 { + return true + } + return false +}() + +let kDeviceSafeTopHeight: CGFloat = { + if kDeviceIsIphoneX { + return 44 + } else { + return 20 + } +}() + +let kDeviceSafeBottomHeight: CGFloat = { + if kDeviceIsIphoneX { + return 34 + } else { + return 0 + } +}() + +func convertPixel(w: CGFloat) -> CGFloat { + return w / 375.0 * ScreenWidth +} + +func convertPixel(h: CGFloat) -> CGFloat { + return h / 812.0 * ScreenHeight +} + +func statusBarHeight() -> CGFloat { + var statusBarHeight: CGFloat = 0 + if #available(iOS 13.0, *) { + let scene = UIApplication.shared.connectedScenes.first + guard let windowScene = scene as? UIWindowScene else { return 0 } + guard let statusBarManager = windowScene.statusBarManager else { return 0 } + statusBarHeight = statusBarManager.statusBarFrame.height + } else { + statusBarHeight = UIApplication.shared.statusBarFrame.height + } + return statusBarHeight +} + +func navigationBarHeight() -> CGFloat { + return 44.0 +} + +func navigationFullHeight() -> CGFloat { + return statusBarHeight() + navigationBarHeight() +} diff --git a/application/assembly/Modules/AtomicXCoreLogin.swift b/application/assembly/Modules/AtomicXCoreLogin.swift new file mode 100644 index 00000000..75654e49 --- /dev/null +++ b/application/assembly/Modules/AtomicXCoreLogin.swift @@ -0,0 +1,40 @@ +// +// AtomicXCoreLogin.swift +// RTCube +// +// Created by gg on 2026/3/13. +// + +import AtomicXCore +import Combine +import Login + +class AtomicXCoreLogin { + private var cancellable: AnyCancellable? + + static let shared = AtomicXCoreLogin() + private init() {} + + func startAutoLogin() { + guard cancellable == nil else { return } + cancellable = LoginEntry.shared.$userModel + .receive(on: RunLoop.main) + .removeDuplicates(by: { lhs, rhs in + lhs?.userId == rhs?.userId && lhs?.userSig == rhs?.userSig && lhs?.token == rhs?.token + }) + .sink { userModel in + if let userModel = userModel { + LoginStore.shared.login(sdkAppID: Int32(LoginEntry.shared.config.sdkAppId), + userID: userModel.userId, + userSig: userModel.userSig, + completion: nil) + } else { + LoginStore.shared.logout(completion: nil) + } + } + } + + func stopAutoLogin() { + cancellable = nil + } +} diff --git a/application/assembly/Modules/Call/CallModule.swift b/application/assembly/Modules/Call/CallModule.swift new file mode 100644 index 00000000..2588223f --- /dev/null +++ b/application/assembly/Modules/Call/CallModule.swift @@ -0,0 +1,44 @@ +// +// CallModule.swift +// main +// + +import Combine +import TUICallKit_Swift +import UIKit + +// MARK: - CallModule + +final class CallModule: ModuleProvider { + let config: ModuleConfig + + init(config: ModuleConfig) { + self.config = config + AtomicXCoreLogin.shared.startAutoLogin() + CallKitLifecycleHandler.shared.register() + CallAntifraudHandler.shared.register() + RoomRiskIPObserver.shared.register() + } + + static func standard(target: AppTarget) -> CallModule { + let config = ModuleConfig( + identifier: "call", + title: AssemblyLocalize("Demo.TRTC.Portal.Main.call"), + description: AssemblyLocalize("Demo.TRTC.Portal.Main.callContent"), + iconName: "main_entrance_tuicallkit", + iconImage: AppAssemblyBundle.image(named: "main_entrance_tuicallkit"), + cardStyle: .uiComponent, + gradientColors: stubUIComponentGradient, + targetProvider: { + switch target { + case .lab: + return CallViewController() + case .domestic, .overseas: + return CallingEntranceMenuViewController() + } + }, + analyticsEvent: "video_call" + ) + return CallModule(config: config) + } +} diff --git a/application/App-UIKit/Call/CallSettings/SettingDetailViewController.swift b/application/assembly/Modules/Call/CallSettings/SettingDetailViewController.swift similarity index 86% rename from application/App-UIKit/Call/CallSettings/SettingDetailViewController.swift rename to application/assembly/Modules/Call/CallSettings/SettingDetailViewController.swift index 14e14fed..b8c3a98b 100644 --- a/application/App-UIKit/Call/CallSettings/SettingDetailViewController.swift +++ b/application/assembly/Modules/Call/CallSettings/SettingDetailViewController.swift @@ -1,14 +1,15 @@ // // SettingDetailViewController.swift -// App-UIKit -// -// Created by yukiwwwang on 2025/8/13. +// AppAssembly // + import Foundation import UIKit +import AtomicX import TUICore import RTCRoomEngine -import AtomicX +import SnapKit +import Toast_Swift #if canImport(TUICallKit_Swift) import TUICallKit_Swift @@ -36,29 +37,29 @@ class SettingDetailViewController: UIViewController, UITextViewDelegate { private let textView: UITextView = { let view = UITextView(frame: .zero) view.backgroundColor = UIColor.clear - view.font = UIFont(name: "PingFangSC-Regular", size: 16) - view.textColor = UIColor("333333") + view.font = ThemeStore.shared.typographyTokens.Regular16 + view.textColor = ThemeStore.shared.colorTokens.textColorPrimary view.textAlignment = .left view.isScrollEnabled = true return view }() private let backButton: UIButton = { let button = UIButton(type: .system) - button.setImage(UIImage(named: "back"), for: .normal) + button.setImage(AppAssemblyBundle.image(named: "calling_back"), for: .normal) button.tintColor = .black return button }() private let confirmButton: UIButton = { let button = UIButton(type: .system) - button.setTitle(("Yes").localized, for: .normal) + button.setTitle(CallingLocalize("Demo.TRTC.calling.settings.yes"), for: .normal) button.tintColor = .black return button }() override func viewDidLoad() { super.viewDidLoad() - view.backgroundColor = .white + view.backgroundColor = ThemeStore.shared.colorTokens.bgColorOperate setupNavigationBar() constructViewHierarchy() activateConstraints() @@ -95,11 +96,11 @@ class SettingDetailViewController: UIViewController, UITextViewDelegate { private func setTextView() { switch detail { case .ringInfo: - textView.text = ("SetRingTip").localized + textView.text = CallingLocalize("Demo.TRTC.calling.settings.setRingTip") case .entendInfo: - textView.text = ("SetExtendTip").localized + textView.text = CallingLocalize("Demo.TRTC.calling.settings.setExtendTip") case .offlinePushInfo: - textView.text = ("SetOffLineInfoTip").localized + textView.text = CallingLocalize("Demo.TRTC.calling.settings.setOffLineInfoTip") } } @@ -125,7 +126,7 @@ class SettingDetailViewController: UIViewController, UITextViewDelegate { } TUICallKit.createInstance().setCallingBell(filePath: text) SettingsConfig.share.ringUrl = text - view.showAtomicToast(text: "Set Successful: \(SettingsConfig.share.ringUrl)") + view.makeToast("Set Successful: \(SettingsConfig.share.ringUrl)") } private func entendInfoSetting(text: String) { @@ -133,7 +134,7 @@ class SettingDetailViewController: UIViewController, UITextViewDelegate { return } SettingsConfig.share.userData = text - view.showAtomicToast(text: "Set Successful: \(text)") + view.makeToast("Set Successful: \(text)") } private func offlinePushInfoSetting(text: String) { @@ -141,7 +142,7 @@ class SettingDetailViewController: UIViewController, UITextViewDelegate { return } setOfflineData(jsonStr: text) - view.showAtomicToast(text: "Set Successful: \(SettingsConfig.share.pushInfo)") + view.makeToast("Set Successful: \(SettingsConfig.share.pushInfo)") } private func setOfflineData(jsonStr: String) { diff --git a/application/assembly/Modules/Call/CallSettings/SettingsConfig.swift b/application/assembly/Modules/Call/CallSettings/SettingsConfig.swift new file mode 100644 index 00000000..deb4725c --- /dev/null +++ b/application/assembly/Modules/Call/CallSettings/SettingsConfig.swift @@ -0,0 +1,55 @@ +// +// SettingsConfig.swift +// AppAssembly +// + +import Foundation +import TUICore +import RTCRoomEngine + +#if canImport(TUICallKit_Swift) +import TUICallKit_Swift +#elseif canImport(TUICallKit) +import TUICallKit +#endif + +class SettingsConfig { + + static let share = SettingsConfig() + + var userId = "" + var avatar = "" + var name = "" + var ringUrl = "" + + var mute: Bool = false + var floatWindow: Bool = true + var enableVirtualBackground: Bool = true + var enableIncomingBanner: Bool = true + var enableAITranscriber: Bool = true + var intRoomId: UInt32 = 0 + var strRoomId: String = "" + var timeout: Int = 60 + var userData: String = "" + let pushInfo: TUIOfflinePushInfo = { + let pushInfo: TUIOfflinePushInfo = TUIOfflinePushInfo() + pushInfo.title = "NEW CALL" + pushInfo.desc = "You have a new call invitation!" + pushInfo.iOSPushType = .apns + pushInfo.ignoreIOSBadge = false + pushInfo.iOSSound = "phone_ringing.mp3" + pushInfo.androidSound = "phone_ringing" + pushInfo.androidOPPOChannelID = "tuikit" + pushInfo.androidFCMChannelID = "fcm_push_channel" + pushInfo.androidVIVOClassification = 1 + pushInfo.androidHuaWeiCategory = "IM" + return pushInfo + }() + var resolution: TUIVideoEncoderParamsResolution = ._1280_720 + var resolutionMode: TUIVideoEncoderParamsResolutionMode = .portrait + var rotation: TUIVideoRenderParamsRotation = ._0 + var fillMode: TUIVideoRenderParamsFillMode = .fill + var beautyLevel: Int = 6 + var is1VN: Bool = true + var screenOrientation: Int = 0 +} diff --git a/application/App-UIKit/Call/CallSettings/SettingsViewController.swift b/application/assembly/Modules/Call/CallSettings/SettingsViewController.swift similarity index 85% rename from application/App-UIKit/Call/CallSettings/SettingsViewController.swift rename to application/assembly/Modules/Call/CallSettings/SettingsViewController.swift index e785e119..55be1507 100644 --- a/application/App-UIKit/Call/CallSettings/SettingsViewController.swift +++ b/application/assembly/Modules/Call/CallSettings/SettingsViewController.swift @@ -1,14 +1,15 @@ // // SettingsViewController.swift -// App-UIKit -// -// Created by yukiwwwang on 2025/8/13. +// AppAssembly // import Foundation import TUICore import UIKit +import AtomicX import RTCRoomEngine +import SnapKit +import Toast_Swift #if canImport(TUICallKit_Swift) import TUICallKit_Swift @@ -17,13 +18,6 @@ import TUICallKit #endif class SettingsViewController: UIViewController, UITextFieldDelegate { - private var intRoomId: UInt32 = 0 - private var strRoomId: String = "" - private var timeout: Int = 30 - private var userData: String = "" - private var offlineData: String = "" - private var beautyLevel: Int = 6 - private var currentTextField: UITextField? private let scrollView: UIScrollView = { @@ -36,26 +30,26 @@ class SettingsViewController: UIViewController, UITextFieldDelegate { private let basicSettingContentView: UIView = { let view = UIView(frame: .zero) - view.backgroundColor = UIColor("AAAAAA") + view.backgroundColor = ThemeStore.shared.colorTokens.textColorTertiary return view }() private lazy var basicSettingLabel: UILabel = { - return createLabel(textSize: 16, text: ("BasicSetting").localized) + return createLabel(textSize: 16, text: CallingLocalize("Demo.TRTC.calling.settings.basicSetting")) }() private let ringContentView: UIView = { let view = UIView(frame: .zero) - view.backgroundColor = .white + view.backgroundColor = ThemeStore.shared.colorTokens.bgColorOperate return view }() private lazy var ringLabel: UILabel = { - return createLabel(textSize: 16, text: ("RingSetting").localized) + return createLabel(textSize: 16, text: CallingLocalize("Demo.TRTC.calling.settings.ringSetting")) }() private lazy var ringInfoLabel: UILabel = { let place: String = SettingsConfig.share.ringUrl.isEmpty ? - ("NotSet").localized : SettingsConfig.share.ringUrl + CallingLocalize("Demo.TRTC.calling.settings.notSet") : SettingsConfig.share.ringUrl let view = createLabel(textSize: 16, text: place) - view.textColor = UIColor("AAAAAA") + view.textColor = ThemeStore.shared.colorTokens.textColorTertiary view.textAlignment = .right return view }() @@ -66,7 +60,7 @@ class SettingsViewController: UIViewController, UITextFieldDelegate { return view }() private lazy var muteSwitchView: UIView = { - let customSwitchView = SettingsCustomSwitchView(title: ("MuteMode").localized, + let customSwitchView = SettingsCustomSwitchView(title: CallingLocalize("Demo.TRTC.calling.settings.muteMode"), isOn: SettingsConfig.share.mute) customSwitchView.switchValueChanged = { isOn in self.muteSwitchClick(isOn) @@ -74,7 +68,7 @@ class SettingsViewController: UIViewController, UITextFieldDelegate { return customSwitchView }() private lazy var floatingSwitchView: UIView = { - let customSwitchView = SettingsCustomSwitchView(title: ("EnableFloating").localized, + let customSwitchView = SettingsCustomSwitchView(title: CallingLocalize("Demo.TRTC.calling.settings.enableFloating"), isOn: SettingsConfig.share.floatWindow) customSwitchView.switchValueChanged = { isOn in self.floatingSwitchClick(isOn) @@ -83,7 +77,7 @@ class SettingsViewController: UIViewController, UITextFieldDelegate { }() #if canImport(TUICallKit_Swift) private lazy var virtualBackgroundSwitchView: SettingsCustomSwitchView = { - let customSwitchView = SettingsCustomSwitchView(title: ("EnableVirtualBackground").localized, + let customSwitchView = SettingsCustomSwitchView(title: CallingLocalize("Demo.TRTC.calling.settings.enableVirtualBackground"), isOn: SettingsConfig.share.enableVirtualBackground) customSwitchView.switchValueChanged = { isOn in self.virtualBackgroundSwitchClick(isOn) @@ -91,7 +85,7 @@ class SettingsViewController: UIViewController, UITextFieldDelegate { return customSwitchView }() private lazy var incomingBannerSwitchView: SettingsCustomSwitchView = { - let customSwitchView = SettingsCustomSwitchView(title: ("EnableIncomingBanner").localized, + let customSwitchView = SettingsCustomSwitchView(title: CallingLocalize("Demo.TRTC.calling.settings.enableIncomingBanner"), isOn: SettingsConfig.share.enableIncomingBanner) customSwitchView.switchValueChanged = { isOn in self.incomingBannerSwitchClick(isOn) @@ -99,7 +93,7 @@ class SettingsViewController: UIViewController, UITextFieldDelegate { return customSwitchView }() private lazy var aiTranscriberSwitchView: SettingsCustomSwitchView = { - let customSwitchView = SettingsCustomSwitchView(title: ("EnableAITranscriber").localized, + let customSwitchView = SettingsCustomSwitchView(title: CallingLocalize("Demo.TRTC.calling.settings.enableAITranscriber"), isOn: SettingsConfig.share.enableAITranscriber) customSwitchView.switchValueChanged = { [weak self] isOn in self?.aiTranscriberSwitchClick(isOn) @@ -109,16 +103,16 @@ class SettingsViewController: UIViewController, UITextFieldDelegate { #endif private let callSettingContentView: UIView = { let view = UIView(frame: .zero) - view.backgroundColor = UIColor("AAAAAA") + view.backgroundColor = ThemeStore.shared.colorTokens.textColorTertiary return view }() private lazy var callSettingLabel: UILabel = { - return createLabel(textSize: 16, text: ("CallParamsSetting").localized) + return createLabel(textSize: 16, text: CallingLocalize("Demo.TRTC.calling.settings.callParamsSetting")) }() private let stringRoomIdContentView: UIView = { let view = UIView(frame: .zero) - view.backgroundColor = .white + view.backgroundColor = ThemeStore.shared.colorTokens.bgColorOperate return view }() private lazy var stringRoomIdLabel: UILabel = { @@ -132,7 +126,7 @@ class SettingsViewController: UIViewController, UITextFieldDelegate { private let intRoomIdContentView: UIView = { let view = UIView(frame: .zero) - view.backgroundColor = .white + view.backgroundColor = ThemeStore.shared.colorTokens.bgColorOperate return view }() private lazy var intRoomIdLabel: UILabel = { @@ -146,11 +140,11 @@ class SettingsViewController: UIViewController, UITextFieldDelegate { private let timeoutContentView: UIView = { let view = UIView(frame: .zero) - view.backgroundColor = .white + view.backgroundColor = ThemeStore.shared.colorTokens.bgColorOperate return view }() private lazy var timeoutLabel: UILabel = { - return createLabel(textSize: 16, text: ("Timeout").localized) + return createLabel(textSize: 16, text: CallingLocalize("Demo.TRTC.calling.settings.timeout")) }() private lazy var timeoutTextField: UITextField = { let timeoutTextField = createTextField(text: "30") @@ -160,16 +154,16 @@ class SettingsViewController: UIViewController, UITextFieldDelegate { private let extendedInfoContentView: UIView = { let view = UIView(frame: .zero) - view.backgroundColor = .white + view.backgroundColor = ThemeStore.shared.colorTokens.bgColorOperate return view }() private lazy var extendedInfoLabel: UILabel = { - return createLabel(textSize: 16, text: ("ExpendedInfo").localized) + return createLabel(textSize: 16, text: CallingLocalize("Demo.TRTC.calling.settings.expendedInfo")) }() private lazy var extendedInfo: UILabel = { - let place = SettingsConfig.share.userData.isEmpty ? ("NotSet").localized : SettingsConfig.share.userData + let place = SettingsConfig.share.userData.isEmpty ? CallingLocalize("Demo.TRTC.calling.settings.notSet") : SettingsConfig.share.userData let view = createLabel(textSize: 16, text: place) - view.textColor = UIColor("AAAAAA") + view.textColor = ThemeStore.shared.colorTokens.textColorTertiary view.textAlignment = .right return view }() @@ -182,15 +176,15 @@ class SettingsViewController: UIViewController, UITextFieldDelegate { private let offlinePushContentView: UIView = { let view = UIView(frame: .zero) - view.backgroundColor = .white + view.backgroundColor = ThemeStore.shared.colorTokens.bgColorOperate return view }() private lazy var offlinePushLabel: UILabel = { - return createLabel(textSize: 16, text: ("OfflinePushInfo").localized) + return createLabel(textSize: 16, text: CallingLocalize("Demo.TRTC.calling.settings.offlinePushInfo")) }() private lazy var offlinePushInfo: UILabel = { - let view = createLabel(textSize: 16, text: ("GoToSettings").localized) - view.textColor = UIColor("AAAAAA") + let view = createLabel(textSize: 16, text: CallingLocalize("Demo.TRTC.calling.settings.goToSettings")) + view.textColor = ThemeStore.shared.colorTokens.textColorTertiary view.textAlignment = .right return view }() @@ -203,20 +197,20 @@ class SettingsViewController: UIViewController, UITextFieldDelegate { private let videoSettingContentView: UIView = { let view = UIView(frame: .zero) - view.backgroundColor = UIColor("AAAAAA") + view.backgroundColor = ThemeStore.shared.colorTokens.textColorTertiary return view }() private lazy var videoSettingLabel: UILabel = { - return createLabel(textSize: 16, text: ("VideoSetting").localized) + return createLabel(textSize: 16, text: CallingLocalize("Demo.TRTC.calling.settings.videoSetting")) }() private let resolutionContentView: UIView = { let view = UIView(frame: .zero) - view.backgroundColor = .white + view.backgroundColor = ThemeStore.shared.colorTokens.bgColorOperate return view }() private lazy var resolutionLabel: UILabel = { - return createLabel(textSize: 16, text: ("Resolution").localized) + return createLabel(textSize: 16, text: CallingLocalize("Demo.TRTC.calling.settings.resolution")) }() private let resolutionData = ["640*360","960*540","1280*720","1920*1080"] private lazy var resolutionDropMenu: SwiftDropMenuListView = { @@ -224,7 +218,7 @@ class SettingsViewController: UIViewController, UITextFieldDelegate { let titleStr: String = resolutionData[convertResolutionToIndex(resolution: SettingsConfig.share.resolution)] + " >" menu.setTitle(titleStr, for: .normal) menu.setTitleColor(.black, for: .normal) - menu.titleLabel?.font = UIFont(name: "PingFangSC-Medium", size: 16) + menu.titleLabel?.font = ThemeStore.shared.typographyTokens.Medium16 menu.backgroundColor = UIColor.clear menu.translatesAutoresizingMaskIntoConstraints = true return menu @@ -232,39 +226,39 @@ class SettingsViewController: UIViewController, UITextFieldDelegate { private let resolutionModeContentView: UIView = { let view = UIView(frame: .zero) - view.backgroundColor = .white + view.backgroundColor = ThemeStore.shared.colorTokens.bgColorOperate return view }() private lazy var resolutionModeLabel: UILabel = { - return createLabel(textSize: 16, text: ("ResolutionMode").localized) + return createLabel(textSize: 16, text: CallingLocalize("Demo.TRTC.calling.settings.resolutionMode")) }() private lazy var resolutionModeSegment: UISegmentedControl = { let index = SettingsConfig.share.resolutionMode == .landscape ? 0 : 1 - return createSegment(item: [("Horizontal").localized, - ("Vertical").localized,], select: index) + return createSegment(item: [CallingLocalize("Demo.TRTC.calling.settings.horizontal"), + CallingLocalize("Demo.TRTC.calling.settings.vertical"),], select: index) }() private let fillModeContentView: UIView = { let view = UIView(frame: .zero) - view.backgroundColor = .white + view.backgroundColor = ThemeStore.shared.colorTokens.bgColorOperate return view }() private lazy var fillModeLabel: UILabel = { - return createLabel(textSize: 16, text: ("FillMode").localized) + return createLabel(textSize: 16, text: CallingLocalize("Demo.TRTC.calling.settings.fillMode")) }() private lazy var fillModeSegment: UISegmentedControl = { let index = SettingsConfig.share.fillMode == .fit ? 0 : 1 - return createSegment(item: [("Fit").localized, - ("Fill").localized,], select: index) + return createSegment(item: [CallingLocalize("Demo.TRTC.calling.settings.fit"), + CallingLocalize("Demo.TRTC.calling.settings.fill"),], select: index) }() private let rotationContentView: UIView = { let view = UIView(frame: .zero) - view.backgroundColor = .white + view.backgroundColor = ThemeStore.shared.colorTokens.bgColorOperate return view }() private lazy var rotationLabel: UILabel = { - return createLabel(textSize: 16, text: ("Rotation").localized) + return createLabel(textSize: 16, text: CallingLocalize("Demo.TRTC.calling.settings.rotation")) }() private lazy var rotationSegment: UISegmentedControl = { return createSegment(item: ["0", "90", "180", "270"], select: convertRotationToIndex(rotation: SettingsConfig.share.rotation)) @@ -272,11 +266,11 @@ class SettingsViewController: UIViewController, UITextFieldDelegate { private let beautyLevelContentView: UIView = { let view = UIView(frame: .zero) - view.backgroundColor = .white + view.backgroundColor = ThemeStore.shared.colorTokens.bgColorOperate return view }() private lazy var beautyLevelLabel: UILabel = { - return createLabel(textSize: 16, text: ("BeautyLevel").localized) + return createLabel(textSize: 16, text: CallingLocalize("Demo.TRTC.calling.settings.beautyLevel")) }() private lazy var beautyLevelTextField: UITextField = { let textField = createTextField(text: "\(SettingsConfig.share.beautyLevel)") @@ -286,31 +280,31 @@ class SettingsViewController: UIViewController, UITextFieldDelegate { private let screenContentView: UIView = { let view = UIView(frame: .zero) - view.backgroundColor = .white + view.backgroundColor = ThemeStore.shared.colorTokens.bgColorOperate return view }() private lazy var screenModeLabel: UILabel = { - return createLabel(textSize: 16, text: ("OtherSetting").localized) + return createLabel(textSize: 16, text: CallingLocalize("Demo.TRTC.calling.settings.otherSetting")) }() private lazy var screenModeSegment: UISegmentedControl = { let titles = [ - ("Screen_Vertical").localized, - ("Screen_Horizontal").localized, - ("Screen_Auto").localized + CallingLocalize("Demo.TRTC.calling.settings.screenVertical"), + CallingLocalize("Demo.TRTC.calling.settings.screenHorizontal"), + CallingLocalize("Demo.TRTC.calling.settings.screenAuto") ] return createSegment(item: titles, select: SettingsConfig.share.screenOrientation) }() private let backButton: UIButton = { let button = UIButton(type: .system) - button.setImage(UIImage(named: "back"), for: .normal) + button.setImage(AppAssemblyBundle.image(named: "calling_back"), for: .normal) button.tintColor = .black return button }() override func viewDidLoad() { super.viewDidLoad() - view.backgroundColor = .white + view.backgroundColor = ThemeStore.shared.colorTokens.bgColorOperate setupNavigationBar() constructViewHierarchy() activateConstraints() @@ -331,9 +325,9 @@ class SettingsViewController: UIViewController, UITextFieldDelegate { private func updateView() { ringInfoLabel.text = SettingsConfig.share.ringUrl.isEmpty ? - ("NotSet").localized : SettingsConfig.share.ringUrl + CallingLocalize("Demo.TRTC.calling.settings.notSet") : SettingsConfig.share.ringUrl extendedInfo.text = SettingsConfig.share.userData.isEmpty ? - ("NotSet").localized : SettingsConfig.share.userData + CallingLocalize("Demo.TRTC.calling.settings.notSet") : SettingsConfig.share.userData } private func setupNavigationBar() { @@ -718,21 +712,21 @@ class SettingsViewController: UIViewController, UITextFieldDelegate { @objc private func ringAvBtnClick() { let offlinePushVC = SettingDetailViewController(type: .ringInfo) - offlinePushVC.title = ("SetRing").localized + offlinePushVC.title = CallingLocalize("Demo.TRTC.calling.settings.setRing") offlinePushVC.hidesBottomBarWhenPushed = true navigationController?.pushViewController(offlinePushVC, animated: true) } @objc private func offlinePushClick() { let offlinePushVC = SettingDetailViewController(type: .offlinePushInfo) - offlinePushVC.title = ("SetOffLineInfo").localized + offlinePushVC.title = CallingLocalize("Demo.TRTC.calling.settings.setOffLineInfo") offlinePushVC.hidesBottomBarWhenPushed = true navigationController?.pushViewController(offlinePushVC, animated: true) } @objc private func extendClick() { let extendVC = SettingDetailViewController(type: .entendInfo) - extendVC.title = ("SetExtend").localized + extendVC.title = CallingLocalize("Demo.TRTC.calling.settings.setExtend") extendVC.hidesBottomBarWhenPushed = true navigationController?.pushViewController(extendVC, animated: true) } @@ -820,7 +814,9 @@ class SettingsViewController: UIViewController, UITextFieldDelegate { if text.isEmpty { return } - SettingsConfig.share.timeout = Int(text) ?? 30 + if let value = Int(text) { + SettingsConfig.share.timeout = value + } self.timeoutTextField.attributedPlaceholder = NSAttributedString(string: String(SettingsConfig.share.timeout)) } @@ -837,7 +833,7 @@ class SettingsViewController: UIViewController, UITextFieldDelegate { self.beautyLevelTextField.attributedPlaceholder = NSAttributedString(string: String(SettingsConfig.share.beautyLevel)) } fail: { [weak self] code, message in guard let self = self else {return} - self.view.showAtomicToast(text: "Error \(code):\(message ?? "")") + self.view.makeToast("Error \(code):\(message ?? "")") } } } @@ -846,8 +842,8 @@ extension SettingsViewController { func createTextField(text: String) -> UITextField { let textField = UITextField(frame: .zero) textField.backgroundColor = UIColor.clear - textField.font = UIFont(name: "PingFangSC-Regular", size: 16) - textField.textColor = UIColor("333333") + textField.font = ThemeStore.shared.typographyTokens.Regular16 + textField.textColor = ThemeStore.shared.colorTokens.textColorPrimary textField.attributedPlaceholder = NSAttributedString(string: text) textField.textAlignment = .right textField.delegate = self @@ -857,11 +853,11 @@ extension SettingsViewController { func createSettingButton() -> UIButton { let btn = UIButton(type: .system) btn.setTitleColor(.white, for: .normal) - btn.setTitle(("Settings").localized, for: .normal) + btn.setTitle(CallingLocalize("Demo.TRTC.calling.settings.settings"), for: .normal) btn.adjustsImageWhenHighlighted = false - btn.setBackgroundImage(UIColor("006EFF").trans2Image(), for: .normal) - btn.titleLabel?.font = UIFont(name: "PingFangSC-Medium", size: 15) - btn.layer.shadowColor = UIColor("006EFF").cgColor + btn.setBackgroundImage(ThemeStore.shared.colorTokens.buttonColorPrimaryDefault.trans2Image(), for: .normal) + btn.titleLabel?.font = ThemeStore.shared.typographyTokens.Medium16 + btn.layer.shadowColor = ThemeStore.shared.colorTokens.buttonColorPrimaryDefault.cgColor btn.layer.shadowOffset = CGSize(width: 0, height: 6) btn.layer.shadowRadius = 16 btn.layer.shadowOpacity = 0.4 @@ -873,7 +869,7 @@ extension SettingsViewController { func createLabel(textSize: CGFloat, text: String) -> UILabel { let label = UILabel(frame: .zero) label.font = UIFont.systemFont(ofSize: textSize) - label.textColor = .black + label.textColor = ThemeStore.shared.colorTokens.textColorPrimary label.text = text return label } diff --git a/application/App-UIKit/Call/CustomViews/DropMenuView.swift b/application/assembly/Modules/Call/CustomViews/DropMenuView.swift similarity index 98% rename from application/App-UIKit/Call/CustomViews/DropMenuView.swift rename to application/assembly/Modules/Call/CustomViews/DropMenuView.swift index 04c26ee4..151c0376 100644 --- a/application/App-UIKit/Call/CustomViews/DropMenuView.swift +++ b/application/assembly/Modules/Call/CustomViews/DropMenuView.swift @@ -1,11 +1,10 @@ // // DropMenuView.swift -// App-UIKit -// -// Created by yukiwwwang on 2025/8/13. +// AppAssembly // import UIKit +import AtomicX protocol SwiftDropMenuControlContentAppearAble: SwiftDropMenuControlDelegate { func on(appear element: SwiftDropMenuControl.AppearElement, forDropMenu menu: SwiftDropMenuControl) @@ -328,7 +327,7 @@ extension SwiftDropMenuListView: UICollectionViewDataSource { } else { cell.contentView.layer.borderColor = UIColor(red: 221/255.0, green: 221/255.0, blue: 221/255.0, alpha: 1.0).cgColor - cell.contentView.backgroundColor = .white + cell.contentView.backgroundColor = ThemeStore.shared.colorTokens.bgColorOperate cell.titleLabel.textColor = UIColor(red: 111/255.0, green: 111/255.0, blue: 112/255.0, alpha: 1.0) } cell.titleLabel.text = title @@ -479,7 +478,7 @@ private class SwiftDropMenuDefaultCell: UICollectionViewCell { let titleLabel: UILabel = { let titleLabel = UILabel() titleLabel.textAlignment = .center - titleLabel.font = UIFont.systemFont(ofSize: 12.0) + titleLabel.font = ThemeStore.shared.typographyTokens.Regular12 return titleLabel }() @@ -511,9 +510,8 @@ private class SwiftDropMenuDefaultCell: UICollectionViewCell { views: ["titleLabel": self.titleLabel])) NSLayoutConstraint.activate(constraints) - self.contentView.layer.borderColor = UIColor(red: 221/255.0, green: 221/255.0, blue: 221/255.0, alpha: 1.0).cgColor - self.contentView.backgroundColor = .white + self.contentView.backgroundColor = ThemeStore.shared.colorTokens.bgColorOperate self.titleLabel.textColor = UIColor(red: 111/255.0, green: 111/255.0, blue: 112/255.0, alpha: 1.0) self.contentView.clipsToBounds = true diff --git a/application/App-UIKit/Call/CustomViews/RadioButton.swift b/application/assembly/Modules/Call/CustomViews/RadioButton.swift similarity index 98% rename from application/App-UIKit/Call/CustomViews/RadioButton.swift rename to application/assembly/Modules/Call/CustomViews/RadioButton.swift index b7c6e214..ee29be82 100644 --- a/application/App-UIKit/Call/CustomViews/RadioButton.swift +++ b/application/assembly/Modules/Call/CustomViews/RadioButton.swift @@ -1,9 +1,8 @@ // -// RadioBUtton.swift -// App-UIKit -// -// Created by yukiwwwang on 2025/8/13. +// RadioButton.swift +// AppAssembly // + import UIKit @IBDesignable diff --git a/application/App-UIKit/Call/CustomViews/SettingsCustomSwitchView.swift b/application/assembly/Modules/Call/CustomViews/SettingsCustomSwitchView.swift similarity index 85% rename from application/App-UIKit/Call/CustomViews/SettingsCustomSwitchView.swift rename to application/assembly/Modules/Call/CustomViews/SettingsCustomSwitchView.swift index 39a53bc1..1c638a7f 100644 --- a/application/App-UIKit/Call/CustomViews/SettingsCustomSwitchView.swift +++ b/application/assembly/Modules/Call/CustomViews/SettingsCustomSwitchView.swift @@ -1,18 +1,18 @@ // // SettingsCustomSwitchView.swift -// App-UIKit -// -// Created by yukiwwwang on 2025/8/13. +// AppAssembly // import UIKit +import AtomicX +import SnapKit class SettingsCustomSwitchView: UIView { private let titleLabel: UILabel = { let label = UILabel() - label.font = UIFont.systemFont(ofSize: 16) - label.textColor = .black + label.font = ThemeStore.shared.typographyTokens.Regular16 + label.textColor = ThemeStore.shared.colorTokens.textColorPrimary return label }() @@ -25,7 +25,7 @@ class SettingsCustomSwitchView: UIView { init(title: String, isOn: Bool) { super.init(frame: .zero) - backgroundColor = .white + backgroundColor = ThemeStore.shared.colorTokens.bgColorOperate titleLabel.text = title switchControl.isOn = isOn switchControl.addTarget(self, action: #selector(switchChanged), for: .valueChanged) diff --git a/application/assembly/Modules/Call/Guide/Model/GuideModel.swift b/application/assembly/Modules/Call/Guide/Model/GuideModel.swift new file mode 100644 index 00000000..e0fa9114 --- /dev/null +++ b/application/assembly/Modules/Call/Guide/Model/GuideModel.swift @@ -0,0 +1,36 @@ +// +// GuideModel.swift +// main +// + +import UIKit + +enum AvartarType: Int, Codable { + case right = 1 + case left = 2 +} + +class GuideModel: NSObject, Codable { + let avartarType: AvartarType + let text: String + let name: String + let leftContextImageName: String + let rightContextImageName: String + let hasCopyButton: Bool + let avatarImageName: String + init(avartarType: AvartarType, + avatarImageName: String, + name: String, + hasCopyButton: Bool = false, text: String, + contextImageName: String = "", + rightContextImageName: String = "") + { + self.avartarType = avartarType + self.avatarImageName = avatarImageName + self.name = name + self.text = text + self.hasCopyButton = hasCopyButton + self.leftContextImageName = contextImageName + self.rightContextImageName = rightContextImageName + } +} diff --git a/application/assembly/Modules/Call/Guide/Resource/GuideExtensions.swift b/application/assembly/Modules/Call/Guide/Resource/GuideExtensions.swift new file mode 100644 index 00000000..1d4145ac --- /dev/null +++ b/application/assembly/Modules/Call/Guide/Resource/GuideExtensions.swift @@ -0,0 +1,4 @@ +// +// GuideExtensions.swift +// main +// diff --git a/application/assembly/Modules/Call/Guide/Resource/Localized/GuideLocalized.swift b/application/assembly/Modules/Call/Guide/Resource/Localized/GuideLocalized.swift new file mode 100644 index 00000000..7c35e3d3 --- /dev/null +++ b/application/assembly/Modules/Call/Guide/Resource/Localized/GuideLocalized.swift @@ -0,0 +1,18 @@ +// +// GuideLocalized.swift +// AppAssembly +// + +import Foundation +import AtomicX + +private let guideLocalizedTableName = "GuideLocalized" + +func GuideLocalize(_ key: String, _ args: CVarArg...) -> String { + return BundleLoader.moduleLocalized( + key: key, + in: AppAssemblyBundle.bundle, + tableName: guideLocalizedTableName, + arguments: args + ) +} diff --git a/application/assembly/Modules/Call/Guide/Resource/Localized/en.lproj/GuideLocalized.strings b/application/assembly/Modules/Call/Guide/Resource/Localized/en.lproj/GuideLocalized.strings new file mode 100644 index 00000000..4b3d6ad7 --- /dev/null +++ b/application/assembly/Modules/Call/Guide/Resource/Localized/en.lproj/GuideLocalized.strings @@ -0,0 +1,39 @@ +/* + GuideLocalized.strings + main +*/ +"Demo.TRTC.Guide.RoomSingleUser" = "Experience by yourself"; +"Demo.TRTC.Guide.RoomMultiUsers" = "Experience with others"; +"Demo.TRTC.Guide.call" = "Call"; +"Demo.TRTC.Guide.room" = "Conference"; +"Demo.TRTC.Guide.roomCopyLink" = "Click the button to copy the link and send to your computer. +https://trtc.io/demo"; +"Demo.TRTC.Guide.createRoom" = "Create a new room and get the room ID."; +"Demo.TRTC.Guide.joinRoom" = "Click 'Join Room' in the browser and inut the room ID to join."; +"Demo.TRTC.Guide.AppJoinRoom" = "Create a new room and give your friend the room ID."; +"Demo.TRTC.Guide.roomManage" = "Experience the features of different platforms and roles, such as 'transfer to the host', 'set as administrator'."; +"Demo.TRTC.Guide.AppcreateRoom" = "Create a new room and give your friend the room ID."; +"Demo.TRTC.Guide.AppRoomDesc" = "Experience different role and features with your friend."; +"Demo.TRTC.Guide.othersUseWeb" = "Your friend uses browser"; +"Demo.TRTC.Guide.othersUseApp" = "Your friend uses TencentRTC App"; +"Demo.TRTC.Guide.AppDL" = "Your friend downloads Tencent RTC app."; +"Demo.TRTC.Guide.calling.detailGuide" = "How to call another user"; +"Demo.TRTC.calling.detailGuidText" = "Your friend clicks 'Call another user' and find the user ID."; +"Demo.TRTC.calling.detailGuidCopyURL" = "Copy"; +"Demo.TRTC.calling.detailGuidCopyURLContext" = "Send the link below to your friend +https://rtcube.cloud.tencent.com/com"; +"Demo.TRTC.calling.detailGuidCopySelectFriend" = "Your friend clicks 'Call another user' and find the user ID."; +"Demo.TRTC.calling.detailGuidCopyCallFriend" = "You enter your friend's user ID, click to search and call."; +"Demo.TRTC.calling.detailGuidAppStore" = "Your friend downloads Tencent Cloud Media Services."; +"Demo.TRTC.calling.detailGuidAppReg" = "Your friend opens the app, logs in, and selects 'Call'."; +"Demo.TRTC.calling.detailTRTCGuidAppReg" = "Your friend opens the app and selects 'Call'."; +"Demo.TRTC.calling.detailGuidWebMainPage" = "Your friend opens the link on their computer, logs in, and selects 'Call'."; +"Demo.TRTC.calling.detailGuidWebFriendCard" = "Your friend finds their user ID on the right and sends it to you."; +"Demo.TRTC.calling.detailGuideH5" = "H5"; +"Demo.TRTC.calling.detailGuideApp" = "APP"; +"Demo.TRTC.calling.detailGuidePC" = "PC"; +"Demo.TRTC.calling.detailGuideReminerText" = "Single-player multi-terminal experience requires an operational computer by your side."; +"Demo.TRTC.calling.detailGuideSteps" = "Steps"; +"Demo.TRTC.calling.guideCopySucess" = "Copied successfully"; +"Demo.TRTC.calling.detailMultiGuideReminerText" = "Inviting others to join requires two Tencent RTC user IDs."; +"Demo.TRTC.Guide.cancel" = "cancel"; diff --git a/application/assembly/Modules/Call/Guide/Resource/Localized/zh-Hans.lproj/GuideLocalized.strings b/application/assembly/Modules/Call/Guide/Resource/Localized/zh-Hans.lproj/GuideLocalized.strings new file mode 100644 index 00000000..b9fac42d --- /dev/null +++ b/application/assembly/Modules/Call/Guide/Resource/Localized/zh-Hans.lproj/GuideLocalized.strings @@ -0,0 +1,27 @@ +/* + GuideLocalized.strings + main +*/ +"Demo.TRTC.Guide.RoomSingleUser" = "单人多端体验"; +"Demo.TRTC.Guide.RoomMultiUsers" = "邀请他人加入"; +"Demo.TRTC.Guide.call" = "通话"; +"Demo.TRTC.Guide.room" = "会议"; +"Demo.TRTC.Guide.roomCopyLink" = "点击按钮复制以下地址,发送给电脑 +https://rtcube.cloud.tencent.com/com"; +"Demo.TRTC.Guide.createRoom" = "创建一个新的房间,查看并记住房间号"; +"Demo.TRTC.Guide.roomOpenLink" = "使用电脑浏览器打开地址,完成注册登录(请使用腾讯云帐号注册登录)"; +"Demo.TRTC.Guide.joinRoom" = "浏览器中选择\u201c加入房间\u201d,输入房间号加入"; +"Demo.TRTC.Guide.roomManage" = "通过\u201c转交房主、设置为管理员\u201d等功能体验不同平台、不同角色功能吧~"; +"Demo.TRTC.Guide.AppDL" = "您的好友下载\u201c腾讯云音视频\u201dAPP"; +"Demo.TRTC.Guide.RoomLogin" = "好友打开APP注册登录后,点击\u201c会议\u201d模块"; +"Demo.TRTC.Guide.AppJoinRoom" = "好友选择\u201c加入房间\u201d,输入房间号加入房间"; +"Demo.TRTC.Guide.AppcreateRoom" = "创建一个新的房间(自由发言房间或上台发言房间),并转告好友房间号"; +"Demo.TRTC.Guide.AppRoomDesc" = "与好友一起体验不同角色功能吧~"; +"Demo.TRTC.Guide.othersUseWeb" = "好友使用浏览器"; +"Demo.TRTC.Guide.othersUseApp" = "好友下载\u201c腾讯云音视频\u201dAPP"; +"Demo.TRTC.calling.detailGuideSteps" = "详细步骤"; +"Demo.TRTC.calling.detailGuideReminerText" = "单人多端体验,需要您身边有一台可操作的电脑。"; +"Demo.TRTC.calling.detailGuidCopyURL" = "复制链接"; +"Demo.TRTC.calling.guideCopySucess" = "已复制到剪切板"; +"Demo.TRTC.calling.detailMultiGuideReminerText" = "邀请他人加入,需要2个注册并在线的腾讯云音视频用户ID。"; +"Demo.TRTC.Guide.cancel" = "取消"; diff --git a/application/assembly/Modules/Call/Guide/Resource/callingGuideJson/callingSingleGuideData.json b/application/assembly/Modules/Call/Guide/Resource/callingGuideJson/callingSingleGuideData.json new file mode 100644 index 00000000..14b0285e --- /dev/null +++ b/application/assembly/Modules/Call/Guide/Resource/callingGuideJson/callingSingleGuideData.json @@ -0,0 +1,45 @@ +[{ + "leftContextImageName": "", + "leftContextImageName_en": "", + "text": "点击按钮复制以下地址,发送给电脑\nhttps:\/\/rtcube.cloud.tencent.com\/com", + "text_en": "Click the button to copy the link and send to your computer.\nhttps:\/\/trtc.io\/demo", + "hasCopyButton": true, + "avartarType": 1, + "name": "手机", + "name_en": "phone", + "avartarImageName": "guide_avatar_phone", + "rightContextImageName": "" +}, { + "text": "使用电脑浏览器打开地址,完成注册登录(请使用腾讯云帐号注册登录)", + "text_en": "Open the link in the computer browser.", + "avartarType": 2, + "avartarImageName": "guide_avatar_pc", + "name": "电脑", + "name_en": "pc", + "rightContextImageName": "", + "hasCopyButton": false, + "leftContextImageName": "guide_calling_weblogin", + "leftContextImageName_en": "guide_calling_weblogin_en" +}, { + "hasCopyButton": false, + "text": "查看用户ID", + "text_en": "Get the User ID.", + "avartarType": 1, + "name": "手机", + "name_en": "phone", + "avartarImageName": "guide_avatar_phone", + "rightContextImageName": "", + "leftContextImageName": "guide_calling_webuserid", + "leftContextImageName_en": "guide_calling_webuserid_en" +}, { + "leftContextImageName": "guide_calling_appcall", + "leftContextImageName_en": "guide_calling_appcall_en", + "hasCopyButton": false, + "avartarType": 2, + "avartarImageName": "guide_avatar_pc", + "name": "手机", + "name_en": "phone", + "text": "你输入好友的用户ID,点击呼叫", + "text_en": "Click ”Call another user“, input the user ID on computer and call.", + "rightContextImageName": "" +}] diff --git a/application/assembly/Modules/Call/Guide/Resource/callingGuideJson/callingWithAppGuideData.json b/application/assembly/Modules/Call/Guide/Resource/callingGuideJson/callingWithAppGuideData.json new file mode 100644 index 00000000..a94c2f03 --- /dev/null +++ b/application/assembly/Modules/Call/Guide/Resource/callingGuideJson/callingWithAppGuideData.json @@ -0,0 +1,45 @@ +[{ + "rightContextImageName": "", + "text": "您的好友下载“腾讯云音视频”APP", + "text_en": "Your friend downloads Tencent RTC app.", + "hasCopyButton": false, + "avartarType": 2, + "avartarImageName": "guide_avatar_friend", + "name": "朋友", + "name_en": "friend", + "leftContextImageName": "guide_room_appdl", + "leftContextImageName_en": "guide_room_appdl_en" +}, { + "leftContextImageName": "guide_calling_applogin", + "leftContextImageName_en": "guide_calling_applogin_en", + "hasCopyButton": false, + "avartarType": 2, + "avartarImageName": "guide_avatar_friend", + "name": "朋友", + "name_en": "friend", + "text": "好友打开APP注册登录后,点击“通话”模块", + "text_en": "Opens the app and click “Calling”.", + "rightContextImageName": "" +}, { + "text": "好友选择“呼叫其他用户”,在搜索栏下方找到自己的用户ID", + "text_en": "Get the user ID.", + "avartarType": 2, + "avartarImageName": "guide_avatar_friend", + "name": "朋友", + "name_en": "friend", + "rightContextImageName": "", + "hasCopyButton": false, + "leftContextImageName": "guide_calling_appuserid", + "leftContextImageName_en": "guide_calling_appuserid_en" +}, { + "hasCopyButton": false, + "text": "你输入好友的用户ID,点击呼叫", + "text_en": "Enter the user ID and call.", + "avartarType": 1, + "avartarImageName": "guide_avatar_self", + "name": "自己", + "name_en": "self", + "rightContextImageName": "", + "leftContextImageName": "guide_calling_appcall", + "leftContextImageName_en": "guide_calling_appcall_en" +}] diff --git a/application/assembly/Modules/Call/Guide/Resource/callingGuideJson/callingWithWebGuideData.json b/application/assembly/Modules/Call/Guide/Resource/callingGuideJson/callingWithWebGuideData.json new file mode 100644 index 00000000..d296e99d --- /dev/null +++ b/application/assembly/Modules/Call/Guide/Resource/callingGuideJson/callingWithWebGuideData.json @@ -0,0 +1,45 @@ +[{ + "leftContextImageName": "", + "leftContextImageName_en": "", + "text": "点击按钮复制以下地址,发送给电脑\nhttps:\/\/rtcube.cloud.tencent.com\/com", + "text_en": "Click the button to copy the link and send to your computer.\nhttps:\/\/trtc.io\/demo", + "hasCopyButton": true, + "avartarType": 1, + "avartarImageName": "guide_avatar_self", + "name": "自己", + "name_en": "self", + "rightContextImageName": "" +}, { + "text": "好友用浏览器打开地址,点击“通话”模块(需先完成注册登录)", + "text_en": "Open the page and click ”Call“.", + "avartarType": 2, + "avartarImageName": "guide_avatar_friend", + "name": "朋友", + "name_en": "friend", + "rightContextImageName": "", + "hasCopyButton": false, + "leftContextImageName": "guide_calling_webopencall", + "leftContextImageName_en": "guide_calling_weblogin_en" +}, { + "text": "好友选择“呼叫其他用户”,在搜索栏下方找到自己的用户ID", + "text_en": "Get the user ID.", + "avartarType": 2, + "avartarImageName": "guide_avatar_friend", + "name": "朋友", + "name_en": "friend", + "rightContextImageName": "", + "hasCopyButton": false, + "leftContextImageName": "guide_calling_appuserid", + "leftContextImageName_en": "guide_calling_appuserid_en" +}, { + "hasCopyButton": false, + "text": "你输入好友的用户ID,点击呼叫", + "text_en": "Enter the user ID and call.", + "avartarType": 1, + "avartarImageName": "guide_avatar_self", + "name": "自己", + "name_en": "self", + "rightContextImageName": "", + "leftContextImageName": "guide_calling_appcall", + "leftContextImageName_en": "guide_calling_appcall_en" +}] diff --git a/application/assembly/Modules/Call/Guide/UI/GuideHomeViewController.swift b/application/assembly/Modules/Call/Guide/UI/GuideHomeViewController.swift new file mode 100644 index 00000000..92b5504e --- /dev/null +++ b/application/assembly/Modules/Call/Guide/UI/GuideHomeViewController.swift @@ -0,0 +1,180 @@ +// +// GuideHomeViewController.swift +// main +// +// pod 'JXSegmentedView' +// pod 'JXPagingView/Paging' + +import UIKit +import AtomicX +import JXSegmentedView +import JXPagingView +import TUICore + +class GuideHomeModel { + var singlePlayerJsonName: String? + var withAppJsonName: String? + var withWebJsonName: String? + + init(singlePlayerJsonName: String? = nil, withAppJsonName: String? = nil, withWebJsonName: String? = nil) { + self.singlePlayerJsonName = singlePlayerJsonName + self.withAppJsonName = withAppJsonName + self.withWebJsonName = withWebJsonName + } +} + +class GuideHomeViewController: UIViewController { + + private let segmentBorderView: UIView = { + let view = UIView(frame: .zero) + view.backgroundColor = ThemeStore.shared.colorTokens.strokeColorSecondary + return view + }() + + var selectedIndex: Int = 0 + convenience init(selectedIndex: Int, + homeJsonData: GuideHomeModel, + copyUrl: String, + copyUrlEn: String) { + self.init() + self.selectedIndex = selectedIndex + self.viewControllers.append(GuideViewController(viewType: .SinglePlayer, + jsonFileData: homeJsonData, + url: copyUrl, + urlEn: copyUrlEn)) + self.viewControllers.append(GuideViewController(viewType: .MultiPlayerWithWeb, + jsonFileData: homeJsonData, + url: copyUrl, + urlEn: copyUrlEn)) + } + + private var viewControllers: [GuideViewController] = [] + + private lazy var dataSource: JXSegmentedDotDataSource = { + let source = JXSegmentedDotDataSource() + source.titles = [GuideLocalize("Demo.TRTC.Guide.RoomSingleUser"), + GuideLocalize("Demo.TRTC.Guide.RoomMultiUsers")] + source.dotStates = [false, false] + source.titleNormalColor = UIColor(red: 98, green: 110, blue: 132, alpha: 0.6) + source.titleSelectedColor = UIColor(red: 0, green: 108, blue: 255) + source.titleNormalFont = ThemeStore.shared.typographyTokens.Regular16 + source.titleSelectedFont = ThemeStore.shared.typographyTokens.Regular16 + source.isTitleZoomEnabled = false + source.isTitleColorGradientEnabled = true + source.isItemSpacingAverageEnabled = true + source.itemSpacing = convertPixel(w: 9) + source.dotSize = CGSize(width: convertPixel(w: 116), height: convertPixel(h: 20)) + source.itemWidth = convertPixel(w: 116) + source.dotColor = UIColor.red + return source + }() + + private lazy var segmentedView: JXSegmentedView = { + let view = JXSegmentedView(frame: .zero) + view.backgroundColor = ThemeStore.shared.colorTokens.bgColorOperate + view.dataSource = dataSource + view.listContainer = listContainerView + view.defaultSelectedIndex = selectedIndex + let indicator = JXSegmentedIndicatorLineView() + indicator.indicatorHeight = 4 + indicator.indicatorWidth = 84 + indicator.indicatorColor = UIColor(red: 10, green: 109, blue: 217) + indicator.verticalOffset = 0 + view.indicators = [indicator] + return view + }() + + private lazy var listContainerView: JXSegmentedListContainerView = { + let view = JXSegmentedListContainerView(dataSource: self) + view.backgroundColor = UIColor.clear + return view + }() + + override func viewDidLoad() { + super.viewDidLoad() + view.backgroundColor = ThemeStore.shared.colorTokens.bgColorOperate + let backBtn = UIButton(type: .custom) + backBtn.setImage(AppAssemblyBundle.image(named: "calling_back"), for: .normal) + backBtn.addTarget(self, action: #selector(backBtnClick), for: .touchUpInside) + let item = UIBarButtonItem(customView: backBtn) + item.tintColor = UIColor.black + navigationItem.leftBarButtonItem = item + self.navigationController?.navigationBar.shadowImage = UIImage() + constructViewHierarchy() + activateConstraints() + } + + override func viewWillAppear(_ animated: Bool) { + super.viewWillAppear(animated) + navigationController?.setNavigationBarHidden(false, animated: false) + } +} + +extension GuideHomeViewController: JXSegmentedListContainerViewDataSource { + + func numberOfLists(in listContainerView: JXSegmentedListContainerView) -> Int { + if let titleDataSource = segmentedView.dataSource as? JXSegmentedBaseDataSource { + return titleDataSource.dataSource.count + } + return 0 + } + + func listContainerView(_ listContainerView: JXSegmentedListContainerView, initListAt index: Int) -> JXSegmentedListContainerViewListDelegate { + return viewControllers[index] + } +} + +extension GuideHomeViewController { + private func constructViewHierarchy() { + view.addSubview(segmentedView) + view.addSubview(segmentBorderView) + view.addSubview(listContainerView) + } + + private func activateConstraints() { + let naviFullHeight = navigationFullHeight() + segmentedView.snp.makeConstraints { make in + make.top.equalToSuperview().offset(navigationFullHeight()) + make.leading.trailing.equalTo(0) + make.height.equalTo(49) + } + segmentBorderView.snp.makeConstraints { make in + make.top.equalToSuperview().offset(naviFullHeight) + make.left.right.equalToSuperview() + make.height.equalTo(1) + } + listContainerView.snp.makeConstraints { make in + make.leading.trailing.equalTo(0) + make.bottom.equalToSuperview() + make.top.equalTo(segmentedView.snp.bottom) + } + } +} + +extension GuideHomeViewController { + @objc func backBtnClick() { + self.navigationController?.popViewController(animated: true) + } +} + +// MARK: - JXSegmentedListContainerViewListDelegate conformance for GuideViewController + +extension GuideViewController: JXPagingViewListViewDelegate, JXSegmentedListContainerViewListDelegate { + + func listView() -> UIView { + return view + } + + func listScrollView() -> UIScrollView { + return UIScrollView() // placeholder; guide page uses its own table scroll + } + + func listViewDidScrollCallback(callback: @escaping (UIScrollView) -> Void) { + self.listViewDidScrollCallback = callback + } + + func listWillAppear() {} + func listDidAppear() {} + func listWillDisappear() {} + func listDidDisappear() {} +} diff --git a/application/assembly/Modules/Call/Guide/UI/GuideSelectView.swift b/application/assembly/Modules/Call/Guide/UI/GuideSelectView.swift new file mode 100644 index 00000000..8893eb7b --- /dev/null +++ b/application/assembly/Modules/Call/Guide/UI/GuideSelectView.swift @@ -0,0 +1,138 @@ +// +// GuideSelectView.swift +// main +// + +import UIKit +import AtomicX + +enum GuideSelectedType { + case app + case web +} + +class GuideSelectCell: UITableViewCell { + static let reuseId = "GuideSelectCell" + + let selectLabel: UILabel = { + let label = UILabel() + label.font = .systemFont(ofSize: 16) + label.textColor = ThemeStore.shared.colorTokens.textColorPrimary + return label + }() + + override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { + super.init(style: style, reuseIdentifier: reuseIdentifier) + constructViewHierarchy() + activateConstraints() + contentView.layer.borderColor = ThemeStore.shared.colorTokens.strokeColorPrimary.cgColor + contentView.layer.borderWidth = 1 + contentView.layer.cornerRadius = ThemeStore.shared.borderRadius.radius8 + selectionStyle = .none + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + private func constructViewHierarchy() { + contentView.addSubview(selectLabel) + } + + private func activateConstraints() { + selectLabel.snp.makeConstraints { make in + make.leading.equalToSuperview().offset(20.scale375()) + make.centerY.equalToSuperview() + } + } +} + +class GuideSelectView: UIView { + var selectedTypeClosure: (GuideSelectedType) -> Void = { _ in } + + let selectLabel: UILabel = { + let label = UILabel() + label.font = .systemFont(ofSize: 16) + label.textColor = ThemeStore.shared.colorTokens.textColorPrimary + return label + }() + + private let iconImageView: UIImageView = { + let imageView = UIImageView(frame: .zero) + imageView.image = AppAssemblyBundle.image(named: "guide_unfold_arrow") + imageView.sizeToFit() + return imageView + }() + + private lazy var selectData: [[String: Any]] = { + return [ + ["desc": GuideLocalize("Demo.TRTC.Guide.othersUseWeb"), + "type": GuideSelectedType.web], + ["desc": GuideLocalize("Demo.TRTC.Guide.othersUseApp"), + "type": GuideSelectedType.app], + ] + }() + + convenience init(_ viewType: PageType?) { + self.init(frame: .zero) + if viewType == .MultiPlayerWithWeb { + configSelectData(selectType: .web) + } else if viewType == .MultiPlayerWithApp { + configSelectData(selectType: .app) + } + } + + private var isViewReady: Bool = false + override func didMoveToWindow() { + super.didMoveToWindow() + guard !isViewReady else { return } + isViewReady = true + constructViewHierarchy() + activateConstraints() + } + + func configSelectData(selectType: GuideSelectedType) { + if let selectDict = selectData.first(where: { $0["type"] as? GuideSelectedType == selectType }) { + self.selectLabel.text = selectDict["desc"] as? String + } + } + + private func constructViewHierarchy() { + addSubview(selectLabel) + addSubview(iconImageView) + } + + private func activateConstraints() { + selectLabel.snp.makeConstraints { make in + make.leading.equalToSuperview().offset(20.scale375()) + make.centerY.equalToSuperview() + } + iconImageView.snp.makeConstraints { make in + make.trailing.equalToSuperview().offset(-20.scale375()) + make.centerY.equalToSuperview() + } + } +} + +extension GuideSelectView: UITableViewDelegate, UITableViewDataSource { + func numberOfSections(in tableView: UITableView) -> Int { + return 1 + } + + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + return self.selectData.count + } + + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + let cell = tableView.dequeueReusableCell(withIdentifier: GuideSelectCell.reuseId, for: indexPath) as! GuideSelectCell + let dic = selectData[indexPath.row] + cell.selectLabel.text = dic["desc"] as? String + return cell + } + + func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { + let dic = selectData[indexPath.row] + let selectType = dic["type"] as! GuideSelectedType + selectedTypeClosure(selectType) + } +} diff --git a/application/assembly/Modules/Call/Guide/UI/GuideTableViewCell.swift b/application/assembly/Modules/Call/Guide/UI/GuideTableViewCell.swift new file mode 100644 index 00000000..ea93e044 --- /dev/null +++ b/application/assembly/Modules/Call/Guide/UI/GuideTableViewCell.swift @@ -0,0 +1,238 @@ +// +// GuideTableViewCell.swift +// main +// + +import UIKit +import AtomicX + +class GuideTableViewCell: UITableViewCell { + static let reuseId = "GuideTableViewCell" + + let avatarImageView: UIImageView = { + let imageView = UIImageView(frame: .zero) + imageView.contentMode = .scaleAspectFit + imageView.image = AppAssemblyBundle.image(named: "calling_guide_friendAvatar") + return imageView + }() + + let nameLabel: UILabel = { + let label = UILabel() + label.font = ThemeStore.shared.typographyTokens.Regular12 + return label + }() + + let contextTextLabel: UILabel = { + let label = UILabel(frame: .zero) + label.numberOfLines = 0 + label.lineBreakMode = .byWordWrapping + label.textColor = ThemeStore.shared.colorTokens.textColorPrimary + label.font = ThemeStore.shared.typographyTokens.Regular14 + return label + }() + + let leftContextImageView: UIImageView = { + let imageView = UIImageView(frame: .zero) + imageView.contentMode = .scaleAspectFit + return imageView + }() + + let rightContextImageView: UIImageView = { + let imageView = UIImageView(frame: .zero) + imageView.contentMode = .scaleAspectFit + return imageView + }() + + let contextContainer: UIView = { + let view = UIView(frame: .zero) + view.backgroundColor = ThemeStore.shared.colorTokens.bgColorDefault + return view + }() + + let copyButtonContent: UIView = { + let view = UIView(frame: .zero) + view.backgroundColor = .clear + view.isHidden = true + return view + }() + + let copyButtonContentBorder: UIView = { + let view = UIView(frame: .zero) + view.backgroundColor = ThemeStore.shared.colorTokens.strokeColorSecondary + return view + }() + + let copyButton: UIButton = { + let button = UIButton(type: .custom) + button.setTitle(GuideLocalize("Demo.TRTC.calling.detailGuidCopyURL"), for: .normal) + button.setTitleColor(ThemeStore.shared.colorTokens.buttonColorPrimaryDefault, for: .normal) + button.titleLabel?.font = ThemeStore.shared.typographyTokens.Medium14 + return button + }() + + var copyAction: () -> Void = {} + + override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { + super.init(style: style, reuseIdentifier: reuseIdentifier) + constructViewHierarchy() + activateConstraints() + bindInteraction() + } + + override func draw(_ rect: CGRect) { + super.draw(rect) + contextContainer.roundedRect(.allCorners, withCornerRatio: 10) + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + override func layoutSubviews() { + super.layoutSubviews() + } +} + +extension GuideTableViewCell { + private func constructViewHierarchy() { + contentView.addSubview(avatarImageView) + contentView.addSubview(contextContainer) + contentView.addSubview(nameLabel) + contextContainer.addSubview(contextTextLabel) + contextContainer.addSubview(leftContextImageView) + contextContainer.addSubview(rightContextImageView) + contextContainer.addSubview(copyButtonContent) + copyButtonContent.addSubview(copyButtonContentBorder) + copyButtonContent.addSubview(copyButton) + } + + private func activateConstraints() { + avatarImageView.snp.makeConstraints { make in + make.top.equalTo(contextContainer) + make.left.equalToSuperview() + make.height.width.equalTo(34.scale375Width()) + } + contextContainer.snp.makeConstraints { make in + make.width.equalTo(301.scale375Width()) + make.left.equalToSuperview() + make.top.equalTo(contextTextLabel).offset(-12.scale375Height()) + make.bottom.equalTo(leftContextImageView).offset(12) + } + contextTextLabel.snp.makeConstraints { make in + make.top.leading.trailing.equalToSuperview().inset(12.scale375()) + } + leftContextImageView.snp.makeConstraints { make in + make.top.equalTo(contextTextLabel.snp.bottom).offset(10.scale375Height()) + make.trailing.leading.equalToSuperview().inset(12.scale375Width()) + make.bottom.equalToSuperview().offset(-12.scale375Height()) + } + + copyButtonContent.snp.makeConstraints { make in + make.left.right.bottom.equalToSuperview() + make.height.equalTo(44.scale375Height()) + } + copyButtonContentBorder.snp.makeConstraints { make in + make.top.equalToSuperview() + make.height.equalTo(1.scale375Height()) + make.left.equalTo(12.scale375Width()) + make.centerX.equalToSuperview() + } + copyButton.snp.makeConstraints { make in + make.edges.equalToSuperview() + } + } + + func bindInteraction() { + copyButton.addTarget(self, action: #selector(copyUrlClicked), for: .touchUpInside) + } +} + +extension GuideTableViewCell { + func config(model: GuideModel) { + let avartarType = model.avartarType + contextTextLabel.text = model.text + nameLabel.text = model.name + nameLabel.layoutSubviews() + avatarImageView.image = AppAssemblyBundle.image(named: model.avatarImageName) + leftContextImageView.image = AppAssemblyBundle.image(named: model.leftContextImageName) + copyButtonContent.isHidden = !model.hasCopyButton + contextTextLabel.snp.remakeConstraints { make in + make.top.leading.trailing.equalToSuperview().inset(12.scale375()) + if model.hasCopyButton { + make.bottom.equalTo(copyButtonContent.snp.top).offset(-16.scale375Height()) + } + } + if avartarType == .left { + updateConstraintsToLeft() + } else { + updateConstraintsToRight() + } + } +} + +extension GuideTableViewCell { + + override func systemLayoutSizeFitting(_ targetSize: CGSize, + withHorizontalFittingPriority horizontalFittingPriority: UILayoutPriority, + verticalFittingPriority: UILayoutPriority) -> CGSize { + let size = super.systemLayoutSizeFitting(targetSize, withHorizontalFittingPriority: horizontalFittingPriority, + verticalFittingPriority: verticalFittingPriority) + avatarImageView.layoutIfNeeded() + contextContainer.layoutIfNeeded() + contextTextLabel.layoutIfNeeded() + let contextContainerHeight = contextContainer.frame.height + return CGSize(width: size.width, height: contextContainerHeight + 20) + } +} + +extension GuideTableViewCell { + private func updateConstraintsToLeft() { + avatarImageView.snp.remakeConstraints { make in + make.top.equalTo(contextContainer) + make.left.equalToSuperview() + make.height.width.equalTo(34.scale375Width()) + } + contextContainer.snp.remakeConstraints { make in + make.left.equalTo(avatarImageView.snp.right).offset(8.scale375Width()) + make.right.equalToSuperview().offset(-20.scale375Width()) + make.top.equalTo(contextTextLabel).offset(-12.scale375Height()) + if copyButtonContent.isHidden == false { + make.bottom.equalTo(copyButtonContent) + } else { + make.bottom.equalTo(leftContextImageView).offset(12.scale375Height()) + } + } + nameLabel.snp.remakeConstraints { make in + make.top.equalTo(avatarImageView.snp.bottom).offset(4) + make.centerX.equalTo(avatarImageView) + } + } + + private func updateConstraintsToRight() { + avatarImageView.snp.remakeConstraints { make in + make.top.equalTo(contextContainer) + make.right.equalToSuperview() + make.height.width.equalTo(34.scale375Width()) + } + contextContainer.snp.remakeConstraints { make in + make.right.equalTo(avatarImageView.snp.left).offset(-8.scale375Width()) + make.left.equalToSuperview().offset(20.scale375Width()) + make.top.equalTo(contextTextLabel).offset(-12.scale375Height()) + if copyButtonContent.isHidden == false { + make.bottom.equalTo(copyButtonContent) + } else { + make.bottom.equalTo(leftContextImageView).offset(12) + } + } + nameLabel.snp.remakeConstraints { make in + make.top.equalTo(avatarImageView.snp.bottom).offset(4) + make.centerX.equalTo(avatarImageView) + } + } +} + +extension GuideTableViewCell { + @objc func copyUrlClicked() { + copyAction() + } +} diff --git a/application/assembly/Modules/Call/Guide/UI/GuideViewController.swift b/application/assembly/Modules/Call/Guide/UI/GuideViewController.swift new file mode 100644 index 00000000..28c7ffba --- /dev/null +++ b/application/assembly/Modules/Call/Guide/UI/GuideViewController.swift @@ -0,0 +1,309 @@ +// +// GuideViewController.swift +// main +// + +import UIKit +import AtomicX +import TUICore +import Toast_Swift + +enum PageType: Int { + case SinglePlayer + case MultiPlayerWithWeb + case MultiPlayerWithApp +} + +class GuideViewController: UIViewController { + var tableViewContentOffset: CGPoint = .zero + var pageType: PageType? + var jsonFileModel: GuideHomeModel? + var copyUrl: String? + var copyUrlEn: String? + + var guideItems: [GuideModel] = [] + var listViewDidScrollCallback: ((UIScrollView) -> Void)? + + private let reminderView: UIView = { + let view = UIView(frame: .zero) + view.backgroundColor = ThemeStore.shared.colorTokens.toastColorWarning + return view + }() + + private let stepsLable: UILabel = { + let label = UILabel(frame: .zero) + label.text = GuideLocalize("Demo.TRTC.calling.detailGuideSteps") + label.font = ThemeStore.shared.typographyTokens.Medium16 + return label + }() + + private let reminderLable: UILabel = { + let label = UILabel(frame: .zero) + label.textColor = ThemeStore.shared.colorTokens.textColorWarning + label.font = ThemeStore.shared.typographyTokens.Regular12 + label.numberOfLines = 0 + return label + }() + + private lazy var guideTableView: UITableView = { + var table = UITableView(frame: .zero) + table.isScrollEnabled = true + table.dataSource = self + table.separatorStyle = .none + table.backgroundColor = UIColor.clear + table.estimatedRowHeight = 42 + table.rowHeight = UITableView.automaticDimension + table.showsVerticalScrollIndicator = false + table.register(GuideTableViewCell.self, forCellReuseIdentifier: GuideTableViewCell.reuseId) + table.separatorColor = .clear + return table + }() + + lazy var selectTableView: UITableView = { + var table = UITableView(frame: .zero) + table.isScrollEnabled = true + table.dataSource = self.selectView + table.delegate = self.selectView + table.separatorStyle = .none + table.backgroundColor = UIColor.clear + table.rowHeight = 40.scale375() + table.showsVerticalScrollIndicator = false + table.register(GuideSelectCell.self, forCellReuseIdentifier: GuideSelectCell.reuseId) + table.separatorColor = .clear + table.isHidden = true + return table + }() + + lazy var selectView: GuideSelectView = { + let view = GuideSelectView(self.pageType) + view.selectedTypeClosure = { [weak self] selectType in + guard let self = self else { return } + var pt: PageType? + if selectType == .web { + pt = .MultiPlayerWithWeb + } else if selectType == .app { + pt = .MultiPlayerWithApp + } + if pt != self.pageType { + self.pageType = pt + self.configureData(withType: self.pageType) + self.selectView.configSelectData(selectType: selectType) + self.selectTableView.isHidden = true + let firstIndexPath = IndexPath(row: 0, section: 0) + self.guideTableView.scrollToRow(at: firstIndexPath, at: .top, animated: false) + } + } + view.layer.borderColor = ThemeStore.shared.colorTokens.strokeColorPrimary.cgColor + view.layer.borderWidth = 1 + view.layer.cornerRadius = ThemeStore.shared.borderRadius.radius8 + view.layer.masksToBounds = true + return view + }() + + convenience init(viewType: PageType, + jsonFileData: GuideHomeModel, + url: String, + urlEn: String) { + self.init() + self.pageType = viewType + self.jsonFileModel = jsonFileData + self.configureData(withType: viewType) + self.copyUrl = url + self.copyUrlEn = urlEn + } + + override func viewDidLoad() { + super.viewDidLoad() + view.backgroundColor = ThemeStore.shared.colorTokens.bgColorOperate + let backBtn = UIButton(type: .custom) + backBtn.setImage(AppAssemblyBundle.image(named: "calling_back"), for: .normal) + backBtn.addTarget(self, action: #selector(backBtnClick), for: .touchUpInside) + let item = UIBarButtonItem(customView: backBtn) + item.tintColor = UIColor.black + navigationItem.leftBarButtonItem = item + navigationController?.navigationBar.shadowImage = UIImage() + constructViewHierarchy() + activateConstraints() + let tap = UITapGestureRecognizer(target: self, action: #selector(showSelectTableView)) + selectView.isUserInteractionEnabled = true + selectView.addGestureRecognizer(tap) + } + + override func viewWillAppear(_ animated: Bool) { + super.viewWillAppear(animated) + guideTableView.contentOffset = .zero + navigationController?.setNavigationBarHidden(false, animated: false) + } +} + +extension GuideViewController { + + func loadGuideDataJson(_ pageType: PageType?) -> [[String: Any]] { + if pageType == .SinglePlayer { + guard let singleJsonFileName = jsonFileModel?.singlePlayerJsonName + else { return [] } + return loadGuideDataJson(withJsonName: singleJsonFileName) + } else if pageType == .MultiPlayerWithWeb { + guard let webJsonFileName = jsonFileModel?.withWebJsonName + else { return [] } + return loadGuideDataJson(withJsonName: webJsonFileName) + } else { + guard let appJsonFileName = jsonFileModel?.withAppJsonName + else { return [] } + return loadGuideDataJson(withJsonName: appJsonFileName) + } + } + + func loadGuideDataJson(withJsonName name: String) -> [[String: Any]] { + guard let jsonPath = AppAssemblyBundle.path(forResource: name, ofType: "json") + else { + return [] + } + guard let data = try? Data(contentsOf: URL(fileURLWithPath: jsonPath)) else { + return [] + } + let value = try? JSONSerialization.jsonObject(with: data, options: .mutableLeaves) + if let res = value as? [[String: Any]] { + return res + } + return [] + } + + func configureData(withType pageType: PageType?) { + guideItems.removeAll() + configReminder() + let list = loadGuideDataJson(pageType) + var guideData: [GuideModel] = [] + list.forEach { dic in + if let hasCopy = dic["hasCopyButton"] as? Bool, + let avartarRawData = dic["avartarType"] as? Int, + let avatarType = AvartarType(rawValue: avartarRawData), + let avatarImageName = dic["avartarImageName"] as? String, + let name = dic["name".guideLocale()] as? String, + let contentImage = dic["leftContextImageName".guideLocale()] as? String, + let text = dic["text".guideLocale()] as? String + { + let model = GuideModel(avartarType: avatarType, + avatarImageName: avatarImageName, + name: name, + hasCopyButton: hasCopy, + text: text, + contextImageName: contentImage) + guideData.append(model) + } + } + guideItems = guideData + guideTableView.reloadData() + } + + func configReminder() { + if pageType == .SinglePlayer { + reminderLable.text = GuideLocalize("Demo.TRTC.calling.detailGuideReminerText") + } else { + reminderLable.text = GuideLocalize("Demo.TRTC.calling.detailMultiGuideReminerText") + } + } +} + +extension GuideViewController { + private func constructViewHierarchy() { + view.addSubview(reminderView) + reminderView.addSubview(reminderLable) + view.addSubview(stepsLable) + view.addSubview(selectView) + view.addSubview(guideTableView) + view.addSubview(selectTableView) + } + + private func activateConstraints() { + reminderView.snp.makeConstraints { make in + make.left.greaterThanOrEqualTo(reminderLable).offset(10) + make.height.lessThanOrEqualTo(52) + make.height.greaterThanOrEqualTo(42) + make.top.left.trailing.equalToSuperview() + } + reminderLable.snp.makeConstraints { make in + make.left.equalToSuperview().offset(TUIGlobalization.isChineseAppLocale() ? 16 : 10) + make.left.right.lessThanOrEqualToSuperview().inset(16) + make.bottom.top.lessThanOrEqualToSuperview().inset(12) + } + selectView.snp.makeConstraints { make in + make.top.equalTo(reminderLable.snp.bottom).offset(16) + make.leading.trailing.equalToSuperview().inset(16) + make.height.equalTo(pageType == .SinglePlayer ? 0 : 40) + } + selectTableView.snp.makeConstraints { make in + make.leading.trailing.equalTo(selectView) + make.top.equalTo(selectView).offset(40) + make.height.equalTo(90) + } + stepsLable.snp.makeConstraints { make in + make.top.equalTo(selectView.snp.bottom).offset(20) + make.leading.equalTo(reminderLable) + } + + guideTableView.snp.makeConstraints { make in + make.top.equalTo(stepsLable.snp.bottom) + make.left.equalToSuperview().offset(20) + make.centerX.equalToSuperview() + make.bottom.equalToSuperview().offset(-10) + } + } +} + +extension GuideViewController: UITableViewDataSource, UITabBarControllerDelegate { + + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + return guideItems.count + } + + func numberOfSections(in tableView: UITableView) -> Int { + return 1 + } + + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + var cell = tableView.dequeueReusableCell(withIdentifier: GuideTableViewCell.reuseId, for: indexPath) as! GuideTableViewCell + if cell.isEqual(nil) { + cell = GuideTableViewCell(frame: .zero) + } + let model = guideItems[indexPath.row] + cell.config(model: model) + cell.selectionStyle = .none + cell.copyAction = { [weak self] in + guard let self = self else { return } + self.copyH5URL() + } + return cell + } +} + +extension GuideViewController { + @objc func backBtnClick() { + self.navigationController?.popViewController(animated: true) + } + + func copyH5URL() { + var stringToCopy: String? + if TUIGlobalization.isChineseAppLocale() { + stringToCopy = copyUrl + } else { + stringToCopy = copyUrlEn + } + UIPasteboard.general.string = stringToCopy + view.makeToast(GuideLocalize("Demo.TRTC.calling.guideCopySucess")) + } + + @objc func showSelectTableView() { + selectTableView.isHidden = !selectTableView.isHidden + } +} + +extension String { + fileprivate func guideLocale() -> String { + if TUIGlobalization.isChineseAppLocale() { + return self + } else { + return self + "_en" + } + } +} diff --git a/application/assembly/Modules/Call/Model/CallingMenuModel.swift b/application/assembly/Modules/Call/Model/CallingMenuModel.swift new file mode 100644 index 00000000..42815c0e --- /dev/null +++ b/application/assembly/Modules/Call/Model/CallingMenuModel.swift @@ -0,0 +1,34 @@ +// +// CallingMenuModel.swift +// main +// + +import UIKit + +let TUICore_ContactUsService = "TUICore_ContactUsService" +let TUICore_ContactService_ShowContactEntrance = "TUICore_ContactService_ShowContactEntrance" +let TUICore_ContactService_HideContactEntrance = "TUICore_ContactService_HideContactEntrance" +let TUICore_ContactService_gotoContactUS = "TUICore_ContactService_gotoContactUS" + +typealias HandlerType = (_ model: CallingMenuModel) -> Void + +struct CallingMenuModel { + var isUnfoled: Bool = false + let iconImageName: String + let title: String + let content: String + var selectHandle: () -> Void + var subInfos: [CallingRobotModel] = [] + var stressContent: [String] + var iconImage: UIImage? { + AppAssemblyBundle.image(named: iconImageName) + } + + init(title: String, content: String, imageName: String, stressContent: [String] = [], selectHandle: @escaping () -> Void) { + self.title = title + self.content = content + self.selectHandle = selectHandle + self.iconImageName = imageName + self.stressContent = stressContent + } +} diff --git a/application/assembly/Modules/Call/Model/CallingRequestRobotModel.swift b/application/assembly/Modules/Call/Model/CallingRequestRobotModel.swift new file mode 100644 index 00000000..e966c653 --- /dev/null +++ b/application/assembly/Modules/Call/Model/CallingRequestRobotModel.swift @@ -0,0 +1,22 @@ +// +// CallingRequestRobotModel.swift +// main +// + +import UIKit + +struct CallingRequestRobotModel: Decodable { + let errorCode: Int + let errorMessage: String + var data: CallingVirtualRobotArrayModel +} + +struct CallingVirtualRobotArrayModel: Decodable { + let virtualUsers: [CallingVirtualRobotModel?]? +} + +struct CallingVirtualRobotModel: Decodable { + let name: String? + let avatar: String? + let virtualUserId: String +} diff --git a/application/assembly/Modules/Call/Model/CallingRobotModel.swift b/application/assembly/Modules/Call/Model/CallingRobotModel.swift new file mode 100644 index 00000000..71e408e1 --- /dev/null +++ b/application/assembly/Modules/Call/Model/CallingRobotModel.swift @@ -0,0 +1,29 @@ +// +// CallingRobotModel.swift +// main +// + +import UIKit + +class CallingRobotModel: NSObject { + let imageName: String + let title: String + let buttonIconImage: String + let hasTopBorder: Bool + let hasBotBorder: Bool + let callType: CallBotType + + init(imageName: String, title: String, + buttonIconImage: String, + hasTopBorder: Bool, + hasBotBorder: Bool, + botCallType: CallBotType) + { + self.imageName = imageName + self.title = title + self.buttonIconImage = buttonIconImage + self.hasTopBorder = hasTopBorder + self.hasBotBorder = hasBotBorder + self.callType = botCallType + } +} diff --git a/application/assembly/Modules/Call/Resource/CallingExtensions.swift b/application/assembly/Modules/Call/Resource/CallingExtensions.swift new file mode 100644 index 00000000..c76894c0 --- /dev/null +++ b/application/assembly/Modules/Call/Resource/CallingExtensions.swift @@ -0,0 +1,20 @@ +// +// CallingExtensions.swift +// main +// + +import UIKit + +// MARK: - UIView + roundedRect(_:withCornerRatio:) + +extension UIView { + func roundedRect(_ corners: UIRectCorner, withCornerRatio ratio: CGFloat) { + let path = UIBezierPath(roundedRect: bounds, + byRoundingCorners: corners, + cornerRadii: CGSize(width: ratio, height: ratio)) + let mask = CAShapeLayer() + mask.frame = bounds + mask.path = path.cgPath + layer.mask = mask + } +} diff --git a/application/assembly/Modules/Call/Resource/Localized/CallingLocalized.swift b/application/assembly/Modules/Call/Resource/Localized/CallingLocalized.swift new file mode 100644 index 00000000..5df8516c --- /dev/null +++ b/application/assembly/Modules/Call/Resource/Localized/CallingLocalized.swift @@ -0,0 +1,20 @@ +// +// CallingLocalized.swift +// AppAssembly +// + +import Foundation +import AtomicX + +// MARK: Calling + +private let CallingLocalizeTableName = "CallingLocalized" + +func CallingLocalize(_ key: String, _ args: CVarArg...) -> String { + return BundleLoader.moduleLocalized( + key: key, + in: AppAssemblyBundle.bundle, + tableName: CallingLocalizeTableName, + arguments: args + ) +} diff --git a/application/assembly/Modules/Call/Resource/Localized/en.lproj/CallingLocalized.strings b/application/assembly/Modules/Call/Resource/Localized/en.lproj/CallingLocalized.strings new file mode 100644 index 00000000..8472cdb8 --- /dev/null +++ b/application/assembly/Modules/Call/Resource/Localized/en.lproj/CallingLocalized.strings @@ -0,0 +1,128 @@ +/* + CallingLocalized.strings + main + + 通话模块英文本地化 +*/ + +"Demo.TRTC.calling.yourID" = "Your ID:"; +"Demo.TRTC.calling.searchID" = "Online user ID"; +"Demo.TRTC.calling.yourphonenumber" = "Your mobile number "; +"Demo.TRTC.calling.searchphonenumber" = "Mobile number"; +"Demo.TRTC.calling.searching" = "Search"; +"Demo.TRTC.calling.searchandcall" = "Search for a registered user\n to start a call"; +"Demo.TRTC.calling.callingbegan" = "Joined call"; +"Demo.TRTC.calling.callingcancel" = "Call cancelled"; +"Demo.TRTC.calling.callingtimeout" = "Call timed out"; +"Demo.TRTC.calling.callingrefuse" = "declined the call"; +"Demo.TRTC.calling.callingleave" = "left the call"; +"Demo.TRTC.calling.callingnoresponse" = "didn't answer"; +"Demo.TRTC.calling.callingbusy" = "is busy"; +"Demo.TRTC.calling.searchingfailed" = "Search failed"; +"Demo.TRTC.calling.cantinviteself" = "You cannot invite yourself."; +"Demo.TRTC.Streaming.call" = "Call"; +"Demo.TRTC.calling.add" = "Add"; +"Demo.TRTC.calling.delete" = "Delete"; +"Demo.TRTC.calling.addedUser" = "User Added"; +"Demo.TRTC.calling.done" = "Done"; +"Demo.TRTC.calling.tips" = "No users added, please search to add users"; +"Demo.TRTC.calling.numExceed" = "Failed, the users exceeded the limit"; + +"Demo.TRTC.Calling.othernetworkpoor" = "The other party's network connection is poor"; +"Demo.TRTC.Calling.yournetworkpoor" = "Your network connection is poor"; + +"Demo.TRTC.Calling.robotCalling" = "Call with robot"; +"Demo.TRTC.Calling.robotInitCalling" = "Call bot"; +"Demo.TRTC.Calling.robotHostCalling" = "Call me"; +"Demo.TRTC.calling.WakupRobot" = "Activating the robot..."; +"Demo.TRTC.Calling.robotCallingContent" = "Try with just one user ID"; +"Demo.TRTC.Calling.humanCalling" = "Call another user"; +"Demo.TRTC.Calling.humanCallingContent" = "Try with another online user ID"; +"Demo.TRTC.calling.cancel" = "Cancel"; +"Demo.TRTC.calling.RobotStressString" = "one user ID"; +"Demo.TRTC.calling.callTwoHumanStress" = "another online user ID"; +"Demo.TRTC.calling.detailGuide" = "How to call another user"; +"Demo.TRTC.calling.detailGuidText" = "Your friend clicks 'Call another user' and find the user ID."; +"Demo.TRTC.calling.detailGuidCopyURL" = "Copy"; +"Demo.TRTC.calling.detailGuidCopyURLContext" = "Send the link below to your friend\nhttps://rtcube.cloud.tencent.com/com"; +"Demo.TRTC.calling.detailGuidCopySelectFriend" = "Your friend clicks 'Call another user' and find the user ID."; +"Demo.TRTC.calling.detailGuidCopyCallFriend" = "You enter your friend's user ID, click to search and call."; +"Demo.TRTC.calling.detailGuidAppStore" = "Your friend downloads Tencent Cloud Media Services."; +"Demo.TRTC.calling.detailGuidAppReg" = "Your friend opens the app, logs in, and selects 'Call'."; +"Demo.TRTC.calling.detailTRTCGuidAppReg" = "Your friend opens the app and selects 'Call'."; +"Demo.TRTC.calling.detailGuidWebMainPage" = "Your friend opens the link on their computer, logs in, and selects 'Call'."; +"Demo.TRTC.calling.detailGuidWebFriendCard" = "Your friend finds their user ID on the right and sends it to you."; +"Demo.TRTC.calling.detailGuideH5" = "H5"; +"Demo.TRTC.calling.detailGuideApp" = "APP"; +"Demo.TRTC.calling.detailGuidePC" = "PC"; +"Demo.TRTC.calling.detailGuideReminerText" = "Single-player multi-terminal experience requires an operational computer by your side."; +"Demo.TRTC.calling.detailGuideSteps" = "Directions"; +"Demo.TRTC.calling.callingBotIsBusy" = "Line busy. Please retry later."; +"Demo.TRTC.calling.callingHistory" = "Call history"; +"Demo.TRTC.calling.callingSelectTitle" = "Choose call mode"; +"Demo.TRTC.calling.call" = "Call"; +"Demo.TRTC.calling.guideCopySucess" = "Copied successfully"; +"Demo.TRTC.calling.contactCopy" = "copy"; +"Demo.TRTC.calling.IDCopyFailed" = "invalid id"; +"Demo.TRTC.calling.detailGuidRTCAppStore" = "Your friend downloads Tencent RTC."; +"Demo.TRTC.calling.detailGuidSelf" = "me"; +"Demo.TRTC.calling.detailGuidfriend" = "friend"; +"Demo.TRTC.calling.guideTitle" = "Call Guide"; +"Demo.TRTC.calling.unexpectedErr" = "Unexpected error"; +"Demo.TRTC.Portal.Main.LoginFailed" = "login failed"; +"Demo.TRTC.Portal.Main.call" = "Call"; + +/* ── CallSettings / CallViewController / JoinGroupCallViewController(RTCubeLab 专用) ── */ +"Demo.TRTC.calling.settings.groupId" = "Group ID"; +"Demo.TRTC.calling.settings.inputGroupId" = "Enter Group ID"; +"Demo.TRTC.calling.settings.userId" = "User ID"; +"Demo.TRTC.calling.settings.inputUserIds" = "Enter User IDs (comma separated)"; +"Demo.TRTC.calling.settings.mediaType" = "Media Type"; +"Demo.TRTC.calling.settings.videoCall" = "Video Call"; +"Demo.TRTC.calling.settings.audioCall" = "Audio Call"; +"Demo.TRTC.calling.settings.callSettings" = "Call Settings"; +"Demo.TRTC.calling.settings.optionalParameters" = "Optional Parameters"; +"Demo.TRTC.calling.settings.joinGroupCall" = "Join Group Call"; +"Demo.TRTC.calling.settings.appCall" = "Call"; +"Demo.TRTC.calling.settings.call" = "Call"; +"Demo.TRTC.calling.settings.basicSetting" = "Basic Settings"; +"Demo.TRTC.calling.settings.ringSetting" = "Ring Setting"; +"Demo.TRTC.calling.settings.notSet" = "Not Set"; +"Demo.TRTC.calling.settings.muteMode" = "Mute Mode"; +"Demo.TRTC.calling.settings.enableFloating" = "Enable Floating Window"; +"Demo.TRTC.calling.settings.enableVirtualBackground" = "Enable Virtual Background"; +"Demo.TRTC.calling.settings.enableIncomingBanner" = "Enable Incoming Banner"; +"Demo.TRTC.calling.settings.enableAITranscriber" = "Enable AI Transcriber"; +"Demo.TRTC.calling.settings.callParamsSetting" = "Call Params Setting"; +"Demo.TRTC.calling.settings.timeout" = "Timeout"; +"Demo.TRTC.calling.settings.expendedInfo" = "Extended Info"; +"Demo.TRTC.calling.settings.offlinePushInfo" = "Offline Push Info"; +"Demo.TRTC.calling.settings.goToSettings" = "Go to Settings"; +"Demo.TRTC.calling.settings.videoSetting" = "Video Setting"; +"Demo.TRTC.calling.settings.resolution" = "Resolution"; +"Demo.TRTC.calling.settings.resolutionMode" = "Resolution Mode"; +"Demo.TRTC.calling.settings.horizontal" = "Horizontal"; +"Demo.TRTC.calling.settings.vertical" = "Vertical"; +"Demo.TRTC.calling.settings.fillMode" = "Fill Mode"; +"Demo.TRTC.calling.settings.fit" = "Fit"; +"Demo.TRTC.calling.settings.fill" = "Fill"; +"Demo.TRTC.calling.settings.rotation" = "Rotation"; +"Demo.TRTC.calling.settings.beautyLevel" = "Beauty Level"; +"Demo.TRTC.calling.settings.otherSetting" = "Other Setting"; +"Demo.TRTC.calling.settings.screenVertical" = "Vertical"; +"Demo.TRTC.calling.settings.screenHorizontal" = "Horizontal"; +"Demo.TRTC.calling.settings.screenAuto" = "Auto"; +"Demo.TRTC.calling.settings.settings" = "Settings"; +"Demo.TRTC.calling.settings.yes" = "OK"; +"Demo.TRTC.calling.settings.setRingTip" = "Enter the ring file path"; +"Demo.TRTC.calling.settings.setExtendTip" = "Enter extended info (JSON format)"; +"Demo.TRTC.calling.settings.setOffLineInfoTip" = "Enter offline push info (JSON format)"; +"Demo.TRTC.calling.settings.setRing" = "Set Ring"; +"Demo.TRTC.calling.settings.setExtend" = "Set Extended Info"; +"Demo.TRTC.calling.settings.setOffLineInfo" = "Set Offline Push Info"; +"Demo.TRTC.calling.settings.inputCallId" = "Enter CallID: "; +"Demo.TRTC.calling.settings.pleaseInputCallId" = "Please enter CallID"; +"Demo.TRTC.calling.settings.roomIdInt" = "Room ID (Int)"; +"Demo.TRTC.calling.settings.roomIdString" = "Room ID (String)"; +"Demo.TRTC.calling.settings.inputRoomId" = "Enter Room ID"; + diff --git a/application/assembly/Modules/Call/Resource/Localized/zh-Hans.lproj/CallingLocalized.strings b/application/assembly/Modules/Call/Resource/Localized/zh-Hans.lproj/CallingLocalized.strings new file mode 100644 index 00000000..6efe9a80 --- /dev/null +++ b/application/assembly/Modules/Call/Resource/Localized/zh-Hans.lproj/CallingLocalized.strings @@ -0,0 +1,127 @@ +/* + CallingLocalized.strings + TRTCScene + + Created by adams on 2021/5/20. + Copyright © 2022 Tencent. All rights reserved. +*/ + +"Demo.TRTC.calling.yourID" = "您的ID:"; +"Demo.TRTC.calling.searchID" = "输入已注册并在线的用户ID进行通话"; +"Demo.TRTC.calling.yourphonenumber" = "您的手机号 "; +"Demo.TRTC.calling.searchphonenumber" = "搜索手机号"; +"Demo.TRTC.calling.searching" = "搜索"; +"Demo.TRTC.calling.searchandcall" = "搜索添加已注册用户\n以发起通话"; +"Demo.TRTC.calling.call" = "通话"; +"Demo.TRTC.calling.callingbegan" = "进入通话"; +"Demo.TRTC.calling.callingcancel" = "通话取消"; +"Demo.TRTC.calling.callingtimeout" = "通话超时"; +"Demo.TRTC.calling.callingrefuse" = "拒绝了通话"; +"Demo.TRTC.calling.callingleave" = "离开了通话"; +"Demo.TRTC.calling.callingnoresponse" = "未响应"; +"Demo.TRTC.calling.callingbusy" = "忙线"; +"Demo.TRTC.calling.searchingfailed" = "查询失败"; +"Demo.TRTC.calling.cantinviteself" = "不能邀请自己"; +"Demo.TRTC.calling.add" = "添加"; +"Demo.TRTC.calling.delete" = "删除"; +"Demo.TRTC.calling.addedUser" = "已添加成员"; +"Demo.TRTC.calling.done" = "完成"; +"Demo.TRTC.calling.tips" = "未添加成员,请搜索添加成员"; +"Demo.TRTC.Streaming.call" = "呼叫"; +"Demo.TRTC.calling.numExceed" = "添加失败,人数超出限制"; + +"Demo.TRTC.Calling.othernetworkpoor" = "对方网络不佳"; +"Demo.TRTC.Calling.yournetworkpoor" = "己方网络不佳"; +"Demo.TRTC.Calling.robotCalling" = "与机器人通话"; +"Demo.TRTC.Calling.robotInitCalling" = "模拟主叫"; +"Demo.TRTC.Calling.robotHostCalling" = "模拟被叫"; +"Demo.TRTC.calling.WakupRobot" = "正在激活机器人,请稍候..."; +"Demo.TRTC.Calling.robotCallingContent" = "单人单机即可体验"; +"Demo.TRTC.Calling.humanCalling" = "与其他用户通话"; +"Demo.TRTC.Calling.humanCallingContent" = "与另一个在线用户同步体验"; +"Demo.TRTC.calling.cancel" = "取消"; +"Demo.TRTC.calling.RobotStressString" = "单人单机"; +"Demo.TRTC.calling.callTwoHumanStress" = "另一个在线用户"; +"Demo.TRTC.calling.detailGuide" = "呼叫其他用户详细指引"; +"Demo.TRTC.calling.detailGuidText" = "好友用手机浏览器打开地址,点击“通话”模块(需先完成注册登录)"; +"Demo.TRTC.calling.detailGuidCopyURL" = "复制链接"; +"Demo.TRTC.calling.detailGuidSelf" = "自己"; +"Demo.TRTC.calling.detailGuidfriend" = "朋友"; +"Demo.TRTC.calling.detailGuidCopyURLContext" = "点击按钮复制以下地址,发送给好友 +https://rtcube.cloud.tencent.com/com"; +"Demo.TRTC.calling.detailGuidCopySelectFriend" = "好友选择“呼叫其他用户”,在搜索栏下方找到自己的用户ID"; +"Demo.TRTC.calling.detailGuidCopyCallFriend" = "你输入好友的用户ID,点击呼叫"; +"Demo.TRTC.calling.detailGuidAppStore" = "您的好友下载“腾讯云音视频”APP"; +"Demo.TRTC.calling.detailGuidAppReg" = "好友打开APP注册登录后,点击“通话”模块"; +"Demo.TRTC.calling.detailGuidWebMainPage" = "好友用电脑打开腾讯云音视频Demo体验馆,点击“通话”模块(需先完成注册登录)"; +"Demo.TRTC.calling.detailGuidWebFriendCard" = "好友在卡片右边找到自己的用户ID"; +"Demo.TRTC.calling.detailGuideH5" = "H5"; +"Demo.TRTC.calling.detailGuideApp" = "APP"; +"Demo.TRTC.calling.detailGuidePC" = "电脑"; +"Demo.TRTC.calling.detailGuideReminerText" = "体验呼叫其他用户,需要2个注册并在线的腾讯云音视频用户ID。"; +"Demo.TRTC.calling.detailGuideSteps" = "详细步骤"; +"Demo.TRTC.calling.callingBotIsBusy" = "机器人占线,请稍后再试"; +"Demo.TRTC.calling.callingHistory" = "查看我的通话记录"; +"Demo.TRTC.calling.callingSelectTitle" = "请选择通话方式"; +"Demo.TRTC.calling.guideCopySucess" = "已复制到剪切板"; +"Demo.TRTC.calling.contactCopy" = "复制"; +"Demo.TRTC.calling.IDCopyFailed" = "无效id"; +"Demo.TRTC.calling.guideTitle" = "互动通话体验指引"; +"Demo.TRTC.calling.unexpectedErr" = "非预期错误"; +"Demo.TRTC.Portal.Main.LoginFailed" = "登录失败"; +"Demo.TRTC.Portal.Main.call" = "通话"; + +/* ── CallSettings / CallViewController / JoinGroupCallViewController(RTCubeLab 专用) ── */ +"Demo.TRTC.calling.settings.groupId" = "Group ID"; +"Demo.TRTC.calling.settings.inputGroupId" = "请输入 Group ID"; +"Demo.TRTC.calling.settings.userId" = "User ID"; +"Demo.TRTC.calling.settings.inputUserIds" = "请输入用户ID(多个用逗号分隔)"; +"Demo.TRTC.calling.settings.mediaType" = "媒体类型"; +"Demo.TRTC.calling.settings.videoCall" = "视频通话"; +"Demo.TRTC.calling.settings.audioCall" = "语音通话"; +"Demo.TRTC.calling.settings.callSettings" = "通话设置"; +"Demo.TRTC.calling.settings.optionalParameters" = "可选参数"; +"Demo.TRTC.calling.settings.joinGroupCall" = "加入群组通话"; +"Demo.TRTC.calling.settings.appCall" = "拨打"; +"Demo.TRTC.calling.settings.call" = "呼叫"; +"Demo.TRTC.calling.settings.basicSetting" = "基础设置"; +"Demo.TRTC.calling.settings.ringSetting" = "铃声设置"; +"Demo.TRTC.calling.settings.notSet" = "未设置"; +"Demo.TRTC.calling.settings.muteMode" = "静音模式"; +"Demo.TRTC.calling.settings.enableFloating" = "开启悬浮窗"; +"Demo.TRTC.calling.settings.enableVirtualBackground" = "开启虚拟背景"; +"Demo.TRTC.calling.settings.enableIncomingBanner" = "开启来电横幅"; +"Demo.TRTC.calling.settings.enableAITranscriber" = "开启AI转写"; +"Demo.TRTC.calling.settings.callParamsSetting" = "通话参数设置"; +"Demo.TRTC.calling.settings.timeout" = "超时时间"; +"Demo.TRTC.calling.settings.expendedInfo" = "扩展信息"; +"Demo.TRTC.calling.settings.offlinePushInfo" = "离线推送信息"; +"Demo.TRTC.calling.settings.goToSettings" = "前往设置"; +"Demo.TRTC.calling.settings.videoSetting" = "视频设置"; +"Demo.TRTC.calling.settings.resolution" = "分辨率"; +"Demo.TRTC.calling.settings.resolutionMode" = "分辨率模式"; +"Demo.TRTC.calling.settings.horizontal" = "横屏"; +"Demo.TRTC.calling.settings.vertical" = "竖屏"; +"Demo.TRTC.calling.settings.fillMode" = "填充模式"; +"Demo.TRTC.calling.settings.fit" = "适应"; +"Demo.TRTC.calling.settings.fill" = "填充"; +"Demo.TRTC.calling.settings.rotation" = "旋转"; +"Demo.TRTC.calling.settings.beautyLevel" = "美颜等级"; +"Demo.TRTC.calling.settings.otherSetting" = "其他设置"; +"Demo.TRTC.calling.settings.screenVertical" = "竖屏"; +"Demo.TRTC.calling.settings.screenHorizontal" = "横屏"; +"Demo.TRTC.calling.settings.screenAuto" = "自动"; +"Demo.TRTC.calling.settings.settings" = "设置"; +"Demo.TRTC.calling.settings.yes" = "确定"; +"Demo.TRTC.calling.settings.setRingTip" = "请输入铃声文件路径"; +"Demo.TRTC.calling.settings.setExtendTip" = "请输入扩展信息(JSON格式)"; +"Demo.TRTC.calling.settings.setOffLineInfoTip" = "请输入离线推送信息(JSON格式)"; +"Demo.TRTC.calling.settings.setRing" = "设置铃声"; +"Demo.TRTC.calling.settings.setExtend" = "设置扩展信息"; +"Demo.TRTC.calling.settings.setOffLineInfo" = "设置离线推送信息"; +"Demo.TRTC.calling.settings.inputCallId" = "输入 CallID: "; +"Demo.TRTC.calling.settings.pleaseInputCallId" = "请输入 CallID"; +"Demo.TRTC.calling.settings.roomIdInt" = "Room ID (整数)"; +"Demo.TRTC.calling.settings.roomIdString" = "Room ID (字符串)"; +"Demo.TRTC.calling.settings.inputRoomId" = "请输入 Room ID"; + diff --git a/application/assembly/Modules/Call/Service/CallAntifraudHandler.swift b/application/assembly/Modules/Call/Service/CallAntifraudHandler.swift new file mode 100644 index 00000000..f4da1605 --- /dev/null +++ b/application/assembly/Modules/Call/Service/CallAntifraudHandler.swift @@ -0,0 +1,34 @@ +// +// CallAntifraudHandler.swift +// Call +// + +import Combine +import AtomicXCore +import Login + +// MARK: - CallAntifraudHandler + +final class CallAntifraudHandler { + + static let shared = CallAntifraudHandler() + private var cancellables = Set() + + private init() {} + + func register() { + CallStore.shared.state.subscribe(StatePublisherSelector(keyPath: \CallState.selfInfo)) + .removeDuplicates() + .receive(on: RunLoop.main) + .sink { selfInfo in + if selfInfo.status == .accept { + guard Bundle.main.bundleIdentifier != "com.tencent.rtc.app" else { return } + if let user = LoginManager.shared.getCurrentUser(), user.isMoa() { return } + + AppAssembly.shared.privacyActionHandler?(.showAntifraudReminder) + } + } + .store(in: &cancellables) + } + +} diff --git a/application/assembly/Modules/Call/Service/CallKitLifecycleHandler.swift b/application/assembly/Modules/Call/Service/CallKitLifecycleHandler.swift new file mode 100644 index 00000000..e63e82ce --- /dev/null +++ b/application/assembly/Modules/Call/Service/CallKitLifecycleHandler.swift @@ -0,0 +1,47 @@ +// +// CallKitLifecycleHandler.swift +// Call +// +// CallKitLifecycleHandler.shared.register() +// + +import UIKit +import TUICallKit_Swift +import TUICore +import Login + +// MARK: - CallKitLifecycleHandler + +final class CallKitLifecycleHandler: NSObject, AppLifecycleHandler { + + static let shared = CallKitLifecycleHandler() + private override init() { super.init() } + + func register() { + AppLifecycleRegistry.shared.register(self) + addTUILoginSuccessObserver() + } +} + +// MARK: - TUICallKit Configuration + +private extension CallKitLifecycleHandler { + + func addTUILoginSuccessObserver() { + NotificationCenter.default.addObserver( + self, + selector: #selector(handleTUILoginSuccess), + name: NSNotification.Name.TUILoginSuccess, + object: nil + ) + } + + @objc func handleTUILoginSuccess() { + let callKit = TUICallKit.createInstance() + callKit.enableFloatWindow(enable: SettingsConfig.share.floatWindow) + callKit.enableVirtualBackground(enable: SettingsConfig.share.enableVirtualBackground) + callKit.enableIncomingBanner(enable: SettingsConfig.share.enableIncomingBanner) + callKit.enableAITranscriber(enable: SettingsConfig.share.enableAITranscriber) + debugPrint(" TUICallKit 全局配置已完成") + } +} diff --git a/application/assembly/Modules/Call/Service/HTTPRequstBotService.swift b/application/assembly/Modules/Call/Service/HTTPRequstBotService.swift new file mode 100644 index 00000000..ae25291d --- /dev/null +++ b/application/assembly/Modules/Call/Service/HTTPRequstBotService.swift @@ -0,0 +1,105 @@ +// +// HTTPRequstBotService.swift +// main +// + +import UIKit +import Alamofire +import TUICore +import Login + +class HTTPRequstBotService: NSObject { + + private var parameters: Dictionary = { + let parameters = ["userId": LoginManager.shared.getCurrentUser()?.userId, + "token": LoginManager.shared.getCurrentUser()?.token, + "apaasAppId": LoginManager.shared.getCurrentUser()?.apaasAppId] + return parameters + }() + + private static var baseUrl: String { + return LoginEntry.shared.config.httpBaseUrl + } + + static func requestWattingCall(success: @escaping () -> Void, + failed: @escaping (_ message: String) -> Void) + { + let waittingCallURL = baseUrl + "base/v1/virtual_call/waiting_caller" + let botService = HTTPRequstBotService() + if let language = TUIGlobalization.getPreferredLanguage() { + if !language.contains("zh") { + botService.parameters.updateValue("en", forKey: "lang") + } + } + if let jsonData = try? JSONSerialization.data(withJSONObject: botService.parameters, options: []), + let jsonString = String(data: jsonData, encoding: .utf8) { + printClog("[AppCall][requestWattingCall] resultJson\(jsonString)") + } else { + print("Failed to convert dictionary to JSON.") + } + AF.request(waittingCallURL, + method: .post, + parameters: botService.parameters as Parameters, + encoding: JSONEncoding.default).responseData + { response in + switch response.result { + case .success(let data): + do { + let json = try JSONSerialization.jsonObject(with: data, options: []) + if let jsonObject = json as? [String: Any] { + printClog("[AppCall][requestWattingCall] resultJson\(jsonObject)") + success() + } else { + failed("invalid json") + } + } catch let error { + failed("json err: \(error)") + } + case .failure(let error): + failed("request failed: \(error)") + } + } + } + + static func requestInitCallBot(success: @escaping (_ botListData: [String: Any]) -> Void, + failed: @escaping (_ message: String) -> Void) + { + let botService = HTTPRequstBotService() + let botQueryUrl = baseUrl + "base/v1/auth_users/virtual_users_query" + if let jsonData = try? JSONSerialization.data(withJSONObject: botService.parameters, options: []), + let jsonString = String(data: jsonData, encoding: .utf8) { + printClog("[AppCall][requestInitCallBot] resultJson\(jsonString)") + } else { + print("Failed to convert dictionary to JSON.") + } + AF.request(botQueryUrl, method: .post, + parameters: botService.parameters as Parameters, + encoding: JSONEncoding.default).responseData + { response in + switch response.result { + case .success(let data): + do { + let json = try JSONSerialization.jsonObject(with: data, options: []) + + if let jsonObject = json as? [String: Any] { + printClog("[AppCall][requestInitCallBot] resultJson\(jsonObject)") + success(jsonObject) + } else { + failed("invalid json") + } + } catch let error { + failed("json err: \(error)") + } + case .failure(let error): + failed("request failed: \(error)") + } + } + } +} + +extension HTTPRequstBotService { + static func printClog(_ log: String) { + debugPrint(log) +// TRTCCloud.sharedInstance().apiLog(log) + } +} diff --git a/application/App-UIKit/Call/CallViewController.swift b/application/assembly/Modules/Call/UI/CallViewController.swift similarity index 81% rename from application/App-UIKit/Call/CallViewController.swift rename to application/assembly/Modules/Call/UI/CallViewController.swift index 3bc6d687..deb4783c 100644 --- a/application/App-UIKit/Call/CallViewController.swift +++ b/application/assembly/Modules/Call/UI/CallViewController.swift @@ -1,13 +1,13 @@ // // CallViewController.swift -// App-UIKit -// -// Created by yukiwwwang on 2025/8/8. +// AppAssembly // import Foundation import UIKit +import SnapKit import AtomicXCore +import AtomicX #if canImport(TUICallKit_Swift) import TUICallKit_Swift @@ -20,50 +20,50 @@ class CallViewController: UIViewController, UITextFieldDelegate { private let line1View: UIView = { let view = UIView(frame: .zero) - view.backgroundColor = UIColor("EEEEEE") + view.backgroundColor = ThemeStore.shared.colorTokens.strokeColorSecondary return view }() private let groupIdContentView: UIView = { let view = UIView(frame: .zero) - view.backgroundColor = UIColor.white + view.backgroundColor = ThemeStore.shared.colorTokens.bgColorOperate view.isHidden = true return view }() private let groupIdTextLabel: UILabel = { let label = UILabel(frame: .zero) - label.font = UIFont.systemFont(ofSize: 16) + label.font = ThemeStore.shared.typographyTokens.Regular16 label.textColor = UIColor.black - label.text = ("Group ID").localized + label.text = CallingLocalize("Demo.TRTC.calling.settings.groupId") return label }() private let groupIdTextField: UITextField = { let textField = UITextField(frame: .zero) textField.backgroundColor = UIColor.clear - textField.font = UIFont(name: "PingFangSC-Regular", size: 16) - textField.textColor = UIColor("333333") - textField.attributedPlaceholder = NSAttributedString(string: ("InputGroupId").localized) + textField.font = ThemeStore.shared.typographyTokens.Regular16 + textField.textColor = ThemeStore.shared.colorTokens.textColorPrimary + textField.attributedPlaceholder = NSAttributedString(string: CallingLocalize("Demo.TRTC.calling.settings.inputGroupId")) textField.textAlignment = .right textField.keyboardType = .asciiCapable return textField }() private let userIdContentView: UIView = { let view = UIView(frame: .zero) - view.backgroundColor = UIColor.white + view.backgroundColor = ThemeStore.shared.colorTokens.bgColorOperate return view }() private let userIdTextLabel: UILabel = { let label = UILabel(frame: .zero) - label.font = UIFont.systemFont(ofSize: 16) + label.font = ThemeStore.shared.typographyTokens.Regular16 label.textColor = UIColor.black - label.text = ("User ID".localized) + label.text = CallingLocalize("Demo.TRTC.calling.settings.userId") return label }() private let calledUserIdTextField: UITextField = { let textField = UITextField(frame: .zero) textField.backgroundColor = UIColor.clear - textField.font = UIFont(name: "PingFangSC-Regular", size: 16) - textField.textColor = UIColor("333333") - textField.attributedPlaceholder = NSAttributedString(string:("InputUserIds").localized) + textField.font = ThemeStore.shared.typographyTokens.Regular16 + textField.textColor = ThemeStore.shared.colorTokens.textColorPrimary + textField.attributedPlaceholder = NSAttributedString(string: CallingLocalize("Demo.TRTC.calling.settings.inputUserIds")) textField.textAlignment = .right textField.keyboardType = .asciiCapable return textField @@ -73,30 +73,30 @@ class CallViewController: UIViewController, UITextFieldDelegate { private let line2View: UIView = { let view = UIView(frame: .zero) - view.backgroundColor = UIColor("EEEEEE") + view.backgroundColor = ThemeStore.shared.colorTokens.strokeColorSecondary return view }() private let mediaTypeContentView: UIView = { let view = UIView(frame: .zero) - view.backgroundColor = UIColor.white + view.backgroundColor = ThemeStore.shared.colorTokens.bgColorOperate return view }() private let typeLabel: UILabel = { let label = UILabel(frame: .zero) - label.font = UIFont.systemFont(ofSize: 16) + label.font = ThemeStore.shared.typographyTokens.Regular16 label.textColor = UIColor.black - label.text = ("MediaType").localized + label.text = CallingLocalize("Demo.TRTC.calling.settings.mediaType") return label }() private let videoButton: RadioButton = { let button = RadioButton(frame: CGRect.zero) - button.titleText = ("Video Call").localized + button.titleText = CallingLocalize("Demo.TRTC.calling.settings.videoCall") button.titleSize = 16 return button }() private let voiceButton: RadioButton = { let button = RadioButton(frame: CGRect.zero) - button.titleText = ("Audio Call").localized + button.titleText = CallingLocalize("Demo.TRTC.calling.settings.audioCall") button.isSelected = true button.titleSize = 16 return button @@ -107,38 +107,38 @@ class CallViewController: UIViewController, UITextFieldDelegate { }() private let callSettingsLabel: UILabel = { let label = UILabel(frame: .zero) - label.font = UIFont.systemFont(ofSize: 16) + label.font = ThemeStore.shared.typographyTokens.Regular16 label.textColor = UIColor.blue - label.text = "\(("CallSettings").localized) >" + label.text = "\(CallingLocalize("Demo.TRTC.calling.settings.callSettings")) >" label.isUserInteractionEnabled = true return label }() private let optionalParamLabel: UILabel = { let label = UILabel(frame: .zero) - label.font = UIFont.systemFont(ofSize: 16) + label.font = ThemeStore.shared.typographyTokens.Regular16 label.textColor = UIColor.blue - label.text = "\(("OptionalParameters").localized) >" + label.text = "\(CallingLocalize("Demo.TRTC.calling.settings.optionalParameters")) >" label.isUserInteractionEnabled = true return label }() private let joinInGroupLabel: UILabel = { let label = UILabel(frame: .zero) - label.font = UIFont.systemFont(ofSize: 16) + label.font = ThemeStore.shared.typographyTokens.Regular16 label.textColor = UIColor.blue - label.text = ("JoinGroupCall").localized + label.text = CallingLocalize("Demo.TRTC.calling.settings.joinGroupCall") label.isUserInteractionEnabled = true return label }() private let callButton: UIButton = { let btn = UIButton(type: .system) btn.setTitleColor(.white, for: .normal) - btn.setTitle(("App_Call").localized, for: .normal) + btn.setTitle(CallingLocalize("Demo.TRTC.calling.settings.appCall"), for: .normal) btn.adjustsImageWhenHighlighted = false - btn.setBackgroundImage(UIColor("006EFF").trans2Image(), for: .normal) - btn.titleLabel?.font = UIFont(name: "PingFangSC-Medium", size: 20) - btn.layer.shadowColor = UIColor("006EFF").cgColor + btn.setBackgroundImage(ThemeStore.shared.colorTokens.buttonColorPrimaryDefault.trans2Image(), for: .normal) + btn.titleLabel?.font = ThemeStore.shared.typographyTokens.Medium20 + btn.layer.shadowColor = ThemeStore.shared.colorTokens.buttonColorPrimaryDefault.cgColor btn.layer.shadowOffset = CGSize(width: 0, height: 6) btn.layer.shadowRadius = 16 btn.layer.shadowOpacity = 0.4 @@ -148,14 +148,15 @@ class CallViewController: UIViewController, UITextFieldDelegate { }() private let backButton: UIButton = { let button = UIButton(type: .system) - button.setImage(UIImage(named: "back"), for: .normal) + button.setImage(AppAssemblyBundle.image(named: "calling_back"), for: .normal) button.tintColor = .black return button }() override func viewDidLoad() { super.viewDidLoad() - view.backgroundColor = UIColor.white + title = CallingLocalize("Demo.TRTC.Portal.Main.call") + view.backgroundColor = ThemeStore.shared.colorTokens.bgColorOperate setupNavigationBar() constructViewHierarchy() activateConstraints() @@ -310,10 +311,10 @@ class CallViewController: UIViewController, UITextFieldDelegate { @objc private func callSettingsLabelClick() { if groupIdContentView.isHidden { groupIdContentView.isHidden = false - optionalParamLabel.text = "\(("OptionalParameters").localized) v" + optionalParamLabel.text = "\(CallingLocalize("Demo.TRTC.calling.settings.optionalParameters")) v" } else { groupIdContentView.isHidden = true - optionalParamLabel.text = "\(("OptionalParameters").localized) >" + optionalParamLabel.text = "\(CallingLocalize("Demo.TRTC.calling.settings.optionalParameters")) >" } } @@ -353,14 +354,14 @@ class CallViewController: UIViewController, UITextFieldDelegate { @objc private func settingButtonClick() { let settingVC = SettingsViewController() - settingVC.title = ("CallSettings").localized + settingVC.title = CallingLocalize("Demo.TRTC.calling.settings.callSettings") settingVC.hidesBottomBarWhenPushed = true navigationController?.pushViewController(settingVC, animated: true) } @objc private func joinInGroupClick() { let joinInGroupVC = JoinGroupCallViewController() - joinInGroupVC.title = ("JoinGroupCall").localized + joinInGroupVC.title = CallingLocalize("Demo.TRTC.calling.settings.joinGroupCall") joinInGroupVC.hidesBottomBarWhenPushed = true navigationController?.pushViewController(joinInGroupVC, animated: true) } diff --git a/application/assembly/Modules/Call/UI/CallingBotHesitationViewController.swift b/application/assembly/Modules/Call/UI/CallingBotHesitationViewController.swift new file mode 100644 index 00000000..e1bf1e87 --- /dev/null +++ b/application/assembly/Modules/Call/UI/CallingBotHesitationViewController.swift @@ -0,0 +1,208 @@ +// +// CallingBotHesitationViewController.swift +// main +// + +import UIKit +import AtomicX +import Alamofire +import TUICallKit_Swift +import RTCRoomEngine +import TUICore + +enum CallBotType: Int { + case initCall + case hostCall +} + +fileprivate class CallingCustomView: UIView { + override func draw(_ rect: CGRect) { + super.draw(rect) + roundedRect(.allCorners, withCornerRatio: 10.0) + } +} + +class CallingBotHesitationViewController: UIViewController { + private var callType: CallBotType = .initCall + var virtualRobotList: [CallingRequestRobotModel?] = [] + var callBotIsBusyHandle: () -> Void = {} + var callBotFailedHandle: (_ message: String) -> Void = { _ in } + var requestBotHandler: (_ botID: String) -> Void = { _ in } + var waitingCallBotFailedHandle: (_ message: String) -> Void = { _ in } + + private let containerView: UIView = { + let view = CallingCustomView(frame: .zero) + view.backgroundColor = ThemeStore.shared.colorTokens.bgColorOperate + return view + }() + + private let avarImageView: UIImageView = { + let imageView = UIImageView(frame: .zero) + imageView.contentMode = .scaleAspectFit + return imageView + }() + + private let tipsLable: UILabel = { + let label = UILabel(frame: .zero) + label.text = CallingLocalize("Demo.TRTC.calling.WakupRobot") + label.textColor = ThemeStore.shared.colorTokens.textColorSecondary + label.font = ThemeStore.shared.typographyTokens.Medium12 + return label + }() + + private let cancelCallingButton: UIButton = { + let button = UIButton(type: .custom) + button.layer.borderColor = ThemeStore.shared.colorTokens.textColorError.cgColor + button.layer.borderWidth = 1.0 + button.layer.cornerRadius = ThemeStore.shared.borderRadius.radius16 + button.layer.masksToBounds = true + button.setTitleColor(ThemeStore.shared.colorTokens.textColorError, for: .normal) + button.setTitle(CallingLocalize("Demo.TRTC.calling.cancel"), for: .normal) + return button + }() + + func configRobotAvatar(avatarImage: UIImage) { + self.avarImageView.image = avatarImage + } + + convenience init(callType: CallBotType) { + self.init() + self.callType = callType + } + + override func viewDidLoad() { + super.viewDidLoad() + view.backgroundColor = UIColor(red: 235, green: 237, blue: 245) + let backBtn = UIButton(type: .custom) + backBtn.setImage(AppAssemblyBundle.image(named: "calling_back"), for: .normal) + backBtn.addTarget(self, action: #selector(backBtnClick), for: .touchUpInside) + let item = UIBarButtonItem(customView: backBtn) + item.tintColor = UIColor.black + navigationItem.leftBarButtonItem = item + constructViewHierarchy() + activateConstraints() + bindInteraction() + self.perform(#selector(postRequest), with: nil, afterDelay: 2) + } + + override func viewWillAppear(_ animated: Bool) { + navigationController?.setNavigationBarHidden(false, animated: false) + } +} + +extension CallingBotHesitationViewController { + private func constructViewHierarchy() { + view.addSubview(containerView) + containerView.addSubview(avarImageView) + containerView.addSubview(tipsLable) + containerView.addSubview(cancelCallingButton) + } + + private func activateConstraints() { + containerView.snp.makeConstraints { make in + make.topMargin.equalToSuperview().offset(100) + make.left.equalToSuperview().offset(54) + make.height.equalTo(352) + make.centerX.equalToSuperview() + } + avarImageView.snp.makeConstraints { make in + make.top.equalToSuperview().offset(54) + make.centerX.equalToSuperview() + make.height.equalTo(84) + make.width.equalTo(84) + } + tipsLable.snp.makeConstraints { make in + make.top.equalTo(avarImageView.snp.bottom).offset(8) + make.centerX.equalToSuperview() + } + cancelCallingButton.snp.makeConstraints { make in + make.bottom.equalToSuperview().offset(-54) + make.centerX.equalToSuperview() + make.height.equalTo(32) + make.width.equalTo(100) + } + } + + func bindInteraction() { + cancelCallingButton.addTarget(self, action: #selector(backBtnClick), for: .touchUpInside) + } +} + +extension CallingBotHesitationViewController { + @objc func backBtnClick() { + NSObject.cancelPreviousPerformRequests(withTarget: self) + self.navigationController?.popViewController(animated: true) + } +} + +extension CallingBotHesitationViewController { + @objc private func postRequest() { + if self.callType == .initCall { + self.initCallBot() + } else { + self.hostCallBot() + } + } +} + +extension CallingBotHesitationViewController { + private func initCallBot() { + HTTPRequstBotService.requestInitCallBot { [weak self] botjson in + guard let self = self else { return } + let requestModel = self.convertJsonToModel(json: botjson) + if requestModel?.errorCode == 0 { + guard let botModelData = requestModel?.data else { return } + guard let botModelArray = botModelData.virtualUsers else { return } + if botModelArray.count > 0 { + let callIndex = Int.random(in: 0 ... botModelArray.count - 1) + printClog("[AppCall][initCallBot]callIndex:\(callIndex)") + guard let callID = botModelArray[callIndex]?.virtualUserId else { return } + printClog("[AppCall][initCallBot]callID:\(callID)") + self.requestBotHandler(callID) + } else { + self.callBotIsBusyHandle() + } + } else { + printClog("[AppCall][initCallBot] requestSuccessButResultErr:\(String(describing: requestModel?.errorCode))") + self.view.makeToast(CallingLocalize("Demo.TRTC.calling.unexpectedErr")) + } + self.navigationController?.popViewController(animated: true) + } failed: { [weak self] message in + guard let self = self else { return } + print(message) + self.callBotFailedHandle(message) + self.navigationController?.popViewController(animated: true) + } + } + + private func hostCallBot() { + HTTPRequstBotService.requestWattingCall { + } failed: { [weak self] message in + guard let self = self else { return } + print(message) + self.waitingCallBotFailedHandle(message) + } + navigationController?.popViewController(animated: true) + } +} + +extension CallingBotHesitationViewController { + func convertJsonToModel(json: [String: Any]) -> CallingRequestRobotModel? { + do { + let jsonData = try JSONSerialization.data(withJSONObject: json, options: []) + let decoder = JSONDecoder() + let model = try decoder.decode(CallingRequestRobotModel.self, from: jsonData) + return model + } catch let error { + print("转换失败: \(error)") + return nil + } + } +} + +extension CallingBotHesitationViewController { + private func printClog(_ log: String) { +// TRTCCloud.sharedInstance().apiLog(log) + debugPrint(log) + } +} diff --git a/application/assembly/Modules/Call/UI/CallingDetaiGuideView.swift b/application/assembly/Modules/Call/UI/CallingDetaiGuideView.swift new file mode 100644 index 00000000..b4eabbd7 --- /dev/null +++ b/application/assembly/Modules/Call/UI/CallingDetaiGuideView.swift @@ -0,0 +1,114 @@ +// +// CallingDetaiGuideView.swift +// main +// + +import UIKit +import AtomicX + +class CallingDetaiGuideView: UIView { + + private let guideImageContainerView: UIView = { + let view = UIView(frame: .zero) + return view + }() + + private let guideImageView: UIImageView = { + let imageView = UIImageView(frame: .zero) + imageView.contentMode = .scaleAspectFit + imageView.image = AppAssemblyBundle.image(named: "calling_call_guide") + return imageView + }() + + private let guideButtonContainerView: UIView = { + let view = UIView(frame: .zero) + return view + }() + + private let guideButtonTitleLable: UILabel = { + let label = UILabel(frame: .zero) + label.text = CallingLocalize("Demo.TRTC.calling.detailGuide") + label.font = ThemeStore.shared.typographyTokens.Medium14 + label.adjustsFontSizeToFitWidth = true + label.minimumScaleFactor = 0.5 + label.textColor = ThemeStore.shared.colorTokens.buttonColorPrimaryDefault + return label + }() + + private let guideArrowImageView: UIImageView = { + let imageView = UIImageView(frame: .zero) + imageView.contentMode = .scaleAspectFit + imageView.image = AppAssemblyBundle.image(named: "calling_call_pushArrow") + return imageView + }() + + private let guideButton: UIButton = { + let button = UIButton(type: .custom) + return button + }() + + var guideButtonClickHandler: () -> Void = {} + var isViewReady = false + + override func didMoveToWindow() { + super.didMoveToWindow() + guard !isViewReady else { + return + } + constructViewHierarchy() + activateConstraints() + bindInteraction() + } +} + +extension CallingDetaiGuideView { + private func constructViewHierarchy() { + addSubview(guideButtonContainerView) + guideButtonContainerView.addSubview(guideButtonTitleLable) + guideButtonContainerView.addSubview(guideArrowImageView) + guideButtonContainerView.addSubview(guideButton) + addSubview(guideImageContainerView) + guideImageContainerView.addSubview(guideImageView) + } + + private func activateConstraints() { + guideButtonContainerView.snp.makeConstraints { make in + make.height.equalTo(24) + make.width.equalTo(160) + make.bottom.equalToSuperview() + make.centerX.equalToSuperview() + } + guideButtonTitleLable.snp.makeConstraints { make in + make.width.equalTo(142) + make.left.equalToSuperview() + make.centerY.equalToSuperview() + } + guideArrowImageView.snp.makeConstraints { make in + make.right.equalToSuperview() + make.height.width.equalTo(14) + make.centerY.equalToSuperview() + } + guideButton.snp.makeConstraints { make in + make.edges.equalTo(guideButtonContainerView) + } + guideImageContainerView.snp.makeConstraints { make in + make.top.left.right.equalToSuperview() + make.bottom.equalTo(guideButtonContainerView.snp.top) + } + guideImageView.snp.makeConstraints { make in + make.height.equalTo(118) + make.width.equalTo(172) + make.center.equalToSuperview() + } + } + + func bindInteraction() { + self.guideButton.addTarget(self, action: #selector(guideButtonClicked), for: .touchUpInside) + } +} + +extension CallingDetaiGuideView { + @objc func guideButtonClicked() { + self.guideButtonClickHandler() + } +} diff --git a/application/assembly/Modules/Call/UI/CallingEntranceMenuViewController.swift b/application/assembly/Modules/Call/UI/CallingEntranceMenuViewController.swift new file mode 100644 index 00000000..d08b5db7 --- /dev/null +++ b/application/assembly/Modules/Call/UI/CallingEntranceMenuViewController.swift @@ -0,0 +1,350 @@ +// +// CallingEntranceMenuViewController.swift +// main +// + +import UIKit +import Toast_Swift +import TUICallKit_Swift +import Login +import RTCRoomEngine +import TUICore +import AtomicXCore +import AtomicX + +class CallingFooterView: UIView { + override func draw(_ rect: CGRect) { + super.draw(rect) + roundedRect([.bottomLeft, .bottomRight], withCornerRatio: 10) + } +} + +public class CallingEntranceMenuViewController: UIViewController { + var listViewDidScrollCallback: ((UIScrollView) -> Void)? + private var CallingMenuItems: [CallingMenuModel] = [] + private var CallingRobotItems: [CallingRobotModel] = [] + private lazy var tableView: UITableView = { + var table = UITableView(frame: .zero, style: .grouped) + table.isScrollEnabled = false + table.dataSource = self + table.delegate = self + table.backgroundColor = UIColor.clear + table.estimatedRowHeight = 120 + table.sectionFooterHeight = 10 + table.rowHeight = UITableView.automaticDimension + table.showsVerticalScrollIndicator = false + table.register(CallingRobotCell.self, forCellReuseIdentifier: CallingRobotCell.reuseId) + table.separatorColor = .clear + return table + }() + + private let historyButton: UIButton = { + let button = UIButton(type: .custom) + return button + }() + + private let selectLabel: UILabel = { + let label = UILabel(frame: .zero) + label.text = CallingLocalize("Demo.TRTC.calling.callingSelectTitle") + label.font = ThemeStore.shared.typographyTokens.Medium12 + label.textColor = ThemeStore.shared.colorTokens.textColorSecondary + return label + }() + + private let historyContentView: UIView = { + let view = UIView(frame: .zero) + view.isHidden = true + return view + }() + + private let historybuttonLabel: UILabel = { + let label = UILabel(frame: .zero) + let text = NSMutableAttributedString(string: + CallingLocalize("Demo.TRTC.calling.callingHistory")) + if let image = AppAssemblyBundle.image(named: "calling_call_pushArrow") { + let imageAttachment = NSTextAttachment() + imageAttachment.image = image + let font = ThemeStore.shared.typographyTokens.Medium14 + let imageAttachmentY = round(font.capHeight - image.size.height) / 2.0 + imageAttachment.bounds = CGRect(x: 4, + y: imageAttachmentY, + width: image.size.width, + height: image.size.height) + + let imageString = NSAttributedString(attachment: imageAttachment) + text.append(imageString) + label.font = font + } + label.attributedText = text + label.textColor = ThemeStore.shared.colorTokens.buttonColorPrimaryDefault + label.textAlignment = .center + return label + }() + + func configData() { + CallingMenuItems = [ + CallingMenuModel(title: CallingLocalize("Demo.TRTC.Calling.robotCalling"), + content: CallingLocalize("Demo.TRTC.Calling.robotCallingContent"), + imageName: "calling_unfold_arrow", + stressContent: [ + CallingLocalize("Demo.TRTC.calling.RobotStressString"), + ], + selectHandle: { [weak self] in + guard let self = self else { return } + self.updateBotCells() + }), + CallingMenuModel(title: CallingLocalize("Demo.TRTC.Calling.humanCalling"), + content: CallingLocalize("Demo.TRTC.Calling.humanCallingContent"), + imageName: "calling_call_pushArrow", + stressContent: [ + CallingLocalize("Demo.TRTC.calling.callTwoHumanStress"), + ], + selectHandle: { [weak self] in + guard let self = self else { return } + self.gotoCallingContactVC() + }), + ] + } + + public override func viewDidLoad() { + super.viewDidLoad() + view.backgroundColor = UIColor(red: 235, green: 237, blue: 245) + let backBtn = UIButton(type: .custom) + backBtn.setImage(AppAssemblyBundle.image(named: "calling_back"), for: .normal) + backBtn.addTarget(self, action: #selector(backBtnClick), for: .touchUpInside) + let item = UIBarButtonItem(customView: backBtn) + item.tintColor = UIColor.black + navigationItem.leftBarButtonItem = item + + title = CallingLocalize("Demo.TRTC.Portal.Main.call") + + configData() + constructViewHierarchy() + activateConstraints() + bindInteraction() + } + + public override func viewWillAppear(_ animated: Bool) { + super.viewWillAppear(animated) + navigationController?.setNavigationBarHidden(false, animated: false) +#if RTCube_APPSTORE +#else + TUICore.callService(TUICore_ContactUsService, + method: TUICore_ContactService_ShowContactEntrance, + param: [:]) +#endif + } + + public override func viewWillDisappear(_ animated: Bool) { + super.viewWillDisappear(animated) + TUICore.callService(TUICore_ContactUsService, + method: TUICore_ContactService_HideContactEntrance, + param: [:]) + } + + deinit { + debugPrint("deinit \(self)") + } +} + +extension CallingEntranceMenuViewController { + private func constructViewHierarchy() { + view.addSubview(tableView) + view.addSubview(historyContentView) + view.addSubview(selectLabel) + historyContentView.addSubview(historybuttonLabel) + historyContentView.addSubview(historyButton) + } + + private func activateConstraints() { + selectLabel.snp.makeConstraints { make in + make.topMargin.equalToSuperview().offset(20) + make.left.equalToSuperview().offset(20) + make.height.equalTo(18) + } + tableView.snp.makeConstraints { make in + make.top.equalTo(selectLabel.snp.bottom) + make.left.equalToSuperview().offset(20) + make.centerX.equalToSuperview() + make.bottom.equalToSuperview().offset(-100) + } + historyContentView.snp.makeConstraints { make in + make.bottom.equalToSuperview().offset(-44) + make.width.equalTo(131) + make.height.equalTo(24) + make.centerX.equalToSuperview() + } + historybuttonLabel.snp.makeConstraints { make in + make.edges.equalToSuperview() + } + historyButton.snp.makeConstraints { make in + make.edges.equalToSuperview() + } + } + + func bindInteraction() { + historyButton.addTarget(self, action: #selector(gotoHistoryVC), for: .touchUpInside) + } +} + +extension CallingEntranceMenuViewController: UITableViewDataSource, UITableViewDelegate { + + public func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + if section == 0 { + return CallingRobotItems.count + } + return 0 + } + + public func numberOfSections(in tableView: UITableView) -> Int { + return CallingMenuItems.count + } + + public func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + let identifier = CallingRobotCell.reuseId + var cell = tableView.dequeueReusableCell(withIdentifier: identifier, for: indexPath) as! CallingRobotCell + if cell.isEqual(nil) { + cell = CallingRobotCell(frame: .zero) + } + cell.selectionStyle = .none + cell.config(CallingRobotItems[indexPath.row]) + cell.clickedDialBotHandler = { [weak self] image, callType in + guard let self = self else { return } + self.gotoHesitationVC(botAvatarImage: image, callType: callType) + } + cell.selectionStyle = .none + return cell + } + + public func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { + return 69 + } + + public func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? { + let model = CallingMenuItems[section] + let headerView = CallingMenuHeaderView(frame: CGRect(x: 0, y: 0, width: ScreenWidth, height: 98)) + headerView.tag = section + headerView.isUserInteractionEnabled = true + let tap = UITapGestureRecognizer(target: self, action: #selector(didSelectSection(sender:))) + headerView.addGestureRecognizer(tap) + headerView.config(model) + return headerView + } + + public func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat { + return 96 + } + + public func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? { + let footerView = CallingFooterView(frame: CGRect(x: 0, y: 0, width: ScreenWidth - 40, height: 10)) + footerView.backgroundColor = ThemeStore.shared.colorTokens.bgColorOperate + return footerView + } + + public func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat { + return 10 + } + + public func tableView(_ tableView: UITableView, estimatedHeightForFooterInSection section: Int) -> CGFloat { + return 10 + } + + public func tableView(_ tableView: UITableView, estimatedHeightForHeaderInSection section: Int) -> CGFloat { + return 96 + } +} + +extension CallingEntranceMenuViewController { + @objc func didSelectSection(sender: Any) { + let gesture = sender as! UITapGestureRecognizer + let headerView = gesture.view as! CallingMenuHeaderView + CallingMenuItems[headerView.tag].selectHandle() + } + + @objc func backBtnClick() { + self.navigationController?.popViewController(animated: true) + } +} + +extension CallingEntranceMenuViewController { + func updateBotCells() { + if CallingRobotItems.count == 0 && UserOverdueLogicManager.sharedManager().userOverdueState == .alreadyLogged { + CallingRobotItems = [ + CallingRobotModel(imageName: "calling_robot_A", + title: "Robot A", + buttonIconImage: "calling_init_call", + hasTopBorder: true, hasBotBorder: true, + botCallType: .initCall), + CallingRobotModel(imageName: "calling_robot_B", + title: "Robot B", buttonIconImage: "calling_pass_call", + hasTopBorder: false, + hasBotBorder: false, + botCallType: .hostCall), + ] + } else { + CallingRobotItems.removeAll() + if UserOverdueLogicManager.sharedManager().userOverdueState == .notLogin { + self.view.makeToast(CallingLocalize("Demo.TRTC.Portal.Main.LoginFailed")) + } + } + tableView.reloadData() + } +} + +extension CallingEntranceMenuViewController { + func gotoHesitationVC(botAvatarImage: UIImage, callType: CallBotType) { + let hesVC = CallingBotHesitationViewController(callType: callType) + hesVC.configRobotAvatar(avatarImage: botAvatarImage) + hesVC.title = CallingLocalize("Demo.TRTC.calling.call") + hesVC.requestBotHandler = { [weak self] callID in + let language = TUIGlobalization.getPreferredLanguage() ?? "" + if language.contains("zh") { + TUICallKit.createInstance().calls(userIdList: [callID], + mediaType: .video, + params: nil, + completion: nil) + } else { + let userDataDict: [String: Any] = ["lang": "en"] + guard let userDataJson = (try? JSONSerialization.data(withJSONObject: userDataDict, options: [])) + .flatMap({ String(data: $0, encoding: .utf8) }) else { return } + var params = CallParams() + params.userData = userDataJson + TUICallKit.createInstance().calls(userIdList: [callID], + mediaType: .video, + params: params) { result in + switch result { + case .success(): + break + case .failure(let error): + self?.view.makeToast("dial phone failed with code:\(error.code) msg:\(error.message)") + } + } + } + } + hesVC.callBotIsBusyHandle = { [weak self] in + guard let self = self else { return } + self.view.makeToast(CallingLocalize("Demo.TRTC.calling.callingBotIsBusy")) + } + hesVC.callBotFailedHandle = { [weak self] message in + guard let self = self else { return } + self.view.makeToast("call bot failed:\(message)") + } + hesVC.waitingCallBotFailedHandle = { [weak self] message in + guard let self = self else { return } + self.view.makeToast("waiting call bot failed:\(message)") + } + self.navigationController?.pushViewController(hesVC, animated: true) + } + + func gotoCallingContactVC() { + let videoCallVC = TRTCCallingContactViewController() + videoCallVC.callType = .video + videoCallVC.title = CallingLocalize("Demo.TRTC.calling.call") + navigationController?.pushViewController(videoCallVC, animated: true) + } + + @objc private func gotoHistoryVC() { + let historyVC = CallingRecentCallsViewController() + self.navigationController?.pushViewController(historyVC, animated: true) + } +} diff --git a/application/assembly/Modules/Call/UI/CallingMenuHeaderView.swift b/application/assembly/Modules/Call/UI/CallingMenuHeaderView.swift new file mode 100644 index 00000000..fefaa055 --- /dev/null +++ b/application/assembly/Modules/Call/UI/CallingMenuHeaderView.swift @@ -0,0 +1,118 @@ +// +// CallingMenuHeaderView.swift +// main +// + +import UIKit +import AtomicX + +class CallingMenuHeaderView: UIView { + private var contentSources: String = "" + private let containerView: UIView = { + let view = UIView(frame: .zero) + view.backgroundColor = ThemeStore.shared.colorTokens.bgColorOperate + return view + }() + + private let titleLabel: UILabel = { + let label = UILabel(frame: .zero) + label.font = ThemeStore.shared.typographyTokens.Medium14 + label.textColor = UIColor("262B32") + label.textAlignment = .left + label.numberOfLines = 2 + label.adjustsFontSizeToFitWidth = true + label.minimumScaleFactor = 0.5 + return label + }() + + private let descTitleLabel: UILabel = { + let label = UILabel(frame: .zero) + label.font = ThemeStore.shared.typographyTokens.Regular12 + label.textColor = UIColor("262B32") + label.textAlignment = .left + label.numberOfLines = 2 + label.adjustsFontSizeToFitWidth = true + label.minimumScaleFactor = 0.5 + return label + }() + + private let iconImageView: UIImageView = { + let imageView = UIImageView(frame: .zero) + imageView.contentMode = .scaleAspectFit + return imageView + }() + + override init(frame: CGRect) { + super.init(frame: frame) + constructViewHierarchy() + activateConstraints() + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + override func draw(_ rect: CGRect) { + super.draw(rect) + containerView.roundedRect([.topLeft, .topRight], withCornerRatio: 5) + } +} + +extension CallingMenuHeaderView { + public func config(_ model: CallingMenuModel) { + if model.iconImageName.hasPrefix("http") { + if let imageURL = URL(string: model.iconImageName) { + iconImageView.kf.setImage(with: .network(imageURL)) + } + } else { + iconImageView.image = model.iconImage + } + titleLabel.text = model.title + conficContent(content: model.content, stressItems: model.stressContent) + } + + private func conficContent(content: String, stressItems: [String]) { + let font = ThemeStore.shared.typographyTokens.Regular12 + let fontAttr: [NSAttributedString.Key: Any] = [.font: font, .foregroundColor: ThemeStore.shared.colorTokens.textColorSecondary] + let contentAttrStr = NSMutableAttributedString(string: content, attributes: fontAttr) + for stressStr in stressItems { + if let range = content.range(of: stressStr) { + let newColor = ThemeStore.shared.colorTokens.buttonColorPrimaryDefault + let newColorAttributes: [NSAttributedString.Key: Any] = [.foregroundColor: newColor] + let nsRange = NSRange(range, in: contentAttrStr.string) + contentAttrStr.addAttributes(newColorAttributes, range: nsRange) + } + } + descTitleLabel.attributedText = contentAttrStr + } +} + +extension CallingMenuHeaderView { + private func constructViewHierarchy() { + addSubview(containerView) + containerView.addSubview(iconImageView) + containerView.addSubview(titleLabel) + containerView.addSubview(descTitleLabel) + } + + private func activateConstraints() { + containerView.snp.makeConstraints { make in + make.left.right.equalToSuperview() + make.top.equalToSuperview().offset(16) + make.bottom.equalToSuperview() + } + titleLabel.snp.makeConstraints { make in + make.left.top.equalToSuperview().offset(20) + make.width.equalTo(300) + } + descTitleLabel.snp.makeConstraints { make in + make.top.equalTo(titleLabel.snp.bottom).offset(8) + make.left.equalTo(titleLabel) + make.width.equalTo(300) + } + iconImageView.snp.makeConstraints { make in + make.right.equalToSuperview().offset(-20) + make.centerY.equalToSuperview().offset(10) + } + } +} diff --git a/application/assembly/Modules/Call/UI/CallingRecentCallsViewController.swift b/application/assembly/Modules/Call/UI/CallingRecentCallsViewController.swift new file mode 100644 index 00000000..7dd98a3e --- /dev/null +++ b/application/assembly/Modules/Call/UI/CallingRecentCallsViewController.swift @@ -0,0 +1,77 @@ +// +// CallingRecentCallsViewController.swift +// main +// + +import UIKit +import AtomicX +import TUICallKit_Swift +import RTCRoomEngine +import TUICore + +class CallingRecentCallsViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + self.title = CallingLocalize("Demo.TRTC.calling.call") + let backBtn = UIButton(type: .custom) + backBtn.setImage(AppAssemblyBundle.image(named: "calling_back"), for: .normal) + backBtn.addTarget(self, action: #selector(backBtnClick), for: .touchUpInside) + let item = UIBarButtonItem(customView: backBtn) + item.tintColor = UIColor.black + navigationItem.leftBarButtonItem = item + configSelfNavigationBar() + + var param: [String: Any] = Dictionary() + param[TUICore_TUICallingObjectFactory_RecordCallsVC_UIStyle] = TUICore_TUICallingObjectFactory_RecordCallsVC_UIStyle_Classic + if let vc = TUICore.createObject(TUICore_TUICallingObjectFactory, + key: TUICore_TUICallingObjectFactory_RecordCallsVC, + param: param) as? RecentCallsViewController + { + vc.view.frame = CGRect(x: 0, y: 44, width: ScreenWidth, height: ScreenHeight - 44) + self.addChild(vc) + view.addSubview(vc.view) + } + } + + override func viewWillAppear(_ animated: Bool) { + super.viewWillAppear(animated) + navigationController?.setNavigationBarHidden(false, animated: false) + } + + override func viewDidAppear(_ animated: Bool) { + super.viewDidAppear(animated) + navigationController?.setNavigationBarHidden(false, animated: false) + } + + override func viewWillDisappear(_ animated: Bool) { + super.viewWillDisappear(animated) + configOtherNavigationBar() + } + + @objc func backBtnClick() { + self.navigationController?.popViewController(animated: true) + } +} + +extension CallingRecentCallsViewController { + private func configSelfNavigationBar() { + let appperance = UINavigationBarAppearance() + appperance.backgroundColor = TUITheme.dynamicColor("head_bg_gradient_start_color", module: .core, defaultColor: "#EBF0F6") + appperance.shadowImage = UIImage() + appperance.shadowColor = nil + self.navigationController?.navigationBar.standardAppearance = appperance + self.navigationController?.navigationBar.scrollEdgeAppearance = appperance + } + + private func configOtherNavigationBar() { + let appperance = UINavigationBarAppearance() + appperance.backgroundColor = ThemeStore.shared.colorTokens.bgColorOperate + appperance.shadowImage = UIImage() + appperance.shadowColor = nil + appperance.titleTextAttributes = [NSAttributedString.Key.font: ThemeStore.shared.typographyTokens.Regular18, + NSAttributedString.Key.foregroundColor: UIColor.black] + self.navigationController?.navigationBar.standardAppearance = appperance + self.navigationController?.navigationBar.scrollEdgeAppearance = appperance + } +} diff --git a/application/assembly/Modules/Call/UI/CallingRobotCell.swift b/application/assembly/Modules/Call/UI/CallingRobotCell.swift new file mode 100644 index 00000000..2c1254ff --- /dev/null +++ b/application/assembly/Modules/Call/UI/CallingRobotCell.swift @@ -0,0 +1,181 @@ +// +// CallingRobotCell.swift +// main +// + +import UIKit +import AtomicX + +class CallingRobotCell: UITableViewCell { + static let reuseId = "CallingRobotCell" + var clickedDialBotHandler: (_ avatarImage: UIImage, _ callType: CallBotType) -> Void = { _, _ in } + + var callType: CallBotType = .initCall + private let containerView: UIView = { + let view = UIView(frame: .zero) + view.backgroundColor = ThemeStore.shared.colorTokens.bgColorOperate + return view + }() + + private let topIntervalLineView: UIView = { + let view = UIView(frame: .zero) + view.backgroundColor = ThemeStore.shared.colorTokens.bgColorDefault + return view + }() + + private let botIntervalLineView: UIView = { + let view = UIView(frame: .zero) + view.backgroundColor = ThemeStore.shared.colorTokens.bgColorDefault + return view + }() + + private let titleLabel: UILabel = { + let label = UILabel(frame: .zero) + label.font = ThemeStore.shared.typographyTokens.Medium16 + label.textColor = ThemeStore.shared.colorTokens.textColorPrimary + label.textAlignment = .left + label.numberOfLines = 2 + label.adjustsFontSizeToFitWidth = true + label.minimumScaleFactor = 0.5 + return label + }() + + private let avatarImageView: UIImageView = { + let imageView = UIImageView(frame: .zero) + imageView.contentMode = .scaleAspectFit + return imageView + }() + + private let buttonIconImage: UIImageView = { + let imageView = UIImageView(frame: .zero) + imageView.contentMode = .scaleAspectFit + return imageView + }() + + private let buttonTitleLabel: UILabel = { + let label = UILabel(frame: .zero) + label.font = ThemeStore.shared.typographyTokens.Regular14 + label.textColor = UIColor("1C66E5") + label.textAlignment = .left + label.adjustsFontSizeToFitWidth = true + label.minimumScaleFactor = 0.5 + return label + }() + + private let dialButton: UIButton = { + let button = UIButton(type: .custom) + button.layer.borderColor = ThemeStore.shared.colorTokens.buttonColorPrimaryDefault.cgColor + button.layer.borderWidth = 1.0 + button.layer.cornerRadius = ThemeStore.shared.borderRadius.radius16 + button.layer.masksToBounds = true + return button + }() + + private let dialButtonContentView: UIView = { + let view = UIView(frame: .zero) + return view + }() + + override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { + super.init(style: style, reuseIdentifier: reuseIdentifier) + self.backgroundColor = .clear + contentView.backgroundColor = .clear + constructViewHierarchy() + activateConstraints() + bindInteraction() + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + override func awakeFromNib() { + super.awakeFromNib() + } +} + +extension CallingRobotCell { + public func config(_ model: CallingRobotModel) { + avatarImageView.image = AppAssemblyBundle.image(named: model.imageName) + titleLabel.text = model.title + buttonIconImage.image = AppAssemblyBundle.image(named: model.buttonIconImage) + botIntervalLineView.isHidden = !model.hasBotBorder + topIntervalLineView.isHidden = !model.hasTopBorder + self.callType = model.callType + if model.callType == .initCall { + buttonTitleLabel.text = CallingLocalize("Demo.TRTC.Calling.robotInitCalling") + } else { + buttonTitleLabel.text = CallingLocalize("Demo.TRTC.Calling.robotHostCalling") + } + } +} + +extension CallingRobotCell { + private func constructViewHierarchy() { + contentView.addSubview(containerView) + containerView.addSubview(avatarImageView) + containerView.addSubview(titleLabel) + containerView.addSubview(dialButton) + containerView.addSubview(topIntervalLineView) + containerView.addSubview(botIntervalLineView) + containerView.insertSubview(dialButtonContentView, belowSubview: dialButton) + dialButtonContentView.addSubview(buttonIconImage) + dialButtonContentView.addSubview(buttonTitleLabel) + } + + private func activateConstraints() { + containerView.snp.makeConstraints { make in + make.left.right.equalToSuperview() + make.top.equalToSuperview() + make.bottom.equalToSuperview() + } + topIntervalLineView.snp.makeConstraints { make in + make.top.right.left.equalToSuperview() + make.height.equalTo(1) + } + botIntervalLineView.snp.makeConstraints { make in + make.bottom.equalToSuperview() + make.left.equalToSuperview().offset(20) + make.centerX.equalToSuperview() + make.height.equalTo(1) + } + avatarImageView.snp.makeConstraints { make in + make.left.equalToSuperview().offset(20) + make.centerY.equalToSuperview() + } + titleLabel.snp.makeConstraints { make in + make.left.equalTo(avatarImageView.snp.right).offset(8) + make.centerY.equalToSuperview() + } + dialButton.snp.makeConstraints { make in + make.right.equalToSuperview().offset(-20) + make.centerY.equalToSuperview() + make.height.equalTo(32) + make.width.equalTo(100) + } + dialButtonContentView.snp.makeConstraints { make in + make.center.equalTo(dialButton) + make.height.equalTo(20) + make.width.equalTo(76) + } + buttonIconImage.snp.makeConstraints { make in + make.left.equalToSuperview() + make.centerY.equalToSuperview() + make.width.height.equalTo(16) + } + buttonTitleLabel.snp.makeConstraints { make in + make.right.equalToSuperview() + make.centerY.equalToSuperview() + } + } + + func bindInteraction() { + dialButton.addTarget(self, action: #selector(dialToRobotClicked), for: .touchUpInside) + } +} + +extension CallingRobotCell { + @objc func dialToRobotClicked() { + self.clickedDialBotHandler(self.avatarImageView.image ?? UIImage(), self.callType) + } +} diff --git a/application/assembly/Modules/Call/UI/CallingSelectUserTableViewCell.swift b/application/assembly/Modules/Call/UI/CallingSelectUserTableViewCell.swift new file mode 100644 index 00000000..8049e251 --- /dev/null +++ b/application/assembly/Modules/Call/UI/CallingSelectUserTableViewCell.swift @@ -0,0 +1,102 @@ +// +// CallingSelectUserTableViewCell.swift +// main +// + +import UIKit +import Login + +public enum CallingSelectUserButtonType { + case call + case add + case delete +} + +public class CallingSelectUserTableViewCell: UITableViewCell { + private var isViewReady = false + private var buttonAction: (() -> Void)? + + lazy var userImageView: UIImageView = { + let img = UIImageView() + return img + }() + + lazy var nameLabel: UILabel = { + let label = UILabel() + label.textColor = UIColor.black + label.backgroundColor = UIColor.clear + return label + }() + + let rightButton: UIButton = { + let button = UIButton(type: .custom) + button.backgroundColor = UIColor("006EFF") + button.setTitleColor(.white, for: .normal) + button.layer.cornerRadius = 15 + return button + }() + + public override func didMoveToWindow() { + super.didMoveToWindow() + guard !isViewReady else { return } + isViewReady = true + contentView.addSubview(userImageView) + userImageView.snp.remakeConstraints { make in + make.leading.equalToSuperview().offset(20) + make.width.height.equalTo(50) + make.centerY.equalTo(self) + } + + contentView.addSubview(nameLabel) + nameLabel.snp.remakeConstraints { make in + make.leading.equalTo(userImageView.snp.trailing).offset(12) + make.trailing.top.bottom.equalTo(self) + } + + contentView.addSubview(rightButton) + rightButton.snp.makeConstraints { make in + make.centerY.equalToSuperview() + make.width.equalTo(60) + make.height.equalTo(30) + make.right.equalToSuperview().offset(-20) + } + + rightButton.addTarget(self, action: #selector(callAction(_:)), for: .touchUpInside) + } + + public override func prepareForReuse() { + super.prepareForReuse() + self.buttonAction = nil + } + + public func config(model: UserModel, type: CallingSelectUserButtonType, selected: Bool = false, action: (() -> Void)? = nil) { + backgroundColor = UIColor.clear + var btnName = "" + + if let imageURL = URL(string: model.avatar) { + userImageView.kf.setImage(with: .network(imageURL)) + } + + userImageView.layer.masksToBounds = true + userImageView.layer.cornerRadius = 25 + nameLabel.text = model.name != "" ? model.name : model.userId + buttonAction = action + + switch type { + case .call: + btnName = CallingLocalize("Demo.TRTC.Streaming.call") + case .add: + btnName = CallingLocalize("Demo.TRTC.calling.add") + case .delete: + btnName = CallingLocalize("Demo.TRTC.calling.delete") + } + rightButton.setTitle(btnName, for: .normal) + } + + @objc + func callAction(_ sender: UIButton) { + if let action = self.buttonAction { + action() + } + } +} diff --git a/application/App-UIKit/Call/JoinGroupCallViewController.swift b/application/assembly/Modules/Call/UI/JoinGroupCallViewController.swift similarity index 81% rename from application/App-UIKit/Call/JoinGroupCallViewController.swift rename to application/assembly/Modules/Call/UI/JoinGroupCallViewController.swift index c1c91161..e2979743 100644 --- a/application/App-UIKit/Call/JoinGroupCallViewController.swift +++ b/application/assembly/Modules/Call/UI/JoinGroupCallViewController.swift @@ -1,13 +1,13 @@ // // JoinGroupCallViewController.swift -// App-UIKit -// -// Created by yukiwwwang on 2025/8/13. +// AppAssembly // import Foundation import UIKit +import AtomicX import RTCRoomEngine +import SnapKit #if canImport(TUICallKit_Swift) import TUICallKit_Swift @@ -20,45 +20,45 @@ class JoinGroupCallViewController: UIViewController, UITextFieldDelegate { private var isIntRoom = true private let line1View: UIView = { let view = UIView(frame: .zero) - view.backgroundColor = UIColor("EEEEEE") + view.backgroundColor = ThemeStore.shared.colorTokens.strokeColorSecondary return view }() private let groupIdContentView: UIView = { let view = UIView(frame: .zero) - view.backgroundColor = UIColor.white + view.backgroundColor = ThemeStore.shared.colorTokens.bgColorOperate return view }() private let groupIdTextLabel: UILabel = { let label = UILabel(frame: .zero) - label.font = UIFont.systemFont(ofSize: 16) + label.font = ThemeStore.shared.typographyTokens.Regular16 label.textColor = UIColor.black - label.text = SettingsConfig.share.is1VN ? "输入 CallID: " : ("GroupId").localized + label.text = SettingsConfig.share.is1VN ? CallingLocalize("Demo.TRTC.calling.settings.inputCallId") : CallingLocalize("Demo.TRTC.calling.settings.groupId") return label }() private let groupIdTextField: UITextField = { let textField = UITextField(frame: .zero) textField.backgroundColor = UIColor.clear - textField.font = UIFont(name: "PingFangSC-Regular", size: 16) - textField.textColor = UIColor("333333") - textField.attributedPlaceholder = NSAttributedString(string: SettingsConfig.share.is1VN ? "请输入 CallID" : ("InputGroupId").localized) + textField.font = ThemeStore.shared.typographyTokens.Regular16 + textField.textColor = ThemeStore.shared.colorTokens.textColorPrimary + textField.attributedPlaceholder = NSAttributedString(string: SettingsConfig.share.is1VN ? CallingLocalize("Demo.TRTC.calling.settings.pleaseInputCallId") : CallingLocalize("Demo.TRTC.calling.settings.inputGroupId")) textField.textAlignment = .right textField.keyboardType = .asciiCapable return textField }() private let roomIdContentView: UIView = { let view = UIView(frame: .zero) - view.backgroundColor = UIColor.white + view.backgroundColor = ThemeStore.shared.colorTokens.bgColorOperate return view }() - private let roomTypeData = [("RoomIdInt").localized, ("RoomIdString").localized] + private let roomTypeData: [String] = [CallingLocalize("Demo.TRTC.calling.settings.roomIdInt"), CallingLocalize("Demo.TRTC.calling.settings.roomIdString")] private var roomTypeIndex = 0 private lazy var roomIdButton: SwiftDropMenuListView = { let menu = SwiftDropMenuListView(frame: CGRect.zero) let titleStr: String = roomTypeData[roomTypeIndex] menu.setTitle(titleStr, for: .normal) menu.setTitleColor(.black, for: .normal) - menu.titleLabel?.font = UIFont(name: "PingFangSC-Medium", size: 16) + menu.titleLabel?.font = ThemeStore.shared.typographyTokens.Medium16 menu.backgroundColor = UIColor.clear menu.translatesAutoresizingMaskIntoConstraints = false return menu @@ -66,9 +66,9 @@ class JoinGroupCallViewController: UIViewController, UITextFieldDelegate { private let roomIdTextField: UITextField = { let textField = UITextField(frame: .zero) textField.backgroundColor = UIColor.clear - textField.font = UIFont(name: "PingFangSC-Regular", size: 16) - textField.textColor = UIColor("333333") - textField.attributedPlaceholder = NSAttributedString(string: ("InputRoomId").localized) + textField.font = ThemeStore.shared.typographyTokens.Regular16 + textField.textColor = ThemeStore.shared.colorTokens.textColorPrimary + textField.attributedPlaceholder = NSAttributedString(string: CallingLocalize("Demo.TRTC.calling.settings.inputRoomId")) textField.textAlignment = .right return textField }() @@ -77,31 +77,31 @@ class JoinGroupCallViewController: UIViewController, UITextFieldDelegate { private let line2View: UIView = { let view = UIView(frame: .zero) - view.backgroundColor = UIColor("EEEEEE") + view.backgroundColor = ThemeStore.shared.colorTokens.strokeColorSecondary return view }() private let mediaTypeContentView: UIView = { let view = UIView(frame: .zero) - view.backgroundColor = UIColor.white + view.backgroundColor = ThemeStore.shared.colorTokens.bgColorOperate return view }() private let typeLabel: UILabel = { let label = UILabel(frame: .zero) - label.font = UIFont.systemFont(ofSize: 16) + label.font = ThemeStore.shared.typographyTokens.Regular16 label.textColor = UIColor.black - label.text = ("MediaType").localized + label.text = CallingLocalize("Demo.TRTC.calling.settings.mediaType") return label }() private let videoButton: RadioButton = { let button = RadioButton(frame: CGRect.zero) - button.titleText = ("Video Call").localized + button.titleText = CallingLocalize("Demo.TRTC.calling.settings.videoCall") button.titleSize = 16 return button }() private let voiceButton: RadioButton = { let button = RadioButton(frame: CGRect.zero) - button.titleText = ("Audio Call").localized + button.titleText = CallingLocalize("Demo.TRTC.calling.settings.audioCall") button.isSelected = true button.titleSize = 16 return button @@ -113,11 +113,11 @@ class JoinGroupCallViewController: UIViewController, UITextFieldDelegate { private let callButton: UIButton = { let btn = UIButton(type: .system) btn.setTitleColor(.white, for: .normal) - btn.setTitle(("Call").localized, for: .normal) + btn.setTitle(CallingLocalize("Demo.TRTC.calling.settings.call"), for: .normal) btn.adjustsImageWhenHighlighted = false - btn.setBackgroundImage(UIColor("006EFF").trans2Image(), for: .normal) - btn.titleLabel?.font = UIFont(name: "PingFangSC-Medium", size: 20) - btn.layer.shadowColor = UIColor("006EFF").cgColor + btn.setBackgroundImage(ThemeStore.shared.colorTokens.buttonColorPrimaryDefault.trans2Image(), for: .normal) + btn.titleLabel?.font = ThemeStore.shared.typographyTokens.Medium20 + btn.layer.shadowColor = ThemeStore.shared.colorTokens.buttonColorPrimaryDefault.cgColor btn.layer.shadowOffset = CGSize(width: 0, height: 6) btn.layer.shadowRadius = 16 btn.layer.shadowOpacity = 0.4 @@ -127,14 +127,14 @@ class JoinGroupCallViewController: UIViewController, UITextFieldDelegate { }() private let backButton: UIButton = { let button = UIButton(type: .system) - button.setImage(UIImage(named: "back"), for: .normal) + button.setImage(AppAssemblyBundle.image(named: "calling_back"), for: .normal) button.tintColor = .black return button }() override func viewDidLoad() { super.viewDidLoad() - view.backgroundColor = UIColor.white + view.backgroundColor = ThemeStore.shared.colorTokens.bgColorOperate setupNavigationBar() constructViewHierarchy() activateConstraints() @@ -288,7 +288,7 @@ class JoinGroupCallViewController: UIViewController, UITextFieldDelegate { @objc private func settingButtonClick() { let settingVC = SettingsViewController() - settingVC.title = ("CallSettings").localized + settingVC.title = CallingLocalize("Demo.TRTC.calling.settings.callSettings") settingVC.hidesBottomBarWhenPushed = true navigationController?.pushViewController(settingVC, animated: true) } @@ -332,9 +332,9 @@ extension JoinGroupCallViewController: SwiftDropMenuListViewDataSource, SwiftDro func dropMenu(_ menu: SwiftDropMenuListView, didSelectItem: String?, atIndex index: Int) { roomTypeIndex = index if index == 0 { - roomIdButton.setTitle(("RoomIdInt").localized + " >", for: .normal) + roomIdButton.setTitle(CallingLocalize("Demo.TRTC.calling.settings.roomIdInt") + " >", for: .normal) } else { - roomIdButton.setTitle(("RoomIdString").localized + " >", for: .normal) + roomIdButton.setTitle(CallingLocalize("Demo.TRTC.calling.settings.roomIdString") + " >", for: .normal) } } diff --git a/application/assembly/Modules/Call/UI/TRTCCallingContactView.swift b/application/assembly/Modules/Call/UI/TRTCCallingContactView.swift new file mode 100644 index 00000000..460e2f22 --- /dev/null +++ b/application/assembly/Modules/Call/UI/TRTCCallingContactView.swift @@ -0,0 +1,425 @@ +// +// TRTCCallingContactView.swift +// main +// + +import UIKit +import Foundation +import Toast_Swift +import TUICallKit_Swift +import RTCRoomEngine +import ImSDK_Plus +import TUICore +import AtomicXCore +import Login +import AtomicX + +enum TRTCCallingUserRemoveReason: UInt32 { + case leave = 0 + case reject + case noresp + case busy +} + +public class TRTCCallingContactView: UIView { + var selectedFinished: (([UserModel]) -> Void)? = nil + var gotoGuideVCHandler: () -> Void = {} + var btnType: CallingSelectUserButtonType = .call + var callType: CallMediaType = .audio + + var shouldShowSearchResult: Bool = false { + didSet { + if oldValue != shouldShowSearchResult { + selectTable.reloadData() + } + } + } + + var searchResult: UserModel? = nil + + private let callingGuideView: CallingDetaiGuideView = { + let view = CallingDetaiGuideView(frame: .zero) + view.isHidden = false + return view + }() + + let searchContainerView: UIView = { + let view = UIView(frame: .zero) + view.backgroundColor = ThemeStore.shared.colorTokens.bgColorDefault + view.layer.cornerRadius = ThemeStore.shared.borderRadius.radius20 + return view + }() + + lazy var searchBar: UISearchBar = { + let searchBar = UISearchBar() + searchBar.searchBarStyle = .minimal + searchBar.backgroundImage = UIImage() + searchBar.placeholder = CallingLocalize("Demo.TRTC.calling.searchID") + searchBar.barTintColor = UIColor.clear + searchBar.backgroundColor = UIColor.clear + searchBar.returnKeyType = .search + + if LoginManager.shared.currentUser?.isMoa() == true { + searchBar.keyboardType = .default + } else { + searchBar.keyboardType = .phonePad + } + + searchBar.layer.cornerRadius = 0 + return searchBar + }() + + lazy var searchBtn: UIButton = { + let done = UIButton(type: .custom) + done.setTitle(CallingLocalize("Demo.TRTC.calling.searching"), for: .normal) + done.setTitleColor(ThemeStore.shared.colorTokens.buttonColorPrimaryDefault, for: .normal) + done.titleLabel?.font = ThemeStore.shared.typographyTokens.Bold14 + done.clipsToBounds = true + done.layer.cornerRadius = ThemeStore.shared.borderRadius.radius20 + return done + }() + + lazy var userInfoMarkView: UIView = { + let view = UIView(frame: .zero) + view.backgroundColor = ThemeStore.shared.colorTokens.textColorTertiary + view.layer.cornerRadius = 1.5 + view.isHidden = true + return view + }() + + let userInfoLabel: UILabel = { + let label = UILabel(frame: .zero) + let copyStr = CallingLocalize("Demo.TRTC.calling.contactCopy") + let str = CallingLocalize("Demo.TRTC.calling.yourID") + " " + + (LoginManager.shared.getCurrentUser()?.userId ?? "") + " " + + copyStr + let font = ThemeStore.shared.typographyTokens.Regular12 + let fontAttr: [NSAttributedString.Key: Any] = [.font: font, .foregroundColor: ThemeStore.shared.colorTokens.textColorPrimary] + let contentAttrStr = NSMutableAttributedString(string: str, attributes: fontAttr) + let newColor = ThemeStore.shared.colorTokens.buttonColorPrimaryDefault + let newColorAttributes: [NSAttributedString.Key: Any] = [.foregroundColor: newColor] + contentAttrStr.addAttributes(newColorAttributes, + range: NSRange(location: str.count - copyStr.count, + length: copyStr.count)) + label.isUserInteractionEnabled = true + label.attributedText = contentAttrStr + return label + }() + + lazy var selectTable: UITableView = { + let table = UITableView(frame: CGRect.zero, style: .plain) + table.tableFooterView = UIView(frame: .zero) + table.backgroundColor = UIColor.clear + table.register(CallingSelectUserTableViewCell.classForCoder(), forCellReuseIdentifier: "CallingSelectUserTableViewCell") + table.delegate = self + table.dataSource = self + return table + }() + + let kUserBorder: CGFloat = 44.0 + let kUserSpacing: CGFloat = 2 + let kUserPanelLeftSpacing: CGFloat = 28 + + lazy var noSearchImageView: UIImageView = { + let imageView = UIImageView(image: AppAssemblyBundle.image(named: "noSearchMembers")) + imageView.isUserInteractionEnabled = false + return imageView + }() + + lazy var noMembersTip: UILabel = { + let label = UILabel() + label.text = CallingLocalize("Demo.TRTC.calling.searchandcall") + label.numberOfLines = 2 + label.textAlignment = NSTextAlignment.center + label.textColor = ThemeStore.shared.colorTokens.textColorDisable + return label + }() + + public init(frame: CGRect = .zero, type: CallingSelectUserButtonType, selectHandle: @escaping ([UserModel]) -> Void) { + super.init(frame: frame) + btnType = type + selectedFinished = selectHandle + backgroundColor = ThemeStore.shared.colorTokens.bgColorOperate + setupUI() + registerButtonTouchEvents() + hiddenNoMembersImg(isHidden: false) + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + deinit { + debugPrint("deinit \(self)") + NotificationCenter.default.removeObserver(self) + } + + var lastNetworkQualityCallTime: Date? +} + +extension TRTCCallingContactView { + + func setupUI() { + constructViewHierarchy() + activateConstraints() + setupUIStyle() + hiddenNoMembersImg(isHidden: false) + selectTable.reloadData() + bindInteraction() + } + + func constructViewHierarchy() { + addSubview(searchContainerView) + searchContainerView.addSubview(searchBar) + searchContainerView.addSubview(searchBtn) + addSubview(userInfoMarkView) + addSubview(userInfoLabel) + addSubview(selectTable) + selectTable.isHidden = true + addSubview(noSearchImageView) + addSubview(noMembersTip) + addSubview(callingGuideView) + } + + func activateConstraints() { + searchContainerView.snp.makeConstraints { make in + if #available(iOS 11.0, *) { + make.top.equalTo(safeAreaLayoutGuide.snp.top).offset(20) + } else { + make.top.equalToSuperview().offset(20) + } + make.leading.equalTo(20) + make.trailing.equalTo(-20) + make.height.equalTo(40) + } + searchBar.snp.makeConstraints { make in + make.top.leading.bottom.equalToSuperview() + make.trailing.equalTo(searchBtn.snp.leading) + } + searchBtn.snp.makeConstraints { make in + make.top.bottom.equalToSuperview() + make.trailing.equalToSuperview().offset(-16) + make.width.equalTo(60) + } + userInfoMarkView.snp.makeConstraints { make in + make.centerY.equalTo(userInfoLabel) + make.leading.equalTo(20) + make.size.equalTo(CGSize(width: 3, height: 12)) + } + userInfoLabel.snp.makeConstraints { make in + make.top.equalTo(searchContainerView.snp.bottom).offset(20) + make.leading.equalTo(userInfoMarkView).offset(8) + make.trailing.equalTo(-20) + make.height.equalTo(20) + } + selectTable.snp.makeConstraints { make in + make.top.equalTo(userInfoLabel.snp.bottom).offset(10) + make.leading.trailing.equalToSuperview() + make.bottomMargin.equalToSuperview() + } + noSearchImageView.snp.makeConstraints { make in + make.top.equalTo(self.bounds.size.height / 3.0) + make.leading.equalTo(self.bounds.size.width * 154.0 / 375) + make.trailing.equalTo(-self.bounds.size.width * 154.0 / 375) + make.height.equalTo(self.bounds.size.width * 67.0 / 375) + } + noMembersTip.snp.makeConstraints { make in + make.top.equalTo(noSearchImageView.snp.bottom) + make.width.equalTo(self.bounds.size.width) + make.height.equalTo(60) + } + callingGuideView.snp.makeConstraints { make in + make.top.equalTo(userInfoLabel.snp.bottom).offset(102) + make.centerX.equalToSuperview() + make.height.equalTo(201) + make.width.equalTo(184) + } + } + + func bindInteraction() { + callingGuideView.guideButtonClickHandler = { [weak self] in + guard let self = self else { return } + self.gotoGuideVCHandler() + } + let tap = UITapGestureRecognizer(target: self, action: #selector(copyUserIDClicked)) + userInfoLabel.isUserInteractionEnabled = true + userInfoLabel.addGestureRecognizer(tap) + } + + func setupUIStyle() { + let textfield = searchBar.searchTextField + textfield.layer.cornerRadius = 0 + textfield.layer.masksToBounds = true + textfield.textColor = UIColor.black + textfield.font = ThemeStore.shared.typographyTokens.Regular14 + textfield.backgroundColor = UIColor.clear + textfield.borderStyle = .none + textfield.leftViewMode = .always + textfield.adjustsFontSizeToFitWidth = true + textfield.minimumFontSize = 10 + ToastManager.shared.position = .bottom + } + + func showCallVC(users: [String]) { + TUICallKit.createInstance().calls(userIdList: users, mediaType: callType, params: nil, completion: nil) + } + + @objc func hiddenNoMembersImg(isHidden: Bool) { + selectTable.isHidden = !isHidden + noSearchImageView.isHidden = isHidden + noMembersTip.isHidden = isHidden + } +} + +extension TRTCCallingContactView: UITextFieldDelegate, UISearchBarDelegate { + + public func searchBarCancelButtonClicked(_ searchBar: UISearchBar) { + hiddenNoMembersImg(isHidden: false) + } + + public func searchBarSearchButtonClicked(_ searchBar: UISearchBar) { + searchBar.resignFirstResponder() + if let input = searchBar.text, input.count > 0 { + searchUser(input: input) + } + } + + public func searchBar(_ searchBar: UISearchBar, textDidChange searchText: String) { + if searchBar.text == nil || searchBar.text?.count ?? 0 == 0 { + shouldShowSearchResult = false + hiddenNoMembersImg(isHidden: false) + } + + if (searchBar.text?.count ?? 0) > 11 { + searchBar.text = (searchBar.text as NSString?)?.substring(to: 11) + } + } + + public func searchUser(input: String) { + if LoginManager.shared.getCurrentUser() != nil && + UserOverdueLogicManager.sharedManager().userOverdueState == .alreadyLogged + { +#if RTCUBE_LAB + V2TIMManager.sharedInstance()?.getUsersInfo([input], succ: { [weak self] infos in + guard let self = self else { return } + if let info = infos?.first { + let userModel = UserModel(userId: info.userID ?? "", + name: info.nickName ?? "", + avatar: info.faceURL ?? "") + self.searchResult = userModel + if self.searchResult != nil { + self.shouldShowSearchResult = true + self.selectTable.reloadData() + self.hiddenNoMembersImg(isHidden: true) + self.callingGuideView.isHidden = true + } + } + }, fail: { code, err in + self.searchResult = nil + self.callingGuideView.isHidden = false + self.makeToast(err) + if UserOverdueLogicManager.sharedManager().userOverdueState == .notLogin { + self.makeToast(CallingLocalize("Demo.TRTC.Portal.Main.LoginFailed")) + } + }) +#else + let param = ["searchUserId": input] + LoginNetworkManager.userQueryUserId(param: param, resultCallback: { [weak self] code, errorMessage, result in + guard let self = self else { return } + if code == kAppLoginServiceSuccessCode { + guard let model = result["jsonModel"] as? HttpJsonModel else { + return + } + if let bsUser = model.searchUserModel { + self.searchResult = UserModel(userId: bsUser.userId, + name: bsUser.name, + avatar: bsUser.avatar) + } + if self.searchResult != nil { + self.shouldShowSearchResult = true + self.selectTable.reloadData() + self.hiddenNoMembersImg(isHidden: true) + self.callingGuideView.isHidden = true + } + } else { + self.searchResult = nil + self.callingGuideView.isHidden = false + self.makeToast(errorMessage) + if UserOverdueLogicManager.sharedManager().userOverdueState == .notLogin { + self.makeToast(CallingLocalize("Demo.TRTC.Portal.Main.LoginFailed")) + } + } + }) +#endif + } + } +} + +extension TRTCCallingContactView: UITableViewDelegate, UITableViewDataSource { + + public func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + if shouldShowSearchResult { + return 1 + } + return 0 + } + + public func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + let cell = tableView.dequeueReusableCell(withIdentifier: "CallingSelectUserTableViewCell") as! CallingSelectUserTableViewCell + cell.selectionStyle = .none + if shouldShowSearchResult { + if let userModel = searchResult { + cell.config(model: userModel, type: btnType, selected: false) { [weak self] in + guard let self = self else { return } + if userModel.userId == V2TIMManager.sharedInstance()?.getLoginUser() { + self.makeToast(CallingLocalize("Demo.TRTC.calling.cantinviteself")) + return + } + if let finish = self.selectedFinished { + finish([userModel]) + } + } + } else { + debugPrint("not search result") + } + } + return cell + } + + public func tableView(_ tableView: UITableView, willDisplayHeaderView view: UIView, forSection section: Int) { + view.tintColor = UIColor.clear + let header = view as! UITableViewHeaderFooterView + header.textLabel?.textColor = UIColor.white + } + + public func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { + return 60 + } + + public func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool { + return true + } +} + +extension TRTCCallingContactView { + + private func registerButtonTouchEvents() { + searchBtn.addTarget(self, action: #selector(searchBtnTouchEvent(sender:)), for: .touchUpInside) + } + + @objc private func searchBtnTouchEvent(sender: UIButton) { + self.searchBar.resignFirstResponder() + if let input = self.searchBar.text, input.count > 0 { + self.searchUser(input: input) + } + } + + @objc private func copyUserIDClicked() { + if let stringToCopy = LoginManager.shared.getCurrentUser()?.userId { + UIPasteboard.general.string = stringToCopy + self.makeToast(CallingLocalize("Demo.TRTC.calling.guideCopySucess")) + } else { + self.makeToast(CallingLocalize("Demo.TRTC.calling.IDCopyFailed")) + } + } +} diff --git a/application/assembly/Modules/Call/UI/TRTCCallingContactViewController.swift b/application/assembly/Modules/Call/UI/TRTCCallingContactViewController.swift new file mode 100644 index 00000000..87122e77 --- /dev/null +++ b/application/assembly/Modules/Call/UI/TRTCCallingContactViewController.swift @@ -0,0 +1,88 @@ +// +// TRTCCallingContactViewController.swift +// main +// + +import Foundation +import TUICallKit_Swift +import RTCRoomEngine +import UIKit +import TUICore +import AtomicXCore +import Login +import AtomicX + +public class TRTCCallingContactViewController: UIViewController { + var selectedFinished: (([UserModel]) -> Void)? = nil + var callType: CallMediaType = .audio + + lazy var callingContactView: TRTCCallingContactView = { + let callingContactView = TRTCCallingContactView(frame: .zero, type: .call) { [weak self] users in + guard let self = self else { return } + var userIds: [String] = [] + for userModel in users { + userIds.append(userModel.userId) + } + self.showCallVC(users: userIds) + } + return callingContactView + }() + + public override func viewDidLoad() { + super.viewDidLoad() + view.backgroundColor = ThemeStore.shared.colorTokens.bgColorOperate + let backBtn = UIButton(type: .custom) + backBtn.setImage(AppAssemblyBundle.image(named: "calling_back"), for: .normal) + backBtn.addTarget(self, action: #selector(backBtnClick), for: .touchUpInside) + let item = UIBarButtonItem(customView: backBtn) + item.tintColor = UIColor.black + navigationItem.leftBarButtonItem = item + + setupUI() + bindInteraction() + } + + public override func viewWillAppear(_ animated: Bool) { + super.viewWillAppear(animated) + navigationController?.setNavigationBarHidden(false, animated: false) + } + + @objc func backBtnClick() { + navigationController?.popViewController(animated: true) + } + + deinit { + debugPrint("deinit \(self)") + } +} + +extension TRTCCallingContactViewController { + + func setupUI() { + view.addSubview(callingContactView) + + callingContactView.snp.makeConstraints { make in + make.edges.equalToSuperview() + } + } + + func bindInteraction() { + callingContactView.gotoGuideVCHandler = { [weak self] in + guard let self = self else { return } + let currentLanguageCode = TUIGlobalization.getPreferredLanguage() + let url = "https://rtcube.cloud.tencent.com/component/experience-center/index.html#/detail?scene=callkit" + let urlEn = "https://trtc.io/demo/homepage/#/detail?scene=callkit" + let guideVC = GuideHomeViewController(selectedIndex: 0, homeJsonData: GuideHomeModel(singlePlayerJsonName: "callingSingleGuideData", + withAppJsonName: "callingWithAppGuideData", + withWebJsonName: "callingWithWebGuideData"), + copyUrl: url, + copyUrlEn: urlEn) + guideVC.title = CallingLocalize("Demo.TRTC.calling.guideTitle") + self.navigationController?.pushViewController(guideVC, animated: true) + } + } + + func showCallVC(users: [String]) { + TUICallKit.createInstance().calls(userIdList: users, mediaType: callType, params: nil, completion: nil) + } +} diff --git a/application/assembly/Modules/Call/UI/TRTCGroupCallingContactViewController.swift b/application/assembly/Modules/Call/UI/TRTCGroupCallingContactViewController.swift new file mode 100644 index 00000000..64697e7d --- /dev/null +++ b/application/assembly/Modules/Call/UI/TRTCGroupCallingContactViewController.swift @@ -0,0 +1,227 @@ +// +// TRTCGroupCallingContactViewController.swift +// main +// + +import UIKit +import Foundation +import Toast_Swift +import TUICallKit_Swift +import RTCRoomEngine +import ImSDK_Plus +import AtomicXCore +import Login +import AtomicX + +enum GroupCallingUserRemoveReason: UInt32 { + case leave = 0 + case reject + case noresp + case busy +} + +public class TRTCGroupCallingContactViewController: UIViewController { + var selectedFinished: (([UserModel]) -> Void)? = nil + var addedUserModel: [UserModel] = [] + var callType: CallMediaType = .audio + + let addedTableTitle: UILabel = { + let label = UILabel(frame: .zero) + label.text = CallingLocalize("Demo.TRTC.calling.addedUser") + label.font = ThemeStore.shared.typographyTokens.Regular16 + label.textColor = UIColor.black + label.textAlignment = .left + return label + }() + + lazy var addedTable: UITableView = { + let table = UITableView(frame: CGRect.zero, style: .plain) + table.tableFooterView = UIView(frame: .zero) + table.backgroundColor = UIColor.clear + table.register(CallingSelectUserTableViewCell.classForCoder(), forCellReuseIdentifier: "CallingSelectUserTableViewCell") + table.delegate = self + table.dataSource = self + return table + }() + + lazy var noMembersTip: UILabel = { + let label = UILabel() + label.text = CallingLocalize("Demo.TRTC.calling.tips") + label.numberOfLines = 2 + label.textAlignment = NSTextAlignment.center + label.textColor = ThemeStore.shared.colorTokens.textColorDisable + return label + }() + + lazy var callingContactView: TRTCCallingContactView = { + let callingContactView = TRTCCallingContactView(frame: .zero, type: .add) { [weak self] users in + guard let self = self else { return } + self.adduser(users: users) + } + return callingContactView + }() + + public override func viewDidLoad() { + super.viewDidLoad() + view.backgroundColor = ThemeStore.shared.colorTokens.bgColorOperate + let backBtn = UIButton(type: .custom) + backBtn.setImage(AppAssemblyBundle.image(named: "calling_back"), for: .normal) + backBtn.addTarget(self, action: #selector(backBtnClick), for: .touchUpInside) + let item = UIBarButtonItem(customView: backBtn) + item.tintColor = UIColor.black + navigationItem.leftBarButtonItem = item + + let callBtn = UIButton(frame: CGRect(x: 0, y: 0, width: 50, height: 30)) + callBtn.setTitle(CallingLocalize("Demo.TRTC.calling.done"), for: .normal) + callBtn.setTitleColor(UIColor.black, for: .normal) + callBtn.titleLabel?.font = ThemeStore.shared.typographyTokens.Regular16 + callBtn.addTarget(self, action: #selector(showCallVC), for: .touchUpInside) + let rightItem = UIBarButtonItem(customView: callBtn) + rightItem.tintColor = UIColor.black + navigationItem.rightBarButtonItem = rightItem + setupUI() + } + + @objc func backBtnClick() { + navigationController?.popViewController(animated: true) + } + + @objc func showCallVC() { + var userIds: [String] = [] + for item in addedUserModel { userIds.append(item.userId) } + guard userIds.count > 0 else { + self.view.makeToast(CallingLocalize("Demo.TRTC.calling.tips")) + return + } + TUICallKit.createInstance().calls(userIdList: userIds, mediaType: callType, params: nil, completion: nil) + } + + deinit { debugPrint("deinit \(self)") } + + public override func viewWillAppear(_ animated: Bool) { + super.viewWillAppear(animated) + navigationController?.setNavigationBarHidden(false, animated: false) + hiddenNoMembersImg(isHidden: false) + } + + public override func viewDidAppear(_ animated: Bool) { + super.viewDidAppear(animated) + navigationController?.setNavigationBarHidden(false, animated: false) + } + + var lastNetworkQualityCallTime: Date? +} + +extension TRTCGroupCallingContactViewController { + func setupUI() { + constructViewHierarchy() + activateConstraints() + bindInteraction() + ToastManager.shared.position = .bottom + hiddenNoMembersImg(isHidden: false) + addedTable.reloadData() + } + + func constructViewHierarchy() { + view.addSubview(addedTableTitle) + view.addSubview(addedTable) + view.addSubview(noMembersTip) + view.addSubview(callingContactView) + } + + func activateConstraints() { + addedTableTitle.snp.makeConstraints { make in + make.topMargin.equalTo(view).offset(20) + make.leading.equalTo(view).offset(20) + make.trailing.equalTo(-20) + make.height.equalTo(20) + } + addedTable.snp.makeConstraints { make in + make.top.equalTo(addedTableTitle.snp.bottom).offset(10) + make.leading.trailing.equalTo(view) + make.height.equalTo(200) + } + noMembersTip.snp.makeConstraints { make in + make.top.equalTo(addedTable.bounds.size.height / 3.0) + make.leading.equalTo(addedTable.bounds.size.width * 154.0 / 375) + make.trailing.equalTo(-addedTable.bounds.size.width * 154.0 / 375) + make.height.equalTo(addedTable.bounds.size.width * 67.0 / 375) + } + callingContactView.snp.makeConstraints { make in + make.top.equalTo(addedTable.snp.bottom) + make.left.right.equalTo(view) + make.bottomMargin.equalTo(view) + } + } + + func bindInteraction() { + selectedFinished = { [weak self] users in + guard let self = self else { return } + self.deleteAddedUser(users: users) + } + } + + func deleteAddedUser(users: [UserModel]) { + guard users.count > 0 else { return } + if let waitingDeleteUser = users.first { + if let deleteIndex = addedUserModel.firstIndex(where: { $0.userId == waitingDeleteUser.userId }) { + addedUserModel.remove(at: deleteIndex) + addedTable.reloadData() + } + } + } + + func adduser(users: [UserModel]) { + guard users.count > 0 else { return } + guard addedUserModel.count < 8 else { + self.view.makeToast(CallingLocalize("Demo.TRTC.calling.numExceed")) + return + } + var addedFlag = false + if let waitingAddUser = users.first { + for _ in addedUserModel.filter({ $0.userId == waitingAddUser.userId }) { + addedFlag = true + } + guard addedFlag == false else { return } + addedUserModel.append(waitingAddUser) + addedTable.reloadData() + } + } + + @objc func hiddenNoMembersImg(isHidden: Bool) { + noMembersTip.isHidden = isHidden + } +} + +extension TRTCGroupCallingContactViewController: UITableViewDelegate, UITableViewDataSource { + public func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + return addedUserModel.count + } + + public func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + let cell = tableView.dequeueReusableCell(withIdentifier: "CallingSelectUserTableViewCell") as! CallingSelectUserTableViewCell + cell.selectionStyle = .none + let userModel = addedUserModel[indexPath.row] + cell.config(model: userModel, type: .delete, selected: false) { [weak self] in + guard let self = self else { return } + if let finish = self.selectedFinished { + finish([userModel]) + } + } + return cell + } + + public func tableView(_ tableView: UITableView, willDisplayHeaderView view: UIView, forSection section: Int) { + view.tintColor = UIColor.clear + let header = view as! UITableViewHeaderFooterView + header.textLabel?.textColor = UIColor.white + } + + public func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { + return 60 + } + + public func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool { + return true + } +} diff --git a/application/assembly/Modules/Interface/EntranceCardStyle.swift b/application/assembly/Modules/Interface/EntranceCardStyle.swift new file mode 100644 index 00000000..b3576ab8 --- /dev/null +++ b/application/assembly/Modules/Interface/EntranceCardStyle.swift @@ -0,0 +1,14 @@ +// +// EntranceCardStyle.swift +// AppAssembly +// + +import Foundation + +public enum EntranceCardStyle { + case standard + + case uiComponent + + case banner +} diff --git a/application/assembly/Modules/Interface/ModuleConfig.swift b/application/assembly/Modules/Interface/ModuleConfig.swift new file mode 100644 index 00000000..290df4b3 --- /dev/null +++ b/application/assembly/Modules/Interface/ModuleConfig.swift @@ -0,0 +1,50 @@ +// +// ModuleConfig.swift +// AppAssembly +// + +import UIKit + +public struct ModuleConfig { + public let identifier: String + + public let title: String + + public let description: String + + public let iconName: String + + public let iconImage: UIImage? + + public let cardStyle: EntranceCardStyle + + public let gradientColors: [UIColor] + + public let isHot: Bool + + public let targetProvider: () -> UIViewController? + + public let analyticsEvent: String + + public init(identifier: String, + title: String, + description: String, + iconName: String, + iconImage: UIImage? = nil, + cardStyle: EntranceCardStyle, + gradientColors: [UIColor] = [], + isHot: Bool = false, + targetProvider: @escaping () -> UIViewController?, + analyticsEvent: String = "") { + self.identifier = identifier + self.title = title + self.description = description + self.iconName = iconName + self.iconImage = iconImage + self.cardStyle = cardStyle + self.gradientColors = gradientColors + self.isHot = isHot + self.targetProvider = targetProvider + self.analyticsEvent = analyticsEvent + } +} diff --git a/application/assembly/Modules/Interface/ModuleEnvironment.swift b/application/assembly/Modules/Interface/ModuleEnvironment.swift new file mode 100644 index 00000000..fac963cc --- /dev/null +++ b/application/assembly/Modules/Interface/ModuleEnvironment.swift @@ -0,0 +1,27 @@ +// +// ModuleEnvironment.swift +// AppAssembly +// + +import Foundation +import Login + +public struct ModuleEnvironment { + public let beautyLicenseURL: String + public let beautyLicenseKey: String + + public let getCurrentUserModel: () -> UserModel? + public let generateUserSig: (_ userId: String) -> String + + public init( + beautyLicenseURL: String = "", + beautyLicenseKey: String = "", + getCurrentUserModel: @escaping () -> UserModel?, + generateUserSig: @escaping (String) -> String + ) { + self.beautyLicenseURL = beautyLicenseURL + self.beautyLicenseKey = beautyLicenseKey + self.getCurrentUserModel = getCurrentUserModel + self.generateUserSig = generateUserSig + } +} diff --git a/application/assembly/Modules/Interface/ModuleProvider.swift b/application/assembly/Modules/Interface/ModuleProvider.swift new file mode 100644 index 00000000..f62e3ed2 --- /dev/null +++ b/application/assembly/Modules/Interface/ModuleProvider.swift @@ -0,0 +1,37 @@ +// +// ModuleProvider.swift +// AppAssembly +// + +import Combine +import UIKit + +public protocol ModuleProvider: AnyObject { + var config: ModuleConfig { get } + + var badgeCountPublisher: AnyPublisher { get } + + var isVisiblePublisher: AnyPublisher { get } + + func setup(with environment: ModuleEnvironment) +} + +// MARK: - Default Implementations + +public extension ModuleProvider { + var badgeCountPublisher: AnyPublisher { + Just(0).eraseToAnyPublisher() + } + + var isVisiblePublisher: AnyPublisher { + Just(true).eraseToAnyPublisher() + } + + func setup(with environment: ModuleEnvironment) {} +} + +public let stubUIComponentGradient: [UIColor] = [ + UIColor(red: 204 / 255.0, green: 223 / 255.0, blue: 255 / 255.0, alpha: 1), + UIColor(red: 204 / 255.0, green: 223 / 255.0, blue: 255 / 255.0, alpha: 0.3), + UIColor(red: 204 / 255.0, green: 223 / 255.0, blue: 255 / 255.0, alpha: 0), +] diff --git a/application/assembly/Modules/Live/AnchorPrepareViewController.swift b/application/assembly/Modules/Live/AnchorPrepareViewController.swift new file mode 100644 index 00000000..5a9e9a06 --- /dev/null +++ b/application/assembly/Modules/Live/AnchorPrepareViewController.swift @@ -0,0 +1,106 @@ +// +// AnchorPrepareViewController.swift +// TUILiveKit +// +// Created by gg on 2025/4/17. +// + +import AtomicX +import AtomicXCore +import Combine +import TUILiveKit + +class AnchorPrepareViewController: UIViewController { + var willStartLive: ((_ vc: AnchorViewController) -> ())? + + private let roomId: String + init(roomId: String) { + self.roomId = roomId + super.init(nibName: nil, bundle: nil) + } + + deinit { + LiveKitLog.info("\(#file)", "\(#line)", "deinit AnchorPrepareViewController \(self)") + } + + @available(*, unavailable) + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + private lazy var rootView: AnchorPrepareView = { + let view = AnchorPrepareView(roomId: roomId) + view.delegate = self + return view + }() + + override func viewDidLoad() { + super.viewDidLoad() + } + + override func loadView() { + view = rootView + } + + override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) { + super.viewWillTransition(to: size, with: coordinator) + let isPortrait = size.width < size.height + rootView.updateRootViewOrientation(isPortrait: isPortrait) + } +} + +let transitionWindow: UIWindow = { + let window = UIWindow(frame: UIScreen.main.bounds) + window.windowScene = UIApplication.shared.connectedScenes.compactMap { $0 as? UIWindowScene }.first + window.windowLevel = .statusBar - 1 + window.backgroundColor = .clear + return window +}() + +extension AnchorPrepareViewController: AnchorPrepareViewDelegate { + func onClickBackButton() { + if let nav = navigationController { + nav.popViewController(animated: true) + } else { + dismiss(animated: true) + } + AudioEffectStore.shared.reset() + DeviceStore.shared.reset() + BaseBeautyStore.shared.reset() + } + + func onClickStartButton(state: PrepareState) { + guard let rootVC = WindowUtils.getCurrentWindow()?.rootViewController else { return } + let tmpView: UIView + if let snapshot = rootView.snapshotView(afterScreenUpdates: true) { + tmpView = snapshot + } else { + tmpView = rootView + } + transitionWindow.addSubview(tmpView) + tmpView.snp.makeConstraints { make in + make.edges.equalToSuperview() + } + transitionWindow.alpha = 1 + transitionWindow.isHidden = false + + dismiss(animated: false) { [weak self, weak rootVC] in + guard let self = self, let rootVC = rootVC else { return } + + let param = LiveParams(liveID: roomId, prepareState: state) + let anchorVC = AnchorViewController(liveParams: param, coreView: rootView.getCoreView(), behavior: .createRoom) + anchorVC.modalPresentationStyle = .fullScreen + + willStartLive?(anchorVC) + + rootVC.present(anchorVC, animated: false) { + UIView.animate(withDuration: 0.3) { + transitionWindow.alpha = 0 + } completion: { _ in + transitionWindow.subviews.forEach { $0.safeRemoveFromSuperview() } + transitionWindow.isHidden = true + } + } + } + } +} diff --git a/application/assembly/Modules/Live/AnchorViewController.swift b/application/assembly/Modules/Live/AnchorViewController.swift new file mode 100644 index 00000000..2b202c99 --- /dev/null +++ b/application/assembly/Modules/Live/AnchorViewController.swift @@ -0,0 +1,250 @@ +// +// AnchorViewController.swift +// TUILiveKit +// +// Created by WesleyLei on 2023/10/11. +// Copyright © 2023 Tencent. All rights reserved. +// + +import AtomicX +import AtomicXCore +import Combine +import Foundation +import Login +import TUICore +import TUILiveKit + +class AnchorViewController: UIViewController { + // MARK: - private property. + + private var cancellableSet = Set() + private let coreView: LiveCoreView + + private let liveInfo: LiveInfo + private let behavior: RoomBehavior + + private let anchorView: AnchorView + + private var remainingTimer: Timer? + private var timeOutTimer: Timer? + + init(liveInfo: LiveInfo, coreView: LiveCoreView? = nil, behavior: RoomBehavior = .createRoom) { + self.liveInfo = liveInfo + self.behavior = behavior + if let coreView = coreView { + self.coreView = coreView + } else { + do { + let jsonObject: [String: Any] = [ + "api": "component", + "component": 21 + ] + let jsonData = try JSONSerialization.data(withJSONObject: jsonObject, options: []) + if let jsonString = String(data: jsonData, encoding: .utf8) { + LiveCoreView.callExperimentalAPI(jsonString) + } + } catch { + LiveKitLog.error("\(#file)", "\(#line)", "dataReport: \(error.localizedDescription)") + } + self.coreView = LiveCoreView(viewType: .pushView) + } + self.anchorView = AnchorView(liveInfo: liveInfo, coreView: self.coreView, behavior: behavior) + super.init(nibName: nil, bundle: nil) + initialize() + } + + init(liveParams: LiveParams, coreView: LiveCoreView? = nil, behavior: RoomBehavior = .createRoom) { + self.liveInfo = liveParams.liveInfo + self.behavior = behavior + if let coreView = coreView { + self.coreView = coreView + } else { + do { + let jsonObject: [String: Any] = [ + "api": "component", + "component": 21 + ] + let jsonData = try JSONSerialization.data(withJSONObject: jsonObject, options: []) + if let jsonString = String(data: jsonData, encoding: .utf8) { + LiveCoreView.callExperimentalAPI(jsonString) + } + } catch { + LiveKitLog.error("\(#file)", "\(#line)", "dataReport: \(error.localizedDescription)") + } + self.coreView = LiveCoreView(viewType: .pushView) + } + self.anchorView = AnchorView(liveParams: liveParams, coreView: self.coreView, behavior: behavior) + super.init(nibName: nil, bundle: nil) + initialize() + } + + private func initialize() { + if FloatWindow.shared.isShowingFloatWindow() { + FloatWindow.shared.releaseFloatWindow() + } + + anchorView.delegate = self + } + + @available(*, unavailable) + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + deinit { + remainingTimer?.invalidate() + remainingTimer = nil + timeOutTimer?.invalidate() + timeOutTimer = nil + RoomRiskIPObserver.shared.resetForNewRoom() + AudioEffectStore.shared.reset() + DeviceStore.shared.reset() + BaseBeautyStore.shared.reset() + LiveKitLog.info("\(#file)", "\(#line)", "deinit AnchorViewController \(self)") + } + + override func viewDidLoad() { + super.viewDidLoad() + navigationController?.setNavigationBarHidden(true, animated: true) + } + + override func loadView() { + view = anchorView + } + + override func touchesBegan(_ touches: Set, with event: UIEvent?) { + super.touchesBegan(touches, with: event) + view.endEditing(true) + } + + override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) { + super.viewWillTransition(to: size, with: coordinator) + let isPortrait = size.width < size.height + anchorView.updateRootViewOrientation(isPortrait: isPortrait) + } + + override func viewWillAppear(_ animated: Bool) { + super.viewWillAppear(animated) + UIApplication.shared.isIdleTimerDisabled = true + navigationController?.setNavigationBarHidden(true, animated: true) + ThemeStore.shared.setMode(.dark) + } + + override func viewDidDisappear(_ animated: Bool) { + super.viewDidDisappear(animated) + UIApplication.shared.isIdleTimerDisabled = false + navigationController?.setNavigationBarHidden(false, animated: true) + } + + override var shouldAutorotate: Bool { + return false + } + + override var supportedInterfaceOrientations: UIInterfaceOrientationMask { + return .portrait + } + + private static let kNineMinuteDuration: TimeInterval = 9 * 60 + private static let kTenMinuteDuration: TimeInterval = 10 * 60 + + private func startRemainingTimer() { + remainingTimer?.invalidate() + remainingTimer = Timer.scheduledTimer(withTimeInterval: Self.kNineMinuteDuration, repeats: false) { [weak self] _ in + guard self != nil else { return } + DispatchQueue.main.async { + AppAssembly.shared.privacyActionHandler?(.showLiveRemainingOneMinToast) + } + } + } + + private func startTimeOutTimer() { + timeOutTimer?.invalidate() + timeOutTimer = Timer.scheduledTimer(withTimeInterval: Self.kTenMinuteDuration, repeats: false) { [weak self] _ in + guard let self = self else { return } + DispatchQueue.main.async { + AppAssembly.shared.privacyActionHandler?(.showLiveTimeOutAlert(onDismiss: { [weak self] in + guard let self = self else { return } + if let nav = self.navigationController { + nav.popViewController(animated: true) + } else { + self.dismiss(animated: true) + } + })) + } + } + } +} + +extension AnchorViewController: AnchorViewDelegate { + func onClickFloatWindow() { + ThemeStore.shared.setMode(.light) + FloatWindow.shared.showFloatWindow(controller: self, provider: self) + } + + func onStartLiving() { + guard LoginManager.shared.currentUser?.isMoa() != true else { return } + AppAssembly.shared.privacyActionHandler?(.showLiveTimeLimitAlert) + startRemainingTimer() + startTimeOutTimer() + } + + func onEndLiving(state: AnchorState) { + let liveDataModel = AnchorEndStatisticsViewInfo(roomId: liveInfo.liveID, + liveDuration: state.totalDuration, + viewCount: state.totalViewers, + messageCount: state.totalMessageSent, + giftTotalCoins: state.totalGiftCoins, + giftTotalUniqueSender: state.totalGiftUniqueSenders, + likeTotalUniqueSender: state.totalLikesReceived, + liveEndedReason: state.liveEndedReason) + let anchorEndView = AnchorEndStatisticsView(endViewInfo: liveDataModel) + anchorEndView.delegate = self + view.addSubview(anchorEndView) + anchorEndView.snp.makeConstraints { make in + make.edges.equalToSuperview() + } + } +} + +extension AnchorViewController: FloatWindowProvider { + func getRoomId() -> String { + liveInfo.liveID + } + + func getOwnerId() -> String { + LiveListStore.shared.state.value.currentLive.liveOwner.userID + } + + func getCoreView() -> AtomicXCore.LiveCoreView { + coreView + } + + func relayoutCoreView() { + anchorView.relayoutCoreView() + } + + func getIsLinking() -> Bool { + CoGuestStore.create(liveID: liveInfo.liveID).state.value.connected.isOnSeat() + } +} + +extension AnchorViewController: AnchorEndStatisticsViewDelegate { + func onCloseButtonClick() { + if let nav = navigationController { + nav.popViewController(animated: true) + } else { + dismiss(animated: true) + } + } +} + +extension [SeatUserInfo] { + func isOnSeat(userID: String? = nil) -> Bool { + if let userID = userID { + return contains(where: { $0.userID == userID }) + } else { + let selfUserID = LoginStore.shared.state.value.loginUserInfo?.userID ?? "" + return contains(where: { $0.userID == selfUserID }) + } + } +} diff --git a/application/assembly/Modules/Live/AudienceViewController.swift b/application/assembly/Modules/Live/AudienceViewController.swift new file mode 100644 index 00000000..034ec794 --- /dev/null +++ b/application/assembly/Modules/Live/AudienceViewController.swift @@ -0,0 +1,190 @@ +// +// AudienceViewController.swift +// TUILiveKit +// +// Created by WesleyLei on 2023/12/11. +// +import AtomicX +import AtomicXCore +import RTCRoomEngine +import TUILiveKit +import UIKit + +class AudienceViewController: UIViewController { + private lazy var audienceView: AudienceView = { + let view = AudienceView(roomId: roomId) + view.delegate = self + view.rotateScreenDelegate = self + return view + }() + + // MARK: - private property. + + var roomId: String + private var orientation: UIDeviceOrientation = .portrait + init(roomId: String) { + self.roomId = roomId + super.init(nibName: nil, bundle: nil) + } + + init(liveInfo: TUILiveInfo) { + self.roomId = liveInfo.roomInfo.roomId + super.init(nibName: nil, bundle: nil) + } + + @available(*, unavailable) + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + deinit { + LiveKitLog.info("\(#file)", "\(#line)", "deinit AudienceViewController \(self)") + unregisterApplicationObserver() + } + + override func viewDidLoad() { + super.viewDidLoad() + constructViewHierarchy() + activateConstraints() + registerApplicationObserver() + } + + override func viewWillAppear(_ animated: Bool) { + super.viewWillAppear(animated) + navigationController?.setNavigationBarHidden(true, animated: true) + UIApplication.shared.isIdleTimerDisabled = true + ThemeStore.shared.setMode(.dark) + } + + override func viewDidDisappear(_ animated: Bool) { + super.viewDidDisappear(animated) + UIApplication.shared.isIdleTimerDisabled = false + navigationController?.setNavigationBarHidden(false, animated: true) + } + + override var shouldAutorotate: Bool { + return false + } + + override var supportedInterfaceOrientations: UIInterfaceOrientationMask { + return [.portrait, .landscapeRight, .landscapeLeft] + } + + override func viewWillTransition(to size: CGSize, with coordinator: any UIViewControllerTransitionCoordinator) { + NotificationCenter.default.post(name: Notification.Name.TUILiveKitRotateScreenNotification, object: nil) + } + + func forceLandscapeMode() { + if #available(iOS 16.0, *) { + guard let scene = UIApplication.shared.connectedScenes.first as? UIWindowScene else { + return + } + let preferences = UIWindowScene.GeometryPreferences.iOS(interfaceOrientations: .landscape) + scene.requestGeometryUpdate(preferences) { error in + debugPrint("forceLandscapeMode: \(error.localizedDescription)") + } + } else { + let orientation: UIDeviceOrientation = .landscapeRight + UIDevice.current.setValue(orientation.rawValue, forKey: "orientation") + UIViewController.attemptRotationToDeviceOrientation() + } + + orientation = .landscapeRight + } + + func forcePortraitMode() { + if #available(iOS 16.0, *) { + guard let scene = UIApplication.shared.connectedScenes.first as? UIWindowScene else { + return + } + let preferences = UIWindowScene.GeometryPreferences.iOS(interfaceOrientations: .portrait) + scene.requestGeometryUpdate(preferences) { error in + debugPrint("forcePortraitMode: \(error.localizedDescription)") + } + } else { + let orientation: UIDeviceOrientation = .portrait + UIDevice.current.setValue(orientation.rawValue, forKey: "orientation") + UIViewController.attemptRotationToDeviceOrientation() + } + + orientation = .portrait + } + + @objc private func applicationWillEnterForeground() { + if orientation == .landscapeRight { + forceLandscapeMode() + } else { + forcePortraitMode() + } + } +} + +extension AudienceViewController { + private func constructViewHierarchy() { + view.addSubview(audienceView) + } + + private func activateConstraints() { + audienceView.snp.remakeConstraints { make in + make.edges.equalToSuperview() + } + } + + private func registerApplicationObserver() { + NotificationCenter.default.addObserver(self, + selector: #selector(applicationWillEnterForeground), + name: UIApplication.willEnterForegroundNotification, + object: nil) + } + + private func unregisterApplicationObserver() { + NotificationCenter.default.removeObserver(self) + } +} + +// MARK: - AudienceEndStatisticsViewDelegate + +extension AudienceViewController: AudienceEndStatisticsViewDelegate { + func onCloseButtonClick() { + if let nav = navigationController { + nav.popViewController(animated: true) + } else { + dismiss(animated: true) + } + } +} + +extension AudienceViewController: AudienceViewDelegate { + func onLiveEnded(roomId: String, ownerName: String, ownerAvatarUrl: String) { + let audienceEndView = AudienceEndStatisticsView(roomId: roomId, avatarUrl: ownerAvatarUrl, userName: ownerName) + audienceEndView.delegate = self + view.addSubview(audienceEndView) + view.showAtomicToast(text: .liveHasStopText, style: .info) + audienceEndView.snp.remakeConstraints { make in + make.edges.equalToSuperview() + } + } + + func onClickFloatWindow() { + ThemeStore.shared.setMode(.light) + FloatWindow.shared.showFloatWindow(controller: self, provider: audienceView) + } +} + +extension AudienceViewController: RotateScreenDelegate { + func rotateScreen(isPortrait: Bool) { + if isPortrait { + forcePortraitMode() + } else { + forceLandscapeMode() + } + } +} + +extension Notification.Name { + static let TUILiveKitRotateScreenNotification = Notification.Name("TUILiveKitRotateScreenNotification") +} + +private extension String { + static let liveHasStopText = AssemblyLocalize("Demo.TRTC.LiveRoom.liveHasStop") +} diff --git a/application/assembly/Modules/Live/LiveListTransitioningDelegate.swift b/application/assembly/Modules/Live/LiveListTransitioningDelegate.swift new file mode 100644 index 00000000..bc19a04d --- /dev/null +++ b/application/assembly/Modules/Live/LiveListTransitioningDelegate.swift @@ -0,0 +1,98 @@ +// +// LiveListTransitioningDelegate.swift +// Assembly +// +// Created by gg on 2025/4/16. +// + +import UIKit + +// MARK: - LiveListPresentationController + +class LiveListPresentationController: UIPresentationController { + override var shouldRemovePresentersView: Bool { + return true + } +} + +// MARK: - LiveListPresentAnimation + +class LiveListPresentAnimation: NSObject, UIViewControllerAnimatedTransitioning { + let originFrame: CGRect + private let snapshotView: UIView? + + init(originFrame: CGRect, snapshotView: UIView? = nil) { + self.originFrame = originFrame + self.snapshotView = snapshotView + } + + func transitionDuration(using transitionContext: UIViewControllerContextTransitioning?) -> TimeInterval { + return 0.5 + } + + func animateTransition(using transitionContext: UIViewControllerContextTransitioning) { + guard let toVC = transitionContext.viewController(forKey: .to) else { return } + let containerView = transitionContext.containerView + let finalFrame = transitionContext.finalFrame(for: toVC) + + containerView.addSubview(toVC.view) + toVC.view.frame = originFrame + toVC.view.layoutIfNeeded() + toVC.view.clipsToBounds = true + + if let snapshotView = snapshotView { + snapshotView.frame = containerView.bounds + containerView.addSubview(snapshotView) + } + + UIView.animate(withDuration: transitionDuration(using: transitionContext), animations: { + toVC.view.frame = finalFrame + }, completion: { [weak self] _ in + guard let self else { + transitionContext.completeTransition(!transitionContext.transitionWasCancelled) + return + } + if let snapshotView = self.snapshotView { + snapshotView.removeFromSuperview() + toVC.view.addSubview(snapshotView) + snapshotView.frame = toVC.view.bounds + snapshotView.autoresizingMask = [.flexibleWidth, .flexibleHeight] + } + transitionContext.completeTransition(!transitionContext.transitionWasCancelled) + }) + } +} + +// MARK: - LiveListTransitioningDelegate + +class LiveListTransitioningDelegate: NSObject, UIViewControllerTransitioningDelegate { + let originFrame: CGRect + private(set) var snapshotView: UIView? + + init(originFrame: CGRect, snapshotView: UIView? = nil) { + self.originFrame = originFrame + self.snapshotView = snapshotView + } + + func dismissSnapshotOverlay() { + guard let snapshotView = snapshotView else { return } + UIView.animate(withDuration: 0.3, animations: { + snapshotView.alpha = 0 + }, completion: { _ in + snapshotView.removeFromSuperview() + }) + self.snapshotView = nil + } + + func animationController(forPresented presented: UIViewController, + presenting: UIViewController, + source: UIViewController) -> UIViewControllerAnimatedTransitioning? { + return LiveListPresentAnimation(originFrame: originFrame, snapshotView: snapshotView) + } + + func presentationController(forPresented presented: UIViewController, + presenting: UIViewController?, + source: UIViewController) -> UIPresentationController? { + return LiveListPresentationController(presentedViewController: presented, presenting: presenting) + } +} diff --git a/application/assembly/Modules/Live/LiveListViewController.swift b/application/assembly/Modules/Live/LiveListViewController.swift new file mode 100644 index 00000000..9fcd4041 --- /dev/null +++ b/application/assembly/Modules/Live/LiveListViewController.swift @@ -0,0 +1,311 @@ +// +// LiveListViewController.swift +// main +// + +import AtomicX +import AtomicXCore +import Combine +import Login +import SnapKit +import Toast_Swift +import TUICore +import TUILiveKit +import UIKit + +// MARK: - LiveListViewController + +final class LiveListViewController: UIViewController { + private var currentStyle = LiveListViewStyle.doubleColumn + private var cancellableSet = Set() + + private weak var viewController: UIViewController? + private var transitionCancellable: AnyCancellable? + + // MARK: - Subviews + + private lazy var liveListView: LiveListView = { + let view = LiveListView(style: currentStyle) + view.itemClickDelegate = self + return view + }() + + private lazy var createRoomBtn = AtomicButton(variant: .filled, + colorType: .primary, + size: .large, + content: .iconLeading(text: AssemblyLocalize("Demo.TRTC.LiveRoom.createroom"), + icon: AppAssemblyBundle.image(named: "livekit_ic_add"))) + + // MARK: - Lifecycle + + override func viewDidLoad() { + super.viewDidLoad() + ThemeStore.shared.setMode(.dark) + setupNavigation() + constructViewHierarchy() + activateConstraints() + bindInteraction() + } + + override func viewWillAppear(_ animated: Bool) { + super.viewWillAppear(animated) + navigationController?.setNavigationBarHidden(false, animated: false) + ThemeStore.shared.setMode(.dark) + } + + private func bindInteraction() { + createRoomBtn.addTarget(self, action: #selector(createRoom), for: .touchUpInside) + + ThemeStore.shared.$currentTheme + .receive(on: DispatchQueue.main) + .sink { [weak self] theme in + guard let self else { return } + applyAppearance(for: theme) + } + .store(in: &cancellableSet) + } + + private func applyAppearance(for theme: Theme) { + view.backgroundColor = theme.tokens.color.bgColorTopBar + } + + override func viewDidAppear(_ animated: Bool) { + super.viewDidAppear(animated) + liveListView.refreshLiveList() + } + + override func viewWillDisappear(_ animated: Bool) { + super.viewWillDisappear(animated) + if isMovingFromParent { + ThemeStore.shared.setMode(.light) + } + liveListView.onRouteToNextPage() + } +} + +// MARK: - UI + +extension LiveListViewController { + private func setupNavigation() { + let appearance = UINavigationBarAppearance() + appearance.configureWithTransparentBackground() + appearance.backgroundColor = .clear + appearance.titleTextAttributes = [.foregroundColor: UIColor.white] + navigationItem.standardAppearance = appearance + navigationItem.scrollEdgeAppearance = appearance + let titleLabel = AssemblyLocalize("Demo.TRTC.LiveRoom.videoLive") + let titleView = AtomicLabel(titleLabel) { theme in + LabelAppearance(textColor: theme.tokens.color.textColorPrimary, + backgroundColor: theme.tokens.color.clearColor, + font: theme.tokens.typography.Medium20, + cornerRadius: 0.0) + } + titleView.adjustsFontSizeToFitWidth = true + titleView.font = ThemeStore.shared.currentTheme.tokens.typography.Medium20 + titleView.text = titleLabel + let width = titleView.sizeThatFits(CGSize(width: CGFloat.greatestFiniteMagnitude, + height: CGFloat.greatestFiniteMagnitude)).width + titleView.frame = CGRect(origin: .zero, size: CGSize(width: width, height: 44)) + navigationItem.titleView = titleView + + let debugView = UIView(frame: CGRect(x: 0, y: 0, width: 20, height: 20)) + debugView.backgroundColor = .clear + debugView.isUserInteractionEnabled = true + let tap = UITapGestureRecognizer(target: self, action: #selector(debugModeChanged)) + tap.numberOfTapsRequired = 5 + debugView.addGestureRecognizer(tap) + let debugViewItem = UIBarButtonItem(customView: debugView) + + let switchColumnBtn = UIButton(type: .custom) + switchColumnBtn.setImage(AppAssemblyBundle.image(named: "live_single_column_icon"), for: .normal) + switchColumnBtn.setImage(AppAssemblyBundle.image(named: "live_double_column_icon"), for: .selected) + switchColumnBtn.addTarget(self, action: #selector(switchColumnBtnClick), for: .touchUpInside) + switchColumnBtn.sizeToFit() + let switchItem = UIBarButtonItem(customView: switchColumnBtn) + switchItem.tintColor = .white + navigationItem.rightBarButtonItems = [switchItem, debugViewItem] + + let backBtn = UIButton(type: .custom) + backBtn.setImage(AppAssemblyBundle.image(named: "calling_back")?.withTintColor(.white, renderingMode: .alwaysOriginal), + for: .normal) + backBtn.addTarget(self, action: #selector(backBtnClick), for: .touchUpInside) + backBtn.sizeToFit() + let backItem = UIBarButtonItem(customView: backBtn) + backItem.tintColor = .white + navigationItem.leftBarButtonItem = backItem + } + + private func constructViewHierarchy() { + view.addSubview(liveListView) + view.addSubview(createRoomBtn) + } + + private func activateConstraints() { + liveListView.snp.makeConstraints { make in + make.edges.equalToSuperview() + } + createRoomBtn.snp.makeConstraints { make in + make.bottom.equalTo(-(convertPixel(h: 15) + kDeviceSafeBottomHeight)) + make.centerX.equalToSuperview() + make.height.equalTo(convertPixel(w: 48)) + make.width.equalTo(convertPixel(w: 154)) + } + } +} + +// MARK: - Actions + +extension LiveListViewController { + @objc private func createRoom() { + guard AppAssembly.shared.canStartNewRoom else { + AppAssembly.shared.showCannotStartRoomToast() + return + } + + let userId = LoginEntry.shared.userModel?.userId ?? "" + let token = LoginEntry.shared.userModel?.token ?? "" + if let privacyActionHandler = AppAssembly.shared.privacyActionHandler { + privacyActionHandler(.checkRealNameAuth(userId: userId, token: token, completion: { [weak self] isAuth, msg in + guard let self = self else { return } + if isAuth { + let liveRoomId = LiveIdentityGenerator.shared.generateId(userId, type: .live) + startLive(roomId: liveRoomId) + } else { + view.makeToast(msg) + } + })) + } else { + let liveRoomId = LiveIdentityGenerator.shared.generateId(userId, type: .live) + startLive(roomId: liveRoomId) + } + } + + @objc private func backBtnClick() { + navigationController?.popViewController(animated: true) + } + + @objc private func switchColumnBtnClick(sender: UIButton) { + let newStyle: LiveListViewStyle = currentStyle == .doubleColumn ? .singleColumn : .doubleColumn + currentStyle = newStyle + liveListView.setColumnStyle(style: newStyle) + sender.isSelected = currentStyle == .singleColumn + createRoomBtn.isHidden = currentStyle == .singleColumn + } + + @objc private func debugModeChanged() { + NotificationCenter.default.post(Notification(name: Notification.Name("__kTUILiveKitTestModeChanged__"))) + } + + private func startLive(roomId: String) { + if FloatWindow.shared.isShowingFloatWindow() { + if let ownerId = FloatWindow.shared.getRoomOwnerId(), ownerId == LoginStore.shared.state.value.loginUserInfo?.userID { + view.showAtomicToast(text: .pushingToReturnText, style: .error) + return + } + FloatWindow.shared.releaseFloatWindow() + } + LiveListStore.shared.fetchLiveInfo(liveID: roomId) { [weak self] result in + guard let self = self else { return } + switch result { + case .success(let liveInfo): + if liveInfo.keepOwnerOnSeat { + showPrepareViewController(roomId: roomId) + } else { + showAnchorViewController(roomId: roomId, seatTemplate: liveInfo.seatTemplate) + } + case .failure: + showPrepareViewController(roomId: roomId) + } + } + } + + private func showPrepareViewController(roomId: String) { + let vc = AnchorPrepareViewController(roomId: roomId) + vc.modalPresentationStyle = .fullScreen + vc.willStartLive = { [weak self] controller in + guard let self = self else { return } + self.viewController = controller + } + present(vc, animated: true) + } + + private func showAnchorViewController(roomId: String, seatTemplate: SeatLayoutTemplate) { + var liveInfo = LiveInfo(seatTemplate: seatTemplate) + liveInfo.liveID = roomId + let anchorVC = AnchorViewController(liveInfo: liveInfo, behavior: .enterRoom) + anchorVC.modalPresentationStyle = .fullScreen + present(anchorVC, animated: true) + } +} + +// MARK: - OnItemClickDelegate + +extension LiveListViewController: OnItemClickDelegate { + func onItemClick(liveInfo: LiveInfo, frame: CGRect) { + if FloatWindow.shared.isShowingFloatWindow() { + if FloatWindow.shared.getCurrentRoomId() == liveInfo.liveID { + FloatWindow.shared.resumeLive(atViewController: navigationController ?? self) + return + } else if let ownerId = FloatWindow.shared.getRoomOwnerId(), + ownerId == LoginStore.shared.state.value.loginUserInfo?.userID + { + view.showAtomicToast(text: .pushingToReturnText, style: .error) + return + } else { + FloatWindow.shared.releaseFloatWindow() + } + } + + let roomType = LiveIdentityGenerator.shared.getIDType(liveInfo.liveID) + let isOwner = liveInfo.liveOwner.userID == (LoginStore.shared.state.value.loginUserInfo?.userID ?? "") + + switch roomType { + case .voice: + let vc = TUIVoiceRoomViewController(roomId: liveInfo.liveID, behavior: isOwner ? .autoCreate : .join) + vc.modalPresentationStyle = .custom + let transitionDelegate = LiveListTransitioningDelegate(originFrame: frame) + vc.transitioningDelegate = transitionDelegate + present(vc, animated: true) + default: + if isOwner { + let vc = AnchorViewController(liveInfo: liveInfo, behavior: .enterRoom) + vc.modalPresentationStyle = .custom + let transitionDelegate = LiveListTransitioningDelegate(originFrame: frame) + vc.transitioningDelegate = transitionDelegate + present(vc, animated: true) + } else { + let isSingleColumn: Bool = frame.size == UIScreen.main.bounds.size + let snapshotView = isSingleColumn ? view.snapshotView(afterScreenUpdates: true) : nil + let vc = AudienceViewController(roomId: liveInfo.liveID) + vc.modalPresentationStyle = .custom + let transitionDelegate = LiveListTransitioningDelegate(originFrame: frame, snapshotView: snapshotView) + vc.transitioningDelegate = transitionDelegate + present(vc, animated: true) + if isSingleColumn { + bindSnapshotDismissal(transitionDelegate: transitionDelegate) + } + } + } + } + + private func bindSnapshotDismissal(transitionDelegate: LiveListTransitioningDelegate) { + transitionCancellable = LiveListStore.shared.state + .subscribe(StatePublisherSelector(keyPath: \LiveListState.currentLive)) + .receive(on: RunLoop.main) + .removeDuplicates() + .dropFirst() + .sink { [weak self] currentLive in + guard let self else { return } + if !currentLive.isEmpty { + transitionDelegate.dismissSnapshotOverlay() + transitionCancellable = nil + } + } + } +} + +// MARK: - Localized Strings + +private extension String { + static let pushingToReturnText = AssemblyLocalize("Demo.TRTC.LiveRoom.exitFloatWindowTip") +} diff --git a/application/assembly/Modules/Live/LiveModule.swift b/application/assembly/Modules/Live/LiveModule.swift new file mode 100644 index 00000000..3b7d8c36 --- /dev/null +++ b/application/assembly/Modules/Live/LiveModule.swift @@ -0,0 +1,136 @@ +// +// LiveModule.swift +// main +// + +import AtomicXCore +import Combine +import TUILiveKit +import UIKit + +#if canImport(TCMediaX) +import TCMediaX +#endif + +// MARK: - LiveModule + +final class LiveModule: ModuleProvider { + let config: ModuleConfig + private var environment: ModuleEnvironment? + + init(config: ModuleConfig) { + self.config = config + AtomicXCoreLogin.shared.startAutoLogin() + RoomRiskIPObserver.shared.register() + } + + func setup(with environment: ModuleEnvironment) { + self.environment = environment + } + + static var standard: LiveModule { + class EnvironmentBox { + weak var module: LiveModule? + } + let box = EnvironmentBox() + + let config = ModuleConfig( + identifier: "live", + title: AssemblyLocalize("Demo.TRTC.Portal.Main.live"), + description: AssemblyLocalize("Demo.TRTC.Portal.Main.liveContent"), + iconName: "main_entrance_tuilivekit", + iconImage: AppAssemblyBundle.image(named: "main_entrance_tuilivekit"), + cardStyle: .uiComponent, + gradientColors: stubUIComponentGradient, + targetProvider: { + box.module?.initLicenseIfNeeded() + return LiveListViewController() + }, + analyticsEvent: "live_streaming" + ) + let module = LiveModule(config: config) + box.module = module + return module + } + + func initLicenseIfNeeded() { + Self.initLicense(with: environment) + } +} + +// MARK: - License + +extension LiveModule { + private static func initLicense(with environment: ModuleEnvironment?) { + callTEBeautyKitSetLicense(with: environment) + + #if canImport(TCMediaX) + if let url = environment?.beautyLicenseURL, let key = environment?.beautyLicenseKey, + !url.isEmpty, !key.isEmpty { + TCMediaXBase.getInstance().setLicenceURL(url, key: key) + } + #endif + } + + private static func callTEBeautyKitSetLicense(with environment: ModuleEnvironment?) { + guard let env = environment, !env.beautyLicenseURL.isEmpty, !env.beautyLicenseKey.isEmpty else { + debugPrint(" beautyLicense 未配置,跳过美颜 License 设置") + return + } + + guard let teBeautyKitClass = NSClassFromString("TEBeautyKit") as? NSObject.Type else { + debugPrint("TEBeautyKit class not found") + return + } + + let setLicenseSelector = NSSelectorFromString("setTELicense:key:completion:") + + if teBeautyKitClass.responds(to: setLicenseSelector) { + typealias SetLicenseFunction = @convention(c) + (AnyClass, Selector, NSString, NSString, @escaping (Int, String?) -> Void) -> Void + + let method = class_getClassMethod(teBeautyKitClass, setLicenseSelector) + if let method = method { + let implementation = method_getImplementation(method) + let function = unsafeBitCast(implementation, to: SetLicenseFunction.self) + function( + teBeautyKitClass, setLicenseSelector, + env.beautyLicenseURL as NSString, + env.beautyLicenseKey as NSString + ) { code, message in + debugPrint("TEBeautyKit license set with code: \(code), message: \(message ?? "nil")") + callTEUIConfigSetPanelLevel() + } + } + } + } + + private static func callTEUIConfigSetPanelLevel() { + guard let teUIConfigClass = NSClassFromString("TEUIConfig") as? NSObject.Type else { return } + + let shareInstanceSelector = NSSelectorFromString("shareInstance") + if teUIConfigClass.responds(to: shareInstanceSelector) { + typealias ShareInstanceFunction = @convention(c) (AnyClass, Selector) -> AnyObject? + + let method = class_getClassMethod(teUIConfigClass, shareInstanceSelector) + if let method = method { + let implementation = method_getImplementation(method) + let function = unsafeBitCast(implementation, to: ShareInstanceFunction.self) + + if let instance = function(teUIConfigClass, shareInstanceSelector) { + let setPanelLevelSelector = NSSelectorFromString("setPanelLevel:") + if instance.responds(to: setPanelLevelSelector) { + typealias SetPanelLevelFunction = @convention(c) (AnyObject, Selector, Int) -> Void + + let instanceMethod = class_getInstanceMethod(type(of: instance), setPanelLevelSelector) + if let instanceMethod = instanceMethod { + let impl = method_getImplementation(instanceMethod) + let fn = unsafeBitCast(impl, to: SetPanelLevelFunction.self) + fn(instance, setPanelLevelSelector, 14) + } + } + } + } + } + } +} diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/Contents.json b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/Contents.json new file mode 100644 index 00000000..73c00596 --- /dev/null +++ b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/arrow_icon.imageset/Contents.json b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/arrow_icon.imageset/Contents.json new file mode 100644 index 00000000..d8671bed --- /dev/null +++ b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/arrow_icon.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "arrow_icon.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "arrow_icon@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "arrow_icon@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/arrow_icon.imageset/arrow_icon.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/arrow_icon.imageset/arrow_icon.png new file mode 100644 index 00000000..93dd925d Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/arrow_icon.imageset/arrow_icon.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/arrow_icon.imageset/arrow_icon@2x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/arrow_icon.imageset/arrow_icon@2x.png new file mode 100644 index 00000000..03189dfb Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/arrow_icon.imageset/arrow_icon@2x.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/arrow_icon.imageset/arrow_icon@3x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/arrow_icon.imageset/arrow_icon@3x.png new file mode 100644 index 00000000..f24770b7 Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/arrow_icon.imageset/arrow_icon@3x.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/average_selected.imageset/Contents.json b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/average_selected.imageset/Contents.json new file mode 100644 index 00000000..61f192ed --- /dev/null +++ b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/average_selected.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "average_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "average_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/average_selected.imageset/average_selected@2x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/average_selected.imageset/average_selected@2x.png new file mode 100644 index 00000000..fa57376d Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/average_selected.imageset/average_selected@2x.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/average_selected.imageset/average_selected@3x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/average_selected.imageset/average_selected@3x.png new file mode 100644 index 00000000..ae37378e Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/average_selected.imageset/average_selected@3x.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/average_unselected.imageset/Contents.json b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/average_unselected.imageset/Contents.json new file mode 100644 index 00000000..b5bf9885 --- /dev/null +++ b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/average_unselected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "average_unselected.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "average_unselected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "average_unselected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/average_unselected.imageset/average_unselected.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/average_unselected.imageset/average_unselected.png new file mode 100644 index 00000000..0bf1cc59 Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/average_unselected.imageset/average_unselected.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/average_unselected.imageset/average_unselected@2x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/average_unselected.imageset/average_unselected@2x.png new file mode 100644 index 00000000..288ecb80 Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/average_unselected.imageset/average_unselected@2x.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/average_unselected.imageset/average_unselected@3x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/average_unselected.imageset/average_unselected@3x.png new file mode 100644 index 00000000..20b61033 Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/average_unselected.imageset/average_unselected@3x.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/bad_selected.imageset/Contents.json b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/bad_selected.imageset/Contents.json new file mode 100644 index 00000000..5cd03e3c --- /dev/null +++ b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/bad_selected.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "bad_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "bad_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/bad_selected.imageset/bad_selected@2x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/bad_selected.imageset/bad_selected@2x.png new file mode 100644 index 00000000..03b67fcd Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/bad_selected.imageset/bad_selected@2x.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/bad_selected.imageset/bad_selected@3x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/bad_selected.imageset/bad_selected@3x.png new file mode 100644 index 00000000..860c27f7 Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/bad_selected.imageset/bad_selected@3x.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/bad_unselected.imageset/Contents.json b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/bad_unselected.imageset/Contents.json new file mode 100644 index 00000000..52eedafa --- /dev/null +++ b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/bad_unselected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "bad_unselected.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "bad_unselected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "bad_unselected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/bad_unselected.imageset/bad_unselected.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/bad_unselected.imageset/bad_unselected.png new file mode 100644 index 00000000..13102cc5 Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/bad_unselected.imageset/bad_unselected.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/bad_unselected.imageset/bad_unselected@2x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/bad_unselected.imageset/bad_unselected@2x.png new file mode 100644 index 00000000..33b862ab Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/bad_unselected.imageset/bad_unselected@2x.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/bad_unselected.imageset/bad_unselected@3x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/bad_unselected.imageset/bad_unselected@3x.png new file mode 100644 index 00000000..b46a75ff Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/bad_unselected.imageset/bad_unselected@3x.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_back.imageset/Contents.json b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_back.imageset/Contents.json new file mode 100644 index 00000000..3325f119 --- /dev/null +++ b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_back.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "calling_back.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "calling_back@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "calling_back@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/App-UIKit/Assets.xcassets/back.imageset/tuiroom_back.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_back.imageset/calling_back.png similarity index 100% rename from application/App-UIKit/Assets.xcassets/back.imageset/tuiroom_back.png rename to application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_back.imageset/calling_back.png diff --git a/application/App-UIKit/Assets.xcassets/back.imageset/tuiroom_back@2x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_back.imageset/calling_back@2x.png similarity index 100% rename from application/App-UIKit/Assets.xcassets/back.imageset/tuiroom_back@2x.png rename to application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_back.imageset/calling_back@2x.png diff --git a/application/App-UIKit/Assets.xcassets/back.imageset/tuiroom_back@3x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_back.imageset/calling_back@3x.png similarity index 100% rename from application/App-UIKit/Assets.xcassets/back.imageset/tuiroom_back@3x.png rename to application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_back.imageset/calling_back@3x.png diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_call_guide.imageset/Contents.json b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_call_guide.imageset/Contents.json new file mode 100644 index 00000000..03cdcc7f --- /dev/null +++ b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_call_guide.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "calling_call_guide@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_call_guide.imageset/calling_call_guide@2x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_call_guide.imageset/calling_call_guide@2x.png new file mode 100644 index 00000000..d98e2cae Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_call_guide.imageset/calling_call_guide@2x.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_call_pushArrow.imageset/Contents.json b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_call_pushArrow.imageset/Contents.json new file mode 100644 index 00000000..30995a41 --- /dev/null +++ b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_call_pushArrow.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "calling_call_pushArrow@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "calling_call_pushArrow@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_call_pushArrow.imageset/calling_call_pushArrow@2x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_call_pushArrow.imageset/calling_call_pushArrow@2x.png new file mode 100644 index 00000000..2870d005 Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_call_pushArrow.imageset/calling_call_pushArrow@2x.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_call_pushArrow.imageset/calling_call_pushArrow@3x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_call_pushArrow.imageset/calling_call_pushArrow@3x.png new file mode 100644 index 00000000..8fdfa704 Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_call_pushArrow.imageset/calling_call_pushArrow@3x.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_guide_friendAvatar.imageset/Contents.json b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_guide_friendAvatar.imageset/Contents.json new file mode 100644 index 00000000..cbe563f9 --- /dev/null +++ b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_guide_friendAvatar.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "calling_guide_friendAvatar@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "calling_guide_friendAvatar@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_guide_friendAvatar.imageset/calling_guide_friendAvatar@2x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_guide_friendAvatar.imageset/calling_guide_friendAvatar@2x.png new file mode 100644 index 00000000..86b963c7 Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_guide_friendAvatar.imageset/calling_guide_friendAvatar@2x.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_guide_friendAvatar.imageset/calling_guide_friendAvatar@3x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_guide_friendAvatar.imageset/calling_guide_friendAvatar@3x.png new file mode 100644 index 00000000..ef7377b7 Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_guide_friendAvatar.imageset/calling_guide_friendAvatar@3x.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_init_call.imageset/Contents.json b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_init_call.imageset/Contents.json new file mode 100644 index 00000000..3c75f4ad --- /dev/null +++ b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_init_call.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "calling_init_call@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "calling_init_call@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_init_call.imageset/calling_init_call@2x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_init_call.imageset/calling_init_call@2x.png new file mode 100644 index 00000000..d2613d33 Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_init_call.imageset/calling_init_call@2x.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_init_call.imageset/calling_init_call@3x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_init_call.imageset/calling_init_call@3x.png new file mode 100644 index 00000000..5c1486ad Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_init_call.imageset/calling_init_call@3x.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_pass_call.imageset/Contents.json b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_pass_call.imageset/Contents.json new file mode 100644 index 00000000..0dbeeb4c --- /dev/null +++ b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_pass_call.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "calling_pass_call@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "calling_pass_call@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_pass_call.imageset/calling_pass_call@2x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_pass_call.imageset/calling_pass_call@2x.png new file mode 100644 index 00000000..9a2cfb9b Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_pass_call.imageset/calling_pass_call@2x.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_pass_call.imageset/calling_pass_call@3x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_pass_call.imageset/calling_pass_call@3x.png new file mode 100644 index 00000000..56257742 Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_pass_call.imageset/calling_pass_call@3x.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_robot_A.imageset/Contents.json b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_robot_A.imageset/Contents.json new file mode 100644 index 00000000..a1e6a227 --- /dev/null +++ b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_robot_A.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "calling_robot_A@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "calling_robot_A@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_robot_A.imageset/calling_robot_A@2x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_robot_A.imageset/calling_robot_A@2x.png new file mode 100644 index 00000000..03da948e Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_robot_A.imageset/calling_robot_A@2x.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_robot_A.imageset/calling_robot_A@3x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_robot_A.imageset/calling_robot_A@3x.png new file mode 100644 index 00000000..5892c87b Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_robot_A.imageset/calling_robot_A@3x.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_robot_B.imageset/Contents.json b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_robot_B.imageset/Contents.json new file mode 100644 index 00000000..ebbac9a8 --- /dev/null +++ b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_robot_B.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "calling_robot_B@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "calling_robot_B@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_robot_B.imageset/calling_robot_B@2x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_robot_B.imageset/calling_robot_B@2x.png new file mode 100644 index 00000000..072bb44e Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_robot_B.imageset/calling_robot_B@2x.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_robot_B.imageset/calling_robot_B@3x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_robot_B.imageset/calling_robot_B@3x.png new file mode 100644 index 00000000..78849c05 Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_robot_B.imageset/calling_robot_B@3x.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_unfold_arrow.imageset/Contents.json b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_unfold_arrow.imageset/Contents.json new file mode 100644 index 00000000..63fee4ce --- /dev/null +++ b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_unfold_arrow.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "calling_unfold_arrow@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "calling_unfold_arrow@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_unfold_arrow.imageset/calling_unfold_arrow@2x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_unfold_arrow.imageset/calling_unfold_arrow@2x.png new file mode 100644 index 00000000..d078ec94 Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_unfold_arrow.imageset/calling_unfold_arrow@2x.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_unfold_arrow.imageset/calling_unfold_arrow@3x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_unfold_arrow.imageset/calling_unfold_arrow@3x.png new file mode 100644 index 00000000..154e1b90 Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/calling_unfold_arrow.imageset/calling_unfold_arrow@3x.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/config_icon.imageset/Contents.json b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/config_icon.imageset/Contents.json new file mode 100644 index 00000000..707a8dcf --- /dev/null +++ b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/config_icon.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "config_icon.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "config_icon@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "config_icon@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/config_icon.imageset/config_icon.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/config_icon.imageset/config_icon.png new file mode 100644 index 00000000..43a9bbab Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/config_icon.imageset/config_icon.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/config_icon.imageset/config_icon@2x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/config_icon.imageset/config_icon@2x.png new file mode 100644 index 00000000..024ce1c1 Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/config_icon.imageset/config_icon@2x.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/config_icon.imageset/config_icon@3x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/config_icon.imageset/config_icon@3x.png new file mode 100644 index 00000000..8fbc1a4d Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/config_icon.imageset/config_icon@3x.png differ diff --git a/application/App-UIKit/Assets.xcassets/create_live.imageset/Contents.json b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/create_live.imageset/Contents.json similarity index 100% rename from application/App-UIKit/Assets.xcassets/create_live.imageset/Contents.json rename to application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/create_live.imageset/Contents.json diff --git a/application/App-UIKit/Assets.xcassets/create_live.imageset/create_live.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/create_live.imageset/create_live.png similarity index 100% rename from application/App-UIKit/Assets.xcassets/create_live.imageset/create_live.png rename to application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/create_live.imageset/create_live.png diff --git a/application/App-UIKit/Assets.xcassets/create_live.imageset/create_live@2x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/create_live.imageset/create_live@2x.png similarity index 100% rename from application/App-UIKit/Assets.xcassets/create_live.imageset/create_live@2x.png rename to application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/create_live.imageset/create_live@2x.png diff --git a/application/App-UIKit/Assets.xcassets/create_live.imageset/create_live@3x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/create_live.imageset/create_live@3x.png similarity index 100% rename from application/App-UIKit/Assets.xcassets/create_live.imageset/create_live@3x.png rename to application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/create_live.imageset/create_live@3x.png diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/empty_hint_icon.imageset/Contents.json b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/empty_hint_icon.imageset/Contents.json new file mode 100644 index 00000000..95c086f6 --- /dev/null +++ b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/empty_hint_icon.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "empty_hint_icon.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "empty_hint_icon@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "empty_hint_icon@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/empty_hint_icon.imageset/empty_hint_icon.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/empty_hint_icon.imageset/empty_hint_icon.png new file mode 100644 index 00000000..311e1ad0 Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/empty_hint_icon.imageset/empty_hint_icon.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/empty_hint_icon.imageset/empty_hint_icon@2x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/empty_hint_icon.imageset/empty_hint_icon@2x.png new file mode 100644 index 00000000..eb550438 Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/empty_hint_icon.imageset/empty_hint_icon@2x.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/empty_hint_icon.imageset/empty_hint_icon@3x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/empty_hint_icon.imageset/empty_hint_icon@3x.png new file mode 100644 index 00000000..9f03dddf Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/empty_hint_icon.imageset/empty_hint_icon@3x.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/exchange_btn.imageset/Contents.json b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/exchange_btn.imageset/Contents.json new file mode 100644 index 00000000..81d43f30 --- /dev/null +++ b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/exchange_btn.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "exchange_btn.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "exchange_btn@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "exchange_btn@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/exchange_btn.imageset/exchange_btn.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/exchange_btn.imageset/exchange_btn.png new file mode 100644 index 00000000..9e9977b6 Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/exchange_btn.imageset/exchange_btn.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/exchange_btn.imageset/exchange_btn@2x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/exchange_btn.imageset/exchange_btn@2x.png new file mode 100644 index 00000000..e61c9ea1 Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/exchange_btn.imageset/exchange_btn@2x.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/exchange_btn.imageset/exchange_btn@3x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/exchange_btn.imageset/exchange_btn@3x.png new file mode 100644 index 00000000..c2d32583 Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/exchange_btn.imageset/exchange_btn@3x.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/guide_unfold_arrow.imageset/Contents.json b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/guide_unfold_arrow.imageset/Contents.json new file mode 100644 index 00000000..1c592e67 --- /dev/null +++ b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/guide_unfold_arrow.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "guide_unfold_arrow@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "guide_unfold_arrow@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/guide_unfold_arrow.imageset/guide_unfold_arrow@2x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/guide_unfold_arrow.imageset/guide_unfold_arrow@2x.png new file mode 100644 index 00000000..c68142ff Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/guide_unfold_arrow.imageset/guide_unfold_arrow@2x.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/guide_unfold_arrow.imageset/guide_unfold_arrow@3x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/guide_unfold_arrow.imageset/guide_unfold_arrow@3x.png new file mode 100644 index 00000000..1f20a7e8 Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/guide_unfold_arrow.imageset/guide_unfold_arrow@3x.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/help_small.imageset/Contents.json b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/help_small.imageset/Contents.json new file mode 100644 index 00000000..0165e727 --- /dev/null +++ b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/help_small.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "trtcvoiceroom_ic_question_link.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/App-UIKit/Assets.xcassets/help_small.imageset/livekit_ic_question_link.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/help_small.imageset/trtcvoiceroom_ic_question_link.png similarity index 100% rename from application/App-UIKit/Assets.xcassets/help_small.imageset/livekit_ic_question_link.png rename to application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/help_small.imageset/trtcvoiceroom_ic_question_link.png diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/home_back.imageset/Contents.json b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/home_back.imageset/Contents.json new file mode 100644 index 00000000..042c9314 --- /dev/null +++ b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/home_back.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "home_back.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home_back@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home_back@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/home_back.imageset/home_back.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/home_back.imageset/home_back.png new file mode 100644 index 00000000..76ef34d6 Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/home_back.imageset/home_back.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/home_back.imageset/home_back@2x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/home_back.imageset/home_back@2x.png new file mode 100644 index 00000000..0e1329a9 Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/home_back.imageset/home_back@2x.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/home_back.imageset/home_back@3x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/home_back.imageset/home_back@3x.png new file mode 100644 index 00000000..67828ce0 Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/home_back.imageset/home_back@3x.png differ diff --git a/application/App-UIKit/Assets.xcassets/live_double_column_icon.imageset/Contents.json b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/live_double_column_icon.imageset/Contents.json similarity index 100% rename from application/App-UIKit/Assets.xcassets/live_double_column_icon.imageset/Contents.json rename to application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/live_double_column_icon.imageset/Contents.json diff --git a/application/App-UIKit/Assets.xcassets/live_double_column_icon.imageset/live_double_column_icon.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/live_double_column_icon.imageset/live_double_column_icon.png similarity index 100% rename from application/App-UIKit/Assets.xcassets/live_double_column_icon.imageset/live_double_column_icon.png rename to application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/live_double_column_icon.imageset/live_double_column_icon.png diff --git a/application/App-UIKit/Assets.xcassets/live_double_column_icon.imageset/live_double_column_icon@2x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/live_double_column_icon.imageset/live_double_column_icon@2x.png similarity index 100% rename from application/App-UIKit/Assets.xcassets/live_double_column_icon.imageset/live_double_column_icon@2x.png rename to application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/live_double_column_icon.imageset/live_double_column_icon@2x.png diff --git a/application/App-UIKit/Assets.xcassets/live_double_column_icon.imageset/live_double_column_icon@3x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/live_double_column_icon.imageset/live_double_column_icon@3x.png similarity index 100% rename from application/App-UIKit/Assets.xcassets/live_double_column_icon.imageset/live_double_column_icon@3x.png rename to application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/live_double_column_icon.imageset/live_double_column_icon@3x.png diff --git a/application/App-UIKit/Assets.xcassets/live_single_column_icon.imageset/Contents.json b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/live_single_column_icon.imageset/Contents.json similarity index 100% rename from application/App-UIKit/Assets.xcassets/live_single_column_icon.imageset/Contents.json rename to application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/live_single_column_icon.imageset/Contents.json diff --git a/application/App-UIKit/Assets.xcassets/live_single_column_icon.imageset/live_single_column_icon.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/live_single_column_icon.imageset/live_single_column_icon.png similarity index 100% rename from application/App-UIKit/Assets.xcassets/live_single_column_icon.imageset/live_single_column_icon.png rename to application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/live_single_column_icon.imageset/live_single_column_icon.png diff --git a/application/App-UIKit/Assets.xcassets/live_single_column_icon.imageset/live_single_column_icon@2x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/live_single_column_icon.imageset/live_single_column_icon@2x.png similarity index 100% rename from application/App-UIKit/Assets.xcassets/live_single_column_icon.imageset/live_single_column_icon@2x.png rename to application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/live_single_column_icon.imageset/live_single_column_icon@2x.png diff --git a/application/App-UIKit/Assets.xcassets/live_single_column_icon.imageset/live_single_column_icon@3x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/live_single_column_icon.imageset/live_single_column_icon@3x.png similarity index 100% rename from application/App-UIKit/Assets.xcassets/live_single_column_icon.imageset/live_single_column_icon@3x.png rename to application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/live_single_column_icon.imageset/live_single_column_icon@3x.png diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/livekit_ic_add.imageset/Contents.json b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/livekit_ic_add.imageset/Contents.json new file mode 100644 index 00000000..3db58d26 --- /dev/null +++ b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/livekit_ic_add.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images": [ + { + "filename": "livekit_ic_add.png", + "idiom": "universal", + "scale": "1x" + }, + { + "idiom": "universal", + "scale": "2x" + }, + { + "idiom": "universal", + "scale": "3x" + } + ], + "info": { + "author": "xcode", + "version": 1 + } +} diff --git a/application/App-UIKit/Assets.xcassets/livekit_ic_add.imageset/livekit_ic_add.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/livekit_ic_add.imageset/livekit_ic_add.png similarity index 100% rename from application/App-UIKit/Assets.xcassets/livekit_ic_add.imageset/livekit_ic_add.png rename to application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/livekit_ic_add.imageset/livekit_ic_add.png diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/main_entrance_interpretation.imageset/Contents.json b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/main_entrance_interpretation.imageset/Contents.json new file mode 100644 index 00000000..9baf55d6 --- /dev/null +++ b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/main_entrance_interpretation.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "main_entrance_interpretation.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "main_entrance_interpretation@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "main_entrance_interpretation@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/main_entrance_interpretation.imageset/main_entrance_interpretation.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/main_entrance_interpretation.imageset/main_entrance_interpretation.png new file mode 100644 index 00000000..927866df Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/main_entrance_interpretation.imageset/main_entrance_interpretation.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/main_entrance_interpretation.imageset/main_entrance_interpretation@2x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/main_entrance_interpretation.imageset/main_entrance_interpretation@2x.png new file mode 100644 index 00000000..0b69cb3e Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/main_entrance_interpretation.imageset/main_entrance_interpretation@2x.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/main_entrance_interpretation.imageset/main_entrance_interpretation@3x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/main_entrance_interpretation.imageset/main_entrance_interpretation@3x.png new file mode 100644 index 00000000..b06ecd1e Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/main_entrance_interpretation.imageset/main_entrance_interpretation@3x.png differ diff --git a/application/App-UIKit/Assets.xcassets/main_call.imageset/Contents.json b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/main_entrance_tuicallkit.imageset/Contents.json similarity index 100% rename from application/App-UIKit/Assets.xcassets/main_call.imageset/Contents.json rename to application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/main_entrance_tuicallkit.imageset/Contents.json diff --git a/application/App-UIKit/Assets.xcassets/main_call.imageset/main_entrance_callkit@2x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/main_entrance_tuicallkit.imageset/main_entrance_callkit@2x.png similarity index 100% rename from application/App-UIKit/Assets.xcassets/main_call.imageset/main_entrance_callkit@2x.png rename to application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/main_entrance_tuicallkit.imageset/main_entrance_callkit@2x.png diff --git a/application/App-UIKit/Assets.xcassets/main_call.imageset/main_entrance_callkit@3x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/main_entrance_tuicallkit.imageset/main_entrance_callkit@3x.png similarity index 100% rename from application/App-UIKit/Assets.xcassets/main_call.imageset/main_entrance_callkit@3x.png rename to application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/main_entrance_tuicallkit.imageset/main_entrance_callkit@3x.png diff --git a/application/App-UIKit/Assets.xcassets/main_chat.imageset/Contents.json b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/main_entrance_tuichat.imageset/Contents.json similarity index 100% rename from application/App-UIKit/Assets.xcassets/main_chat.imageset/Contents.json rename to application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/main_entrance_tuichat.imageset/Contents.json diff --git a/application/App-UIKit/Assets.xcassets/main_chat.imageset/main_entrance_uichat@2x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/main_entrance_tuichat.imageset/main_entrance_uichat@2x.png similarity index 100% rename from application/App-UIKit/Assets.xcassets/main_chat.imageset/main_entrance_uichat@2x.png rename to application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/main_entrance_tuichat.imageset/main_entrance_uichat@2x.png diff --git a/application/App-UIKit/Assets.xcassets/main_chat.imageset/main_entrance_uichat@3x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/main_entrance_tuichat.imageset/main_entrance_uichat@3x.png similarity index 100% rename from application/App-UIKit/Assets.xcassets/main_chat.imageset/main_entrance_uichat@3x.png rename to application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/main_entrance_tuichat.imageset/main_entrance_uichat@3x.png diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/main_entrance_tuilivekit.imageset/Contents.json b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/main_entrance_tuilivekit.imageset/Contents.json new file mode 100644 index 00000000..7d78947b --- /dev/null +++ b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/main_entrance_tuilivekit.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "main_entrance_livekit@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "main_entrance_livekit@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/App-UIKit/Assets.xcassets/main_live.imageset/main_livekit@2x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/main_entrance_tuilivekit.imageset/main_entrance_livekit@2x.png similarity index 100% rename from application/App-UIKit/Assets.xcassets/main_live.imageset/main_livekit@2x.png rename to application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/main_entrance_tuilivekit.imageset/main_entrance_livekit@2x.png diff --git a/application/App-UIKit/Assets.xcassets/main_live.imageset/main_livekit@3x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/main_entrance_tuilivekit.imageset/main_entrance_livekit@3x.png similarity index 100% rename from application/App-UIKit/Assets.xcassets/main_live.imageset/main_livekit@3x.png rename to application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/main_entrance_tuilivekit.imageset/main_entrance_livekit@3x.png diff --git a/application/App-UIKit/Assets.xcassets/main_room.imageset/Contents.json b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/main_entrance_tuiroom.imageset/Contents.json similarity index 100% rename from application/App-UIKit/Assets.xcassets/main_room.imageset/Contents.json rename to application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/main_entrance_tuiroom.imageset/Contents.json diff --git a/application/App-UIKit/Assets.xcassets/main_room.imageset/main_entrance_uiroom@2x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/main_entrance_tuiroom.imageset/main_entrance_uiroom@2x.png similarity index 100% rename from application/App-UIKit/Assets.xcassets/main_room.imageset/main_entrance_uiroom@2x.png rename to application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/main_entrance_tuiroom.imageset/main_entrance_uiroom@2x.png diff --git a/application/App-UIKit/Assets.xcassets/main_room.imageset/main_entrance_uiroom@3x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/main_entrance_tuiroom.imageset/main_entrance_uiroom@3x.png similarity index 100% rename from application/App-UIKit/Assets.xcassets/main_room.imageset/main_entrance_uiroom@3x.png rename to application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/main_entrance_tuiroom.imageset/main_entrance_uiroom@3x.png diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/main_entrance_voice_room.imageset/Contents.json b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/main_entrance_voice_room.imageset/Contents.json new file mode 100644 index 00000000..ea044a0c --- /dev/null +++ b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/main_entrance_voice_room.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "main_entrance_voice_room.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "main_entrance_voice_room@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "main_entrance_voice_room@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/main_entrance_voice_room.imageset/main_entrance_voice_room.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/main_entrance_voice_room.imageset/main_entrance_voice_room.png new file mode 100644 index 00000000..444f174f Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/main_entrance_voice_room.imageset/main_entrance_voice_room.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/main_entrance_voice_room.imageset/main_entrance_voice_room@2x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/main_entrance_voice_room.imageset/main_entrance_voice_room@2x.png new file mode 100644 index 00000000..74fe7412 Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/main_entrance_voice_room.imageset/main_entrance_voice_room@2x.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/main_entrance_voice_room.imageset/main_entrance_voice_room@3x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/main_entrance_voice_room.imageset/main_entrance_voice_room@3x.png new file mode 100644 index 00000000..0a03d8fd Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/main_entrance_voice_room.imageset/main_entrance_voice_room@3x.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/mic_close.imageset/Contents.json b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/mic_close.imageset/Contents.json new file mode 100644 index 00000000..74b1c24b --- /dev/null +++ b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/mic_close.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mic_close.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mic_close@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mic_close@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/mic_close.imageset/mic_close.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/mic_close.imageset/mic_close.png new file mode 100644 index 00000000..ae7dea05 Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/mic_close.imageset/mic_close.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/mic_close.imageset/mic_close@2x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/mic_close.imageset/mic_close@2x.png new file mode 100644 index 00000000..b74a6ada Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/mic_close.imageset/mic_close@2x.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/mic_close.imageset/mic_close@3x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/mic_close.imageset/mic_close@3x.png new file mode 100644 index 00000000..356105b0 Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/mic_close.imageset/mic_close@3x.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/mic_open.imageset/Contents.json b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/mic_open.imageset/Contents.json new file mode 100644 index 00000000..aa5af64a --- /dev/null +++ b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/mic_open.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mic_open.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mic_open@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mic_open@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/mic_open.imageset/mic_open.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/mic_open.imageset/mic_open.png new file mode 100644 index 00000000..79b1155e Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/mic_open.imageset/mic_open.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/mic_open.imageset/mic_open@2x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/mic_open.imageset/mic_open@2x.png new file mode 100644 index 00000000..57dd3a00 Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/mic_open.imageset/mic_open@2x.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/mic_open.imageset/mic_open@3x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/mic_open.imageset/mic_open@3x.png new file mode 100644 index 00000000..869a012f Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/mic_open.imageset/mic_open@3x.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/mute_icon.imageset/Contents.json b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/mute_icon.imageset/Contents.json new file mode 100644 index 00000000..10403898 --- /dev/null +++ b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/mute_icon.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mute_icon.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mute_icon@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mute_icon@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/mute_icon.imageset/mute_icon.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/mute_icon.imageset/mute_icon.png new file mode 100644 index 00000000..fc8ccf37 Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/mute_icon.imageset/mute_icon.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/mute_icon.imageset/mute_icon@2x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/mute_icon.imageset/mute_icon@2x.png new file mode 100644 index 00000000..9bcd5c31 Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/mute_icon.imageset/mute_icon@2x.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/mute_icon.imageset/mute_icon@3x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/mute_icon.imageset/mute_icon@3x.png new file mode 100644 index 00000000..0de91f28 Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/mute_icon.imageset/mute_icon@3x.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/nice_selected.imageset/Contents.json b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/nice_selected.imageset/Contents.json new file mode 100644 index 00000000..50728c99 --- /dev/null +++ b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/nice_selected.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "nice_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "nice_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/nice_selected.imageset/nice_selected@2x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/nice_selected.imageset/nice_selected@2x.png new file mode 100644 index 00000000..96547efe Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/nice_selected.imageset/nice_selected@2x.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/nice_selected.imageset/nice_selected@3x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/nice_selected.imageset/nice_selected@3x.png new file mode 100644 index 00000000..4f00adfd Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/nice_selected.imageset/nice_selected@3x.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/nice_unselected.imageset/Contents.json b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/nice_unselected.imageset/Contents.json new file mode 100644 index 00000000..bb3ebb3b --- /dev/null +++ b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/nice_unselected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "nice_unselected.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "nice_unselected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "nice_unselected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/nice_unselected.imageset/nice_unselected.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/nice_unselected.imageset/nice_unselected.png new file mode 100644 index 00000000..fc384e85 Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/nice_unselected.imageset/nice_unselected.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/nice_unselected.imageset/nice_unselected@2x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/nice_unselected.imageset/nice_unselected@2x.png new file mode 100644 index 00000000..15c75296 Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/nice_unselected.imageset/nice_unselected@2x.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/nice_unselected.imageset/nice_unselected@3x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/nice_unselected.imageset/nice_unselected@3x.png new file mode 100644 index 00000000..af2fa0e2 Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/nice_unselected.imageset/nice_unselected@3x.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/noSearchMembers.imageset/Contents.json b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/noSearchMembers.imageset/Contents.json new file mode 100644 index 00000000..38c48011 --- /dev/null +++ b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/noSearchMembers.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "noSearchMembers.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "noSearchMembers@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "noSearchMembers@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/noSearchMembers.imageset/noSearchMembers.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/noSearchMembers.imageset/noSearchMembers.png new file mode 100644 index 00000000..34d7822b Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/noSearchMembers.imageset/noSearchMembers.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/noSearchMembers.imageset/noSearchMembers@2x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/noSearchMembers.imageset/noSearchMembers@2x.png new file mode 100644 index 00000000..7bf9e815 Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/noSearchMembers.imageset/noSearchMembers@2x.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/noSearchMembers.imageset/noSearchMembers@3x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/noSearchMembers.imageset/noSearchMembers@3x.png new file mode 100644 index 00000000..82eb9927 Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/noSearchMembers.imageset/noSearchMembers@3x.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/pause_btn.imageset/Contents.json b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/pause_btn.imageset/Contents.json new file mode 100644 index 00000000..9f3b0190 --- /dev/null +++ b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/pause_btn.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "pause_btn.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "pause_btn@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "pause_btn@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/pause_btn.imageset/pause_btn.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/pause_btn.imageset/pause_btn.png new file mode 100644 index 00000000..a757e24c Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/pause_btn.imageset/pause_btn.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/pause_btn.imageset/pause_btn@2x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/pause_btn.imageset/pause_btn@2x.png new file mode 100644 index 00000000..e40a23da Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/pause_btn.imageset/pause_btn@2x.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/pause_btn.imageset/pause_btn@3x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/pause_btn.imageset/pause_btn@3x.png new file mode 100644 index 00000000..1f183708 Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/pause_btn.imageset/pause_btn@3x.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/slider_dot.imageset/Contents.json b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/slider_dot.imageset/Contents.json new file mode 100644 index 00000000..123920f1 --- /dev/null +++ b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/slider_dot.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "slider_dot.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "slider_dot@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "slider_dot@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/slider_dot.imageset/slider_dot.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/slider_dot.imageset/slider_dot.png new file mode 100644 index 00000000..680b8bdf Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/slider_dot.imageset/slider_dot.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/slider_dot.imageset/slider_dot@2x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/slider_dot.imageset/slider_dot@2x.png new file mode 100644 index 00000000..d3f40f7a Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/slider_dot.imageset/slider_dot@2x.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/slider_dot.imageset/slider_dot@3x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/slider_dot.imageset/slider_dot@3x.png new file mode 100644 index 00000000..74b15b07 Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/slider_dot.imageset/slider_dot@3x.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/slider_thumb.imageset/Contents.json b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/slider_thumb.imageset/Contents.json new file mode 100644 index 00000000..cf4cea2c --- /dev/null +++ b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/slider_thumb.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "slider_thumb.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "slider_thumb@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "slider_thumb@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/slider_thumb.imageset/slider_thumb.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/slider_thumb.imageset/slider_thumb.png new file mode 100644 index 00000000..41c075a9 Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/slider_thumb.imageset/slider_thumb.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/slider_thumb.imageset/slider_thumb@2x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/slider_thumb.imageset/slider_thumb@2x.png new file mode 100644 index 00000000..fec61306 Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/slider_thumb.imageset/slider_thumb@2x.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/slider_thumb.imageset/slider_thumb@3x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/slider_thumb.imageset/slider_thumb@3x.png new file mode 100644 index 00000000..c59fb87f Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/slider_thumb.imageset/slider_thumb@3x.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/star_selected.imageset/Contents.json b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/star_selected.imageset/Contents.json new file mode 100644 index 00000000..c44b7f4e --- /dev/null +++ b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/star_selected.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "star_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "star_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/star_selected.imageset/star_selected@2x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/star_selected.imageset/star_selected@2x.png new file mode 100644 index 00000000..36531092 Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/star_selected.imageset/star_selected@2x.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/star_selected.imageset/star_selected@3x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/star_selected.imageset/star_selected@3x.png new file mode 100644 index 00000000..5314314c Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/star_selected.imageset/star_selected@3x.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/star_unselected.imageset/Contents.json b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/star_unselected.imageset/Contents.json new file mode 100644 index 00000000..6939e5bc --- /dev/null +++ b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/star_unselected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "star_unselected.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "star_unselected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "star_unselected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/star_unselected.imageset/star_unselected.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/star_unselected.imageset/star_unselected.png new file mode 100644 index 00000000..2fea8c68 Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/star_unselected.imageset/star_unselected.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/star_unselected.imageset/star_unselected@2x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/star_unselected.imageset/star_unselected@2x.png new file mode 100644 index 00000000..9c50bd66 Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/star_unselected.imageset/star_unselected@2x.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/star_unselected.imageset/star_unselected@3x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/star_unselected.imageset/star_unselected@3x.png new file mode 100644 index 00000000..76b5184b Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/star_unselected.imageset/star_unselected@3x.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/start_btn.imageset/Contents.json b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/start_btn.imageset/Contents.json new file mode 100644 index 00000000..e9d79a40 --- /dev/null +++ b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/start_btn.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "start_btn.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "start_btn@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "start_btn@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/start_btn.imageset/start_btn.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/start_btn.imageset/start_btn.png new file mode 100644 index 00000000..28cb6585 Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/start_btn.imageset/start_btn.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/start_btn.imageset/start_btn@2x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/start_btn.imageset/start_btn@2x.png new file mode 100644 index 00000000..6cae3fc1 Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/start_btn.imageset/start_btn@2x.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/start_btn.imageset/start_btn@3x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/start_btn.imageset/start_btn@3x.png new file mode 100644 index 00000000..20ed3d71 Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/start_btn.imageset/start_btn@3x.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/start_icon.imageset/Contents.json b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/start_icon.imageset/Contents.json new file mode 100644 index 00000000..c9b5851f --- /dev/null +++ b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/start_icon.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "start_icon.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "start_icon@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "start_icon@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/start_icon.imageset/start_icon.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/start_icon.imageset/start_icon.png new file mode 100644 index 00000000..3bde7fe1 Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/start_icon.imageset/start_icon.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/start_icon.imageset/start_icon@2x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/start_icon.imageset/start_icon@2x.png new file mode 100644 index 00000000..bdd5b7ef Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/start_icon.imageset/start_icon@2x.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/start_icon.imageset/start_icon@3x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/start_icon.imageset/start_icon@3x.png new file mode 100644 index 00000000..ad2dce57 Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/start_icon.imageset/start_icon@3x.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/unmute_icon.imageset/Contents.json b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/unmute_icon.imageset/Contents.json new file mode 100644 index 00000000..f3c57bd0 --- /dev/null +++ b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/unmute_icon.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "unmute_icon.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "unmute_icon@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "unmute_icon@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/unmute_icon.imageset/unmute_icon.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/unmute_icon.imageset/unmute_icon.png new file mode 100644 index 00000000..052a1666 Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/unmute_icon.imageset/unmute_icon.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/unmute_icon.imageset/unmute_icon@2x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/unmute_icon.imageset/unmute_icon@2x.png new file mode 100644 index 00000000..dbfbf600 Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/unmute_icon.imageset/unmute_icon@2x.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/unmute_icon.imageset/unmute_icon@3x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/unmute_icon.imageset/unmute_icon@3x.png new file mode 100644 index 00000000..1ecc30b9 Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/unmute_icon.imageset/unmute_icon@3x.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/very_nice_selected.imageset/Contents.json b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/very_nice_selected.imageset/Contents.json new file mode 100644 index 00000000..1981303f --- /dev/null +++ b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/very_nice_selected.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "very_nice_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "very_nice_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/very_nice_selected.imageset/very_nice_selected@2x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/very_nice_selected.imageset/very_nice_selected@2x.png new file mode 100644 index 00000000..001690f6 Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/very_nice_selected.imageset/very_nice_selected@2x.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/very_nice_selected.imageset/very_nice_selected@3x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/very_nice_selected.imageset/very_nice_selected@3x.png new file mode 100644 index 00000000..32732a09 Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/very_nice_selected.imageset/very_nice_selected@3x.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/very_nice_unselected.imageset/Contents.json b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/very_nice_unselected.imageset/Contents.json new file mode 100644 index 00000000..035990aa --- /dev/null +++ b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/very_nice_unselected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "very_nice_unselected.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "very_nice_unselected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "very_nice_unselected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/very_nice_unselected.imageset/very_nice_unselected.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/very_nice_unselected.imageset/very_nice_unselected.png new file mode 100644 index 00000000..26012257 Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/very_nice_unselected.imageset/very_nice_unselected.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/very_nice_unselected.imageset/very_nice_unselected@2x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/very_nice_unselected.imageset/very_nice_unselected@2x.png new file mode 100644 index 00000000..f680c8a5 Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/very_nice_unselected.imageset/very_nice_unselected@2x.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/very_nice_unselected.imageset/very_nice_unselected@3x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/very_nice_unselected.imageset/very_nice_unselected@3x.png new file mode 100644 index 00000000..8bc83fc9 Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/very_nice_unselected.imageset/very_nice_unselected@3x.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/worse_selected.imageset/Contents.json b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/worse_selected.imageset/Contents.json new file mode 100644 index 00000000..2650906c --- /dev/null +++ b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/worse_selected.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "worse_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "worse_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/worse_selected.imageset/worse_selected@2x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/worse_selected.imageset/worse_selected@2x.png new file mode 100644 index 00000000..d0510f48 Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/worse_selected.imageset/worse_selected@2x.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/worse_selected.imageset/worse_selected@3x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/worse_selected.imageset/worse_selected@3x.png new file mode 100644 index 00000000..5a1bc888 Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/worse_selected.imageset/worse_selected@3x.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/worse_unselected.imageset/Contents.json b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/worse_unselected.imageset/Contents.json new file mode 100644 index 00000000..8aeb0327 --- /dev/null +++ b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/worse_unselected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "worse_unselected.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "worse_unselected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "worse_unselected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/worse_unselected.imageset/worse_unselected.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/worse_unselected.imageset/worse_unselected.png new file mode 100644 index 00000000..20576869 Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/worse_unselected.imageset/worse_unselected.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/worse_unselected.imageset/worse_unselected@2x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/worse_unselected.imageset/worse_unselected@2x.png new file mode 100644 index 00000000..2f5d7268 Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/worse_unselected.imageset/worse_unselected@2x.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/worse_unselected.imageset/worse_unselected@3x.png b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/worse_unselected.imageset/worse_unselected@3x.png new file mode 100644 index 00000000..09e41ef3 Binary files /dev/null and b/application/assembly/Modules/Resource/AppAssemblyAssets.xcassets/worse_unselected.imageset/worse_unselected@3x.png differ diff --git a/application/assembly/Modules/Resource/AppAssemblyBundle.swift b/application/assembly/Modules/Resource/AppAssemblyBundle.swift new file mode 100644 index 00000000..8c88229b --- /dev/null +++ b/application/assembly/Modules/Resource/AppAssemblyBundle.swift @@ -0,0 +1,57 @@ +// +// AppAssemblyBundle.swift +// AppAssembly +// + +import UIKit +import TUICore + +// MARK: - AppAssemblyBundle + +enum AppAssemblyBundle { + + static let bundle: Bundle = { + let bundleName = "AppAssemblyBundle" + + let frameworkBundle = Bundle(for: BundleToken.self) + if let url = frameworkBundle.url(forResource: bundleName, withExtension: "bundle"), + let bundle = Bundle(url: url) { + return bundle + } + + if let url = Bundle.main.url(forResource: bundleName, withExtension: "bundle"), + let bundle = Bundle(url: url) { + return bundle + } + + return Bundle.main + }() + + // MARK: - Image + + static func image(named name: String) -> UIImage? { + return UIImage(named: name, in: bundle, compatibleWith: nil) + } + + // MARK: - Localized String + + static func localizedString(forKey key: String, table: String) -> String { + if let language = TUIGlobalization.getPreferredLanguage(), + !language.isEmpty, + let path = bundle.path(forResource: language, ofType: "lproj"), + let languageBundle = Bundle(path: path) { + return languageBundle.localizedString(forKey: key, value: "", table: table) + } + return bundle.localizedString(forKey: key, value: "", table: table) + } + + // MARK: - JSON + + static func path(forResource name: String, ofType ext: String = "json") -> String? { + return bundle.path(forResource: name, ofType: ext) + } +} + +// MARK: - Private + +private final class BundleToken {} diff --git a/application/assembly/Modules/Resource/Localized/AssemblyLocalized.swift b/application/assembly/Modules/Resource/Localized/AssemblyLocalized.swift new file mode 100644 index 00000000..2d087519 --- /dev/null +++ b/application/assembly/Modules/Resource/Localized/AssemblyLocalized.swift @@ -0,0 +1,18 @@ +// +// AssemblyLocalized.swift +// AppAssembly +// + +import Foundation +import AtomicX + +private let AssemblyLocalizeTableName = "AssemblyLocalized" + +func AssemblyLocalize(_ key: String, _ args: CVarArg...) -> String { + return BundleLoader.moduleLocalized( + key: key, + in: AppAssemblyBundle.bundle, + tableName: AssemblyLocalizeTableName, + arguments: args + ) +} diff --git a/application/assembly/Modules/Resource/Localized/en.lproj/AssemblyLocalized.strings b/application/assembly/Modules/Resource/Localized/en.lproj/AssemblyLocalized.strings new file mode 100644 index 00000000..8b78ab77 --- /dev/null +++ b/application/assembly/Modules/Resource/Localized/en.lproj/AssemblyLocalized.strings @@ -0,0 +1,78 @@ +/* + AssemblyLocalized.strings + AppAssembly + + English localization for AppAssembly module +*/ +"App.PortalViewController.sharelog" = "Share and Upload Logs"; +"App.PortalViewController.share" = "share"; +"App.PortalViewController.cancel" = "cancel"; + +"AppCommon.TCUtil.sendhttprequest" = "Unable to convert parameter value to JSON string due to sendHttpRequest failure"; +"AppCommon.TCUtil.parametererror" = "Parameter error"; +"AppCommon.TCUtil.serverrequesterror" = "Server request error"; + +"Demo.TRTC.Portal.Mine.personalcenter" = "Personal Center"; +"Demo.TRTC.Portal.Mine.about" = "About"; + +"Demo.TRTC.Portal.App.title" = "Tencent Cloud Media Services"; +"Demo.TRTC.Portal.confirm" = "Done"; +"Demo.TRTC.Portal.enterusername" = "Please enter a nickname"; +"Demo.TRTC.Portal.privacy" = "Privacy"; +"Demo.TRTC.Portal.disclaimer" = "Disclaimer"; +"Demo.TRTC.Portal.sdkversion" = "SDK Version"; +"Demo.TRTC.Portal.appversion" = "Application Version"; +"Demo.TRTC.Portal.limit20count" = "Chinese characters, letters, numbers and underscores, 2 - 20 words"; +"Demo.TRTC.Portal.changenickname" = "Change Your Nickname"; +"Demo.TRTC.Portal.disclaimerdesc" = "TRTC (this app) is a tryout app, whose copyright is owned by Tencent Cloud. This app is for tryout only and must not be used commercially.\nIn accordance with relevant regulations, this app forbids pornographic, abusive, terrorism, and politically sensitive content. All audio/video interactions are recorded and archived."; +"Demo.TRTC.Home.appusetoshowfunc" = "This app demonstrates the features of Tencent Video Cloud terminal products."; + +"Demo.TRTC.Portal.Main.call" = "Call"; +"Demo.TRTC.Portal.Main.callContent" = "Ringtone/Floating window/Less stutter"; +"Demo.TRTC.Portal.Main.tuiRoom" = "Conference"; +"Demo.TRTC.Portal.Main.tuiRoomContent" = "Quick meeting/Invite/Manage participants/Share screen"; +"Demo.TRTC.Portal.Main.live" = "Live"; +"Demo.TRTC.Portal.Main.liveContent" = "Live preview/Beauty filters/Multi-host"; +"Demo.TRTC.Portal.Main.uichat" = "Chat"; +"Demo.TRTC.Portal.Main.uichatContent" = "Group chat/Contacts/Audio chat/Data sync"; +"Demo.TRTC.Portal.Main.beautyEffects" = "Beauty AR"; +"Demo.TRTC.Portal.Main.beautyEffectsContent" = "Beautify/Makeup/Filters/Stickers"; +"Demo.TRTC.Portal.Main.video" = "Video Play"; +"Demo.TRTC.Portal.Main.videoContent" = "Adaptive bitrate/Change video quality & speed"; +"Demo.TRTC.Portal.Player.videoPlay" = "Video Play"; +"Demo.TRTC.Portal.Player.singleFunction" = "Single Function"; +"Demo.TRTC.Portal.Main.shortVideo" = "UGSV"; +"Demo.TRTC.Portal.Main.shortVideoContent" = "Photo & video editor/Split screen/Transition effects"; +"Demo.TRTC.Portal.Main.VoiceRoom" = "Voice Room"; +"Demo.TRTC.Portal.Main.VoiceRoomContent" = "High audio quality/Large room/Smooth mic on/off"; +"Demo.TRTC.Portal.Main.ktv" = "Karaoke"; +"Demo.TRTC.Portal.Main.ktvContent" = "Music library/Duet/Real-time scoring"; +"Demo.TRTC.Portal.Main.AI" = "Conversational AI"; +"Demo.TRTC.Portal.Main.AiDesc" = "Realtime Call · AI Noise Suppression · Smart Interruption"; +"Demo.TRTC.Portal.Main.HotComponent" = "Hot"; +"Demo.TRTC.Portal.Main.Interpretation" = "AI Translation"; +"Demo.TRTC.Portal.Main.InterpretationDesc" = "Simultaneous interpretation · Multi-languages"; +"Demo.TRTC.Portal.Main.IndustryScenarioPractice" = "Industry Scenario Practice"; +"Demo.TRTC.Portal.Main.Exploremore" = "Explore more"; +"Demo.TRTC.Portal.Main.UICompnent" = "UIKit"; +"Demo.TRTC.Portal.Main.trial" = "*The \"UI\" label indicates that the component comes with a ready-to-use UI kit."; +"Demo.TRTC.Portal.Main.Report" = "Attention: This is a DEMO APP. Do not trust anyone asking you to transfer money. Report scam"; +"Demo.TRTC.Portal.Main.MoudleBannedMessage" = "Your account is at risk and has been restricted."; +"Demo.TRTC.Portal.Main.FaceAuthFailedMessage" = "Verification failed. Please try again."; +"Demo.TRTC.Portal.Main.safetyReminderTitle" = "Safety Reminder"; +"Demo.TRTC.Portal.Main.safetyReminderFirstPara" = "Tencent Cloud Media Services App provides you with the demonstration and experience of Tencent Cloud Audio and Video and Communication Cloud Services. Please note:"; +"Demo.TRTC.Portal.Main.safetyReminderEndPara" = "Thank you for your understanding and support, wish you a pleasant use!"; +"Demo.TRTC.Portal.Main.safetyReminderMidPara" = "1. This App is for demonstration and experience purposes only, and should not be used for daily communication or business transactions.\n2. Please do not disclose your personal information, account password, or other sensitive information to strangers to protect your privacy and security.\n3. Be vigilant about remittance, winning a prize, and other money-related information to avoid being deceived.\n4. If you encounter any suspicious situations, please report to us promptly, and we will verify and handle it as soon as possible."; +"Demo.TRTC.Portal.Main.safetyReminderConfirm" = "GOT IT"; + +"Demo.TRTC.LiveRoom.videoLive" = "Video Live"; +"Demo.TRTC.LiveRoom.createroom" = "Go Live"; + +"Demo.TRTC.VoiceRoom.voicechatroom" = "Voice Room"; +"Demo.TRTC.VoiceRoom.createroom" = "Create Room"; + +"Demo.TRTC.LiveRoom.exitFloatWindowTip" = "Live streaming in progress. Please try again later."; + +"Demo.TRTC.LiveRoom.liveHasStop" = "Live broadcast has ended"; + +"Demo.TRTC.Common.cannotStartRoomDuringCall" = "You are in a call. Please try again after it ends."; diff --git a/application/assembly/Modules/Resource/Localized/zh-Hans.lproj/AssemblyLocalized.strings b/application/assembly/Modules/Resource/Localized/zh-Hans.lproj/AssemblyLocalized.strings new file mode 100644 index 00000000..7d99cdb1 --- /dev/null +++ b/application/assembly/Modules/Resource/Localized/zh-Hans.lproj/AssemblyLocalized.strings @@ -0,0 +1,77 @@ +/* + AssemblyLocalized.strings + AppAssembly + + 简体中文本地化 +*/ +"App.PortalViewController.sharelog" = "分享上传日志"; +"App.PortalViewController.share" = "分享"; +"App.PortalViewController.cancel" = "取消"; +"AppCommon.TCUtil.sendhttprequest" = "sendHttpRequest failed,参数转成json格式失败"; +"AppCommon.TCUtil.parametererror" = "参数错误"; +"AppCommon.TCUtil.serverrequesterror" = "服务请求失败"; + +"Demo.TRTC.Portal.Mine.personalcenter" = "个人中心"; +"Demo.TRTC.Portal.Mine.about" = "关于"; + +"Demo.TRTC.Portal.App.title" = "腾讯云音视频"; +"Demo.TRTC.Portal.confirm" = "确认"; +"Demo.TRTC.Portal.enterusername" = "请输入用户昵称"; +"Demo.TRTC.Portal.privacy" = "隐私保护指引"; +"Demo.TRTC.Portal.disclaimer" = "免责声明"; +"Demo.TRTC.Portal.sdkversion" = "SDK 版本"; +"Demo.TRTC.Portal.appversion" = "商店版本"; +"Demo.TRTC.Portal.limit20count" = "仅限中文、字母、数字和下划线,2-20个字"; +"Demo.TRTC.Portal.changenickname" = "修改用户昵称"; +"Demo.TRTC.Portal.disclaimerdesc" = "腾讯云音视频 TRTC(\"本产品\")是由腾讯云提供的一款测试产品,腾讯云享有本产品的著作权和所有权。本产品仅用于功能体验,不得用于任何商业用途。\n为配合相关部门监管要求,本产品音视频互动全程均有录音录像存档,严禁在使用中有任何色情、辱骂、暴恐、涉政等违规内容的传播。"; +"Demo.TRTC.Home.appusetoshowfunc" = "本APP用于展示腾讯视频云终端产品的各类功能"; + +"Demo.TRTC.Portal.Main.call" = "通话"; +"Demo.TRTC.Portal.Main.callContent" = "响铃通知·通话悬浮窗·通话卡顿优化"; +"Demo.TRTC.Portal.Main.tuiRoom" = "会议"; +"Demo.TRTC.Portal.Main.tuiRoomContent" = "快速会议·邀请入会·会中管控·共享屏幕"; +"Demo.TRTC.Portal.Main.live" = "直播"; +"Demo.TRTC.Portal.Main.liveContent" = "开播预览·智能美颜·连麦PK"; +"Demo.TRTC.Portal.Main.uichat" = "聊天"; +"Demo.TRTC.Portal.Main.uichatContent" = "群组聊天·好友通讯录·语音消息·资料多端同步"; +"Demo.TRTC.Portal.Main.beautyEffects" = "美颜特效"; +"Demo.TRTC.Portal.Main.beautyEffectsContent" = "美颜·美妆·滤镜·贴纸"; +"Demo.TRTC.Portal.Main.video" = "视频播放"; +"Demo.TRTC.Portal.Main.videoContent" = "自适应拉流·视频切换·倍速播放"; +"Demo.TRTC.Portal.Player.videoPlay" = "视频播放"; +"Demo.TRTC.Portal.Player.singleFunction" = "单功能体验"; +"Demo.TRTC.Portal.Main.shortVideo" = "短视频制作"; +"Demo.TRTC.Portal.Main.shortVideoContent" = "图片视频编辑·多屏合拍·图片转场"; +"Demo.TRTC.Portal.Main.VoiceRoom" = "语聊房"; +"Demo.TRTC.Portal.Main.VoiceRoomContent" = "高音质·大房间·平滑上下麦"; +"Demo.TRTC.Portal.Main.ktv" = "在线K歌"; +"Demo.TRTC.Portal.Main.ktvContent" = "曲库点唱·实时合唱·互动抢唱·实时评分"; +"Demo.TRTC.Portal.Main.AI" = "AI 对话"; +"Demo.TRTC.Portal.Main.AiDesc" = "实时语音对话·AI 降噪·智能打断"; +"Demo.TRTC.Portal.Main.HotComponent" = "热门"; +"Demo.TRTC.Portal.Main.Interpretation" = "AI 同声传译"; +"Demo.TRTC.Portal.Main.InterpretationDesc" = "超低延迟·精准翻译·多语言覆盖"; +"Demo.TRTC.Portal.Main.IndustryScenarioPractice" = "行业应用场景"; +"Demo.TRTC.Portal.Main.Exploremore" = "探索更多"; +"Demo.TRTC.Portal.Main.UICompnent" = "UI组件"; +"Demo.TRTC.Portal.Main.trial" = "* UI组件指该产品提供含UI快速集成方案,30分钟上线同款能力"; +"Demo.TRTC.Portal.Main.Report" = "仅用于业务功能体验,请勿轻信汇款、中奖等涉及钱款的信息,谨防上当受骗,立即举报"; +"Demo.TRTC.Portal.Main.MoudleBannedMessage" = "您的账户存在风险,已被限制使用"; +"Demo.TRTC.Portal.Main.FaceAuthFailedMessage" = "核验失败,请重试"; +"Demo.TRTC.Portal.Main.safetyReminderTitle" = "安全提示"; +"Demo.TRTC.Portal.Main.safetyReminderFirstPara" = "腾讯云音视频 App 为您提供腾讯云音视频及通信云服务的演示与体验。请注意:"; +"Demo.TRTC.Portal.Main.safetyReminderEndPara" = "感谢您的理解与支持,祝您使用愉快!"; +"Demo.TRTC.Portal.Main.safetyReminderMidPara" = "1. 本App用途仅适用于演示和体验,请勿用于日常沟通或商业交易。\n2. 请勿向陌生人透露您的个人信息、账号密码等敏感信息,以保护您的隐私安全。\n3. 请务必警惕汇款、中奖等涉及钱款的信息,避免上当受骗。\n4. 如遇到可疑情况,请及时向我们反馈,我们将尽快为您核实处理。"; +"Demo.TRTC.Portal.Main.safetyReminderConfirm" = "我知道了"; + +"Demo.TRTC.LiveRoom.videoLive" = "在线直播"; +"Demo.TRTC.LiveRoom.createroom" = "开直播"; + +"Demo.TRTC.VoiceRoom.voicechatroom" = "语聊房"; +"Demo.TRTC.VoiceRoom.createroom" = "创建房间"; + +"Demo.TRTC.LiveRoom.exitFloatWindowTip" = "正在直播中,请稍后再试。"; + +"Demo.TRTC.LiveRoom.liveHasStop" = "直播已结束"; + +"Demo.TRTC.Common.cannotStartRoomDuringCall" = "当前正在通话中,请结束后再试"; diff --git a/application/assembly/Modules/Room/RoomModule.swift b/application/assembly/Modules/Room/RoomModule.swift new file mode 100644 index 00000000..f5c67b6a --- /dev/null +++ b/application/assembly/Modules/Room/RoomModule.swift @@ -0,0 +1,39 @@ +// +// RoomModule.swift +// main +// + +import TUIRoomKit +import UIKit + +// MARK: - RoomModule + +final class RoomModule: ModuleProvider { + let config: ModuleConfig + + init(config: ModuleConfig) { + self.config = config + AtomicXCoreLogin.shared.startAutoLogin() + } + + static var standard: RoomModule { + let config = ModuleConfig( + identifier: "room", + title: AssemblyLocalize("Demo.TRTC.Portal.Main.tuiRoom"), + description: AssemblyLocalize("Demo.TRTC.Portal.Main.tuiRoomContent"), + iconName: "main_entrance_tuiroom", + iconImage: AppAssemblyBundle.image(named: "main_entrance_tuiroom"), + cardStyle: .uiComponent, + gradientColors: [], + targetProvider: { + guard AppAssembly.shared.canStartNewRoom else { + AppAssembly.shared.showCannotStartRoomToast() + return nil + } + return RoomHomeViewController() + }, + analyticsEvent: "conference" + ) + return RoomModule(config: config) + } +} diff --git a/application/assembly/Modules/ScenesApplication/ScenesApplicationModule.swift b/application/assembly/Modules/ScenesApplication/ScenesApplicationModule.swift new file mode 100644 index 00000000..8d0924a5 --- /dev/null +++ b/application/assembly/Modules/ScenesApplication/ScenesApplicationModule.swift @@ -0,0 +1,39 @@ +// +// ScenesApplicationModule.swift +// main +// + +import UIKit + +// MARK: - ScenesApplicationModule + +final class ScenesApplicationModule: ModuleProvider { + let config: ModuleConfig + + init(config: ModuleConfig) { + self.config = config + } + + // MARK: - Constants + + private static let exhibitionURL = "https://trtc.io/exhibition/details?lang=zh&from=app" + + static var standard: ScenesApplicationModule { + let config = ModuleConfig( + identifier: "scenes_application", + title: AssemblyLocalize("Demo.TRTC.Portal.Main.IndustryScenarioPractice"), + description: AssemblyLocalize("Demo.TRTC.Portal.Main.Exploremore"), + iconName: "", + cardStyle: .banner, + gradientColors: stubUIComponentGradient, + targetProvider: { + if let url = URL(string: ScenesApplicationModule.exhibitionURL) { + UIApplication.shared.open(url, options: [:], completionHandler: nil) + } + return nil + }, + analyticsEvent: "" + ) + return ScenesApplicationModule(config: config) + } +} diff --git a/application/assembly/Modules/VoiceRoom/VoiceRoomModule.swift b/application/assembly/Modules/VoiceRoom/VoiceRoomModule.swift new file mode 100644 index 00000000..884d753c --- /dev/null +++ b/application/assembly/Modules/VoiceRoom/VoiceRoomModule.swift @@ -0,0 +1,35 @@ +// +// VoiceRoomModule.swift +// main +// + +import UIKit +import TUILiveKit + +// MARK: - VoiceRoomModule + +final class VoiceRoomModule: ModuleProvider { + let config: ModuleConfig + + init(config: ModuleConfig) { + self.config = config + AtomicXCoreLogin.shared.startAutoLogin() + } + + static var standard: VoiceRoomModule { + let config = ModuleConfig( + identifier: "voice_chat", + title: AssemblyLocalize("Demo.TRTC.Portal.Main.VoiceRoom"), + description: AssemblyLocalize("Demo.TRTC.Portal.Main.VoiceRoomContent"), + iconName: "main_entrance_voice_room", + iconImage: AppAssemblyBundle.image(named: "main_entrance_voice_room"), + cardStyle: .standard, + gradientColors: [], + targetProvider: { + VoiceRoomViewController() + }, + analyticsEvent: "voice_room" + ) + return VoiceRoomModule(config: config) + } +} diff --git a/application/assembly/Modules/VoiceRoom/VoiceRoomViewController.swift b/application/assembly/Modules/VoiceRoom/VoiceRoomViewController.swift new file mode 100644 index 00000000..9558ef24 --- /dev/null +++ b/application/assembly/Modules/VoiceRoom/VoiceRoomViewController.swift @@ -0,0 +1,145 @@ +// +// VoiceRoomViewController.swift +// main +// + +import AtomicX +import Combine +import Login +import SnapKit +import Toast_Swift +import TUICore +import TUILiveKit +import UIKit + +// MARK: - VoiceRoomViewController + +final class VoiceRoomViewController: UIViewController { + // MARK: - Properties + + private var cancellableSet = Set() + + // MARK: - Subviews + + private lazy var liveListViewController: TUILiveListViewController = .init() + + private lazy var createButton = AtomicButton(variant: .filled, + colorType: .primary, + size: .large, + content: .iconLeading(text: AssemblyLocalize("Demo.TRTC.LiveRoom.createroom"), + icon: AppAssemblyBundle.image(named: "livekit_ic_add"))) + + // MARK: - Lifecycle + + override func viewDidLoad() { + super.viewDidLoad() + ThemeStore.shared.setMode(.dark) + setupNavigation() + constructViewHierarchy() + activateConstraints() + bindInteraction() + view.backgroundColor = .white + } + + override func viewWillAppear(_ animated: Bool) { + super.viewWillAppear(animated) + navigationController?.setNavigationBarHidden(false, animated: false) + } + + override func viewWillDisappear(_ animated: Bool) { + super.viewWillDisappear(animated) + if isMovingFromParent { + ThemeStore.shared.setMode(.light) + } + } +} + +// MARK: - UI + +extension VoiceRoomViewController { + private func setupNavigation() { + let appearance = UINavigationBarAppearance() + appearance.configureWithTransparentBackground() + appearance.backgroundColor = .clear + navigationItem.standardAppearance = appearance + navigationItem.scrollEdgeAppearance = appearance + + let titleLabel = AssemblyLocalize("Demo.TRTC.VoiceRoom.voicechatroom") + let titleView = AtomicLabel(titleLabel) { theme in + LabelAppearance(textColor: theme.tokens.color.textColorAntiPrimary, + backgroundColor: theme.tokens.color.clearColor, + font: theme.tokens.typography.Medium20, + cornerRadius: 0.0) + } + titleView.adjustsFontSizeToFitWidth = true + titleView.font = ThemeStore.shared.currentTheme.tokens.typography.Medium20 + titleView.text = titleLabel + let width = titleView.sizeThatFits(CGSize(width: CGFloat.greatestFiniteMagnitude, + height: CGFloat.greatestFiniteMagnitude)).width + titleView.frame = CGRect(origin: .zero, size: CGSize(width: width, height: 44)) + navigationItem.titleView = titleView + + let backBtn = UIButton(type: .custom) + backBtn.setImage(AppAssemblyBundle.image(named: "calling_back"), for: .normal) + backBtn.addTarget(self, action: #selector(backBtnClick), for: .touchUpInside) + backBtn.sizeToFit() + let backItem = UIBarButtonItem(customView: backBtn) + backItem.tintColor = .black + navigationItem.leftBarButtonItem = backItem + + let helpBtn = UIButton(type: .custom) + helpBtn.setImage(AppAssemblyBundle.image(named: "help_small"), for: .normal) + helpBtn.addTarget(self, action: #selector(connectWeb), for: .touchUpInside) + helpBtn.sizeToFit() + let rightItem = UIBarButtonItem(customView: helpBtn) + rightItem.tintColor = .black + navigationItem.rightBarButtonItem = rightItem + } + + private func constructViewHierarchy() { + addChild(liveListViewController) + view.addSubview(liveListViewController.view) + view.addSubview(createButton) + } + + private func activateConstraints() { + liveListViewController.view.snp.makeConstraints { make in + make.edges.equalToSuperview() + } + createButton.snp.makeConstraints { make in + make.bottom.equalTo(-(convertPixel(h: 15) + kDeviceSafeBottomHeight)) + make.centerX.equalToSuperview() + make.height.equalTo(convertPixel(w: 48)) + make.width.equalTo(convertPixel(w: 154)) + } + } + + private func bindInteraction() { + createButton.addTarget(self, action: #selector(createRoom), for: .touchUpInside) + } +} + +// MARK: - Actions + +extension VoiceRoomViewController { + @objc private func createRoom() { + guard AppAssembly.shared.canStartNewRoom else { + AppAssembly.shared.showCannotStartRoomToast() + return + } + + let voiceRoomId = LiveIdentityGenerator.shared.generateId(LoginEntry.shared.userModel?.userId ?? "", type: .voice) + let params = CreateRoomParams() + VoiceRoomKit.createInstance().createRoom(roomId: voiceRoomId, params: params) + } + + @objc private func backBtnClick() { + navigationController?.popViewController(animated: true) + } + + @objc private func connectWeb() { + if let url = URL(string: "https://cloud.tencent.com/document/product/647/105441") { + UIApplication.shared.open(url, options: [:], completionHandler: nil) + } + } +} diff --git a/application/assembly/RoomRiskIPObserver.swift b/application/assembly/RoomRiskIPObserver.swift new file mode 100644 index 00000000..2f1eaca1 --- /dev/null +++ b/application/assembly/RoomRiskIPObserver.swift @@ -0,0 +1,49 @@ +// +// RoomRiskIPObserver.swift +// AppAssembly +// + +import Foundation +import ImSDK_Plus + +// MARK: - RoomRiskIPObserver + +final class RoomRiskIPObserver: NSObject { + + static let shared = RoomRiskIPObserver() + + private var isShownRiskIpAlert = false + + private override init() { + super.init() + } + + func register() { + V2TIMManager.sharedInstance()?.addGroupListener(listener: self) + } + + func resetForNewRoom() { + isShownRiskIpAlert = false + } +} + +// MARK: - V2TIMGroupListener + +extension RoomRiskIPObserver: V2TIMGroupListener { + + func onReceiveRESTCustomData(groupID: String?, data: Data?) { + guard !isShownRiskIpAlert else { return } + + guard let data = data, let dict = try? JSONSerialization.jsonObject(with: data, options: []) as? [String: Any] else { + return + } + + let isHighRiskUserInRoom = (dict["isHighRiskUserInRoom"] as? Bool) ?? false + if isHighRiskUserInRoom { + isShownRiskIpAlert = true + DispatchQueue.main.async { + AppAssembly.shared.privacyActionHandler?(.showHighRiskIPAlert) + } + } + } +} diff --git a/application/language/LanguageEntry.swift b/application/language/LanguageEntry.swift new file mode 100644 index 00000000..19ab0f81 --- /dev/null +++ b/application/language/LanguageEntry.swift @@ -0,0 +1,51 @@ +// +// LanguageEntry.swift +// language +// +// LanguageEntry.shared.pushLanguageSelect(from: navigationController) { changed in +// } +// + +import UIKit + +private let kAppPreferredLanguageKey = "app_preferred_language" +private let kDefaultLanguageID = "en" + +public final class LanguageEntry { + public static let shared = LanguageEntry() + private init() {} + + public func pushLanguageSelect( + from navigationController: UINavigationController, + completion: ((Bool) -> Void)? = nil + ) { + let vc = LanguageSelectViewController() + vc.onLanguageChanged = { [weak vc] languageID in + completion?(true) + } + navigationController.pushViewController(vc, animated: true) + } + + public func buildLanguageSelectViewController( + completion: ((String) -> Void)? = nil + ) -> UIViewController { + let vc = LanguageSelectViewController() + vc.onLanguageChanged = { languageID in + completion?(languageID) + } + return vc + } + + public var currentLanguageID: String { + get { + return UserDefaults.standard.string(forKey: kAppPreferredLanguageKey) ?? kDefaultLanguageID + } + set { + UserDefaults.standard.set(newValue, forKey: kAppPreferredLanguageKey) + } + } + + public var isChinese: Bool { + return currentLanguageID.hasPrefix("zh") + } +} diff --git a/application/language/LanguageSelectViewController.swift b/application/language/LanguageSelectViewController.swift new file mode 100644 index 00000000..aa5c0808 --- /dev/null +++ b/application/language/LanguageSelectViewController.swift @@ -0,0 +1,197 @@ +// +// LanguageSelectViewController.swift +// language +// + +import UIKit +import AtomicX + +class LanguageSelectViewController: UIViewController { + + var onLanguageChanged: ((String) -> Void)? + + private var dataSource: [LanguageCellModel] = [] + + private lazy var tableView: UITableView = { + let tableView = UITableView(frame: .zero, style: .plain) + tableView.backgroundColor = .clear + tableView.separatorStyle = .none + tableView.dataSource = self + tableView.delegate = self + tableView.contentInset = UIEdgeInsets(top: 20, left: 0, bottom: 20, right: 0) + tableView.register(LanguageSelectCell.self, forCellReuseIdentifier: LanguageSelectCell.reuseID) + return tableView + }() + + override func viewDidLoad() { + super.viewDidLoad() + view.backgroundColor = ThemeStore.shared.colorTokens.bgColorOperate + title = MainLocalize("Demo.TRTC.Language.switchLanguage") + configData() + setupNavigationBar() + view.addSubview(tableView) + tableView.snp.makeConstraints { make in + make.edges.equalToSuperview() + } + } + + override func viewWillAppear(_ animated: Bool) { + super.viewWillAppear(animated) + navigationController?.setNavigationBarHidden(false, animated: false) + } + + override var preferredStatusBarStyle: UIStatusBarStyle { + if #available(iOS 13.0, *) { + return .darkContent + } else { + return .default + } + } + + override var prefersStatusBarHidden: Bool { + return false + } + + // MARK: - Private + + private func configData() { + dataSource = [ + LanguageCellModel(languageID: "zh-Hans", languageName: "简体中文"), + LanguageCellModel(languageID: "en", languageName: "English"), + ] + + let currentLanguageID = LanguageEntry.shared.currentLanguageID + for (index, model) in dataSource.enumerated() where currentLanguageID == model.languageID { + dataSource[index].selected = true + } + } + + private func setupNavigationBar() { + let backBtn = UIButton(type: .custom) + backBtn.setImage(UIImage(named: "main_mine_about_back"), for: .normal) + backBtn.addTarget(self, action: #selector(backBtnClick), for: .touchUpInside) + backBtn.sizeToFit() + let item = UIBarButtonItem(customView: backBtn) + item.tintColor = .black + navigationItem.leftBarButtonItem = item + } + + @objc private func backBtnClick() { + navigationController?.popViewController(animated: true) + } +} + +// MARK: - UITableViewDataSource + +extension LanguageSelectViewController: UITableViewDataSource { + + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + return dataSource.count + } + + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + let model = dataSource[indexPath.row] + let cell = tableView.dequeueReusableCell(withIdentifier: LanguageSelectCell.reuseID, for: indexPath) + if let cell = cell as? LanguageSelectCell { + cell.update(model: model) + } + return cell + } + + func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { + return 56 + } +} + +// MARK: - UITableViewDelegate + +extension LanguageSelectViewController: UITableViewDelegate { + + func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { + let selectedModel = dataSource[indexPath.row] + + for i in 0.. UIImage? { + let size = CGSize(width: 20, height: 20) + UIGraphicsBeginImageContextWithOptions(size, false, 0) + guard let context = UIGraphicsGetCurrentContext() else { return nil } + + let checkColor = UIColor(red: 0.0, green: 0.48, blue: 1.0, alpha: 1.0) + context.setStrokeColor(checkColor.cgColor) + context.setLineWidth(2.5) + context.setLineCap(.round) + context.setLineJoin(.round) + + let path = UIBezierPath() + path.move(to: CGPoint(x: 3, y: 10)) + path.addLine(to: CGPoint(x: 8, y: 15)) + path.addLine(to: CGPoint(x: 17, y: 4)) + context.addPath(path.cgPath) + context.strokePath() + + let image = UIGraphicsGetImageFromCurrentImageContext() + UIGraphicsEndImageContext() + return image + } +} diff --git a/application/login/Components/Model/AvatarModel.swift b/application/login/Components/Model/AvatarModel.swift new file mode 100644 index 00000000..1d539544 --- /dev/null +++ b/application/login/Components/Model/AvatarModel.swift @@ -0,0 +1,57 @@ +// +// AvatarModel.swift +// login +// + +import Foundation + +class AvatarModel: NSObject { + let url: String + init(url: String) { + self.url = url + super.init() + } +} + +class AvatarViewModel: NSObject { + + var currentSelectAvatarModel: AvatarModel? + + lazy var avatarListDataSource: [AvatarModel] = { + var res: [AvatarModel] = [] + + let allUrl = [ + "https://liteav.sdk.qcloud.com/app/res/picture/voiceroom/avatar/user_avatar1.png", + "https://liteav.sdk.qcloud.com/app/res/picture/voiceroom/avatar/user_avatar10.png", + "https://liteav.sdk.qcloud.com/app/res/picture/voiceroom/avatar/user_avatar11.png", + "https://liteav.sdk.qcloud.com/app/res/picture/voiceroom/avatar/user_avatar12.png", + "https://liteav.sdk.qcloud.com/app/res/picture/voiceroom/avatar/user_avatar13.png", + "https://liteav.sdk.qcloud.com/app/res/picture/voiceroom/avatar/user_avatar14.png", + "https://liteav.sdk.qcloud.com/app/res/picture/voiceroom/avatar/user_avatar15.png", + "https://liteav.sdk.qcloud.com/app/res/picture/voiceroom/avatar/user_avatar16.png", + "https://liteav.sdk.qcloud.com/app/res/picture/voiceroom/avatar/user_avatar17.png", + "https://liteav.sdk.qcloud.com/app/res/picture/voiceroom/avatar/user_avatar18.png", + "https://liteav.sdk.qcloud.com/app/res/picture/voiceroom/avatar/user_avatar19.png", + "https://liteav.sdk.qcloud.com/app/res/picture/voiceroom/avatar/user_avatar2.png", + "https://liteav.sdk.qcloud.com/app/res/picture/voiceroom/avatar/user_avatar20.png", + "https://liteav.sdk.qcloud.com/app/res/picture/voiceroom/avatar/user_avatar21.png", + "https://liteav.sdk.qcloud.com/app/res/picture/voiceroom/avatar/user_avatar22.png", + "https://liteav.sdk.qcloud.com/app/res/picture/voiceroom/avatar/user_avatar23.png", + "https://liteav.sdk.qcloud.com/app/res/picture/voiceroom/avatar/user_avatar24.png", + "https://liteav.sdk.qcloud.com/app/res/picture/voiceroom/avatar/user_avatar3.png", + "https://liteav.sdk.qcloud.com/app/res/picture/voiceroom/avatar/user_avatar4.png", + "https://liteav.sdk.qcloud.com/app/res/picture/voiceroom/avatar/user_avatar5.png", + "https://liteav.sdk.qcloud.com/app/res/picture/voiceroom/avatar/user_avatar6.png", + "https://liteav.sdk.qcloud.com/app/res/picture/voiceroom/avatar/user_avatar7.png", + "https://liteav.sdk.qcloud.com/app/res/picture/voiceroom/avatar/user_avatar8.png", + "https://liteav.sdk.qcloud.com/app/res/picture/voiceroom/avatar/user_avatar9.png", + ] + + allUrl.forEach { (url) in + let model = AvatarModel(url: url) + res.append(model) + } + + return res + }() +} diff --git a/application/login/Components/Model/LoginError.swift b/application/login/Components/Model/LoginError.swift new file mode 100644 index 00000000..edf79e46 --- /dev/null +++ b/application/login/Components/Model/LoginError.swift @@ -0,0 +1,41 @@ +// +// LoginError.swift +// login +// + +import Foundation + +public enum LoginError: Error { + case cancelled + + case networkError(message: String) + + case verifyCodeFailed(message: String) + + case loginFailed(code: Int, message: String) + + case tokenExpired + + case ioaAuthFailed(message: String) + + case unknown(message: String) + + public var message: String { + switch self { + case .cancelled: + return LoginLocalize("Demo.TRTC.Login.userCancelled") + case .networkError(let message): + return message + case .verifyCodeFailed(let message): + return message + case .loginFailed(_, let message): + return message + case .tokenExpired: + return LoginLocalize("Demo.TRTC.Login.tokenExpired") + case .ioaAuthFailed(let message): + return message + case .unknown(let message): + return message + } + } +} diff --git a/application/login/Components/Model/LoginResult.swift b/application/login/Components/Model/LoginResult.swift new file mode 100644 index 00000000..a78d97c3 --- /dev/null +++ b/application/login/Components/Model/LoginResult.swift @@ -0,0 +1,17 @@ +// +// LoginResult.swift +// login +// + +import Foundation + +public struct LoginResult { + public let userModel: UserModel + + public let loginMode: LoginMode + + public init(userModel: UserModel, mode: LoginMode) { + self.userModel = userModel + self.loginMode = mode + } +} diff --git a/application/login/Components/Model/UserModel.swift b/application/login/Components/Model/UserModel.swift new file mode 100644 index 00000000..62b25954 --- /dev/null +++ b/application/login/Components/Model/UserModel.swift @@ -0,0 +1,34 @@ +// +// UserModel.swift +// login +// + +import Foundation + +public struct UserModel { + public var userId: String + public var token: String + public var userSig: String + public var phone: String + public var email: String + public var name: String + public var avatar: String + + public init( + userId: String = "", + token: String = "", + userSig: String = "", + phone: String = "", + email: String = "", + name: String = "", + avatar: String = "" + ) { + self.userId = userId + self.token = token + self.userSig = userSig + self.phone = phone + self.email = email + self.name = name + self.avatar = avatar + } +} diff --git a/application/login/Components/Service/CaptchaService.swift b/application/login/Components/Service/CaptchaService.swift new file mode 100644 index 00000000..4f66b968 --- /dev/null +++ b/application/login/Components/Service/CaptchaService.swift @@ -0,0 +1,276 @@ +// +// CaptchaService.swift +// login +// +// - CaptchaManager (BusinessService) +// + +import TUICore +import UIKit +import WebKit + +private enum CaptchaError: Error { + case message(String) +} + +public struct CaptchaResult { + public let appId: String + public let ticket: String + public let randstr: String +} + +private final class WeakScriptMessageHandler: NSObject, WKScriptMessageHandler { + weak var delegate: WKScriptMessageHandler? + + init(_ delegate: WKScriptMessageHandler) { + self.delegate = delegate + super.init() + } + + func userContentController( + _ userContentController: WKUserContentController, + didReceive message: WKScriptMessage + ) { + delegate?.userContentController(userContentController, didReceive: message) + } +} + +public final class CaptchaService: NSObject { + // MARK: - Constants + + private static let networkDisabledTicket = "terror_1001_" + private static let tCaptchaURL = "https://turing.captcha.qcloud.com/TCaptcha.js" + + // MARK: - Properties + + private var captchaWebAppid: NSInteger = 0 + private var verifySuccessBlock: ((_ ticket: String, _ randstr: String) -> Void)? + private var verifyFailedBlock: ((_ message: String) -> Void)? + private var verifyCancelBlock: (() -> Void)? + + private var _webView: WKWebView? + + deinit { + guard let webView = _webView else { return } + let controller = webView.configuration.userContentController + controller.removeScriptMessageHandler(forName: "verifySuccess") + controller.removeScriptMessageHandler(forName: "verifyError") + controller.removeScriptMessageHandler(forName: "verifyCancel") + } + + private var webView: WKWebView { + if let existing = _webView { + return existing + } + let config = WKWebViewConfiguration() + + let preference = WKPreferences() + preference.javaScriptEnabled = true + preference.javaScriptCanOpenWindowsAutomatically = true + config.preferences = preference + + let wkUserController = WKUserContentController() + let handler = WeakScriptMessageHandler(self) + wkUserController.add(handler, name: "verifySuccess") + wkUserController.add(handler, name: "verifyError") + wkUserController.add(handler, name: "verifyCancel") + config.userContentController = wkUserController + + let webView = WKWebView(frame: .zero, configuration: config) + webView.isOpaque = false + webView.backgroundColor = .clear + webView.scrollView.backgroundColor = .clear + webView.navigationDelegate = self + if #available(iOS 11.0, *) { + webView.scrollView.contentInsetAdjustmentBehavior = .never + } + _webView = webView + return webView + } + + // MARK: - Public API + + public func verify( + success: @escaping (CaptchaResult) -> Void, + failed: @escaping (String) -> Void, + cancelled: (() -> Void)? = nil + ) { + fetchCaptchaAppId { [weak self] result in + guard let self = self else { return } + switch result { + case .success(let appId): + self.captchaWebAppid = appId + self.showVerifyWebView( + success: { ticket, randstr in + let captchaResult = CaptchaResult( + appId: String(appId), + ticket: ticket, + randstr: randstr + ) + success(captchaResult) + }, + failed: failed, + cancelled: cancelled + ) + case .failure(let error): + if case .message(let msg) = error { + failed(msg) + } + } + } + } + + private func fetchCaptchaAppId(completion: @escaping (Result) -> Void) { + LoginManager.shared.getGlobalData(param: [:]) { code, errorMessage, result in + if code == kAppLoginServiceSuccessCode { + guard let model = result["jsonModel"] as? HttpJsonModel, + let captchaWebAppid = model.captchaWebAppid + else { + completion(.failure(.message(LoginLocalize("LoginNetwork.ProfileManager.sendfailed")))) + return + } + completion(.success(captchaWebAppid)) + } else { + completion(.failure(.message(errorMessage))) + } + } + } + + private func showVerifyWebView( + success: @escaping (_ ticket: String, _ randstr: String) -> Void, + failed: @escaping (_ message: String) -> Void, + cancelled: (() -> Void)? = nil + ) { + checkCaptchaStatus { [weak self] isAccessible in + guard let self = self else { return } + if isAccessible { + self.loadVerifyWebView(success: success, failed: failed, cancelled: cancelled) + } else { + let ticket = "\(CaptchaService.networkDisabledTicket)\(self.captchaWebAppid)_\(Int(Date().timeIntervalSince1970))" + let randomStr = UUID().uuidString.lowercased().prefix(11) + success(ticket, "@\(randomStr)") + } + } + } + + private func loadVerifyWebView( + success: @escaping (_ ticket: String, _ randstr: String) -> Void, + failed: @escaping (_ message: String) -> Void, + cancelled: (() -> Void)? = nil + ) { + guard let parentView = findPresentingView() else { + failed(LoginLocalize("LoginNetwork.ProfileManager.sendfailed")) + return + } + + parentView.addSubview(webView) + webView.snp.makeConstraints { make in + make.edges.equalToSuperview() + } + + guard let path = Bundle.loginResources.path(forResource: "VerifyPicture", ofType: "html") else { + failed(LoginLocalize("LoginNetwork.ProfileManager.sendfailed")) + return + } + + verifySuccessBlock = { [weak self] ticket, randstr in + self?.cleanupCallbacks() + self?.webView.removeFromSuperview() + success(ticket, randstr) + } + verifyFailedBlock = { [weak self] message in + self?.cleanupCallbacks() + self?.webView.removeFromSuperview() + failed(message) + } + verifyCancelBlock = { [weak self] in + self?.cleanupCallbacks() + self?.webView.removeFromSuperview() + cancelled?() + } + + let req = URLRequest(url: URL(fileURLWithPath: path)) + webView.configuration.preferences.javaScriptEnabled = true + webView.load(req) + } + + private func checkCaptchaStatus(completion: @escaping (Bool) -> Void) { + guard let captchaUrl = URL(string: CaptchaService.tCaptchaURL) else { + completion(false) + return + } + var captchaRequest = URLRequest(url: captchaUrl) + captchaRequest.timeoutInterval = 3 + captchaRequest.httpMethod = "GET" + let task = URLSession.shared.dataTask(with: captchaRequest) { _, _, error in + DispatchQueue.main.async { + completion(error == nil) + } + } + task.resume() + } + + // MARK: - Helpers + + private func findPresentingView() -> UIView? { + if let windowScene = UIApplication.shared.connectedScenes.first as? UIWindowScene, + let window = windowScene.windows.first(where: { $0.isKeyWindow }), + let topVC = window.rootViewController?.presentedViewController ?? window.rootViewController + { + return topVC.view + } + return nil + } + + private func cleanupCallbacks() { + verifySuccessBlock = nil + verifyFailedBlock = nil + verifyCancelBlock = nil + } +} + +// MARK: - WKNavigationDelegate + +extension CaptchaService: WKNavigationDelegate { + public func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) { + let js = "document.getElementsByClassName('navbar')[0].style.display='none'" + webView.evaluateJavaScript(js) + webView.evaluateJavaScript("callVerify('\(captchaWebAppid)');") + } +} + +// MARK: - WKScriptMessageHandler + +extension CaptchaService: WKScriptMessageHandler { + public func userContentController( + _ userContentController: WKUserContentController, + didReceive message: WKScriptMessage + ) { + switch message.name { + case "verifySuccess": + if let body = message.body as? String, + let data = body.data(using: .utf8), + let parameter = try? JSONSerialization.jsonObject(with: data, options: .mutableLeaves) as? [String: String], + let ticket = parameter["ticket"], + let randstr = parameter["randstr"], + !ticket.isEmpty, !randstr.isEmpty + { + verifySuccessBlock?(ticket, randstr) + } + webView.removeFromSuperview() + + case "verifyError": + if let err = message.body as? String { + verifyFailedBlock?(err) + } + webView.removeFromSuperview() + + case "verifyCancel": + verifyCancelBlock?() + webView.removeFromSuperview() + + default: + break + } + } +} diff --git a/application/login/Components/Service/HttpService/Base/NetworkManager.swift b/application/login/Components/Service/HttpService/Base/NetworkManager.swift new file mode 100644 index 00000000..4c2843a6 --- /dev/null +++ b/application/login/Components/Service/HttpService/Base/NetworkManager.swift @@ -0,0 +1,111 @@ +// +// NetworkManager.swift +// login +// + +import Alamofire +import Foundation + +var appLoginBaseUrl: String { + return LoginEntry.shared.config.httpBaseUrl + "base/v1/" +} + +var apaasAppId: String { + return LoginEntry.shared.config.apaasAppId +} + +class NetworkManager { + typealias HttpCompletionCallBack = (_ model: HttpJsonModel) -> Void + + static func request(baseUrl: URLConvertible, + params: Parameters? = nil, + success: ((_ data: HttpJsonModel) -> Void)?, + failed: ((_ errorCode: Int32, _ errorMessage: String?) -> Void)?) { + NetworkManager.request(baseUrl, method: .post, + parameters: params, + encoding: JSONEncoding.default, + completionHandler: { (model: HttpJsonModel) in + if model.errorCode == 0 { + success?(model) + } else { + failed?(model.errorCode, model.errorMessage) + } + }) + } + + static func request(_ convertible: URLConvertible, method: HTTPMethod = .get, parameters: + Parameters? = nil, completionHandler: HttpCompletionCallBack? = nil) { + request(convertible, method: method, parameters: parameters, encoding: URLEncoding.default, completionHandler: completionHandler) + } + + static func request(_ convertible: URLConvertible, method: HTTPMethod = .get, parameters: + Parameters? = nil, encoding: ParameterEncoding, completionHandler: HttpCompletionCallBack? = nil) { + AF.request(convertible, method: method, parameters: addBaseParametersData(parameters), encoding: encoding) + .nmResponseJSON { data in + var result: HttpJsonModel = HttpJsonModel() + result.errorMessage = LoginLocalize("Demo.TRTC.http.syserror") + if let respData = data.data, respData.count > 0 { + let value = try? JSONSerialization.jsonObject(with: respData, options: .mutableLeaves) + #if DEBUG + debugPrint("http_result: " + "\(value ?? "")") + #else + #endif + if let res = value as? [String: Any] { + if let jsonMOdel = HttpJsonModel.json(res) { + result = jsonMOdel + } + } + } + completionHandler?(result) + } + } + + private static func addBaseParametersData(_ parameters: Parameters? = nil) -> Parameters? { + guard var resultParameters = parameters else { + return nil + } + if let userId = LoginManager.shared.getCurrentUser()?.userId { + if resultParameters["userId"] == nil { + resultParameters["userId"] = userId + } + } + if let token = LoginManager.shared.getCurrentUser()?.token { + if resultParameters["token"] == nil { + resultParameters["token"] = token + } + } + if let apaasUserId = LoginManager.shared.getCurrentUser()?.apaasUserId, !apaasUserId.isEmpty { + if resultParameters["apaasUserId"] == nil { + resultParameters["apaasUserId"] = apaasUserId + } + } + if resultParameters["appId"] == nil { + resultParameters["appId"] = HttpLogicRequest.sdkAppId + } + return resultParameters + } +} + +extension DataRequest { + @discardableResult + public func nmResponseJSON(completionHandler: @escaping (AFDataResponse) -> Void) -> Self { + responseJSON { data in + #if DEBUG + debugPrint("url:\(String(describing: self.convertible.urlRequest))") + debugPrint("trtcParameters:\(String(describing: self.convertible.trtcParameters()))") + #else + #endif + completionHandler(data) + } + } +} + +extension URLRequestConvertible { + func trtcParameters() -> Parameters? { + let mirror = Mirror(reflecting: self) + for child in mirror.children where child.label == "parameters" { + return (child.value as? Parameters) + } + return nil + } +} diff --git a/application/login/Components/Service/HttpService/Logic/HttpLogicRequest.swift b/application/login/Components/Service/HttpService/Logic/HttpLogicRequest.swift new file mode 100644 index 00000000..ffaa8b62 --- /dev/null +++ b/application/login/Components/Service/HttpService/Logic/HttpLogicRequest.swift @@ -0,0 +1,149 @@ +// +// HttpLogicRequest.swift +// login +// + +import Alamofire +import Foundation +import ImSDK_Plus +import TUICore + +private let sdkAppIdKey = "sdk_app_id_key" +private let userAvatarDomain = "https://im.sdk.qcloud.com/download/tuikit-resource/avatar/" +private let userAvatarCount = 26 + +public class HttpLogicRequest { + + private static var _sdkAppId: Int32 = 0 + public private(set) static var sdkAppId: Int32 { + set { + _sdkAppId = newValue + } + get { + if _sdkAppId > 0 { + return _sdkAppId + } + let config = LoginEntry.shared.config + if config.isSetupService { + if let appid = UserDefaults.standard.object(forKey: sdkAppIdKey) as? String { + _sdkAppId = Int32(appid) ?? 0 + } + return _sdkAppId + } else { + // GenerateTestUserSig + return Int32(config.sdkAppId) + } + } + } + + static func updateSdkAppId(sdkAppId: Int32) { + HttpLogicRequest.sdkAppId = sdkAppId + UserDefaults.standard.setValue(String(sdkAppId), forKey: sdkAppIdKey) + UserDefaults.standard.synchronize() + } + + static func resetSdkAppIdCache() { + _sdkAppId = 0 + } +} + +public class IMLogicRequest { + public static func imUserLogin(currentUserModel: BSUserModel?, + success: ((_ data: BSUserModel?) -> Void)?, + failed: ((_ errorCode: Int32, _ errorMessage: String?) -> Void)?) { + guard let userModel = currentUserModel else { + failed?(-1, LoginLocalize("LoginNetwork.ProfileManager.loginfailed")) + return + } + userModel.apaasAppId = apaasAppId + TUILogin.login(HttpLogicRequest.sdkAppId, userID: userModel.userId, userSig: userModel.userSig) { + V2TIMManager.sharedInstance()?.getUsersInfo([userModel.userId], succ: { infos in + if let info = infos?.first { + userModel.avatar = info.faceURL ?? "" + if !userModel.isMoa() { + userModel.name = info.nickName ?? "" + } + if let userID = info.userID { + userModel.userId = userID + } + LoginManager.shared.syncUserModelLocalData(userModel) + success?(userModel) + UserOverdueLogicManager.sharedManager().userOverdueState = .alreadyLogged + } else { + failed?(-1, LoginLocalize("LoginNetwork.ProfileManager.loginfailed")) + } + }, fail: { code, errorDes in + failed?(code, errorDes) + }) + } fail: { code, errorDes in + failed?(code, errorDes) + } + } + + public static func imUserLogout(currentUserModel: BSUserModel?, + success: ((_ data: BSUserModel?) -> Void)?, + failed: ((_ errorCode: Int32, _ errorMessage: String?) -> Void)?) { + TUILogin.logout { + success?(currentUserModel) + } fail: { code, errorDes in + failed?(code, errorDes) + } + } + + public static func imUserDelete(currentUserModel: BSUserModel?, + success: ((_ data: BSUserModel?) -> Void)?, + failed: ((_ errorCode: Int32, _ errorMessage: String?) -> Void)?) { + let userInfo = V2TIMUserFullInfo() + userInfo.nickName = "" + userInfo.faceURL = "" + V2TIMManager.sharedInstance()?.setSelfInfo(info: userInfo, succ: { + debugPrint("set profile success") + TUILogin.logout { + success?(currentUserModel) + } fail: { code, errorDes in + failed?(code, errorDes) + } + }, fail: { code, errorDes in + failed?(code, errorDes) + }) + } + + public static func synchronizUserInfo(currentUserModel: BSUserModel, + name: String, success: ((_ data: BSUserModel?) -> Void)?, + failed: ((_ errorCode: Int32, _ errorMessage: String?) -> Void)?) { + let userInfo = V2TIMUserFullInfo() + userInfo.nickName = name + let randomAvatarIndex = Int.random(in: 1...userAvatarCount) + var avatarURL = userAvatarDomain + "avatar_\(randomAvatarIndex).png" + if currentUserModel.avatar.hasPrefix("http") { + avatarURL = currentUserModel.avatar + } + userInfo.faceURL = avatarURL + debugPrint("IMLogicRequest-synchronizUserInfo-\(avatarURL)") + V2TIMManager.sharedInstance()?.setSelfInfo(info: userInfo, succ: { + currentUserModel.name = name + currentUserModel.avatar = avatarURL + LoginManager.shared.syncUserModelLocalData(currentUserModel) + success?(currentUserModel) + debugPrint("set profile success") + }, fail: { code, errorDes in + failed?(code, errorDes) + }) + } + + public static func synchronizUserInfo(currentUserModel: BSUserModel, + avatar: String, + success: ((_ data: BSUserModel?) -> Void)?, + failed: ((_ errorCode: Int32, _ errorMessage: String?) -> Void)?) { + let userInfo = V2TIMUserFullInfo() + userInfo.nickName = currentUserModel.name + userInfo.faceURL = avatar + V2TIMManager.sharedInstance()?.setSelfInfo(info: userInfo, succ: { + currentUserModel.avatar = avatar + success?(currentUserModel) + debugPrint("set profile success") + }, fail: { code, errorDes in + failed?(code, errorDes) + }) + } +} diff --git a/application/login/Components/Service/HttpService/Login/LoginConstants.swift b/application/login/Components/Service/HttpService/Login/LoginConstants.swift new file mode 100644 index 00000000..f7409ed3 --- /dev/null +++ b/application/login/Components/Service/HttpService/Login/LoginConstants.swift @@ -0,0 +1,18 @@ +// +// LoginConstants.swift +// login +// + +import Foundation + +// MARK: - AppLoginErrCode +public let kAppLoginServiceSuccessCode = 0 +public let kAppLoginServiceStopCode = 120 +public let kAppLoginServiceIOTDenyCode = 223 +public let kAppLoginServiceUserInviteIncorrect = 225 +public let kAppLoginServiceUserInviteCodeExpire = 227 +public let kAppLoginServiceUserInviteInvalid = 228 +public let kAppLoginServiceUserInviteCodeBeUsed = 229 + +// MARK: - UserDefaults Key +public let PER_USER_MODEL_KEY = "per_user_model" diff --git a/application/login/Components/Service/HttpService/Login/LoginManager.swift b/application/login/Components/Service/HttpService/Login/LoginManager.swift new file mode 100644 index 00000000..eb5b431e --- /dev/null +++ b/application/login/Components/Service/HttpService/Login/LoginManager.swift @@ -0,0 +1,288 @@ +// +// LoginManager.swift +// login +// + +import Alamofire +import ImSDK_Plus +import UIKit +import TUICore + +@objcMembers +public class LoginManager: NSObject { + private var keepaliveTimer: DispatchSourceTimer? + override private init() {} + public static let shared: LoginManager = LoginManager() + public internal(set) var currentUser: BSUserModel? + + public func getCurrentUser() -> BSUserModel? { + if currentUser == nil { + if let cacheData = UserDefaults.standard.object(forKey: PER_USER_MODEL_KEY) as? Data { + do { + currentUser = try JSONDecoder().decode(BSUserModel.self, from: cacheData) + } catch { + return nil + } + } + } + return currentUser + } + + public func syncUserModelLocalData(_ userModel: BSUserModel) { + do { + let cacheData = try JSONEncoder().encode(userModel) + UserDefaults.standard.set(cacheData, forKey: PER_USER_MODEL_KEY) + UserDefaults.standard.synchronize() + } catch { + print("Save Failed") + } + } + + // Dispatch Timer + public func keepAlive() { + guard keepaliveTimer == nil else { return } + keepaliveTimer = DispatchSource.makeTimerSource(queue: DispatchQueue.global(qos: .userInteractive)) + keepaliveTimer?.schedule(deadline: .now(), repeating: .seconds(10)) + keepaliveTimer?.setEventHandler(handler: { [weak self] in + guard let self = self else { return } + if self.currentUser != nil { + LoginNetworkManager.keepUserLoginAlive(param: [:]) { code, errMessage, resultParam in + debugPrint("TUICore_AppLoginService_userKeepalive code:\(code) errMessage:\(errMessage)") + } + } + }) + keepaliveTimer?.resume() + } +} + +extension LoginManager { + public func removeLoginCache() { + currentUser = nil + UserDefaults.standard.set(nil, forKey: PER_USER_MODEL_KEY) + UserOverdueLogicManager.sharedManager().userOverdueState = .notLogin + } +} + +extension LoginManager { + + public func getSms(param: [AnyHashable: Any]?, + resultCallback: @escaping TUICallServiceResultCallback) { + let appId = param?["appId"] as! String + let ticket = param?["ticket"] as! String + let phone = param?["phone"] as! String + let email = param?["email"] as! String + let randstr = param?["randstr"] as! String + LoginNetworkManager.getSms(appId: appId, ticket: ticket, phone: phone, + email: email, randstr: randstr, + success: { model in + let successResultParams = ["jsonModel": model] + resultCallback(Int(model.errorCode), model.errorMessage, successResultParams) + }, failed: { code, errorMessage in + let errMsg = errorMessage ?? "failed" + let failedResultParams = ["errorCode": code, "errorMessage": errMsg] as [AnyHashable: Any] + resultCallback(Int(code), errMsg, failedResultParams) + }) + } + + public func getEmailVerifyCode(param: [AnyHashable: Any]?, + resultCallback: @escaping TUICallServiceResultCallback) { + let appId = param?["appId"] as! String + let ticket = param?["ticket"] as! String + let phone = param?["phone"] as! String + let email = param?["email"] as! String + let randstr = param?["randstr"] as! String + LoginNetworkManager.getSms(appId: appId, ticket: ticket, phone: phone, + email: email, randstr: randstr, + success: { model in + let successResultParams = ["jsonModel": model] + resultCallback(Int(model.errorCode), model.errorMessage, successResultParams) + }, failed: { code, errorMessage in + let errMsg = errorMessage ?? "failed" + let failedResultParams = ["errorCode": code, "errorMessage": errMsg] as [AnyHashable: Any] + resultCallback(Int(code), errMsg, failedResultParams) + }) + } + + public func loginByToken(param: [AnyHashable: Any]?, + resultCallback: @escaping TUICallServiceResultCallback) { + let userId = param?["userId"] as! String + let token = param?["token"] as! String + LoginNetworkManager.loginByToken(userId: userId, token: token, + success: { [weak self] data in + guard let self = self else { return } + if let data = data { + currentUser = data + } + currentUser?.isHighRiskUser = data?.isHighRiskUser ?? false + currentUser?.isHighRiskIp = data?.isHighRiskIp ?? false + if let user = currentUser { + syncUserModelLocalData(user) + } + let resultParam = ["data": data] as [AnyHashable: Any] + resultCallback(kAppLoginServiceSuccessCode, "success", resultParam) + }, failed: { errorCode, errorMessage in + let errMsg = errorMessage ?? "failed" + let failedResultParams = ["errorCode": errorCode, "errorMessage": errMsg] as [AnyHashable: Any] + resultCallback(Int(errorCode), errMsg, failedResultParams) + }) + } + + public func loginByPhone(param: [AnyHashable: Any]?, + resultCallback: @escaping TUICallServiceResultCallback) { + let phone = param?["phone"] as! String + let code = param?["code"] as! String + let sessionId = param?["sessionId"] as! String + LoginNetworkManager.login(phone: phone, sessionId: sessionId, code: code, + success: { [weak self] data in + guard let self = self else { return } + if let data = data { + currentUser = data + } + currentUser?.isHighRiskUser = data?.isHighRiskUser ?? false + currentUser?.isHighRiskIp = data?.isHighRiskIp ?? false + if let user = currentUser { + syncUserModelLocalData(user) + } + let resultParam = ["userModel": data] as [AnyHashable: Any] + resultCallback(kAppLoginServiceSuccessCode, "success", resultParam) + }, failed: { errorCode, errorMessage in + let errMsg = errorMessage ?? "failed" + let failedResultParams = ["errorCode": errorCode, "errorMessage": errMsg] as [AnyHashable: Any] + resultCallback(Int(errorCode), errMsg, failedResultParams) + }) + } + + public func loginByEmail(param: [AnyHashable: Any]?, + resultCallback: @escaping TUICallServiceResultCallback) { + let email = param?["email"] as! String + let code = param?["code"] as! String + let sessionId = param?["sessionId"] as! String + LoginNetworkManager.login(email: email, sessionId: sessionId, code: code, + success: { [weak self] data in + guard let self = self else { return } + if let data = data { + currentUser = data + } + currentUser?.isHighRiskUser = data?.isHighRiskUser ?? false + currentUser?.isHighRiskIp = data?.isHighRiskIp ?? false + if let user = currentUser { + syncUserModelLocalData(user) + } + let resultParam = ["data": data] as [AnyHashable: Any] + resultCallback(kAppLoginServiceSuccessCode, "success", resultParam) + }, failed: { errorCode, errorMessage in + let errMsg = errorMessage ?? "failed" + let failedResultParams = ["errorCode": errorCode, "errorMessage": errMsg] as [AnyHashable: Any] + resultCallback(Int(errorCode), errMsg, failedResultParams) + }) + } + + public func loginByMOA(ticket: String, + success: ((_ data: BSUserModel?) -> Void)?, + failed: ((_ errorCode: Int32, _ errorMessage: String?) -> Void)?) { + LoginNetworkManager.loginByMOA(ticket: ticket, + success: { [weak self] data in + guard let self = self else { return } + data?.loginType = "moa" + currentUser = data + currentUser?.isHighRiskUser = data?.isHighRiskUser ?? false + currentUser?.isHighRiskIp = data?.isHighRiskIp ?? false + if let user = currentUser { + syncUserModelLocalData(user) + } + success?(data) + }, failed: { errorCode, errorMessage in + let errMsg = errorMessage ?? "failed" + failed?(errorCode, errMsg) + }) + } + + public func getGlobalData(param: [AnyHashable: Any]?, + resultCallback: @escaping TUICallServiceResultCallback) { + LoginNetworkManager.getImageCaptcha { data in + let successResultParams = ["jsonModel": data] + resultCallback(Int(data.errorCode), data.errorMessage, successResultParams) + } failed: { errorCode, errorMessage in + let errMsg = errorMessage ?? "failed" + let failedResultParams = ["errorCode": errorCode, "errorMessage": errMsg] as [AnyHashable: Any] + resultCallback(Int(errorCode), errMsg, failedResultParams) + } + } + + public func logout(param: [AnyHashable: Any]?, + resultCallback: @escaping TUICallServiceResultCallback) { + let token = param?["token"] as! String + let userId = param?["userId"] as! String + LoginNetworkManager.logout(userId: userId, token: token, + success: { data in + let resultParam = ["data": data] as [AnyHashable: Any] + resultCallback(kAppLoginServiceSuccessCode, "success", resultParam) + }, failed: { errorCode, errorMessage in + let errMsg = errorMessage ?? "failed" + let failedResultParams = ["errorCode": errorCode, "errorMessage": errMsg] as [AnyHashable: Any] + resultCallback(Int(errorCode), errMsg, failedResultParams) + }) + } + + public func logoff(param: [AnyHashable: Any]?, + resultCallback: @escaping TUICallServiceResultCallback) { + let token = param?["token"] as! String + let userId = param?["userId"] as! String + LoginNetworkManager.deleteUser(userId: userId, token: token, + success: { data in + let resultParam = ["data": data] as [AnyHashable: Any] + resultCallback(kAppLoginServiceSuccessCode, "success", resultParam) + }, failed: { errorCode, errorMessage in + let errMsg = errorMessage ?? "failed" + let failedResultParams = ["errorCode": errorCode, "errorMessage": errMsg] as [AnyHashable: Any] + resultCallback(Int(errorCode), errMsg, failedResultParams) + }) + } + + public func userUpdate(param: [AnyHashable: Any]?, + resultCallback: @escaping TUICallServiceResultCallback) { + let currentUserModel = param?["currentUserModel"] as! BSUserModel + let name = param?["name"] as! String + LoginNetworkManager.updateUser(currentUserModel: currentUserModel, name: name, + success: { data in + let resultParam = ["data": data] as [AnyHashable: Any] + resultCallback(kAppLoginServiceSuccessCode, "success", resultParam) + }, failed: { errorCode, errorMessage in + let errMsg = errorMessage ?? "failed" + let failedResultParams = ["errorCode": errorCode, "errorMessage": errMsg] as [AnyHashable: Any] + resultCallback(Int(errorCode), errMsg, failedResultParams) + }) + } + + public func getInviteCode(_ email: String?, + success: ((_ data: HttpJsonModel) -> Void)? = nil, + failed: ((_ errorCode: Int32, _ errorMessage: String?) -> Void)? = nil) { + LoginNetworkManager.requestInvitationCode(email, success: success, failed: failed) + } + + public func noneAuthLogin(withInvitationCode invitationCode: String?, + success: ((_ data: BSUserModel?) -> Void)? = nil, + failed: ((_ errorCode: Int32, _ errorMessage: String?) -> Void)? = nil) { + LoginNetworkManager.noneAuthLogin(withInvitationCode: invitationCode, success: success, failed: failed) + } + + public func needReceiveEmail(_ email: String, + _ marketingStatus: Bool, + success: ((_ data: HttpJsonModel) -> Void)? = nil, + failed: ((_ errorCode: Int32, _ errorMessage: String?) -> Void)? = nil) { + LoginNetworkManager.requestEdmSendEmail(email, marketingStatus, success: success, failed: failed) + } + + public func getUserModuleBlackList(success: ((_ data: HttpJsonModel) -> Void)? = nil, + failed: ((_ errorCode: Int32, _ errorMessage: String?) -> Void)? = nil) { + LoginNetworkManager.getUserModuleBlackList(currentUser?.userId ?? TUILogin.getUserID() ?? "") { [weak self] result in + guard let self = self, let map = result.data as? [String: Any] else { return } + currentUser?.bannedModules = map["module"] as? [String: Bool] ?? [:] + currentUser?.bannedFeatures = map["feature"] as? [String: Bool] ?? [:] + success?(result) + } failed: { errorCode, errorMessage in + failed?(errorCode, errorMessage) + debugPrint("\(errorCode) \(String(describing: errorMessage))") + } + } +} diff --git a/application/login/Components/Service/HttpService/Login/LoginNetworkManager.swift b/application/login/Components/Service/HttpService/Login/LoginNetworkManager.swift new file mode 100644 index 00000000..02aafc51 --- /dev/null +++ b/application/login/Components/Service/HttpService/Login/LoginNetworkManager.swift @@ -0,0 +1,247 @@ +// +// LoginNetworkManager.swift +// login +// + +import UIKit +import TUICore + +public class LoginNetworkManager: NSObject { + + static func getSms(appId: String, + ticket: String, phone: String = "", email: String = "", + randstr: String = "", success: ((_ data: HttpJsonModel) -> Void)? = nil, + failed: ((_ errorCode: Int32, _ errorMessage: String?) -> Void)? = nil) { + let baseUrl = appLoginBaseUrl + "auth_users/user_verify_by_picture" + if !phone.isEmpty { + let params = ["appId": appId, + "ticket": ticket, + "phone": phone, + "randstr": randstr, + "apaasAppId": apaasAppId] + NetworkManager.request(baseUrl: baseUrl, params: params, success: success, failed: failed) + } else if !email.isEmpty { + let params = ["appId": appId, + "ticket": ticket, + "email": email, + "randstr": randstr, + "apaasAppId": apaasAppId] + NetworkManager.request(baseUrl: baseUrl, params: params, success: success, failed: failed) + } else { + failed?(-1, LoginLocalize("Demo.TRTC.Home.phoneoremailIsEmpty")) + } + } + + static func getUserModuleBlackList(_ userID: String, success: ((_ data: HttpJsonModel) -> Void)? = nil, + failed: ((_ errorCode: Int32, _ errorMessage: String?) -> Void)? = nil) { + let baseUrl = appLoginBaseUrl + "auth_users/module_blacklist" + if !userID.isEmpty { + let params = ["userId": userID] + NetworkManager.request(baseUrl: baseUrl, params: params, success: success, failed: failed) + } else { + failed?(-1, LoginLocalize("Demo.TRTC.Home.userIDIsEmpty")) + } + } + + public static func noneAuthLogin(withInvitationCode invitationCode: String?, + success: ((_ data: BSUserModel?) -> Void)? = nil, + failed: ((_ errorCode: Int32, _ errorMessage: String?) -> Void)? = nil) { + let baseUrl = appLoginBaseUrl + "auth_users/none_auth" + let params = ["inviteCode": invitationCode, + "apaasAppId": apaasAppId] + NetworkManager.request(baseUrl: baseUrl, params: params, success: { model in + if let sdkAppId = model.sdkAppId { + HttpLogicRequest.updateSdkAppId(sdkAppId: sdkAppId) + IMLogicRequest.imUserLogin(currentUserModel: model.currentUserModel, success: success, failed: failed) + } else { + failed?(-1, LoginLocalize("Demo.TRTC.http.syserror")) + } + }, failed: failed) + } + + static func login(phone: String, sessionId: String, + code: String, + success: ((_ data: BSUserModel?) -> Void)?, + failed: ((_ errorCode: Int32, _ errorMessage: String?) -> Void)?) { + let baseUrl = appLoginBaseUrl + "auth_users/user_login_code" + let params = ["phone": phone, + "code": code, + "sessionId": sessionId, + "apaasAppId": apaasAppId] + NetworkManager.request(baseUrl: baseUrl, params: params, success: { model in + if let sdkAppId = model.sdkAppId { + HttpLogicRequest.updateSdkAppId(sdkAppId: sdkAppId) + IMLogicRequest.imUserLogin(currentUserModel: model.currentUserModel, success: success, failed: failed) + } else { + failed?(-1, LoginLocalize("Demo.TRTC.http.syserror")) + } + }, failed: failed) + } + + static func login(email: String, + sessionId: String, + code: String, + success: ((_ data: BSUserModel?) -> Void)?, + failed: ((_ errorCode: Int32, _ errorMessage: String?) -> Void)?) { + let baseUrl = appLoginBaseUrl + "auth_users/user_login_code" + let params = ["email": email, + "code": code, + "sessionId": sessionId, + "apaasAppId": apaasAppId] + NetworkManager.request(baseUrl: baseUrl, params: params, success: { model in + if let sdkAppId = model.sdkAppId { + HttpLogicRequest.updateSdkAppId(sdkAppId: sdkAppId) + IMLogicRequest.imUserLogin(currentUserModel: model.currentUserModel, success: success, failed: failed) + } else { + failed?(-1, LoginLocalize("Demo.TRTC.http.syserror")) + } + }, failed: failed) + } + + public static func loginByMOA(ticket: String, + success: ((_ data: BSUserModel?) -> Void)?, + failed: ((_ errorCode: Int32, _ errorMessage: String?) -> Void)?) { + let baseUrl = appLoginBaseUrl + "auth_users/user_login_moa" + let params: [String: Any] = [ + "key": ticket, + "apaasAppId": apaasAppId, + "tag": "trtc" + ] + NetworkManager.request(baseUrl: baseUrl, params: params, success: { model in + if let sdkAppId = model.sdkAppId { + HttpLogicRequest.updateSdkAppId(sdkAppId: sdkAppId) + IMLogicRequest.imUserLogin(currentUserModel: model.currentUserModel, success: success, failed: failed) + } else { + failed?(-1, LoginLocalize("Demo.TRTC.http.syserror")) + } + }, failed: failed) + } + + static func loginByToken(userId: String, + token: String, + success: ((_ data: BSUserModel?) -> Void)?, + failed: ((_ errorCode: Int32, _ errorMessage: String?) -> Void)?) { + let baseUrl = appLoginBaseUrl + "auth_users/user_login_token" + let params = ["userId": userId, + "token": token, + "apaasAppId": apaasAppId] + NetworkManager.request(baseUrl: baseUrl, params: params, success: { model in + IMLogicRequest.imUserLogin(currentUserModel: model.currentUserModel, success: success, failed: failed) + }, failed: failed) + } + + static func getImageCaptcha(success: ((_ data: HttpJsonModel) -> Void)?, + failed: ((_ errorCode: Int32, _ errorMessage: String?) -> Void)?) { + let baseUrl = appLoginBaseUrl + "gslb" + NetworkManager.request(baseUrl: baseUrl, params: nil, success: success, failed: failed) + } + + static func keepAlive(success: ((_ data: HttpJsonModel) -> Void)?, + failed: ((_ errorCode: Int32, _ errorMessage: String?) -> Void)?) { + let baseUrl = appLoginBaseUrl + "auth_users/user_keepalive" + NetworkManager.request(baseUrl: baseUrl, params: [:], success: success, failed: failed) + } + + static func logout(userId: String, token: String, + success: ((_ data: BSUserModel?) -> Void)?, + failed: ((_ errorCode: Int32, _ errorMessage: String?) -> Void)?) { + let baseUrl = appLoginBaseUrl + "auth_users/user_logout" + let params = ["userId": userId, "token": token] + NetworkManager.request(baseUrl: baseUrl, params: params, success: { _ in + IMLogicRequest.imUserLogout(currentUserModel: nil, success: success, failed: failed) + }, failed: failed) + } + + static func deleteUser(userId: String, token: String, + success: ((_ data: BSUserModel?) -> Void)?, + failed: ((_ errorCode: Int32, _ errorMessage: String?) -> Void)?) { + let baseUrl = appLoginBaseUrl + "auth_users/user_delete" + let params = ["userId": userId, "token": token] + NetworkManager.request(baseUrl: baseUrl, params: params, success: { _ in + IMLogicRequest.imUserDelete(currentUserModel: nil, success: success, failed: failed) + }, failed: failed) + } + + static func updateUser(currentUserModel: BSUserModel, + name: String, success: ((_ data: BSUserModel?) -> Void)?, + failed: ((_ errorCode: Int32, _ errorMessage: String?) -> Void)?) { + let baseUrl = appLoginBaseUrl + "auth_users/user_update" + let params = ["userId": currentUserModel.userId, "token": currentUserModel.token, "name": name] + NetworkManager.request(baseUrl: baseUrl, + params: params, + success: { _ in + IMLogicRequest.synchronizUserInfo(currentUserModel: currentUserModel, + name: name, success: success, + failed: failed) + }, failed: failed) + } + + public static func userQueryUserId(param: [AnyHashable : Any]?, + resultCallback: @escaping TUICallServiceResultCallback) -> Bool { + let searchUserId = param?["searchUserId"] + LoginNetworkManager.userQuery(searchUserId: searchUserId as! String, success: { data in + let successResultParams = ["jsonModel": data] + resultCallback(Int(data.errorCode), data.errorMessage, successResultParams) + }, failed: { errorCode, errorMessage in + let errMsg = errorMessage ?? "failed" + let failedResultParams = ["errorCode": errorCode, + "errorMessage": errMsg,] + resultCallback(Int(errorCode), errMsg, failedResultParams) + }) + return true + } + + static func userQuery(searchUserId: String, + success: ((_ data: HttpJsonModel) -> Void)?, + failed: ((_ errorCode: Int32, _ errorMessage: String?) -> Void)?) { + let baseUrl = appLoginBaseUrl + "auth_users/user_query" + let params = ["searchUserId": searchUserId,] + NetworkManager.request(baseUrl: baseUrl, + params: params, + success: success, + failed: failed) + } + + static func requestInvitationCode(_ email: String?, + success: ((_ data: HttpJsonModel) -> Void)? = nil, + failed: ((_ errorCode: Int32, _ errorMessage: String?) -> Void)? = nil) { + let applyInviteCodeApi = "auth_users/apply_invite_code" + let requeURL = appLoginBaseUrl + applyInviteCodeApi + let params = ["email": email, + "apaasAppId": apaasAppId] + NetworkManager.request(baseUrl: requeURL, params: params, success: success, failed: failed) + } + + static func requestEdmSendEmail(_ email: String, + _ marketingStatus: Bool, + success: ((_ data: HttpJsonModel) -> Void)? = nil, + failed: ((_ errorCode: Int32, _ errorMessage: String?) -> Void)? = nil) { + let edmEmailApi = "auth_users/create_leave_user_send_email" + let requestURL = appLoginBaseUrl + edmEmailApi + let params = ["email": email, + "source": "tencent_rtc_app", + "marketingStatus": marketingStatus, + "scene": "product-trtc"] as [String: Any] + NetworkManager.request(baseUrl: requestURL, params: params, success: success, failed: failed) + } + + static func keepUserLoginAlive(param: [AnyHashable: Any]?, + resultCallback: @escaping TUICallServiceResultCallback) -> Bool { + LoginNetworkManager.keepAlive { data in + let successResultParams = ["jsonModel": data] + resultCallback(Int(data.errorCode), data.errorMessage, successResultParams) + } failed: { errorCode, errorMessage in + let errMsg = errorMessage ?? "failed" + let failedResultParams = ["errorCode": errorCode, + "errorMessage": errMsg] as [AnyHashable: Any] + resultCallback(Int(errorCode), errMsg, failedResultParams) + } + return true + } + + static func processLoginFailCode(code: Int32) { + if (code == 203) || (code == 204) { + UserOverdueLogicManager.sharedManager().userOverdueState = .loggedAndOverdue + } + } +} diff --git a/application/login/Components/Service/HttpService/Login/ProfileManager.swift b/application/login/Components/Service/HttpService/Login/ProfileManager.swift new file mode 100644 index 00000000..82f57286 --- /dev/null +++ b/application/login/Components/Service/HttpService/Login/ProfileManager.swift @@ -0,0 +1,147 @@ +// +// ProfileManager.swift +// login +// + +import Foundation +import TUICore +import ImSDK_Plus + +public class ProfileManager: NSObject { + public static let shared = ProfileManager() + private override init() {} + + var sessionId: String = "" + public internal(set) var curUserModel: BSUserModel? = nil + + public func getCurrentUser() -> BSUserModel? { + if curUserModel == nil { + if let cacheData = UserDefaults.standard.object(forKey: PER_USER_MODEL_KEY) as? Data { + do { + curUserModel = try JSONDecoder().decode(BSUserModel.self, from: cacheData) + } catch { + return nil + } + } + } + return curUserModel + } + + public func login(phone: String, + name: String, + token: String, + success: @escaping () -> Void, + failed: ((_ error: String) -> Void)? = nil, auto: Bool = false) { + let phoneValue = phone + if !auto { + assert(phoneValue.count > 0) + curUserModel = generateUserModel(userID: phoneValue, token: token) + } + do { + let cacheData = try JSONEncoder().encode(curUserModel) + UserDefaults.standard.set(cacheData, forKey: PER_USER_MODEL_KEY) + success() + } catch { + print("Save Failed") + failed?("usermodel save failed") + } + } + + public func localizeUserModel() { + do { + let cacheData = try JSONEncoder().encode(curUserModel) + UserDefaults.standard.set(cacheData, forKey: PER_USER_MODEL_KEY) + } catch { + print("Save Failed") + } + } + + public func setNickName(name: String, success: @escaping () -> Void, + failed: @escaping (_ error: String) -> Void) { + let userInfo = V2TIMUserFullInfo() + userInfo.nickName = name + curUserModel?.name = name + V2TIMManager.sharedInstance()?.setSelfInfo(info: userInfo, succ: { + success() + debugPrint("set profile success") + }, fail: { (code, desc) in + failed(desc ?? "") + debugPrint("set profile failed.") + }) + } + + public func IMLogin(sdkAppId: Int, userSig: String, success: @escaping () -> Void, failed: @escaping (_ error: String) -> Void) { + guard let userID = curUserModel?.userId else { + failed("userID wrong") + return + } + let user = String(userID) + + TUILogin.login(Int32(sdkAppId), userID: user, userSig: userSig) { + debugPrint("login success") + V2TIMManager.sharedInstance()?.getUsersInfo([userID], succ: { [weak self] (infos) in + guard let self = self else { return } + if let info = infos?.first { + self.curUserModel?.avatar = info.faceURL ?? "" + self.curUserModel?.name = info.nickName ?? "" + self.curUserModel?.userId = info.userID ?? "" + localizeUserModel() + success() + UserOverdueLogicManager.sharedManager().userOverdueState = .alreadyLogged + } else { + failed("") + } + }, fail: { (code, err) in + failed(err ?? "") + debugPrint("get user info failed, code:\(code), error: \(err ?? "nil")") + }) + } fail: { (code, errorDes) in + failed(errorDes ?? "") + debugPrint("login failed, code:\(code), error: \(errorDes ?? "nil")") + } + } + + public func curUserID() -> String? { + guard let userID = curUserModel?.userId else { + return nil + } + return userID + } + + public func removeLoginCache() { + UserDefaults.standard.set(nil, forKey: PER_USER_MODEL_KEY) + } + + public func curUserSig() -> String { + return curUserModel?.userSig ?? "" + } + + public func synchronizUserInfo() { + guard let userModel = curUserModel else { + return + } + let userInfo = V2TIMUserFullInfo() + userInfo.nickName = userModel.name + userInfo.faceURL = userModel.avatar + V2TIMManager.sharedInstance()?.setSelfInfo(info: userInfo, succ: { + debugPrint("set profile success") + }, fail: { (code, desc) in + debugPrint("set profile failed.") + }) + } + + func generateUserModel(userID: String, token: String) -> BSUserModel { + let defaultAvatar = "https://imgcache.qq.com/qcloud/public/static//avatar1_100.20191230.png" + let userModel = BSUserModel(token: "", + phone: userID, email: "", + name: "", + avatar: defaultAvatar, + userId: userID, + appId: "", + userSig: token, + apaasAppId: "", + apaasUserId: "", + sdkUserSig: "") + return userModel + } +} diff --git a/application/login/Components/Service/HttpService/Model/AccountModel.swift b/application/login/Components/Service/HttpService/Model/AccountModel.swift new file mode 100644 index 00000000..e27f2d33 --- /dev/null +++ b/application/login/Components/Service/HttpService/Model/AccountModel.swift @@ -0,0 +1,110 @@ +// +// AccountModel.swift +// login +// + +import UIKit + +@objcMembers +public class ResignModel: NSObject, Codable { + var codeStr: String? = "" + var errorMessage: String = "" + var errorCode: Int32 = -1 +} + +@objcMembers +public class LoginModel: NSObject, Codable { + var errorCode: Int = -1 + var errorMessage: String = "" + var data: BSUserModel? = nil +} + +@objcMembers +public class BSUserModel: NSObject, Codable { + public var token: String + public var phone: String + public var email: String + public var name: String + public var avatar: String + public var userId: String + public var appId: String + public var userSig: String = "" + public var apaasAppId: String = "" + public var apaasUserId: String = "" + public var sdkUserSig: String = "" + public var isHighRiskUser: Bool = false + public var isHighRiskIp: Bool = false + public var bannedModules: [String: Bool] = [:] + public var bannedFeatures: [String: Bool] = [:] + public var loginType: String + + enum CodingKeys: String, CodingKey { + case token + case phone + case email + case name + case avatar + case userId + case userSig + case apaasAppId + case apaasUserId + case sdkUserSig + case loginType + case appId + } + + public init(token: String, phone: String, email: String, name: String, avatar: String, userId: String, + appId: String, userSig: String, apaasAppId: String, apaasUserId: String, sdkUserSig: String, + isHighRiskUser: Bool = false, isHighRiskIp: Bool = false, loginType: String = "") { + self.token = token + self.phone = phone + self.email = email + self.name = name + self.avatar = avatar + self.userId = userId + self.appId = appId + self.userSig = userSig + self.apaasAppId = apaasAppId + self.apaasUserId = apaasUserId + self.sdkUserSig = sdkUserSig + self.isHighRiskUser = isHighRiskUser + self.isHighRiskIp = isHighRiskIp + self.loginType = loginType + } + + required public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + name = (try? container.decode(String.self, forKey: .name)) ?? "" + phone = (try? container.decode(String.self, forKey: .phone)) ?? "" + email = (try? container.decode(String.self, forKey: .email)) ?? "" + token = (try? container.decode(String.self, forKey: .token)) ?? "" + avatar = (try? container.decode(String.self, forKey: .avatar)) ?? "" + userId = (try? container.decode(String.self, forKey: .userId)) ?? "" + appId = (try? container.decode(String.self, forKey: .appId)) ?? "" + userSig = (try? container.decode(String.self, forKey: .userSig)) ?? "" + apaasAppId = (try? container.decode(String.self, forKey: .apaasAppId)) ?? "" + apaasUserId = (try? container.decode(String.self, forKey: .apaasUserId)) ?? "" + sdkUserSig = (try? container.decode(String.self, forKey: .sdkUserSig)) ?? "" + loginType = (try? container.decode(String.self, forKey: .loginType)) ?? "" + } + + public func isMoa() -> Bool { + return loginType == "moa" + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(phone, forKey: .phone) + try container.encode(email, forKey: .email) + try container.encode(token, forKey: .token) + try container.encode(name, forKey: .name) + try container.encode(avatar, forKey: .avatar) + try container.encode(userId, forKey: .userId) + try container.encode(appId, forKey: .appId) + try container.encode(userSig, forKey: .userSig) + try container.encode(apaasAppId, forKey: .apaasAppId) + try container.encode(apaasUserId, forKey: .apaasUserId) + try container.encode(sdkUserSig, forKey: .sdkUserSig) + try container.encode(loginType, forKey: .loginType) + } +} diff --git a/application/login/Components/Service/HttpService/Model/HttpJsonModel.swift b/application/login/Components/Service/HttpService/Model/HttpJsonModel.swift new file mode 100644 index 00000000..530b7048 --- /dev/null +++ b/application/login/Components/Service/HttpService/Model/HttpJsonModel.swift @@ -0,0 +1,125 @@ +// +// HttpJsonModel.swift +// login +// + +import Foundation +import TUICore + +public class HttpJsonModel: NSObject { + public var errorCode: Int32 = -1 + public var errorMessage: String = "" + public var data: Any? + + public static func json(_ json: [String: Any]) -> HttpJsonModel? { + guard let errorCode = json["errorCode"] as? Int32 else { + return nil + } + guard let errorMessage = json["errorMessage"] as? String else { + return nil + } + + let info = HttpJsonModel() + info.errorCode = errorCode + if errorCode == kAppLoginServiceStopCode, let notice = json["notice"] as? [String: String] { + info.errorMessage = (TUIGlobalization.isChineseAppLocale() ? notice["zh"] : notice["en"]) ?? errorMessage + } else { + info.errorMessage = errorMessage + } + info.data = json["data"] as Any + return info + } + + public lazy var captchaWebAppid: NSInteger? = { + guard let result = data as? [String: Any] else { return nil } + return result["captcha_web_appid"] as? NSInteger + }() + + public lazy var sessionID: String? = { + guard let result = data as? [String: Any] else { return nil } + return result["sessionId"] as? String + }() + + public lazy var sdkAppId: Int32? = { + guard let result = data as? [String: Any] else { return nil } + return result["sdkAppId"] as? Int32 + }() + + public lazy var currentUserModel: BSUserModel? = { + guard let result = data as? [String: Any] else { return nil } + return getUserModel(result) + }() + + public lazy var users: [BSUserModel] = { + var usersResult: [BSUserModel] = [] + guard let result = data as? [[String: Any]] else { return usersResult } + for dict in result { + if let userModel = getUserModel(dict) { + usersResult.append(userModel) + } + } + return usersResult + }() + + public lazy var searchUserModel: BSUserModel? = { + guard let result = data as? [String: Any] else { return nil } + return getSearchUserModel(result) + }() + + // MARK: - Private + + private func getUserModel(_ result: [String: Any]) -> BSUserModel? { + guard let userId = result["userId"] as? String else { return nil } + guard let userSig = result["userSig"] as? String else { return nil } + guard let token = result["token"] as? String else { return nil } + + let phone = (result["phone"] as? String) ?? "" + let email = (result["email"] as? String) ?? "" + let name = (result["name"] as? String) ?? "" + let avatar = (result["avatar"] as? String) ?? defaultAvatar() + let appId = (result["apaasAppId"] as? String) ?? "" + let apaasUserId = (result["apaasUserId"] as? String) ?? "" + let sdkUserSig = (result["sdkUserSig"] as? String) ?? "" + let isHighRiskUser = (result["isHighRiskUser"] as? Bool) ?? false + let isHighRiskIp = (result["isHighRiskIp"] as? Bool) ?? false + let loginType = (result["loginType"] as? String) ?? "" + return BSUserModel(token: token, + phone: phone, + email: email, + name: name, + avatar: avatar, + userId: userId, + appId: appId, + userSig: userSig, + apaasAppId: apaasAppId, + apaasUserId: apaasUserId, + sdkUserSig: sdkUserSig, + isHighRiskUser: isHighRiskUser, + isHighRiskIp: isHighRiskIp, + loginType: loginType) + } + + private func getSearchUserModel(_ result: [String: Any]) -> BSUserModel? { + guard let name = result["name"] as? String else { return nil } + guard let avatar = result["avatar"] as? String else { return nil } + guard let userId = result["userId"] as? String else { return nil } + let phone = (result["phone"] as? String) ?? "" + let email = (result["email"] as? String) ?? "" + let appId = (result["appId"] as? String) ?? "" + let userSig = (result["userSig"] as? String) ?? "" + let token = (result["token"] as? String) ?? "" + let apaasAppId = (result["apaasAppId"] as? String) ?? "" + let apaasUserId = (result["apaasUserId"] as? String) ?? "" + let sdkUserSig = (result["sdkUserSig"] as? String) ?? "" + let isHighRiskUser = (result["isHighRiskUser"] as? Bool) ?? false + let isHighRiskIp = (result["isHighRiskIp"] as? Bool) ?? false + let loginType = (result["loginType"] as? String) ?? "" + return BSUserModel(token: token, phone: phone, email: email, name: name, avatar: avatar, userId: userId, appId: appId, + userSig: userSig, apaasAppId: apaasAppId, apaasUserId: apaasUserId, sdkUserSig: sdkUserSig, + isHighRiskUser: isHighRiskUser, isHighRiskIp: isHighRiskIp, loginType: loginType) + } + + private func defaultAvatar() -> String { + return "https://liteav-test-1252463788.cos.ap-guangzhou.myqcloud.com/voice_room/voice_room_cover1.png" + } +} diff --git a/application/login/Components/Service/HttpService/Model/LoginConfig.swift b/application/login/Components/Service/HttpService/Model/LoginConfig.swift new file mode 100644 index 00000000..38d0c705 --- /dev/null +++ b/application/login/Components/Service/HttpService/Model/LoginConfig.swift @@ -0,0 +1,36 @@ +// +// LoginConfig.swift +// login +// + +import Foundation + +public struct LoginConfig: Equatable { + public let httpBaseUrl: String + + public let isSetupService: Bool + + public let sdkAppId: Int + + public let apaasAppId: String + + public let secretKey: String + + public static let `default` = LoginConfig( + httpBaseUrl: "", + isSetupService: true, + sdkAppId: 0, + apaasAppId: "", + secretKey: "" + ) + + public func withBaseUrl(_ newBaseUrl: String) -> LoginConfig { + LoginConfig( + httpBaseUrl: newBaseUrl, + isSetupService: isSetupService, + sdkAppId: sdkAppId, + apaasAppId: apaasAppId, + secretKey: secretKey + ) + } +} diff --git a/application/login/Components/Service/HttpService/Model/UserOverdueLogicManager.swift b/application/login/Components/Service/HttpService/Model/UserOverdueLogicManager.swift new file mode 100644 index 00000000..0570703a --- /dev/null +++ b/application/login/Components/Service/HttpService/Model/UserOverdueLogicManager.swift @@ -0,0 +1,85 @@ +// +// UserOverdueLogicManager.swift +// login +// + +import Foundation +import UIKit +import TUICore + +@objc public enum UserOverdueState: Int { + case notLogin = 0 + case alreadyLogged = 1 + case loggedAndOverdue = 2 +} + +public class UserOverdueLogicManager: NSObject { + private static let staticInstance: UserOverdueLogicManager = UserOverdueLogicManager() + public static func sharedManager() -> UserOverdueLogicManager { staticInstance } + + private override init() { + super.init() + viewModel = UserOverdueViewModel() + self.addObserver(viewModel, forKeyPath: "_userOverdueState", options: [.old, .new], context: nil) + } + + public var viewModel: UserOverdueViewModel! + + @objc dynamic private var _userOverdueState: UserOverdueState = .notLogin + weak var nowAlertController: UIAlertController? + + public var userOverdueState: UserOverdueState { + set { + switch newValue { + case .notLogin: + if _userOverdueState == .alreadyLogged { + _userOverdueState = newValue + } + case .alreadyLogged: + _userOverdueState = newValue + case .loggedAndOverdue: + _userOverdueState = newValue + } + } + get { + return _userOverdueState + } + } +} + +public class UserOverdueViewModel: NSObject { + public override func observeValue(forKeyPath keyPath: String?, of object: Any?, + change: [NSKeyValueChangeKey: Any]?, + context: UnsafeMutableRawPointer?) { + if keyPath == "_userOverdueState" { + if UserOverdueLogicManager.sharedManager().userOverdueState == .loggedAndOverdue { + DispatchQueue.main.asyncAfter(deadline: DispatchTime.now()) { + self.showOverdueAlertView() + } + } + } + } + + func showOverdueAlertView() { + if UserOverdueLogicManager.sharedManager().nowAlertController != nil { + return + } + let alertController = UIAlertController( + title: LoginLocalize("Demo.TRTC.LiveRoom.prompt"), + message: LoginLocalize("Demo.TRTC.Home.useroverduemessage"), + preferredStyle: .alert + ) + let sureAction = UIAlertAction(title: LoginLocalize("LoginNetwork.AppUtils.determine"), style: .default) { _ in + LoginEntry.shared.logout { _ in + LoginEntry.shared.onPassiveLogout?() + } + } + alertController.addAction(sureAction) + if let windowScene = UIApplication.shared.connectedScenes.first as? UIWindowScene, + let keyWindow = windowScene.windows.first(where: { $0.isKeyWindow }), + let rootViewController = keyWindow.rootViewController { + rootViewController.present(alertController, animated: true, completion: nil) + } + UserOverdueLogicManager.sharedManager().nowAlertController = alertController + } +} diff --git a/application/login/Components/Service/LoginNetworkService.swift b/application/login/Components/Service/LoginNetworkService.swift new file mode 100644 index 00000000..5f15cc9f --- /dev/null +++ b/application/login/Components/Service/LoginNetworkService.swift @@ -0,0 +1,312 @@ +// +// LoginNetworkService.swift +// login +// + +import Foundation +import TUICore + +public final class LoginNetworkService { + + public func sendSms( + phone: String, + captcha: CaptchaResult, + success: @escaping (_ sessionId: String) -> Void, + failed: @escaping (_ error: LoginError) -> Void + ) { + let param: [String: Any] = [ + "appId": captcha.appId, + "ticket": captcha.ticket, + "phone": phone, + "email": "", + "randstr": captcha.randstr, + ] + LoginManager.shared.getSms(param: param) { code, errorMessage, result in + if code == kAppLoginServiceSuccessCode { + guard let model = result["jsonModel"] as? HttpJsonModel, + let sessionId = model.sessionID + else { + failed(.verifyCodeFailed(message: errorMessage)) + return + } + success(sessionId) + } else { + if code == kAppLoginServiceIOTDenyCode { + failed(.verifyCodeFailed(message: LoginLocalize("LoginNetwork.ProfileManager.iotfailed"))) + } else { + failed(.verifyCodeFailed(message: errorMessage)) + } + } + } + } + + public func sendEmailVerifyCode( + email: String, + captcha: CaptchaResult, + success: @escaping (_ sessionId: String) -> Void, + failed: @escaping (_ error: LoginError) -> Void + ) { + let param: [String: Any] = [ + "appId": captcha.appId, + "ticket": captcha.ticket, + "phone": "", + "email": email, + "randstr": captcha.randstr, + ] + LoginManager.shared.getEmailVerifyCode(param: param) { code, errorMessage, result in + if code == kAppLoginServiceSuccessCode || code == 0 { + guard let model = result["jsonModel"] as? HttpJsonModel, + let sessionId = model.sessionID + else { + failed(.verifyCodeFailed(message: errorMessage)) + return + } + success(sessionId) + } else { + failed(.verifyCodeFailed(message: errorMessage)) + } + } + } + + public func loginByPhone( + phone: String, + sessionId: String, + code: String, + completion: @escaping (Result) -> Void + ) { + let param: [String: Any] = [ + "phone": phone, + "sessionId": sessionId, + "code": code, + "apaasAppId": LoginEntry.shared.config.apaasAppId, + ] + LoginManager.shared.loginByPhone(param: param) { [weak self] resultCode, errorMessage, _ in + if resultCode == kAppLoginServiceSuccessCode { + guard let self = self else { + completion(.failure(.unknown(message: "LoginNetworkService was deallocated"))) + return + } + self.handleLoginSuccess(mode: .phoneVerify, completion: completion) + } else { + LoginNetworkManager.processLoginFailCode(code: Int32(resultCode)) + completion(.failure(.loginFailed(code: resultCode, message: errorMessage))) + } + } + } + + public func loginByEmail( + email: String, + sessionId: String, + code: String, + completion: @escaping (Result) -> Void + ) { + let param: [String: Any] = [ + "email": email, + "sessionId": sessionId, + "code": code, + "apaasAppId": LoginEntry.shared.config.apaasAppId, + ] + LoginManager.shared.loginByEmail(param: param) { [weak self] resultCode, errorMessage, _ in + if resultCode == kAppLoginServiceSuccessCode { + guard let self = self else { + completion(.failure(.unknown(message: "LoginNetworkService was deallocated"))) + return + } + self.handleLoginSuccess(mode: .emailVerify, completion: completion) + } else { + LoginNetworkManager.processLoginFailCode(code: Int32(resultCode)) + completion(.failure(.loginFailed(code: resultCode, message: errorMessage))) + } + } + } + + public func loginByToken( + userId: String, + token: String, + originalMode: LoginMode, + completion: @escaping (Result) -> Void + ) { + let param: [String: Any] = [ + "userId": userId, + "token": token, + "apaasAppId": LoginEntry.shared.config.apaasAppId, + ] + LoginManager.shared.loginByToken(param: param) { [weak self] resultCode, _, _ in + if resultCode == kAppLoginServiceSuccessCode { + guard let self = self else { + completion(.failure(.unknown(message: "LoginNetworkService was deallocated"))) + return + } + self.handleLoginSuccess(mode: originalMode, completion: completion) + } else { + UserOverdueLogicManager.sharedManager().userOverdueState = .loggedAndOverdue + LoginNetworkManager.processLoginFailCode(code: Int32(resultCode)) + completion(.failure(.tokenExpired)) + } + } + } + + public func loginByMOA( + ticket: String, + completion: @escaping (Result) -> Void + ) { + LoginManager.shared.loginByMOA(ticket: ticket, success: { [weak self] _ in + guard let self = self else { + completion(.failure(.unknown(message: "LoginNetworkService was deallocated"))) + return + } + self.handleLoginSuccess(mode: .ioaAuth, completion: completion) + }, failed: { errorCode, errorMessage in + let errMsg = errorMessage ?? "iOA login failed" + LoginNetworkManager.processLoginFailCode(code: errorCode) + completion(.failure(.ioaAuthFailed(message: errMsg))) + }) + } + + public func noneAuthLogin( + invitationCode: String?, + completion: @escaping (Result) -> Void + ) { + LoginManager.shared.noneAuthLogin(withInvitationCode: invitationCode, success: { [weak self] _ in + guard let self = self else { + completion(.failure(.unknown(message: "LoginNetworkService was deallocated"))) + return + } + self.handleLoginSuccess(mode: .inviteCode, completion: completion) + }, failed: { errorCode, errorMessage in + let errMsg = errorMessage ?? "Login failed" + completion(.failure(.loginFailed(code: Int(errorCode), message: errMsg))) + }) + } + + public func logout(completion: @escaping (Result) -> Void) { + guard let user = LoginManager.shared.getCurrentUser() else { + completion(.failure(.unknown(message: "No current user"))) + return + } + let param: [String: Any] = [ + "userId": user.userId, + "token": user.token, + ] + LoginManager.shared.logout(param: param) { resultCode, errorMessage, _ in + if resultCode == kAppLoginServiceSuccessCode { + LoginManager.shared.removeLoginCache() + completion(.success(())) + } else { + completion(.failure(.networkError(message: errorMessage))) + } + } + } + + public func deleteAccount(completion: @escaping (Result) -> Void) { + guard let user = LoginManager.shared.getCurrentUser() else { + completion(.failure(.unknown(message: "No current user"))) + return + } + let param: [String: Any] = [ + "userId": user.userId, + "token": user.token, + ] + LoginManager.shared.logoff(param: param) { resultCode, errorMessage, _ in + if resultCode == kAppLoginServiceSuccessCode { + LoginManager.shared.removeLoginCache() + completion(.success(())) + } else { + completion(.failure(.networkError(message: errorMessage))) + } + } + } + + public func updateUserName( + name: String, + completion: @escaping (Result) -> Void + ) { + guard let user = LoginManager.shared.getCurrentUser() else { + completion(.failure(.unknown(message: "No current user"))) + return + } + let param: [String: Any] = [ + "currentUserModel": user, + "name": name, + ] + LoginManager.shared.userUpdate(param: param) { resultCode, errorMessage, _ in + if resultCode == kAppLoginServiceSuccessCode { + completion(.success(())) + } else { + completion(.failure(.networkError(message: errorMessage))) + } + } + } + + public func getCachedUser() -> UserModel? { + guard let user = LoginManager.shared.getCurrentUser() else { return nil } + return UserModel( + userId: user.userId, + token: user.token, + userSig: user.userSig, + phone: user.phone, + email: user.email, + name: user.name, + avatar: user.avatar + ) + } + + func getRawCachedUser() -> BSUserModel? { + return LoginManager.shared.getCurrentUser() + } + + public func requestInvitationCode( + email: String?, + completion: @escaping (Result) -> Void + ) { + LoginManager.shared.getInviteCode(email, success: { _ in + completion(.success(())) + }, failed: { errorCode, errorMessage in + let errMsg = errorMessage ?? "Request failed" + completion(.failure(.loginFailed(code: Int(errorCode), message: errMsg))) + }) + } + + public func needReceiveEmail( + email: String, + marketingStatus: Bool + ) { + LoginManager.shared.needReceiveEmail(email, marketingStatus) + } + + public func getUserModuleBlackList( + completion: @escaping (Result) -> Void + ) { + LoginManager.shared.getUserModuleBlackList(success: { _ in + completion(.success(())) + }, failed: { _, errorMessage in + let errMsg = errorMessage ?? "Request failed" + completion(.failure(.networkError(message: errMsg))) + }) + } + + private func handleLoginSuccess(mode: LoginMode, + completion: @escaping (Result) -> Void + ) { + guard let rawUser = LoginManager.shared.getCurrentUser() else { + completion(.failure(.loginFailed(code: -1, message: "Login succeeded but user data not found"))) + return + } + + let userModel = UserModel( + userId: rawUser.userId, + token: rawUser.token, + userSig: rawUser.userSig, + phone: rawUser.phone, + email: rawUser.email, + name: rawUser.name, + avatar: rawUser.avatar + ) + let loginResult = LoginResult(userModel: userModel, mode: mode) + completion(.success(loginResult)) + } + + public func startKeepAlive() { + LoginManager.shared.keepAlive() + } +} diff --git a/application/login/Components/Service/TUILoginListenerHandler.swift b/application/login/Components/Service/TUILoginListenerHandler.swift new file mode 100644 index 00000000..0f0f9738 --- /dev/null +++ b/application/login/Components/Service/TUILoginListenerHandler.swift @@ -0,0 +1,47 @@ +// +// TUILoginListenerHandler.swift +// Login +// + +import Foundation +import TUICore + +// MARK: - TUILoginListenerHandler + +final class TUILoginListenerHandler: NSObject, AppLifecycleHandler { + + static let shared = TUILoginListenerHandler() + private override init() { super.init() } + + func register() { + AppLifecycleRegistry.shared.register(self) + } + + // MARK: - AppLifecycleHandler + + func applicationDidFinishLaunching(_ application: UIApplication) { + TUILogin.add(self) + } +} + +// MARK: - TUILoginListener + +extension TUILoginListenerHandler: TUILoginListener { + func onConnecting() {} + + func onConnectSuccess() {} + + func onConnectFailed(_ code: Int32, err: String!) {} + + func onKickedOffline() { + DispatchQueue.main.asyncAfter(deadline: .now() + 1.0) { + UserOverdueLogicManager.sharedManager().userOverdueState = .loggedAndOverdue + } + } + + func onUserSigExpired() { + DispatchQueue.main.asyncAfter(deadline: .now() + 1.0) { + UserOverdueLogicManager.sharedManager().userOverdueState = .loggedAndOverdue + } + } +} diff --git a/application/login/Components/Views/AvatarListAlertView.swift b/application/login/Components/Views/AvatarListAlertView.swift new file mode 100644 index 00000000..727de1ef --- /dev/null +++ b/application/login/Components/Views/AvatarListAlertView.swift @@ -0,0 +1,292 @@ +// +// AvatarListAlertView.swift +// login +// + +import UIKit +import AtomicX +import Kingfisher + +class AlertContentView: UIView { + lazy var bgView: UIView = { + let view = UIView(frame: .zero) + view.backgroundColor = .black + view.alpha = 0.6 + return view + }() + lazy var contentView: UIView = { + let view = UIView(frame: .zero) + view.backgroundColor = ThemeStore.shared.colorTokens.bgColorOperate + return view + }() + + lazy var titleLabel: UILabel = { + let label = UILabel(frame: .zero) + label.textColor = ThemeStore.shared.colorTokens.textColorPrimary + label.font = ThemeStore.shared.typographyTokens.Medium24 + return label + }() + + public var willDismiss: (()->())? + public var didDismiss: (()->())? + + let viewModel: AvatarViewModel + + public init(frame: CGRect = .zero, viewModel: AvatarViewModel) { + self.viewModel = viewModel + super.init(frame: frame) + contentView.transform = CGAffineTransform(translationX: 0, y: ScreenHeight) + alpha = 0 + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + private var isViewReady = false + override func didMoveToWindow() { + super.didMoveToWindow() + guard !isViewReady else { + return + } + isViewReady = true + constructViewHierarchy() + activateConstraints() + bindInteraction() + } + + public func show() { + UIView.animate(withDuration: 0.3) { + self.alpha = 1 + self.contentView.transform = .identity + } + } + + public func dismiss() { + if let action = willDismiss { + action() + } + UIView.animate(withDuration: 0.3) { + self.alpha = 0 + self.contentView.transform = CGAffineTransform(translationX: 0, y: ScreenHeight) + } completion: { (finish) in + if let action = self.didDismiss { + action() + } + self.removeFromSuperview() + } + } + + override func touchesBegan(_ touches: Set, with event: UIEvent?) { + guard let point = touches.first?.location(in: self) else { + return + } + if !contentView.frame.contains(point) { + dismiss() + } + } + + override func draw(_ rect: CGRect) { + super.draw(rect) + contentView.roundedRect(rect: contentView.bounds, byRoundingCorners: [.topLeft, .topRight], cornerRadii: CGSize(width: 20, height: 20)) + } + + func constructViewHierarchy() { + addSubview(bgView) + addSubview(contentView) + contentView.addSubview(titleLabel) + } + func activateConstraints() { + bgView.snp.makeConstraints { (make) in + make.edges.equalToSuperview() + } + contentView.snp.makeConstraints { (make) in + make.leading.trailing.bottom.equalToSuperview() + } + titleLabel.snp.makeConstraints { (make) in + make.leading.equalToSuperview().offset(20) + make.top.equalToSuperview().offset(32) + } + } + func bindInteraction() { + } +} + +// MARK: - AvatarListAlertView + +class AvatarListAlertView: AlertContentView { + + lazy var confirmBtn: UIButton = { + let btn = UIButton(type: .system) + btn.setTitle(LoginLocalize("Demo.TRTC.Login.done"), for: .normal) + btn.titleLabel?.font = ThemeStore.shared.typographyTokens.Medium16 + btn.isEnabled = false + return btn + }() + + lazy var collectionView: UICollectionView = { + let itemWH = (ScreenWidth - 20 * 5) / 4 + let layout = UICollectionViewFlowLayout() + layout.scrollDirection = .vertical + layout.itemSize = CGSize(width: itemWH, height: itemWH) + layout.minimumLineSpacing = 20 + layout.minimumInteritemSpacing = 20 + let collectionView = UICollectionView(frame: .zero, collectionViewLayout: layout) + collectionView.contentInset = UIEdgeInsets(top: 20, left: 20, bottom: 20, right: 20) + collectionView.showsVerticalScrollIndicator = false + collectionView.showsHorizontalScrollIndicator = false + collectionView.backgroundColor = .clear + return collectionView + }() + + override init(frame: CGRect = .zero, viewModel: AvatarViewModel) { + super.init(frame: frame, viewModel: viewModel) + titleLabel.font = ThemeStore.shared.typographyTokens.Medium20 + titleLabel.text = LoginLocalize("Demo.TRTC.Login.setavatar") + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + override func constructViewHierarchy() { + super.constructViewHierarchy() + contentView.addSubview(collectionView) + contentView.addSubview(confirmBtn) + } + override func activateConstraints() { + super.activateConstraints() + collectionView.snp.makeConstraints { (make) in + make.leading.bottom.trailing.equalToSuperview() + make.top.equalTo(titleLabel.snp.bottom) + make.height.equalTo(convertPixel(h: 440)) + } + confirmBtn.snp.makeConstraints { (make) in + make.trailing.equalToSuperview().offset(-20) + make.centerY.equalTo(titleLabel) + } + } + override func bindInteraction() { + super.bindInteraction() + + confirmBtn.addTarget(self, action: #selector(confirmBtnClick), for: .touchUpInside) + + collectionView.delegate = self + collectionView.dataSource = self + collectionView.register(AvatarListCell.self, forCellWithReuseIdentifier: "AvatarListCell") + } + + public var didClickConfirmBtn: (()->())? + + @objc func confirmBtnClick() { + guard let _ = viewModel.currentSelectAvatarModel else { + return + } + + if let action = didClickConfirmBtn { + action() + } + dismiss() + } + + override func dismiss() { + super.dismiss() + viewModel.currentSelectAvatarModel = nil + } +} + +extension AvatarListAlertView: UICollectionViewDataSource { + func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { + return viewModel.avatarListDataSource.count + } + func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { + let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "AvatarListCell", for: indexPath) + if let scell = cell as? AvatarListCell { + let model = viewModel.avatarListDataSource[indexPath.item] + scell.model = model + } + return cell + } +} + +extension AvatarListAlertView: UICollectionViewDelegate { + func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { + viewModel.currentSelectAvatarModel = viewModel.avatarListDataSource[indexPath.item] + confirmBtn.isEnabled = true + } +} + +// MARK: - AvatarListCell + +class AvatarListCell: UICollectionViewCell { + + var model: AvatarModel? { + didSet { + guard let model = model else { return } + if let url = URL.init(string: model.url) { + headImageView.kf.setImage(with: .network(url)) + } + } + } + + override var isSelected: Bool { + didSet { + selectView.isHidden = !isSelected + } + } + + lazy var headImageView: UIImageView = { + let imageV = UIImageView(frame: .zero) + imageV.contentMode = .scaleAspectFill + imageV.clipsToBounds = true + return imageV + }() + + lazy var selectView: UIView = { + let view = UIView(frame: .zero) + view.backgroundColor = .clear + view.isHidden = true + return view + }() + + override init(frame: CGRect) { + super.init(frame: frame) + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + override func draw(_ rect: CGRect) { + super.draw(rect) + headImageView.layer.cornerRadius = frame.height * 0.5 + selectView.layer.cornerRadius = selectView.frame.height * 0.5 + selectView.layer.borderWidth = 3 + selectView.layer.borderColor = ThemeStore.shared.colorTokens.buttonColorPrimaryDefault.cgColor + } + + private var isViewReady = false + override func didMoveToWindow() { + super.didMoveToWindow() + guard !isViewReady else { + return + } + isViewReady = true + constructViewHierarchy() + activateConstraints() + } + + func constructViewHierarchy() { + contentView.addSubview(headImageView) + headImageView.addSubview(selectView) + } + + func activateConstraints() { + headImageView.snp.makeConstraints { (make) in + make.edges.equalToSuperview() + } + selectView.snp.makeConstraints { (make) in + make.edges.equalToSuperview() + } + } +} diff --git a/application/login/Components/Views/CountdownButton.swift b/application/login/Components/Views/CountdownButton.swift new file mode 100644 index 00000000..9f512405 --- /dev/null +++ b/application/login/Components/Views/CountdownButton.swift @@ -0,0 +1,87 @@ +// +// CountdownButton.swift +// login +// + +import UIKit +import AtomicX + +class CountdownButton: UIButton { + + private var countdownTimer: Timer? + private(set) var countdown: Int = 0 + + override init(frame: CGRect) { + super.init(frame: frame) + setupStyle() + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + private func setupStyle() { + setTitle(LoginLocalize("V2.Live.LinkMicNew.getverificationcode"), for: .normal) + setTitle(LoginLocalize("V2.Live.LinkMicNew.getverificationcode"), for: .disabled) + titleLabel?.font = ThemeStore.shared.typographyTokens.Medium16 + setTitleColor(ThemeStore.shared.colorTokens.buttonColorPrimaryDefault, for: .normal) + setTitleColor(ThemeStore.shared.colorTokens.textColorDisable, for: .disabled) + adjustsImageWhenHighlighted = false + isEnabled = false + } + + // MARK: - Public + + func startCountdown(duration: Int = 60) { + stopCountdown() + countdown = duration + isUserInteractionEnabled = false + updateTitle() + + countdownTimer = Timer.scheduledTimer(withTimeInterval: 1.0, repeats: true) { [weak self] _ in + guard let self = self else { return } + self.countdown -= 1 + if self.countdown <= 0 { + self.stopCountdown() + } else { + self.updateTitle() + } + } + } + + func stopCountdown() { + countdownTimer?.invalidate() + countdownTimer = nil + countdown = 0 + isUserInteractionEnabled = true + resetTitle() + } + + func updateCountdown(_ value: Int) { + countdown = value + if value > 0 { + isUserInteractionEnabled = false + updateTitle() + } else { + stopCountdown() + } + } + + // MARK: - Private + + private func updateTitle() { + setTitle("\(countdown)s", for: .normal) + setTitle("\(countdown)s", for: .disabled) + sizeToFit() + } + + private func resetTitle() { + setTitle(LoginLocalize("V2.Live.LinkMicNew.getverificationcode"), for: .normal) + setTitle(LoginLocalize("V2.Live.LinkMicNew.getverificationcode"), for: .disabled) + sizeToFit() + } + + deinit { + countdownTimer?.invalidate() + } +} diff --git a/application/login/Components/Views/FullScreenLoadingView.swift b/application/login/Components/Views/FullScreenLoadingView.swift new file mode 100644 index 00000000..2d6e9ed8 --- /dev/null +++ b/application/login/Components/Views/FullScreenLoadingView.swift @@ -0,0 +1,133 @@ +// +// FullScreenLoadingView.swift +// login +// + +import UIKit +import SnapKit +import AtomicX + +public class FullScreenLoadingView: UIView { + + // MARK: - Properties + + private let containerView: UIView = { + let view = UIView() + view.backgroundColor = ThemeStore.shared.colorTokens.bgColorMask + return view + }() + + private lazy var blurEffectView: UIVisualEffectView = { + if #available(iOS 13.0, *) { + let blurEffect = UIBlurEffect(style: .systemUltraThinMaterialDark) + let view = UIVisualEffectView(effect: blurEffect) + return view + } else { + return UIVisualEffectView() + } + }() + + private let contentContainerView: UIView = { + let view = UIView() + return view + }() + + private let loadingImageView: UIImageView = { + let imageView = UIImageView() + imageView.image = UIImage.loginImage(named: "loading") + imageView.contentMode = .scaleAspectFit + imageView.alpha = 0.9 + return imageView + }() + + private let loadingLabel: UILabel = { + let label = UILabel() + label.textColor = .white + label.font = ThemeStore.shared.typographyTokens.Regular14 + label.textAlignment = .left + label.text = LoginLocalize("Demo.TRTC.Login.loading") + return label + }() + + // MARK: - Initialization + + public override init(frame: CGRect) { + super.init(frame: frame) + setupUI() + startRotationAnimation() + isHidden = true + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + // MARK: - Setup + + private func setupUI() { + addSubview(containerView) + containerView.snp.makeConstraints { make in + make.edges.equalToSuperview() + } + + if #available(iOS 13.0, *) { + containerView.addSubview(blurEffectView) + blurEffectView.snp.makeConstraints { make in + make.edges.equalToSuperview() + } + blurEffectView.alpha = 0.3 + } + + containerView.addSubview(contentContainerView) + contentContainerView.addSubview(loadingImageView) + contentContainerView.addSubview(loadingLabel) + + setupConstraints() + } + + private func setupConstraints() { + contentContainerView.snp.makeConstraints { make in + make.center.equalToSuperview() + make.height.equalTo(22) + } + + loadingImageView.snp.makeConstraints { make in + make.leading.equalToSuperview() + make.centerY.equalToSuperview() + make.width.height.equalTo(20) + } + + loadingLabel.snp.makeConstraints { make in + make.leading.equalTo(loadingImageView.snp.trailing).offset(8) + make.trailing.equalToSuperview() + make.centerY.equalToSuperview() + make.height.equalTo(22) + } + } + + private func startRotationAnimation() { + let rotation = CABasicAnimation(keyPath: "transform.rotation.z") + rotation.toValue = NSNumber(value: Double.pi * 2) + rotation.duration = 1.0 + rotation.isCumulative = true + rotation.repeatCount = Float.greatestFiniteMagnitude + loadingImageView.layer.add(rotation, forKey: "rotationAnimation") + } + + private func setMessage(_ message: String?) { + loadingLabel.text = message ?? LoginLocalize("Demo.TRTC.Login.ioaLoading") + } + + // MARK: - Public Methods + + public func show(with message: String? = nil) { + if let message = message { + setMessage(message) + } + isHidden = false + } + + public func hide() { + isHidden = true + } +} diff --git a/application/login/Components/Views/InvitationBubbleView.swift b/application/login/Components/Views/InvitationBubbleView.swift new file mode 100644 index 00000000..4f6ba3cf --- /dev/null +++ b/application/login/Components/Views/InvitationBubbleView.swift @@ -0,0 +1,84 @@ +// +// InvitationBubbleView.swift +// login +// + +import UIKit +import AtomicX + +class InvitationBubbleView: UIView { + + var cornerRadius: CGFloat = 6 + var triangleWidth: CGFloat = 10 + var triangleHeight: CGFloat = 6 + var triangleOffset: CGFloat? + + lazy var label: UILabel = { + let label = UILabel() + label.numberOfLines = 0 + label.textAlignment = .center + label.font = ThemeStore.shared.typographyTokens.Medium14 + label.textColor = ThemeStore.shared.colorTokens.textColorButton + return label + }() + + override init(frame: CGRect) { + super.init(frame: frame) + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + private var isViewReady = false + override func didMoveToWindow() { + super.didMoveToWindow() + guard !isViewReady else { return } + isViewReady = true + constructViewHierarchy() + activateConstraints() + self.backgroundColor = .clear + } + + override func draw(_ rect: CGRect) { + let bubbleRect = CGRect( + x: 0, + y: 0, + width: rect.width, + height: rect.height - triangleHeight + ) + + let triangleX: CGFloat + if let offset = triangleOffset { + triangleX = offset + } else { + triangleX = (rect.width - triangleWidth) / 2 + } + let triangleY = rect.height - triangleHeight + + let path = UIBezierPath( + roundedRect: bubbleRect, + cornerRadius: cornerRadius + ) + + path.move(to: CGPoint(x: triangleX, y: triangleY)) + path.addLine(to: CGPoint(x: triangleX + triangleWidth / 2, y: rect.height)) + path.addLine(to: CGPoint(x: triangleX + triangleWidth, y: triangleY)) + path.close() + + ThemeStore.shared.colorTokens.textColorPrimary.setFill() + path.fill() + } + + private func constructViewHierarchy() { + addSubview(label) + } + + private func activateConstraints() { + label.snp.makeConstraints { make in + make.left.right.equalToSuperview().inset(8) + make.top.equalToSuperview().inset(4) + make.bottom.equalToSuperview().inset(triangleHeight + 4) + } + } +} diff --git a/application/login/Components/Views/LoginHeaderView.swift b/application/login/Components/Views/LoginHeaderView.swift new file mode 100644 index 00000000..0e5058e2 --- /dev/null +++ b/application/login/Components/Views/LoginHeaderView.swift @@ -0,0 +1,78 @@ +// +// LoginHeaderView.swift +// login +// + +import UIKit +import TUICore + +class LoginHeaderView: UIView { + + lazy var bgView: UIImageView = { + let imageView = UIImageView(image: UIImage.loginImage(named: "login_bg")) + return imageView + }() + + lazy var logoView: UIImageView = { + let imageView = UIImageView(image: UIImage.loginImage(named: getMainLogoStr())) + imageView.contentMode = .scaleAspectFit + return imageView + }() + + override init(frame: CGRect) { + super.init(frame: frame) + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + private var isViewReady = false + override func didMoveToWindow() { + super.didMoveToWindow() + guard !isViewReady else { return } + constructViewHierarchy() + activateConstraints() + bindInteraction() + isViewReady = true + } + + func constructViewHierarchy() { + addSubview(bgView) + bgView.addSubview(logoView) + } + + func activateConstraints() { + bgView.snp.makeConstraints { make in + make.top.leading.trailing.equalToSuperview() + make.height.equalTo(200) + } + logoView.snp.makeConstraints { make in + make.centerX.equalToSuperview() + make.bottom.equalToSuperview().offset(-20) + make.height.equalTo(48) + make.width.equalTo(213) + } + } + + func bindInteraction() { + + } + + func refreshLogo() { + logoView.image = UIImage.loginImage(named: getMainLogoStr()) + } + + private func getMainLogoStr() -> String { + guard let language = TUIGlobalization.getPreferredLanguage() else { + return "main_english_logo" + } + if language.contains("zh-Hans") { + return "main_simplified_chinese_logo" + } else if language.contains("zh-Hant") { + return "main_traditional_chinese_logo" + } else { + return "main_english_logo" + } + } +} diff --git a/application/login/Components/Views/LoginTextField.swift b/application/login/Components/Views/LoginTextField.swift new file mode 100644 index 00000000..9825a247 --- /dev/null +++ b/application/login/Components/Views/LoginTextField.swift @@ -0,0 +1,29 @@ +// +// LoginTextField.swift +// login +// + +import UIKit +import AtomicX + +class LoginTextField: UITextField { + + init(placeholder: String) { + super.init(frame: .zero) + let tokens = ThemeStore.shared + backgroundColor = tokens.colorTokens.bgColorOperate + font = tokens.typographyTokens.Regular16 + textColor = tokens.colorTokens.textColorPrimary + attributedPlaceholder = NSAttributedString( + string: placeholder, + attributes: [ + NSAttributedString.Key.font: tokens.typographyTokens.Regular16, + NSAttributedString.Key.foregroundColor: tokens.colorTokens.textColorDisable, + ] + ) + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } +} diff --git a/application/login/Components/Views/PrivacyAgreementView.swift b/application/login/Components/Views/PrivacyAgreementView.swift new file mode 100644 index 00000000..e2171dc3 --- /dev/null +++ b/application/login/Components/Views/PrivacyAgreementView.swift @@ -0,0 +1,163 @@ +// +// PrivacyAgreementView.swift +// login +// + +import UIKit +import AtomicX + +class AgreementButton: UIButton { + override func point(inside point: CGPoint, with event: UIEvent?) -> Bool { + if (bounds.size.width <= 16) && (bounds.size.height <= 16) { + let expandSize: CGFloat = 16.0 + let x = bounds.origin.x - expandSize + let y = bounds.origin.y - expandSize + let width = bounds.size.width + 2 * expandSize + let height = bounds.size.height + 2 * expandSize + let buttonRect = CGRect(x: x, y: y, width: width, height: height) + return buttonRect.contains(point) + } else { + return super.point(inside: point, with: event) + } + } +} + +class LoginAgreementTextView: UITextView { + override var canBecomeFirstResponder: Bool { + return false + } +} + +// MARK: - PrivacyAgreementView + +class PrivacyAgreementView: UIView { + + weak var hostViewController: UIViewController? + + var isAgreed: Bool { + return agreementButton.isSelected + } + + lazy var agreementButton: AgreementButton = { + let button = AgreementButton(type: .custom) + button.setImage(UIImage.loginImage(named: "checkbox_nor"), for: .normal) + button.setImage(UIImage.loginImage(named: "checkbox_sel"), for: .selected) + button.sizeToFit() + button.imageView?.contentMode = .scaleAspectFill + return button + }() + + lazy var agreementTextView: LoginAgreementTextView = { + let textView = LoginAgreementTextView(frame: .zero, textContainer: nil) + textView.delegate = self + textView.backgroundColor = ThemeStore.shared.colorTokens.bgColorOperate + textView.isEditable = false + textView.textContainerInset = .zero + textView.textContainer.lineFragmentPadding = 0 + textView.dataDetectorTypes = .link + textView.textAlignment = .left + let totalStr = LoginLocalize("Demo.TRTC.Portal.privateandagreement", + LoginLocalize("Demo.TRTC.Portal."), + LoginLocalize("Demo.TRTC.Portal."), + LoginLocalize("Demo.TRTC.Portal.")) + + let privaSummaryStr = LoginLocalize("Demo.TRTC.Portal.") + let privaStr = LoginLocalize("Demo.TRTC.Portal.") + let protoStr = LoginLocalize("Demo.TRTC.Portal.") + + guard let privaR = totalStr.range(of: privaStr), + let protoR = totalStr.range(of: protoStr), + let privaSummaryR = totalStr.range(of: privaSummaryStr) else { + return textView + } + + let totalRange = NSRange(location: 0, length: totalStr.count) + let privaSummaryRange = NSRange(privaSummaryR, in: totalStr) + let privaRange = NSRange(privaR, in: totalStr) + let protoRange = NSRange(protoR, in: totalStr) + + let attribute = NSMutableAttributedString(string: totalStr) + + let style = NSMutableParagraphStyle() + style.alignment = .left + style.lineBreakMode = .byWordWrapping + attribute.addAttribute(.paragraphStyle, value: style, range: totalRange) + + attribute.addAttribute(.font, value: ThemeStore.shared.typographyTokens.Regular14, range: totalRange) + attribute.addAttribute(.foregroundColor, value: UIColor.lightGray, range: totalRange) + + attribute.addAttribute(.link, value: "privacySummary", range: privaSummaryRange) + attribute.addAttribute(.link, value: "privacy", range: privaRange) + attribute.addAttribute(.link, value: "protocol", range: protoRange) + + attribute.addAttribute(.foregroundColor, value: UIColor.blue, range: privaSummaryRange) + attribute.addAttribute(.foregroundColor, value: UIColor.blue, range: privaRange) + attribute.addAttribute(.foregroundColor, value: UIColor.blue, range: protoRange) + textView.attributedText = attribute + return textView + }() + + override init(frame: CGRect) { + super.init(frame: frame) + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + private var isViewReady = false + override func didMoveToWindow() { + super.didMoveToWindow() + guard !isViewReady else { return } + constructViewHierarchy() + activateConstraints() + bindInteraction() + isViewReady = true + } + + func constructViewHierarchy() { + addSubview(agreementButton) + addSubview(agreementTextView) + bringSubviewToFront(agreementButton) + } + + func activateConstraints() { + agreementButton.snp.makeConstraints { make in + make.top.leading.equalToSuperview() + make.size.equalTo(CGSize(width: 16, height: 16)) + } + agreementTextView.snp.makeConstraints { make in + make.leading.equalTo(agreementButton.snp.trailing).offset(8) + make.top.equalTo(agreementButton).offset(convertPixel(h: -1)) + make.trailing.equalToSuperview() + make.height.equalTo(convertPixel(h: 40)) + } + } + + func bindInteraction() { + agreementButton.addTarget(self, action: #selector(agreementCheckboxBtnClick), for: .touchUpInside) + } + + @objc private func agreementCheckboxBtnClick() { + agreementButton.isSelected = !agreementButton.isSelected + } + + func setAgreed(_ agreed: Bool) { + agreementButton.isSelected = agreed + } +} + +// MARK: - UITextViewDelegate + +extension PrivacyAgreementView: UITextViewDelegate { + func textView(_ textView: UITextView, shouldInteractWith URL: URL, in characterRange: NSRange) -> Bool { + if URL.absoluteString == "privacy" { + LoginEntry.shared.privacyLinkHandler?("privacy", hostViewController) + } else if URL.absoluteString == "protocol" { + LoginEntry.shared.privacyLinkHandler?("agreement", hostViewController) + } else if URL.absoluteString == "privacySummary" { + LoginEntry.shared.privacyLinkHandler?("privacySummary", hostViewController) + } + return true + } +} diff --git a/application/login/Components/Views/PrivacyAlertView.swift b/application/login/Components/Views/PrivacyAlertView.swift new file mode 100644 index 00000000..7999f87c --- /dev/null +++ b/application/login/Components/Views/PrivacyAlertView.swift @@ -0,0 +1,210 @@ +// +// PrivacyAlertView.swift +// login +// + +import UIKit +import AtomicX + +class PrivacyAlertView: UIView { + lazy var containerView: UIView = { + let view = UIView(frame: .zero) + view.backgroundColor = ThemeStore.shared.colorTokens.bgColorOperate + view.layer.cornerRadius = ThemeStore.shared.borderRadius.radius6 + view.layer.borderWidth = 0.5 + view.layer.borderColor = UIColor.lightGray.cgColor + return view + }() + lazy var bgView: UIView = { + let view = UIView(frame: .zero) + view.backgroundColor = .black + view.alpha = 0.1 + return view + }() + lazy var titleLabel: UILabel = { + let label = UILabel(frame: .zero) + label.font = ThemeStore.shared.typographyTokens.Medium18 + label.textColor = ThemeStore.shared.colorTokens.textColorPrimary + label.text = LoginLocalize("Demo.TRTC.Login.welcome") + label.numberOfLines = 2 + label.adjustsFontSizeToFitWidth = true + label.minimumScaleFactor = 0.5 + label.textAlignment = .center + return label + }() + lazy var descTextView: LoginAgreementTextView = { + let textView = LoginAgreementTextView(frame: .zero) + textView.backgroundColor = .clear + textView.delegate = self + + let totalStr = LoginLocalize("Demo.TRTC.Portal.privatealertdescription", + LoginLocalize("Demo.TRTC.Portal."), + LoginLocalize("Demo.TRTC.Portal.")) + let privaStr = LoginLocalize("Demo.TRTC.Portal.") + let protoStr = LoginLocalize("Demo.TRTC.Portal.") + + guard let privaR = totalStr.range(of: privaStr), let protoR = totalStr.range(of: protoStr) else { + return textView + } + + let totalRange = NSRange(location: 0, length: totalStr.count) + let privaRange = NSRange(privaR, in: totalStr) + let protoRange = NSRange(protoR, in: totalStr) + + let attr = NSMutableAttributedString(string: totalStr) + + let style = NSMutableParagraphStyle() + style.alignment = .center + attr.addAttribute(.paragraphStyle, value: style, range: totalRange) + + attr.addAttribute(.font, value: ThemeStore.shared.typographyTokens.Regular14, range: totalRange) + attr.addAttribute(.foregroundColor, value: UIColor.darkGray, range: totalRange) + + attr.addAttribute(.link, value: "privacy", range: privaRange) + attr.addAttribute(.link, value: "protocol", range: protoRange) + + attr.addAttribute(.foregroundColor, value: UIColor.blue, range: privaRange) + attr.addAttribute(.foregroundColor, value: UIColor.blue, range: protoRange) + + textView.attributedText = attr + + return textView + }() + lazy var confirmBtn: UIButton = { + let btn = UIButton(type: .custom) + btn.setTitle(LoginLocalize("V2.Live.LinkMicNew.agree"), for: .normal) + btn.setTitleColor(.white, for: .normal) + btn.backgroundColor = .blue + return btn + }() + lazy var cancelBtn: UIButton = { + let btn = UIButton(type: .custom) + btn.setTitle(LoginLocalize("V2.Live.LinkMicNew.disagree"), for: .normal) + btn.setTitleColor(.black, for: .normal) + btn.backgroundColor = .clear + return btn + }() + lazy var lineView: UIView = { + let view = UIView(frame: .zero) + view.backgroundColor = .lightGray + return view + }() + + var didClickCancelBtn: (()->())? + var didClickConfirmBtn: (()->())? + var didDismiss: (()->())? + + let superVC: UIViewController + + init(superVC: UIViewController, frame: CGRect = .zero) { + self.superVC = superVC + super.init(frame: frame) + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + var isViewReady = false + override func didMoveToWindow() { + super.didMoveToWindow() + guard !isViewReady else { + return + } + isViewReady = true + constructViewHierarchy() + activateConstraints() + bindInteraction() + } + + func constructViewHierarchy() { + addSubview(bgView) + addSubview(containerView) + containerView.addSubview(titleLabel) + containerView.addSubview(descTextView) + containerView.addSubview(lineView) + containerView.addSubview(cancelBtn) + containerView.addSubview(confirmBtn) + } + func activateConstraints() { + bgView.snp.makeConstraints { (make) in + make.edges.equalToSuperview() + } + containerView.snp.makeConstraints { (make) in + make.leading.equalToSuperview().offset(40) + make.trailing.equalToSuperview().offset(-40) + make.centerY.equalToSuperview() + make.height.equalTo(containerView.snp.width).multipliedBy(0.8) + } + titleLabel.snp.makeConstraints { (make) in + make.top.equalToSuperview().offset(16) + make.leading.greaterThanOrEqualToSuperview() + make.trailing.lessThanOrEqualToSuperview() + make.centerX.equalToSuperview() + } + cancelBtn.snp.makeConstraints { (make) in + make.leading.equalToSuperview() + make.bottom.equalToSuperview() + make.width.equalToSuperview().multipliedBy(0.5) + make.height.equalTo(40) + } + confirmBtn.snp.makeConstraints { (make) in + make.trailing.equalToSuperview() + make.bottom.equalToSuperview() + make.width.equalToSuperview().multipliedBy(0.5) + make.height.equalTo(40) + } + lineView.snp.makeConstraints { (make) in + make.bottom.equalTo(cancelBtn.snp.top) + make.height.equalTo(0.5) + make.leading.equalToSuperview().offset(10) + make.trailing.equalToSuperview() + } + descTextView.snp.makeConstraints { (make) in + make.top.equalTo(titleLabel.snp.bottom).offset(10) + make.bottom.equalTo(cancelBtn.snp.top) + make.leading.trailing.equalToSuperview() + } + } + func bindInteraction() { + cancelBtn.addTarget(self, action: #selector(cancelBtnClick), for: .touchUpInside) + confirmBtn.addTarget(self, action: #selector(confirmBtnClick), for: .touchUpInside) + } + + @objc func cancelBtnClick() { + if let action = didClickCancelBtn { + action() + } + dismiss() + } + + @objc func confirmBtnClick() { + if let action = didClickConfirmBtn { + action() + } + dismiss() + } + + func dismiss() { + UIView.animate(withDuration: 0.3) { + self.alpha = 0 + } completion: { (finish) in + if let action = self.didDismiss { + action() + } + self.removeFromSuperview() + } + } +} + +extension PrivacyAlertView: UITextViewDelegate { + func textView(_ textView: UITextView, shouldInteractWith URL: URL, in characterRange: NSRange) -> Bool { + if URL.absoluteString == "privacy" { + LoginEntry.shared.privacyLinkHandler?("privacy", superVC) + } + else if URL.absoluteString == "protocol" { + LoginEntry.shared.privacyLinkHandler?("agreement", superVC) + } + return true + } +} diff --git a/application/login/Components/Views/PrivacyPanelView.swift b/application/login/Components/Views/PrivacyPanelView.swift new file mode 100644 index 00000000..adbab766 --- /dev/null +++ b/application/login/Components/Views/PrivacyPanelView.swift @@ -0,0 +1,198 @@ +// +// PrivacyPanelView.swift +// login +// + +import UIKit +import AtomicX + +class PrivacyPanelView: UIView { + weak var rootVC: UIViewController? + var onAgreeButtonClickedClosure: (() -> Void)? + var onDismissClosure: (() -> Void)? + + init() { + super.init(frame: .zero) + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + private lazy var bgView: UIView = { + let view = UIView() + view.backgroundColor = ThemeStore.shared.colorTokens.textColorPrimary + view.alpha = 0.7 + let blurFilter = CIFilter(name: "CIGaussianBlur") + blurFilter?.setValue(4, forKey: kCIInputRadiusKey) + view.layer.compositingFilter = blurFilter + view.isUserInteractionEnabled = true + return view + }() + + private lazy var contentView: UIView = { + let view = UIView() + view.backgroundColor = ThemeStore.shared.colorTokens.bgColorOperate + view.layer.cornerRadius = ThemeStore.shared.borderRadius.radius12 + view.layer.maskedCorners = [.layerMinXMinYCorner, .layerMaxXMinYCorner] + view.layer.masksToBounds = true + return view + }() + + private lazy var titleLabelView: UILabel = { + let label = UILabel() + label.font = ThemeStore.shared.typographyTokens.Medium16 + label.textColor = ThemeStore.shared.colorTokens.textColorSecondary + label.text = LoginLocalize("Demo.TRTC.Portal.readAndAgreeConditions") + label.textAlignment = .center + return label + }() + + private lazy var descTextView: LoginAgreementTextView = { + let textView = LoginAgreementTextView(frame: .zero, textContainer: nil) + textView.delegate = self + textView.backgroundColor = ThemeStore.shared.colorTokens.bgColorOperate + textView.isEditable = false + textView.textContainerInset = .zero + textView.textContainer.lineFragmentPadding = 0 + textView.dataDetectorTypes = .link + textView.textAlignment = .center + + let privaSummaryStr = LoginLocalize("Demo.TRTC.Portal.") + let privaStr = LoginLocalize("Demo.TRTC.Portal.") + let protoStr = LoginLocalize("Demo.TRTC.Portal.") + let totalStr = privaSummaryStr + privaStr + protoStr + + guard let privaR = totalStr.range(of: privaStr), + let protoR = totalStr.range(of: protoStr), + let privaSummaryR = totalStr.range(of: privaSummaryStr) else { + return textView + } + + let totalRange = NSRange(location: 0, length: totalStr.count) + let privaSummaryRange = NSRange(privaSummaryR, in: totalStr) + let privaRange = NSRange(privaR, in: totalStr) + let protoRange = NSRange(protoR, in: totalStr) + + let attribute = NSMutableAttributedString(string: totalStr) + + let style = NSMutableParagraphStyle() + style.alignment = .center + style.lineBreakMode = .byWordWrapping + attribute.addAttribute(.paragraphStyle, value: style, range: totalRange) + + attribute.addAttribute(.font, value: ThemeStore.shared.typographyTokens.Regular14, range: totalRange) + + attribute.addAttribute(.link, value: "privacySummary", range: privaSummaryRange) + attribute.addAttribute(.link, value: "privacy", range: privaRange) + attribute.addAttribute(.link, value: "protocol", range: protoRange) + + attribute.addAttribute(.foregroundColor, value: UIColor.blue, range: privaSummaryRange) + attribute.addAttribute(.foregroundColor, value: UIColor.blue, range: privaRange) + attribute.addAttribute(.foregroundColor, value: UIColor.blue, range: protoRange) + textView.attributedText = attribute + return textView + }() + + private lazy var agreeButton: UIButton = { + let button = UIButton() + button.setTitleColor(.white, for: .normal) + button.setTitle(LoginLocalize("Demo.TRTC.Portal.agreeAndContinue"), for: .normal) + button.titleLabel?.font = ThemeStore.shared.typographyTokens.Medium16 + button.backgroundColor = ThemeStore.shared.colorTokens.buttonColorPrimaryDefault + button.layer.cornerRadius = ThemeStore.shared.borderRadius.radius20 + button.layer.masksToBounds = true + return button + }() + + private var isViewReady = false + override func didMoveToWindow() { + super.didMoveToWindow() + guard !isViewReady else { return } + isViewReady = true + constructViewHierarchy() + activateConstraints() + bindInteraction() + } +} + +//MARK: - Private +extension PrivacyPanelView { + private func constructViewHierarchy() { + addSubview(bgView) + addSubview(contentView) + contentView.addSubview(titleLabelView) + contentView.addSubview(descTextView) + contentView.addSubview(agreeButton) + } + + private func activateConstraints() { + bgView.snp.makeConstraints { make in + make.edges.equalToSuperview() + } + + contentView.snp.makeConstraints { make in + make.leading.trailing.bottom.equalToSuperview() + make.height.equalTo(206) + } + + titleLabelView.snp.makeConstraints { make in + make.centerX.equalToSuperview() + make.top.equalToSuperview().inset(24) + make.height.equalTo(24) + } + + descTextView.snp.makeConstraints { make in + make.centerX.equalToSuperview() + make.top.equalTo(titleLabelView.snp.bottom).offset(24) + make.height.lessThanOrEqualTo(40) + make.leading.trailing.equalToSuperview().inset(16) + } + + agreeButton.snp.makeConstraints { make in + make.centerX.equalToSuperview() + make.top.equalTo(descTextView.snp.bottom).offset(24) + make.width.equalTo(315) + make.height.equalTo(40) + } + } + + private func bindInteraction() { + agreeButton.addTarget(self, action: #selector(onAgreeBtnClicked), for: .touchUpInside) + let tapGesture = UITapGestureRecognizer(target: self, action: #selector(bgViewTapped)) + bgView.addGestureRecognizer(tapGesture) + } + + @objc private func bgViewTapped() { + dismiss() + } + + @objc private func onAgreeBtnClicked() { + onAgreeButtonClickedClosure?() + dismiss() + } + + private func dismiss() { + UIView.animate(withDuration: 0.3) { [weak self] in + guard let self = self else { return } + self.alpha = 0 + } completion: { [weak self] _ in + guard let self = self else { return } + self.onDismissClosure?() + self.removeFromSuperview() + } + } +} + +extension PrivacyPanelView: UITextViewDelegate { + func textView(_ textView: UITextView, shouldInteractWith URL: URL, in characterRange: NSRange) -> Bool { + if URL.absoluteString == "privacy" { + LoginEntry.shared.privacyLinkHandler?("privacy", rootVC) + } else if URL.absoluteString == "protocol" { + LoginEntry.shared.privacyLinkHandler?("agreement", rootVC) + } else if URL.absoluteString == "privacySummary" { + LoginEntry.shared.privacyLinkHandler?("privacySummary", rootVC) + } + return true + } +} diff --git a/application/login/Components/Views/RegisterView.swift b/application/login/Components/Views/RegisterView.swift new file mode 100644 index 00000000..03ce6979 --- /dev/null +++ b/application/login/Components/Views/RegisterView.swift @@ -0,0 +1,366 @@ +// +// RegisterView.swift +// login +// + +import UIKit +import Kingfisher +import AtomicX + +class RegisterView: UIView { + + // MARK: - Callbacks + + var onRegisterButtonTapped: ((_ nickName: String, _ avatarURL: String) -> Void)? + var onHeadImageTapped: (() -> Void)? + + // MARK: - SubViews + + lazy var titleLabel: UILabel = { + let label = UILabel(frame: .zero) + label.font = ThemeStore.shared.typographyTokens.Regular20 + label.textColor = ThemeStore.shared.colorTokens.textColorPrimary + label.text = LoginLocalize("Demo.TRTC.Login.regist") + return label + }() + + lazy var subtitleLabel: UILabel = { + let label = UILabel(frame: .zero) + label.font = ThemeStore.shared.typographyTokens.Regular14 + label.textColor = ThemeStore.shared.colorTokens.textColorTertiary + label.text = LoginLocalize("Demo.TRTC.LoginMock.adduserinformationforfirstlogin") + label.numberOfLines = 0 + return label + }() + + lazy var headImageViewBtn: UIButton = { + let btn = UIButton(type: .custom) + btn.layer.cornerRadius = 50 + btn.clipsToBounds = true + btn.adjustsImageWhenHighlighted = false + return btn + }() + + lazy var textField: UITextField = { + let textField = UITextField(frame: .zero) + textField.backgroundColor = ThemeStore.shared.colorTokens.bgColorOperate + textField.font = ThemeStore.shared.typographyTokens.Regular16 + textField.textColor = ThemeStore.shared.colorTokens.textColorPrimary + textField.attributedPlaceholder = NSAttributedString( + string: LoginLocalize("Demo.TRTC.LoginMock.fillinusernickname"), + attributes: [ + .font: ThemeStore.shared.typographyTokens.Regular16, + .foregroundColor: ThemeStore.shared.colorTokens.textColorDisable, + ] + ) + textField.delegate = self + textField.text = nickNameArray.randomElement() ?? "" + return textField + }() + + lazy var textFieldSpacingLine: UIView = { + let view = UIView(frame: .zero) + view.backgroundColor = ThemeStore.shared.colorTokens.strokeColorSecondary + return view + }() + + lazy var descLabel: UILabel = { + let label = UILabel(frame: .zero) + label.font = ThemeStore.shared.typographyTokens.Regular16 + label.textColor = .darkGray + label.text = LoginLocalize("Demo.TRTC.Login.limit20count") + label.adjustsFontSizeToFitWidth = true + return label + }() + + lazy var footerLabel: UILabel = { + let label = UILabel(frame: .zero) + label.font = ThemeStore.shared.typographyTokens.Regular14 + label.textColor = ThemeStore.shared.colorTokens.textColorDisable + label.text = LoginLocalize("Demo.TRTC.Login.modifyLaterInSettings") + label.textAlignment = .center + return label + }() + + lazy var registBtn: UIButton = { + let btn = UIButton(type: .custom) + btn.setTitleColor(ThemeStore.shared.colorTokens.textColorButton, for: .normal) + btn.setTitle(LoginLocalize("Demo.TRTC.Login.regist"), for: .normal) + btn.adjustsImageWhenHighlighted = false + btn.setBackgroundImage(ThemeStore.shared.colorTokens.buttonColorPrimaryDefault.trans2Image(), for: .normal) + btn.titleLabel?.font = ThemeStore.shared.typographyTokens.Medium18 + btn.layer.shadowColor = ThemeStore.shared.colorTokens.buttonColorPrimaryDefault.cgColor + btn.layer.shadowOffset = CGSize(width: 0, height: 6) + btn.layer.shadowRadius = 16 + btn.layer.shadowOpacity = 0.4 + btn.layer.masksToBounds = true + btn.isEnabled = false + return btn + }() + + // MARK: - State + + private var selectedAvatarUrl: String? + private var canUse = true + private let enableColor = ThemeStore.shared.colorTokens.textColorDisable + private let disableColor = ThemeStore.shared.colorTokens.textColorError + + private lazy var nickNameArray: [String] = { + if let userModel = LoginManager.shared.getCurrentUser(), + userModel.isMoa(), + !userModel.name.isEmpty { + return [userModel.name] + } + var datas = [String]() + for i in 1..<34 { + datas.append(LoginLocalize("Demo.TRTC.login_custom_name_\(i)")) + } + return datas + }() + + // MARK: - Init + + override init(frame: CGRect) { + super.init(frame: frame) + backgroundColor = ThemeStore.shared.colorTokens.bgColorOperate + NotificationCenter.default.addObserver(self, selector: #selector(keyboardFrameChange(noti:)), + name: UIResponder.keyboardWillChangeFrameNotification, object: nil) + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + deinit { + NotificationCenter.default.removeObserver(self) + } + + // MARK: - Lifecycle + + override func draw(_ rect: CGRect) { + super.draw(rect) + registBtn.layer.cornerRadius = registBtn.frame.height * 0.5 + } + + override func touchesBegan(_ touches: Set, with event: UIEvent?) { + super.touchesBegan(touches, with: event) + textField.resignFirstResponder() + UIView.animate(withDuration: 0.3) { + self.transform = .identity + } + checkRegistBtnState() + } + + private var isViewReady = false + override func didMoveToWindow() { + super.didMoveToWindow() + guard !isViewReady else { return } + isViewReady = true + constructViewHierarchy() + activateConstraints() + bindInteraction() + initAvatar() + } + + // MARK: - Public + + func setAvatarURL(_ url: String) { + selectedAvatarUrl = url + if let imageURL = URL(string: url) { + headImageViewBtn.kf.setImage(with: .network(imageURL), for: .normal) + } + } + + // MARK: - UI Lifecycle Methods + + func constructViewHierarchy() { + addSubview(titleLabel) + addSubview(subtitleLabel) + addSubview(headImageViewBtn) + addSubview(textField) + addSubview(textFieldSpacingLine) + addSubview(descLabel) + addSubview(registBtn) + addSubview(footerLabel) + checkRegistBtnState(textField.text?.count ?? -1) + } + + func activateConstraints() { + titleLabel.snp.makeConstraints { make in + make.leading.equalToSuperview().offset(convertPixel(w: 40)) + make.top.equalToSuperview().offset(kDeviceSafeTopHeight + 10) + } + subtitleLabel.snp.makeConstraints { make in + make.leading.equalTo(titleLabel) + make.trailing.lessThanOrEqualToSuperview().offset(-convertPixel(w: 40)) + make.top.equalTo(titleLabel.snp.bottom).offset(6) + } + headImageViewBtn.snp.makeConstraints { make in + make.centerX.equalToSuperview() + make.top.equalTo(subtitleLabel.snp.bottom).offset(30) + make.size.equalTo(CGSize(width: 100, height: 100)) + } + textField.snp.makeConstraints { make in + make.top.equalTo(headImageViewBtn.snp.bottom).offset(convertPixel(h: 40)) + make.leading.equalToSuperview().offset(convertPixel(w: 40)) + make.trailing.equalToSuperview().offset(-convertPixel(w: 40)) + make.height.equalTo(convertPixel(h: 57)) + } + textFieldSpacingLine.snp.makeConstraints { make in + make.bottom.leading.trailing.equalTo(textField) + make.height.equalTo(1) + } + descLabel.snp.makeConstraints { make in + make.top.equalTo(textField.snp.bottom).offset(10) + make.leading.equalToSuperview().offset(convertPixel(w: 40)) + make.trailing.lessThanOrEqualToSuperview().offset(convertPixel(w: -40)) + } + registBtn.snp.makeConstraints { make in + make.top.equalTo(descLabel.snp.bottom).offset(convertPixel(h: 40)) + make.leading.equalToSuperview().offset(convertPixel(w: 20)) + make.trailing.equalToSuperview().offset(-convertPixel(w: 20)) + make.height.equalTo(convertPixel(h: 52)) + } + footerLabel.snp.makeConstraints { make in + make.centerX.equalToSuperview() + make.top.equalTo(registBtn.snp.bottom).offset(12) + } + } + + func bindInteraction() { + registBtn.addTarget(self, action: #selector(registBtnClick), for: .touchUpInside) + headImageViewBtn.addTarget(self, action: #selector(headBtnClick), for: .touchUpInside) + } + + // MARK: - Actions + + @objc private func headBtnClick() { + textField.resignFirstResponder() + UIView.animate(withDuration: 0.3) { + self.transform = .identity + } + onHeadImageTapped?() + } + + @objc private func registBtnClick() { + textField.resignFirstResponder() + guard let name = textField.text, !name.isEmpty else { return } + let avatarURL = selectedAvatarUrl ?? "" + + if let userModel = LoginManager.shared.getCurrentUser() { + if !avatarURL.isEmpty { + IMLogicRequest.synchronizUserInfo(currentUserModel: userModel, + avatar: avatarURL, + success: { _ in + debugPrint("set IM avatar and name success") + }, failed: { code, message in + debugPrint("set IM avatar and name errorStr: \(message ?? ""), errorCode: \(code)") + }) + } else { + IMLogicRequest.synchronizUserInfo(currentUserModel: userModel, name: name, success: { _ in + debugPrint("set IM name success") + }, failed: { code, message in + debugPrint("set IM name errorStr: \(message ?? ""), errorCode: \(code)") + }) + } + } + + onRegisterButtonTapped?(name, avatarURL) + } + + // MARK: - Private + + private func initAvatar() { + if let avatar = LoginManager.shared.getCurrentUser()?.avatar, !avatar.isEmpty, + let url = URL(string: avatar) { + headImageViewBtn.kf.setImage(with: .network(url), for: .normal) + selectedAvatarUrl = avatar + } else { + let model = AvatarViewModel() + let randomAvatar = model.avatarListDataSource[Int(arc4random()) % model.avatarListDataSource.count] + if let url = URL(string: randomAvatar.url) { + headImageViewBtn.kf.setImage(with: .network(url), for: .normal) + selectedAvatarUrl = randomAvatar.url + } + } + } + + @objc private func keyboardFrameChange(noti: Notification) { + guard let info = noti.userInfo else { return } + guard let value = info[UIResponder.keyboardFrameEndUserInfoKey], value is CGRect else { return } + guard let superview = textField.superview else { return } + let rect = value as! CGRect + let converted = superview.convert(textField.frame, to: self) + if rect.intersects(converted) { + transform = CGAffineTransform(translationX: 0, y: -converted.maxY + rect.minY) + } + } + + func checkRegistBtnState(_ count: Int = -1) { + var ctt = textField.text?.count ?? 0 + if count > -1 { + ctt = count + } + registBtn.isEnabled = canUse && ctt > 0 + } +} + +// MARK: - UITextFieldDelegate + +extension RegisterView: UITextFieldDelegate { + func textFieldDidBeginEditing(_ textField: UITextField) { + textField.becomeFirstResponder() + } + + func textFieldDidEndEditing(_ textField: UITextField) { + textField.resignFirstResponder() + UIView.animate(withDuration: 0.3) { + self.transform = .identity + } + checkRegistBtnState() + } + + func textFieldShouldReturn(_ textField: UITextField) -> Bool { + textField.resignFirstResponder() + checkRegistBtnState() + return true + } + + func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool { + let maxCount = 20 + guard let textFieldText = textField.text, + let rangeOfTextToReplace = Range(range, in: textFieldText) else { + return false + } + let substringToReplace = textFieldText[rangeOfTextToReplace] + let count = textFieldText.count - substringToReplace.count + string.count + let res = count <= maxCount + if res { + let newText = (textFieldText as NSString).replacingCharacters(in: range, with: string) + checkAlertTitleLState(newText) + checkRegistBtnState(count) + } + return res + } + + private func checkAlertTitleLState(_ text: String = "") { + if text.isEmpty { + if let str = textField.text { + canUse = validate(userName: str) + descLabel.textColor = canUse ? enableColor : disableColor + } else { + canUse = false + descLabel.textColor = disableColor + } + } else { + canUse = validate(userName: text) + descLabel.textColor = canUse ? enableColor : disableColor + } + } + + private func validate(userName: String) -> Bool { + let reg = "^[a-z0-9A-Z\\u4e00-\\u9fa5\\_]{2,20}$" + let predicate = NSPredicate(format: "SELF MATCHES %@", reg) + return predicate.evaluate(with: userName) + } +} diff --git a/application/login/Components/Views/UserAgreementView.swift b/application/login/Components/Views/UserAgreementView.swift new file mode 100644 index 00000000..f44f0ba1 --- /dev/null +++ b/application/login/Components/Views/UserAgreementView.swift @@ -0,0 +1,137 @@ +// +// UserAgreementView.swift +// login +// + +import UIKit +import WebKit +import SnapKit +import AtomicX + +class UserAgreementViewController: UIViewController { + static let UserAgreeKey = "UserAgreeKey" + + typealias Completion = () -> Void + var completion: Completion? = nil + + var topPadding: CGFloat = { + if #available(iOS 11.0, *) { + return UIApplication.shared.keyWindow?.safeAreaInsets.top ?? 0 + } + return 0 + }() + + var bottomPadding: CGFloat = { + if #available(iOS 11.0, *) { + return UIApplication.shared.keyWindow?.safeAreaInsets.bottom ?? 0 + } + return 0 + }() + + static func isAgree() -> Bool { + if let isAgree = UserDefaults.standard.object(forKey: UserAgreeKey) as? Bool { + return isAgree + } + return false + } + + override func viewDidLoad() { + super.viewDidLoad() + setupUI() + } + + deinit { + debugPrint("deinit \(self)") + } +} + +// MARK: - UI Setup +extension UserAgreementViewController { + func setupUI() { + title = LoginLocalize("V2.Live.LinkMicNew.termsandconditions") + view.backgroundColor = ThemeStore.shared.colorTokens.bgColorOperate + let htmlPath = Bundle.loginResources.path(forResource: "UserProtocol", ofType: "html") + var htmlContent = "" + do { + htmlContent = try String(contentsOfFile: htmlPath ?? "") + } catch { + } + + let lineView1 = UIView() + lineView1.backgroundColor = UIColor.gray + view.addSubview(lineView1) + lineView1.snp.remakeConstraints { (make) in + make.width.equalTo(view) + make.height.equalTo(0.5) + make.leading.equalTo(0) + make.bottom.equalTo(view).offset(-50 - bottomPadding) + } + + let lineView2 = UIView() + lineView2.backgroundColor = UIColor.gray + view.addSubview(lineView2) + lineView2.snp.remakeConstraints { (make) in + make.width.equalTo(0.5) + make.height.equalTo(49) + make.leading.equalTo(view.snp.trailing).dividedBy(2) + make.top.equalTo(lineView1.snp.bottom) + } + + let agreeBtn = UIButton() + agreeBtn.setTitle(LoginLocalize("V2.Live.LinkMicNew.agree"), for: .normal) + agreeBtn.setTitleColor(ThemeStore.shared.colorTokens.textColorLink, for: .normal) + view.addSubview(agreeBtn) + agreeBtn.snp.remakeConstraints { (make) in + make.width.equalTo(view).dividedBy(2) + make.height.equalTo(49) + make.leading.equalTo(view.snp.trailing).dividedBy(2) + make.top.equalTo(lineView1.snp.bottom) + } + agreeBtn.addTarget(self, action: #selector(agreeBtnTouchEvent(sender:)), for: .touchUpInside) + + let unAgreeBtn = UIButton() + unAgreeBtn.setTitle(LoginLocalize("V2.Live.LinkMicNew.disagree"), for: .normal) + unAgreeBtn.setTitleColor(ThemeStore.shared.colorTokens.textColorLink, for: .normal) + view.addSubview(unAgreeBtn) + unAgreeBtn.snp.remakeConstraints { (make) in + make.width.equalTo(view).dividedBy(2) + make.height.equalTo(49) + make.leading.equalTo(0) + make.top.equalTo(lineView1.snp.bottom) + } + unAgreeBtn.addTarget(self, action: #selector(unAgreeBtnTouchEvent(sender:)), for: .touchUpInside) + + let webView = WKWebView() + webView.loadHTMLString(htmlContent, baseURL: Bundle.main.bundleURL) + view.addSubview(webView) + webView.snp.remakeConstraints { (make) in + make.top.equalTo(topPadding) + make.bottom.equalTo(lineView1.snp.top) + make.leading.equalTo(0) + make.width.equalTo(view) + } + } + + func agree() { + UserDefaults.standard.set(true, forKey: UserAgreementViewController.UserAgreeKey) + UserDefaults.standard.synchronize() + self.dismiss(animated: true, completion: completion) + } + + func unAgree() { + UserDefaults.standard.set(false, forKey: UserAgreementViewController.UserAgreeKey) + UserDefaults.standard.synchronize() + self.dismiss(animated: true, completion: completion) + } +} + +// MARK: - UIButton TouchEvent +extension UserAgreementViewController { + @objc private func unAgreeBtnTouchEvent(sender: UIButton) { + unAgree() + } + + @objc private func agreeBtnTouchEvent(sender: UIButton) { + agree() + } +} diff --git a/application/login/Components/Views/VerifyCodeInputView.swift b/application/login/Components/Views/VerifyCodeInputView.swift new file mode 100644 index 00000000..d4df45c4 --- /dev/null +++ b/application/login/Components/Views/VerifyCodeInputView.swift @@ -0,0 +1,90 @@ +// +// VerifyCodeInputView.swift +// login +// + +import UIKit +import AtomicX + +class VerifyCodeInputView: UIView { + + var onTextChanged: ((String) -> Void)? + + lazy var textField: LoginTextField = { + let tf = LoginTextField(placeholder: LoginLocalize("V2.Live.LinkMicNew.enterverificationcode")) + tf.keyboardType = .numberPad + tf.layer.borderWidth = 1.0 + tf.layer.borderColor = ThemeStore.shared.colorTokens.strokeColorPrimary.cgColor + tf.layer.cornerRadius = 10.0 + tf.leftView = leftContainerView + tf.leftViewMode = .always + tf.delegate = self + return tf + }() + + lazy var getVerifyCodeButton: CountdownButton = { + let button = CountdownButton() + return button + }() + + private lazy var leftContainerView: UIView = { + let view = UIView(frame: CGRect(x: 0, y: 0, width: convertPixel(w: 42), height: convertPixel(h: 24))) + let iconView = UIImageView(frame: CGRect(x: 14, y: 0, width: convertPixel(w: 20), height: convertPixel(h: 20))) + iconView.contentMode = .scaleAspectFit + iconView.image = UIImage.loginImage(named: "login_safe") + iconView.center.y = view.center.y + view.addSubview(iconView) + return view + }() + + override init(frame: CGRect) { + super.init(frame: frame) + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + private var isViewReady = false + override func didMoveToWindow() { + super.didMoveToWindow() + guard !isViewReady else { return } + constructViewHierarchy() + activateConstraints() + isViewReady = true + } + + func constructViewHierarchy() { + addSubview(textField) + addSubview(getVerifyCodeButton) + } + + func activateConstraints() { + textField.snp.makeConstraints { make in + make.edges.equalToSuperview() + } + getVerifyCodeButton.snp.makeConstraints { make in + make.trailing.equalTo(textField).offset(convertPixel(w: -12)) + make.centerY.equalTo(textField) + } + } +} + +extension VerifyCodeInputView: UITextFieldDelegate { + func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool { + let maxCount = 6 + guard let textFieldText = textField.text, + let rangeOfTextToReplace = Range(range, in: textFieldText) else { + return false + } + let substringToReplace = textFieldText[rangeOfTextToReplace] + let count = textFieldText.count - substringToReplace.count + string.count + let res = count <= maxCount + if res { + DispatchQueue.main.asyncAfter(deadline: .now() + 0.05) { [weak self] in + self?.onTextChanged?(textField.text ?? "") + } + } + return res + } +} diff --git a/application/login/DebugAuth/DebugAuthView.swift b/application/login/DebugAuth/DebugAuthView.swift new file mode 100644 index 00000000..03574d6e --- /dev/null +++ b/application/login/DebugAuth/DebugAuthView.swift @@ -0,0 +1,106 @@ +// +// DebugAuthView.swift +// login +// + +import UIKit +import AtomicX +import Combine +import Toast_Swift + +class DebugAuthView: UIView { + + // MARK: - Dependencies + + let store: DebugAuthStore + private var cancellables = Set() + + // MARK: - SubViews + + lazy var debugConfigView: DebugConfigView = { + let view = DebugConfigView() + return view + }() + + // MARK: - Init + + init(store: DebugAuthStore) { + self.store = store + super.init(frame: .zero) + backgroundColor = ThemeStore.shared.colorTokens.bgColorOperate + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + // MARK: - Lifecycle + + private var isViewReady = false + override func didMoveToWindow() { + super.didMoveToWindow() + guard !isViewReady else { return } + constructViewHierarchy() + activateConstraints() + bindInteraction() + setupViewStyle() + isViewReady = true + } + + func constructViewHierarchy() { + addSubview(debugConfigView) + } + + func activateConstraints() { + debugConfigView.snp.makeConstraints { make in + make.edges.equalToSuperview() + } + } + + func bindInteraction() { + debugConfigView.accountTextField.text = store.state.userName + + debugConfigView.onLoginButtonTapped = { [weak self] in + guard let self = self else { return } + self.store.updateUserName(self.debugConfigView.accountTextField.text ?? "") + self.store.login() + } + + debugConfigView.onUserNameChanged = { [weak self] name in + self?.store.updateUserName(name) + } + + store.$state + .map(\.toastMessage) + .removeDuplicates() + .sink { [weak self] message in + guard !message.isEmpty else { return } + self?.makeToast(message) + } + .store(in: &cancellables) + + store.$state + .map(\.isLoginEnabled) + .removeDuplicates() + .sink { [weak self] isEnabled in + self?.debugConfigView.loginButton.isEnabled = isEnabled + } + .store(in: &cancellables) + + store.$state + .map(\.userName) + .removeDuplicates() + .filter { $0.isEmpty } + .dropFirst() + .receive(on: RunLoop.main) + .sink { [weak self] _ in + guard let self = self else { return } + self.debugConfigView.accountTextField.text = "" + self.debugConfigView.loginButton.isEnabled = true + self.hideAllToasts() + } + .store(in: &cancellables) + } + + func setupViewStyle() {} +} diff --git a/application/login/DebugAuth/Store/DebugAuthState.swift b/application/login/DebugAuth/Store/DebugAuthState.swift new file mode 100644 index 00000000..9306f629 --- /dev/null +++ b/application/login/DebugAuth/Store/DebugAuthState.swift @@ -0,0 +1,16 @@ +// +// DebugAuthState.swift +// login +// + +import Foundation + +public struct DebugAuthState { + public var userName: String = "" + public var isLoading: Bool = false + public var isLoginEnabled: Bool = true + public var toastMessage: String = "" + public var needsRegister: Bool = false + public var avatarURL: String = "" + public var nickName: String = "" +} diff --git a/application/login/DebugAuth/Store/DebugAuthStore.swift b/application/login/DebugAuth/Store/DebugAuthStore.swift new file mode 100644 index 00000000..7a398ce3 --- /dev/null +++ b/application/login/DebugAuth/Store/DebugAuthStore.swift @@ -0,0 +1,166 @@ +// +// DebugAuthStore.swift +// login +// + +import Foundation +import Combine +import TUICore + +class DebugAuthStore: LoginSubStore { + + // MARK: - State + + @Published private(set) var state = DebugAuthState() + + // MARK: - LoginSubStore + + private let resultSubject = PassthroughSubject, Never>() + var resultPublisher: AnyPublisher, Never> { + resultSubject.eraseToAnyPublisher() + } + + // MARK: - Callbacks + + var onNeedsRegister: (() -> Void)? + + private var logoutCancellable: AnyCancellable? + + // MARK: - Init + + init() { + logoutCancellable = subscribeLogout() + if let userModel = ProfileManager.shared.getCurrentUser() { + UserOverdueLogicManager.sharedManager().userOverdueState = .alreadyLogged + state.userName = userModel.userId + } + } + + // MARK: - LoginSubStore + + func resetState() { + state = DebugAuthState() + } + + // MARK: - Public Methods + + func updateUserName(_ name: String) { + state.userName = name + } + + func login() { + let phone = state.userName + guard !phone.isEmpty else { return } + + state.isLoginEnabled = false + state.isLoading = true + + DispatchQueue.main.asyncAfter(deadline: .now() + 4.0) { [weak self] in + self?.state.isLoginEnabled = true + } + + let config = LoginEntry.shared.config + guard let generator = LoginEntry.shared.userSigGenerator else { + state.isLoading = false + state.isLoginEnabled = true + return + } + let userSig = generator(phone, config.sdkAppId, config.secretKey) + + ProfileManager.shared.login(phone: phone, + name: "", + token: userSig) { [weak self] in + guard let self = self else { return } + self.state.isLoading = false + self.loginIM() + } + } + + func register(nickName: String) { + state.isLoading = true + + ProfileManager.shared.synchronizUserInfo() + ProfileManager.shared.setNickName(name: nickName) { [weak self] in + guard let self = self else { return } + let selector = NSSelectorFromString("getSelfUserInfo") + if TUILogin.responds(to: selector) { + TUILogin.perform(selector) + } + self.registerSuccess() + } failed: { [weak self] err in + guard let self = self else { return } + self.state.isLoading = false + self.state.toastMessage = err + } + } + + func updateAvatar(_ url: String) { + ProfileManager.shared.curUserModel?.avatar = url + state.avatarURL = url + } + + // MARK: - Private + + private func loginIM() { + guard let userID = ProfileManager.shared.curUserID() else { return } + let userSig = ProfileManager.shared.curUserSig() + + if TUILogin.getUserID() != userID { + ProfileManager.shared.curUserModel?.name = "" + } + + ProfileManager.shared.IMLogin(sdkAppId: LoginEntry.shared.config.sdkAppId, userSig: userSig) { [weak self] in + guard let self = self else { return } + self.loginSuccess() + } failed: { [weak self] error in + guard let self = self else { return } + self.state.toastMessage = LoginLocalize("LoginNetwork.ProfileManager.loginfailed") + UserOverdueLogicManager.sharedManager().userOverdueState = .loggedAndOverdue + } + } + + private func loginSuccess() { + if ProfileManager.shared.curUserModel?.name.count == 0 { + let avatarURL = ProfileManager.shared.curUserModel?.avatar ?? "" + let defaultAvatar = "https://liteav.sdk.qcloud.com/app/res/picture/voiceroom/avatar/user_avatar1.png" + + if avatarURL.isEmpty { + ProfileManager.shared.curUserModel?.avatar = defaultAvatar + } + + state.needsRegister = true + state.avatarURL = ProfileManager.shared.curUserModel?.avatar ?? defaultAvatar + onNeedsRegister?() + } else { + state.toastMessage = LoginLocalize("V2.Live.LinkMicNew.loginsuccess") + buildAndEmitResult() + } + } + + private func registerSuccess() { + state.isLoading = false + state.toastMessage = LoginLocalize("Demo.TRTC.Login.registsuccess") + ProfileManager.shared.localizeUserModel() + ProfileManager.shared.synchronizUserInfo() + buildAndEmitResult() + } + + private func buildAndEmitResult() { + guard let rawUser = ProfileManager.shared.curUserModel else { + resultSubject.send(.failure(.unknown(message: "User data not found"))) + return + } + let user = UserModel( + userId: rawUser.userId, + token: rawUser.token, + userSig: rawUser.userSig, + phone: rawUser.phone, + email: rawUser.email, + name: rawUser.name, + avatar: rawUser.avatar + ) + let loginResult = LoginResult(userModel: user, mode: .debugAuth) + + resultSubject.send(.success(loginResult)) + } +} diff --git a/application/login/DebugAuth/SubViews/DebugConfigView.swift b/application/login/DebugAuth/SubViews/DebugConfigView.swift new file mode 100644 index 00000000..e7560e9d --- /dev/null +++ b/application/login/DebugAuth/SubViews/DebugConfigView.swift @@ -0,0 +1,275 @@ +// +// DebugConfigView.swift +// login +// + +import UIKit +import TUICore +import AtomicX + +class DebugConfigView: UIView { + + var onLoginButtonTapped: (() -> Void)? + var onUserNameChanged: ((String) -> Void)? + + weak var currentTextField: UITextField? + + // MARK: - SubViews + + lazy var bgView: UIImageView = { + let imageView = UIImageView(image: UIImage.loginImage(named: "login_bg")) + return imageView + }() + + lazy var logoView: UIImageView = { + let imageView = UIImageView(image: UIImage.loginImage(named: getMainLogoStr())) + imageView.contentMode = .scaleAspectFit + return imageView + }() + + lazy var contentView: UIView = { + let view = UIView(frame: .zero) + view.backgroundColor = ThemeStore.shared.colorTokens.bgColorOperate + return view + }() + + lazy var accountTextField: UITextField = { + let textField = createTextField(LoginLocalize("Demo.TRTC.Login.enterUserName")) + textField.keyboardType = .default + textField.layer.borderWidth = 1.0 + textField.layer.borderColor = ThemeStore.shared.colorTokens.strokeColorPrimary.cgColor + textField.layer.cornerRadius = 5.0 + return textField + }() + + lazy var loginButton: UIButton = { + let button = UIButton(type: .custom) + button.setTitleColor(ThemeStore.shared.colorTokens.textColorButton, for: .normal) + button.setTitle(LoginLocalize("V2.Live.LoginMock.login"), for: .normal) + button.adjustsImageWhenHighlighted = false + button.setBackgroundImage(ThemeStore.shared.colorTokens.buttonColorPrimaryDefault.trans2Image(), for: .normal) + button.titleLabel?.font = ThemeStore.shared.typographyTokens.Medium18 + button.layer.shadowColor = ThemeStore.shared.colorTokens.buttonColorPrimaryDefault.cgColor + button.layer.shadowOffset = CGSize(width: 0, height: 6) + button.layer.shadowRadius = 16 + button.layer.shadowOpacity = 0.4 + button.layer.masksToBounds = true + button.isEnabled = false + return button + }() + + let versionTipLabel: UILabel = { + let tip = UILabel() + tip.textAlignment = .center + tip.font = ThemeStore.shared.typographyTokens.Regular14 + tip.textColor = ThemeStore.shared.colorTokens.textColorDisable + let appVersion = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String ?? "0.0.0" + let buildNumber = Bundle.main.infoDictionary?["CFBundleVersion"] as? String ?? "0" + tip.text = "Tencent Cloud Media Services v\(appVersion)(\(buildNumber))" + tip.adjustsFontSizeToFitWidth = true + return tip + }() + + private lazy var leftAccountTFContainerView: UIView = { + let iconSize: CGFloat = 20 + let horizontalPadding: CGFloat = 8 + let containerHeight: CGFloat = 24 + let containerWidth = iconSize + horizontalPadding * 2 + + let view = UIView(frame: CGRect(x: 0, y: 0, width: containerWidth, height: containerHeight)) + let iconView = UIImageView(frame: CGRect(x: horizontalPadding, y: (containerHeight - iconSize) / 2, width: iconSize, height: iconSize)) + iconView.contentMode = .scaleAspectFit + iconView.image = UIImage.loginImage(named: "login_phone") + view.addSubview(iconView) + return view + }() + + // MARK: - Init + + override init(frame: CGRect) { + super.init(frame: frame) + NotificationCenter.default.addObserver(self, selector: #selector(keyboardFrameChange(noti:)), + name: UIResponder.keyboardWillChangeFrameNotification, object: nil) + } + + deinit { + NotificationCenter.default.removeObserver(self) + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + // MARK: - Lifecycle + + override func draw(_ rect: CGRect) { + super.draw(rect) + loginButton.layer.cornerRadius = loginButton.frame.height * 0.5 + } + + override func touchesBegan(_ touches: Set, with event: UIEvent?) { + super.touchesBegan(touches, with: event) + if let current = currentTextField { + current.resignFirstResponder() + currentTextField = nil + } + UIView.animate(withDuration: 0.3) { + self.transform = .identity + } + } + + private var isViewReady = false + override func didMoveToWindow() { + super.didMoveToWindow() + loginButton.isEnabled = true + guard !isViewReady else { return } + isViewReady = true + constructViewHierarchy() + activateConstraints() + bindInteraction() + } + + func constructViewHierarchy() { + addSubview(bgView) + addSubview(contentView) + bgView.addSubview(logoView) + contentView.addSubview(accountTextField) + contentView.addSubview(loginButton) + contentView.addSubview(versionTipLabel) + } + + func activateConstraints() { + bgView.snp.makeConstraints { make in + make.top.leading.trailing.equalToSuperview() + make.height.equalTo(200) + } + logoView.snp.makeConstraints { make in + make.centerX.equalToSuperview() + make.bottom.equalToSuperview().offset(-20) + make.height.equalTo(48) + make.width.equalTo(213) + } + contentView.snp.makeConstraints { make in + make.top.equalTo(bgView.snp.bottom) + make.leading.trailing.bottom.equalToSuperview() + } + accountTextField.snp.makeConstraints { make in + make.top.equalToSuperview().offset(convertPixel(h: 40)) + make.leading.equalToSuperview().offset(convertPixel(w: 30)) + make.trailing.equalToSuperview().offset(-convertPixel(w: 30)) + make.height.equalTo(convertPixel(h: 57)) + } + loginButton.snp.makeConstraints { make in + make.top.equalTo(accountTextField.snp.bottom).offset(convertPixel(h: 50)) + make.leading.equalToSuperview().offset(convertPixel(w: 20)) + make.trailing.equalToSuperview().offset(-convertPixel(w: 20)) + make.height.equalTo(convertPixel(h: 52)) + } + versionTipLabel.snp.makeConstraints { make in + make.bottomMargin.equalTo(contentView).offset(-12) + make.leading.trailing.equalTo(contentView) + make.height.equalTo(30) + } + } + + func bindInteraction() { + loginButton.addTarget(self, action: #selector(loginBtnClick), for: .touchUpInside) + accountTextField.delegate = self + accountTextField.leftView = leftAccountTFContainerView + accountTextField.leftViewMode = .always + } + + // MARK: - Actions + + @objc private func loginBtnClick() { + currentTextField?.resignFirstResponder() + guard let userName = accountTextField.text, !userName.isEmpty else { return } + loginButton.isEnabled = false + onLoginButtonTapped?() + DispatchQueue.main.asyncAfter(deadline: .now() + 4.0) { [weak self] in + self?.loginButton.isEnabled = true + } + } + + @objc private func keyboardFrameChange(noti: Notification) { + guard let info = noti.userInfo, + let value = info[UIResponder.keyboardFrameEndUserInfoKey] as? CGRect, + let superview = loginButton.superview else { return } + let converted = superview.convert(loginButton.frame, to: self) + if value.intersects(converted) { + transform = CGAffineTransform(translationX: 0, y: -converted.maxY + value.minY) + } + } + + // MARK: - Helpers + + private func createTextField(_ placeholder: String) -> UITextField { + let textField = UITextField(frame: .zero) + textField.backgroundColor = ThemeStore.shared.colorTokens.bgColorOperate + textField.font = ThemeStore.shared.typographyTokens.Regular16 + textField.textColor = ThemeStore.shared.colorTokens.textColorPrimary + textField.attributedPlaceholder = NSAttributedString( + string: placeholder, + attributes: [ + .font: ThemeStore.shared.typographyTokens.Regular16, + .foregroundColor: ThemeStore.shared.colorTokens.textColorDisable, + ] + ) + return textField + } + + private func getMainLogoStr() -> String { + guard let language = TUIGlobalization.getPreferredLanguage() else { + return "main_english_logo" + } + if language.contains("zh-Hans") { + return "main_simplified_chinese_logo" + } else if language.contains("zh-Hant") { + return "main_traditional_chinese_logo" + } else { + return "main_english_logo" + } + } +} + +// MARK: - UITextFieldDelegate + +extension DebugConfigView: UITextFieldDelegate { + func textFieldDidBeginEditing(_ textField: UITextField) { + if let last = currentTextField { + last.resignFirstResponder() + } + currentTextField = textField + textField.becomeFirstResponder() + } + + func textFieldDidEndEditing(_ textField: UITextField) { + textField.resignFirstResponder() + currentTextField = nil + UIView.animate(withDuration: 0.3) { + self.transform = .identity + } + onUserNameChanged?(textField.text ?? "") + } + + func textFieldShouldReturn(_ textField: UITextField) -> Bool { + textField.resignFirstResponder() + return true + } + + func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool { + let maxCount = 11 + guard let textFieldText = textField.text, + let rangeOfTextToReplace = Range(range, in: textFieldText) else { return false } + let substringToReplace = textFieldText[rangeOfTextToReplace] + let count = textFieldText.count - substringToReplace.count + string.count + let res = count <= maxCount + if res { + loginButton.isEnabled = count > 0 + DispatchQueue.main.asyncAfter(deadline: .now() + 0.05) { [weak self] in + self?.onUserNameChanged?(textField.text ?? "") + } + } + return res + } +} diff --git a/application/login/DevLoginMenuViewController.swift b/application/login/DevLoginMenuViewController.swift new file mode 100644 index 00000000..b2a5458d --- /dev/null +++ b/application/login/DevLoginMenuViewController.swift @@ -0,0 +1,484 @@ +// +// DevLoginMenuViewController.swift +// login +// + +import SnapKit +import UIKit +import AtomicX + +private struct LoginMenuItem { + let title: String + let subtitle: String + let icon: String // SF Symbol name + let mode: LoginMode +} + +public enum ServerEnvironment: Int { + case production = 0 + case test = 1 + + var title: String { + switch self { + case .production: return LoginLocalize("Demo.TRTC.DevMenu.envProduction") + case .test: return LoginLocalize("Demo.TRTC.DevMenu.envTest") + } + } +} + +final class DevLoginMenuViewController: UIViewController { + var onSelectMode: ((LoginMode) -> Void)? + + var onEnvironmentChanged: ((ServerEnvironment) -> Void)? + + private(set) var currentEnvironment: ServerEnvironment = .production + + // MARK: - Data + + private let menuItems: [LoginMenuItem] = { + var items: [LoginMenuItem] = [ + LoginMenuItem( + title: LoginLocalize("Demo.TRTC.DevMenu.phoneLogin"), + subtitle: LoginLocalize("Demo.TRTC.DevMenu.phoneLoginDesc"), + icon: "phone.fill", + mode: .phoneVerify + ), + LoginMenuItem( + title: LoginLocalize("Demo.TRTC.DevMenu.emailLogin"), + subtitle: LoginLocalize("Demo.TRTC.DevMenu.emailLoginDesc"), + icon: "envelope.fill", + mode: .emailVerify + ), + ] + #if LOGIN_FULL + items.append(LoginMenuItem( + title: LoginLocalize("Demo.TRTC.DevMenu.ioaLogin"), + subtitle: LoginLocalize("Demo.TRTC.DevMenu.ioaLoginDesc"), + icon: "building.2.fill", + mode: .ioaAuth + )) + #endif + items.append(contentsOf: [ + LoginMenuItem( + title: LoginLocalize("Demo.TRTC.DevMenu.inviteCodeLogin"), + subtitle: LoginLocalize("Demo.TRTC.DevMenu.inviteCodeLoginDesc"), + icon: "ticket.fill", + mode: .inviteCode + ), + LoginMenuItem( + title: LoginLocalize("Demo.TRTC.DevMenu.debugLogin"), + subtitle: LoginLocalize("Demo.TRTC.DevMenu.debugLoginDesc"), + icon: "wrench.and.screwdriver.fill", + mode: .debugAuth + ), + ]) + return items + }() + + // MARK: - UI + + private lazy var headerView: LoginHeaderView = { + let view = LoginHeaderView() + return view + }() + + private lazy var tableView: UITableView = { + let tv = UITableView(frame: .zero, style: .plain) + tv.backgroundColor = ThemeStore.shared.colorTokens.bgColorOperate + tv.separatorStyle = .none + tv.showsVerticalScrollIndicator = false + tv.register(LoginMenuCell.self, forCellReuseIdentifier: LoginMenuCell.reuseID) + tv.dataSource = self + tv.delegate = self + tv.tableFooterView = buildTableFooterView() + return tv + }() + + private lazy var toggleContainer: UIStackView = { + let stack = UIStackView() + stack.axis = .horizontal + stack.spacing = 8 + stack.alignment = .center + return stack + }() + + private lazy var autoLoginToggleButton: UIButton = { + let button = UIButton(type: .system) + button.layer.cornerRadius = ThemeStore.shared.borderRadius.radius16 + button.clipsToBounds = true + button.titleLabel?.font = ThemeStore.shared.typographyTokens.Medium14 + button.contentEdgeInsets = UIEdgeInsets(top: 6, left: 14, bottom: 6, right: 26) + button.titleEdgeInsets = UIEdgeInsets(top: 0, left: 14, bottom: 0, right: -14) + button.addTarget(self, action: #selector(autoLoginToggleTapped), for: .touchUpInside) + return button + }() + + private lazy var autoLoginDotView: UIView = { + let dot = UIView() + dot.layer.cornerRadius = ThemeStore.shared.borderRadius.radius4 + dot.isUserInteractionEnabled = false + return dot + }() + + private lazy var envToggleButton: UIButton = { + let button = UIButton(type: .system) + button.layer.cornerRadius = ThemeStore.shared.borderRadius.radius16 + button.clipsToBounds = true + button.titleLabel?.font = ThemeStore.shared.typographyTokens.Medium14 + button.contentEdgeInsets = UIEdgeInsets(top: 6, left: 14, bottom: 6, right: 26) + button.titleEdgeInsets = UIEdgeInsets(top: 0, left: 14, bottom: 0, right: -14) + button.addTarget(self, action: #selector(envToggleTapped), for: .touchUpInside) + return button + }() + + private lazy var envDotView: UIView = { + let dot = UIView() + dot.layer.cornerRadius = ThemeStore.shared.borderRadius.radius4 + dot.isUserInteractionEnabled = false + return dot + }() + + // MARK: - Lifecycle + + override func viewDidLoad() { + super.viewDidLoad() + view.backgroundColor = ThemeStore.shared.colorTokens.bgColorOperate + constructViewHierarchy() + activateConstraints() + applyEnvToggleStyle(animated: false) + applyAutoLoginToggleStyle(animated: false) + } + + // MARK: - Setup + + private func constructViewHierarchy() { + view.addSubview(headerView) + view.addSubview(tableView) + } + + private func activateConstraints() { + headerView.snp.makeConstraints { make in + make.top.leading.trailing.equalToSuperview() + make.height.equalTo(200 + statusBarHeight()) + } + + tableView.snp.makeConstraints { make in + make.top.equalTo(headerView.snp.bottom) + make.leading.trailing.bottom.equalToSuperview() + } + } + + // MARK: - TableView Footer + + private func buildTableFooterView() -> UIView { + let wrapper = UIView(frame: CGRect(x: 0, y: 0, width: UIScreen.main.bounds.width, height: 60)) + + let versionLabel = UILabel() + let version = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String ?? "1.0" + let build = Bundle.main.infoDictionary?["CFBundleVersion"] as? String ?? "1" + versionLabel.text = "RTCube Lab v\(version) (\(build))" + versionLabel.font = ThemeStore.shared.typographyTokens.Regular12 + versionLabel.textColor = ThemeStore.shared.colorTokens.textColorDisable + versionLabel.textAlignment = .center + + wrapper.addSubview(versionLabel) + versionLabel.snp.makeConstraints { make in + make.center.equalToSuperview() + } + + return wrapper + } + + @objc private func autoLoginToggleTapped() { + LoginEntry.shared.isAutoLoginEnabled.toggle() + applyAutoLoginToggleStyle(animated: true) + } + + private func applyAutoLoginToggleStyle(animated: Bool) { + let style: CapsuleStyle = LoginEntry.shared.isAutoLoginEnabled + ? .active(hex: "006EFF") + : .inactive + autoLoginToggleButton.applyCapsuleStyle( + title: LoginLocalize("Demo.TRTC.DevMenu.autoLogin"), + style: style, + dotView: autoLoginDotView, + animated: animated + ) + } + + @objc private func envToggleTapped() { + let newEnv: ServerEnvironment = (currentEnvironment == .production) ? .test : .production + currentEnvironment = newEnv + applyEnvToggleStyle(animated: true) + onEnvironmentChanged?(newEnv) + } + + private func applyEnvToggleStyle(animated: Bool) { + let style: CapsuleStyle = (currentEnvironment == .production) + ? .active(hex: "34C759", textHex: "2DA44E") + : .active(hex: "FF9500", textHex: "D4780A") + envToggleButton.applyCapsuleStyle( + title: currentEnvironment.title, + style: style, + dotView: envDotView, + animated: animated + ) + } +} + +// MARK: - UITableViewDataSource & UITableViewDelegate + +extension DevLoginMenuViewController: UITableViewDataSource, UITableViewDelegate { + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + return menuItems.count + } + + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + let cell = tableView.dequeueReusableCell(withIdentifier: LoginMenuCell.reuseID, for: indexPath) as! LoginMenuCell + let item = menuItems[indexPath.row] + cell.configure(title: item.title, subtitle: item.subtitle, icon: item.icon) + return cell + } + + func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { + return 76 + } + + func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? { + let header = UIView() + header.backgroundColor = ThemeStore.shared.colorTokens.bgColorOperate + + let titleLabel = UILabel() + titleLabel.text = LoginLocalize("Demo.TRTC.DevMenu.selectLoginMethod") + titleLabel.font = ThemeStore.shared.typographyTokens.Medium18 + titleLabel.textColor = ThemeStore.shared.colorTokens.textColorPrimary + + header.addSubview(titleLabel) + header.addSubview(toggleContainer) + toggleContainer.addArrangedSubview(autoLoginToggleButton) + toggleContainer.addArrangedSubview(envToggleButton) + autoLoginToggleButton.addSubview(autoLoginDotView) + envToggleButton.addSubview(envDotView) + + titleLabel.snp.makeConstraints { make in + make.leading.equalToSuperview().offset(30) + make.centerY.equalToSuperview() + } + + toggleContainer.snp.makeConstraints { make in + make.trailing.equalToSuperview().offset(-20) + make.centerY.equalToSuperview() + make.height.equalTo(32) + } + + autoLoginToggleButton.snp.makeConstraints { make in + make.height.equalTo(32) + } + + autoLoginDotView.snp.makeConstraints { make in + make.centerY.equalToSuperview() + make.leading.equalToSuperview().offset(12) + make.width.height.equalTo(8) + } + + envToggleButton.snp.makeConstraints { make in + make.height.equalTo(32) + } + + envDotView.snp.makeConstraints { make in + make.centerY.equalToSuperview() + make.leading.equalToSuperview().offset(12) + make.width.height.equalTo(8) + } + + return header + } + + func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat { + return 64 + } + + func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) -> Void { tableView.deselectRow(at: indexPath, animated: true) + let item = menuItems[indexPath.row] + onSelectMode?(item.mode) + } +} + +// MARK: - LoginMenuCell + +private final class LoginMenuCell: UITableViewCell { + static let reuseID = "LoginMenuCell" + + private let iconBgView: UIView = { + let view = UIView() + view.backgroundColor = ThemeStore.shared.colorTokens.buttonColorPrimaryDefault.withAlphaComponent(0.1) + view.layer.cornerRadius = 18 + return view + }() + + private let iconImageView: UIImageView = { + let iv = UIImageView() + iv.contentMode = .center + iv.tintColor = ThemeStore.shared.colorTokens.buttonColorPrimaryDefault + return iv + }() + + private let titleLabel: UILabel = { + let label = UILabel() + label.font = ThemeStore.shared.typographyTokens.Medium16 + label.textColor = ThemeStore.shared.colorTokens.textColorPrimary + return label + }() + + private let subtitleLabel: UILabel = { + let label = UILabel() + label.font = ThemeStore.shared.typographyTokens.Regular12 + label.textColor = ThemeStore.shared.colorTokens.textColorTertiary + return label + }() + + private let arrowImageView: UIImageView = { + let iv = UIImageView() + iv.contentMode = .center + iv.tintColor = ThemeStore.shared.colorTokens.textColorDisable + if #available(iOS 13.0, *) { + let config = UIImage.SymbolConfiguration(pointSize: 12, weight: .medium) + iv.image = UIImage(systemName: "chevron.right", withConfiguration: config) + } + return iv + }() + + private let cardView: UIView = { + let view = UIView() + view.backgroundColor = ThemeStore.shared.colorTokens.bgColorDefault + view.layer.cornerRadius = ThemeStore.shared.borderRadius.radius12 + view.clipsToBounds = true + return view + }() + + override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { + super.init(style: style, reuseIdentifier: reuseIdentifier) + selectionStyle = .none + backgroundColor = .clear + contentView.backgroundColor = .clear + + contentView.addSubview(cardView) + cardView.addSubview(iconBgView) + iconBgView.addSubview(iconImageView) + cardView.addSubview(titleLabel) + cardView.addSubview(subtitleLabel) + cardView.addSubview(arrowImageView) + + cardView.snp.makeConstraints { make in + make.top.equalToSuperview() + make.leading.equalToSuperview().offset(20) + make.trailing.equalToSuperview().offset(-20) + make.bottom.equalToSuperview().offset(-12) + } + + iconBgView.snp.makeConstraints { make in + make.leading.equalToSuperview().offset(14) + make.centerY.equalToSuperview() + make.width.height.equalTo(36) + } + + iconImageView.snp.makeConstraints { make in + make.center.equalToSuperview() + make.width.height.equalTo(20) + } + + titleLabel.snp.makeConstraints { make in + make.leading.equalTo(iconBgView.snp.trailing).offset(12) + make.top.equalToSuperview().offset(12) + make.trailing.lessThanOrEqualTo(arrowImageView.snp.leading).offset(-8) + } + + subtitleLabel.snp.makeConstraints { make in + make.leading.equalTo(titleLabel) + make.top.equalTo(titleLabel.snp.bottom).offset(2) + make.trailing.lessThanOrEqualTo(arrowImageView.snp.leading).offset(-8) + } + + arrowImageView.snp.makeConstraints { make in + make.trailing.equalToSuperview().offset(-14) + make.centerY.equalToSuperview() + make.width.height.equalTo(16) + } + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + func configure(title: String, subtitle: String, icon: String) { + titleLabel.text = title + subtitleLabel.text = subtitle + if #available(iOS 13.0, *) { + let config = UIImage.SymbolConfiguration(pointSize: 18, weight: .medium) + iconImageView.image = UIImage(systemName: icon, withConfiguration: config) + } + } + + override func setHighlighted(_ highlighted: Bool, animated: Bool) { + super.setHighlighted(highlighted, animated: animated) + UIView.animate(withDuration: 0.15) { + self.cardView.alpha = highlighted ? 0.6 : 1.0 + self.cardView.transform = highlighted + ? CGAffineTransform(scaleX: 0.98, y: 0.98) + : .identity + } + } +} + +private enum CapsuleStyle { + case active(hex: String, textHex: String? = nil) + case inactive + + var dotColor: UIColor { + switch self { + case .active(let hex, _): return UIColor(hex) + case .inactive: return ThemeStore.shared.colorTokens.textColorDisable + } + } + + var backgroundColor: UIColor { + switch self { + case .active(let hex, _): return UIColor(hex).withAlphaComponent(0.1) + case .inactive: return ThemeStore.shared.colorTokens.bgColorDefault + } + } + + var textColor: UIColor { + switch self { + case .active(let hex, let textHex): + return UIColor(textHex ?? hex) + case .inactive: + return ThemeStore.shared.colorTokens.textColorTertiary + } + } + + var borderColor: UIColor { + switch self { + case .active(let hex, _): return UIColor(hex).withAlphaComponent(0.3) + case .inactive: return ThemeStore.shared.colorTokens.strokeColorSecondary + } + } +} + +private extension UIButton { + func applyCapsuleStyle(title: String, style: CapsuleStyle, dotView: UIView, animated: Bool) { + let applyBlock = { + self.setTitle(title, for: .normal) + self.setTitleColor(style.textColor, for: .normal) + self.backgroundColor = style.backgroundColor + self.layer.borderWidth = 1 + self.layer.borderColor = style.borderColor.cgColor + dotView.backgroundColor = style.dotColor + } + if animated { + UIView.animate(withDuration: 0.25, delay: 0, options: .curveEaseInOut, animations: applyBlock) + } else { + applyBlock() + } + } +} diff --git a/application/login/EmailVerify/EmailVerifyView.swift b/application/login/EmailVerify/EmailVerifyView.swift new file mode 100644 index 00000000..e01ef8a5 --- /dev/null +++ b/application/login/EmailVerify/EmailVerifyView.swift @@ -0,0 +1,401 @@ +// +// EmailVerifyView.swift +// login +// + +import UIKit +import AtomicX +import Combine +import Toast_Swift + +class EmailVerifyView: UIView { + + // MARK: - Dependencies + + let store: EmailVerifyStore + private var cancellables = Set() + weak var navigationController: UINavigationController? + + // MARK: - UI Components + + private let backgroundImageView: UIImageView = { + let imageView = UIImageView() + imageView.contentMode = .scaleAspectFill + imageView.clipsToBounds = true + imageView.image = UIImage.loginImage(named: "login_background") + imageView.backgroundColor = ThemeStore.shared.colorTokens.bgColorDefault + return imageView + }() + + private let logoImageView: UIImageView = { + let imageView = UIImageView() + imageView.contentMode = .scaleAspectFit + imageView.image = UIImage.loginImage(named: "rtc_logo") + return imageView + }() + + private let titleLabel: UILabel = { + let label = UILabel() + label.text = String.EmailLogin.welcomeTitle + label.font = UIFont.boldSystemFont(ofSize: 22) + label.textColor = ThemeStore.shared.colorTokens.textColorPrimary + label.textAlignment = .left + return label + }() + + private let subtitleLabel: UILabel = { + let label = UILabel() + label.text = String.EmailLogin.subtitle + label.font = ThemeStore.shared.typographyTokens.Regular12 + label.textColor = ThemeStore.shared.colorTokens.textColorSecondary + label.textAlignment = .left + label.numberOfLines = 0 + label.lineBreakMode = .byWordWrapping + return label + }() + + private let emailInputContainer: UIView = { + let view = UIView() + view.backgroundColor = .clear + return view + }() + + private let emailTextField: UITextField = { + let textField = UITextField() + textField.placeholder = String.EmailLogin.emailPlaceholder + textField.font = ThemeStore.shared.typographyTokens.Regular16 + textField.textColor = ThemeStore.shared.colorTokens.textColorPrimary + textField.borderStyle = .none + textField.keyboardType = .emailAddress + textField.autocapitalizationType = .none + textField.autocorrectionType = .no + textField.attributedPlaceholder = NSAttributedString( + string: String.EmailLogin.emailPlaceholder, + attributes: [NSAttributedString.Key.foregroundColor: ThemeStore.shared.colorTokens.textColorDisable] + ) + return textField + }() + + private let inputBottomBorder: UIView = { + let view = UIView() + view.backgroundColor = ThemeStore.shared.colorTokens.strokeColorSecondary + return view + }() + + private let continueButton: UIButton = { + let button = UIButton(type: .system) + button.setTitle(String.EmailLogin.continueButton, for: .normal) + button.titleLabel?.font = ThemeStore.shared.typographyTokens.Bold14 + button.setTitleColor(.white, for: .normal) + button.setTitleColor(.white, for: .disabled) + button.isEnabled = false + button.backgroundColor = ThemeStore.shared.colorTokens.buttonColorPrimaryDisabled + return button + }() + + private let bottomTextLabel: UILabel = { + let label = UILabel() + label.numberOfLines = 0 + label.textAlignment = .left + return label + }() + + lazy var fullScreenLoadingView: FullScreenLoadingView = { + let view = FullScreenLoadingView() + return view + }() + + // MARK: - Init + + init(store: EmailVerifyStore) { + self.store = store + super.init(frame: .zero) + backgroundColor = ThemeStore.shared.colorTokens.bgColorOperate + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + // MARK: - Lifecycle + + override func layoutSubviews() { + super.layoutSubviews() + continueButton.layer.cornerRadius = continueButton.frame.height / 2 + bringSubviewToFront(fullScreenLoadingView) + } + + private var isViewReady = false + override func didMoveToWindow() { + super.didMoveToWindow() + guard !isViewReady else { return } + setupUI() + setupConstraints() + setupBottomText() + setupActions() + bindStore() + fullScreenLoadingView.hide() + isViewReady = true + } + + // MARK: - Setup UI + + private func setupUI() { + addSubview(backgroundImageView) + addSubview(logoImageView) + addSubview(titleLabel) + addSubview(subtitleLabel) + addSubview(emailInputContainer) + emailInputContainer.addSubview(emailTextField) + emailInputContainer.addSubview(inputBottomBorder) + addSubview(continueButton) + addSubview(bottomTextLabel) + addSubview(fullScreenLoadingView) + } + + private func setupConstraints() { + backgroundImageView.snp.makeConstraints { make in + make.edges.equalToSuperview() + } + + logoImageView.snp.makeConstraints { make in + make.top.equalTo(safeAreaLayoutGuide).offset(41) + make.leading.equalToSuperview().offset(24) + make.size.equalTo(40) + } + + titleLabel.snp.makeConstraints { make in + make.top.equalTo(logoImageView.snp.bottom).offset(15) + make.leading.trailing.equalToSuperview().inset(24) + } + + subtitleLabel.snp.makeConstraints { make in + make.top.equalTo(titleLabel.snp.bottom).offset(4) + make.leading.trailing.equalToSuperview().inset(24) + } + + emailInputContainer.snp.makeConstraints { make in + make.top.equalTo(subtitleLabel.snp.bottom).offset(16) + make.leading.trailing.equalToSuperview().inset(24) + make.height.equalTo(48) + } + + emailTextField.snp.makeConstraints { make in + make.top.leading.trailing.equalToSuperview() + make.height.equalTo(46) + } + + inputBottomBorder.snp.makeConstraints { make in + make.leading.trailing.bottom.equalToSuperview() + make.height.equalTo(1) + } + + continueButton.snp.makeConstraints { make in + make.top.equalTo(emailInputContainer.snp.bottom).offset(96) + make.leading.trailing.equalToSuperview().inset(24) + make.height.equalTo(40) + } + + bottomTextLabel.snp.makeConstraints { make in + make.top.equalTo(continueButton.snp.bottom).offset(8) + make.leading.trailing.equalToSuperview().inset(24) + } + + fullScreenLoadingView.snp.makeConstraints { make in + make.edges.equalToSuperview() + } + } + + private func setupBottomText() { + let fullText = String.EmailLogin.bottomText + let attributedString = NSMutableAttributedString(string: fullText) + + let firstPartRange = NSRange(location: 0, length: String.EmailLogin.bottomTextPrefix.count) + attributedString.addAttributes([ + .font: ThemeStore.shared.typographyTokens.Regular12, + .foregroundColor: ThemeStore.shared.colorTokens.textColorSecondary, + ], range: firstPartRange) + + let enterCodeRange = NSRange(location: String.EmailLogin.bottomTextPrefix.count, length: String.EmailLogin.enterCodeLink.count) + attributedString.addAttributes([ + .font: ThemeStore.shared.typographyTokens.Regular12, + .foregroundColor: ThemeStore.shared.colorTokens.buttonColorPrimaryDefault, + ], range: enterCodeRange) + + bottomTextLabel.attributedText = attributedString + + let tapGesture = UITapGestureRecognizer(target: self, action: #selector(bottomTextTapped(_:))) + bottomTextLabel.addGestureRecognizer(tapGesture) + bottomTextLabel.isUserInteractionEnabled = true + } + + private func setupActions() { + continueButton.addTarget(self, action: #selector(continueButtonTapped), for: .touchUpInside) + continueButton.addTarget(self, action: #selector(buttonTouchDown), for: .touchDown) + continueButton.addTarget(self, action: #selector(buttonTouchUp), for: [.touchUpInside, .touchUpOutside, .touchCancel]) + + emailTextField.delegate = self + emailTextField.addTarget(self, action: #selector(emailTextChanged), for: .editingChanged) + + let tapGesture = UITapGestureRecognizer(target: self, action: #selector(dismissKeyboard)) + addGestureRecognizer(tapGesture) + } + + private func bindStore() { + store.$state + .map(\.toastMessage) + .removeDuplicates() + .sink { [weak self] message in + guard !message.isEmpty else { return } + self?.makeToast(message) + } + .store(in: &cancellables) + + store.$state + .map(\.email) + .removeDuplicates() + .filter { $0.isEmpty } + .dropFirst() + .receive(on: RunLoop.main) + .sink { [weak self] _ in + guard let self = self else { return } + self.emailTextField.text = "" + self.updateContinueButtonState() + self.hideAllToasts() + } + .store(in: &cancellables) + } + + // MARK: - Actions + + @objc private func continueButtonTapped() { + endEditing(true) + store.continueWithEmail() + } + + @objc private func bottomTextTapped(_ gesture: UITapGestureRecognizer) { + let text = bottomTextLabel.text ?? "" + let enterCodeRange = (text as NSString).range(of: String.EmailLogin.enterCodeLink) + + if enterCodeRange.location != NSNotFound { + let tapLocation = gesture.location(in: bottomTextLabel) + let textContainer = NSTextContainer(size: bottomTextLabel.bounds.size) + let layoutManager = NSLayoutManager() + let textStorage = NSTextStorage(attributedString: bottomTextLabel.attributedText ?? NSAttributedString()) + + layoutManager.addTextContainer(textContainer) + textStorage.addLayoutManager(layoutManager) + + textContainer.lineFragmentPadding = 0 + textContainer.maximumNumberOfLines = bottomTextLabel.numberOfLines + textContainer.lineBreakMode = bottomTextLabel.lineBreakMode + + let characterIndex = layoutManager.characterIndex(for: tapLocation, in: textContainer, fractionOfDistanceBetweenInsertionPoints: nil) + + if NSLocationInRange(characterIndex, enterCodeRange) { + store.navigateToInviteCodeDirectly() + } + } + } + + @objc private func buttonTouchDown() { + UIView.animate(withDuration: 0.1) { + self.continueButton.transform = CGAffineTransform(scaleX: 0.95, y: 0.95) + self.continueButton.alpha = 0.8 + } + } + + @objc private func buttonTouchUp() { + UIView.animate(withDuration: 0.1) { + self.continueButton.transform = CGAffineTransform.identity + self.continueButton.alpha = 1.0 + } + } + + @objc private func dismissKeyboard() { + endEditing(true) + } + + @objc private func emailTextChanged() { + store.updateEmail(emailTextField.text ?? "") + updateContinueButtonState() + } + + // MARK: - Button State + + private func updateContinueButtonState() { + let email = emailTextField.text ?? "" + let trimmed = email.trimmingCharacters(in: .whitespacesAndNewlines) + let emailRegEx = "[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,64}" + let emailPred = NSPredicate(format: "SELF MATCHES %@", emailRegEx) + let isValidInput = !trimmed.isEmpty && emailPred.evaluate(with: trimmed) + + UIView.animate(withDuration: 0.3) { + if isValidInput { + self.continueButton.isEnabled = true + self.continueButton.backgroundColor = ThemeStore.shared.colorTokens.buttonColorPrimaryDefault + } else { + self.continueButton.isEnabled = false + self.continueButton.backgroundColor = ThemeStore.shared.colorTokens.buttonColorPrimaryDisabled + } + } + } +} + +// MARK: - UITextFieldDelegate +extension EmailVerifyView: UITextFieldDelegate { + func textFieldDidBeginEditing(_ textField: UITextField) { + UIView.animate(withDuration: 0.3) { + self.inputBottomBorder.backgroundColor = ThemeStore.shared.colorTokens.buttonColorPrimaryDefault + } + } + + func textFieldDidEndEditing(_ textField: UITextField) { + UIView.animate(withDuration: 0.3) { + self.inputBottomBorder.backgroundColor = ThemeStore.shared.colorTokens.strokeColorSecondary + } + store.updateEmail(textField.text ?? "") + updateContinueButtonState() + } + + func textFieldShouldReturn(_ textField: UITextField) -> Bool { + textField.resignFirstResponder() + if continueButton.isEnabled { + continueButtonTapped() + } + return true + } + + func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool { + DispatchQueue.main.async { + self.store.updateEmail(textField.text ?? "") + self.updateContinueButtonState() + } + return true + } +} + +// MARK: - String Constants +extension String { + struct EmailLogin { + // MARK: - Titles and Labels + static var welcomeTitle: String { LoginLocalize("Demo.TRTC.Email.welcomeTitle") } + static var subtitle: String { LoginLocalize("Demo.TRTC.Email.subtitle") } + + // MARK: - Input Fields + static var emailPlaceholder: String { LoginLocalize("Demo.TRTC.Email.emailPlaceholder") } + + // MARK: - Button Texts + static var continueButton: String { LoginLocalize("Demo.TRTC.Email.continueButton") } + static var requesting: String { LoginLocalize("Demo.TRTC.Email.requesting") } + + // MARK: - Error Messages + static var enterEmailError: String { LoginLocalize("Demo.TRTC.Email.enterEmailError") } + static var validEmailError: String { LoginLocalize("Demo.TRTC.Email.validEmailError") } + + // MARK: - Bottom Text + static var bottomTextPrefix: String { LoginLocalize("Demo.TRTC.Email.bottomTextPrefix") } + static var enterCodeLink: String { LoginLocalize("Demo.TRTC.Email.enterCodeLink") } + static var bottomText: String { bottomTextPrefix + enterCodeLink } + } +} diff --git a/application/login/EmailVerify/Store/EmailVerifyState.swift b/application/login/EmailVerify/Store/EmailVerifyState.swift new file mode 100644 index 00000000..360a74b2 --- /dev/null +++ b/application/login/EmailVerify/Store/EmailVerifyState.swift @@ -0,0 +1,11 @@ +// +// EmailVerifyState.swift +// login +// + +import Foundation + +public struct EmailVerifyState { + public var email: String = "" + public var toastMessage: String = "" +} diff --git a/application/login/EmailVerify/Store/EmailVerifyStore.swift b/application/login/EmailVerify/Store/EmailVerifyStore.swift new file mode 100644 index 00000000..b36446d6 --- /dev/null +++ b/application/login/EmailVerify/Store/EmailVerifyStore.swift @@ -0,0 +1,80 @@ +// +// EmailVerifyStore.swift +// login +// + +import Foundation +import Combine + +public class EmailVerifyStore: LoginSubStore { + + // MARK: - State + + @Published private(set) var state = EmailVerifyState() + + // MARK: - LoginSubStore + + private let resultSubject = PassthroughSubject, Never>() + var resultPublisher: AnyPublisher, Never> { + resultSubject.eraseToAnyPublisher() + } + + // MARK: - Dependencies + + private let networkService = LoginNetworkService() + private var logoutCancellable: AnyCancellable? + + var onNavigateToInviteCode: ((_ email: String?) -> Void)? + + var onSwitchToIOA: (() -> Void)? + + // MARK: - Init + + init() { + logoutCancellable = subscribeLogout() + } + + // MARK: - LoginSubStore + + func resetState() { + state = EmailVerifyState() + } + + // MARK: - Public Methods + + func updateEmail(_ email: String) { + state.email = email + } + + func continueWithEmail() { + let email = state.email.trimmingCharacters(in: .whitespacesAndNewlines) + + guard !email.isEmpty else { + state.toastMessage = String.EmailLogin.enterEmailError + return + } + + guard isValidEmail(email) else { + state.toastMessage = String.EmailLogin.validEmailError + return + } + + onNavigateToInviteCode?(email) + } + + func navigateToInviteCodeDirectly() { + onNavigateToInviteCode?(nil) + } + + func switchToIOA() { + onSwitchToIOA?() + } + + // MARK: - Private + + private func isValidEmail(_ email: String) -> Bool { + let emailRegEx = "[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,64}" + let emailPred = NSPredicate(format: "SELF MATCHES %@", emailRegEx) + return emailPred.evaluate(with: email) + } +} diff --git a/application/login/Extension/AppLifecycleRegistry.swift b/application/login/Extension/AppLifecycleRegistry.swift new file mode 100644 index 00000000..c0a7fdbf --- /dev/null +++ b/application/login/Extension/AppLifecycleRegistry.swift @@ -0,0 +1,89 @@ +// +// AppLifecycleRegistry.swift +// Login +// + +import UIKit + +// MARK: - Protocol + +public protocol AppLifecycleHandler: AnyObject { + + func handleOpenURL(_ url: URL, options: [UIApplication.OpenURLOptionsKey: Any]) -> Bool + + func applicationDidFinishLaunching(_ application: UIApplication) + + func applicationWillEnterForeground(_ application: UIApplication) + + func applicationDidEnterBackground(_ application: UIApplication) + + func applicationDidRegisterForRemoteNotifications(deviceToken: Data) +} + +public extension AppLifecycleHandler { + func handleOpenURL(_ url: URL, options: [UIApplication.OpenURLOptionsKey: Any]) -> Bool { return false } + func applicationDidFinishLaunching(_ application: UIApplication) {} + func applicationWillEnterForeground(_ application: UIApplication) {} + func applicationDidEnterBackground(_ application: UIApplication) {} + func applicationDidRegisterForRemoteNotifications(deviceToken: Data) {} +} + +// MARK: - Registry + +public final class AppLifecycleRegistry { + public static let shared = AppLifecycleRegistry() + private init() {} + + private struct WeakHandler { + weak var value: AppLifecycleHandler? + } + + private var handlers: [WeakHandler] = [] + + public func register(_ handler: AppLifecycleHandler) { + cleanUp() + guard !handlers.contains(where: { $0.value === handler }) else { return } + handlers.append(WeakHandler(value: handler)) + } + + public func unregister(_ handler: AppLifecycleHandler) { + handlers.removeAll { $0.value === handler } + } + + @discardableResult + public func handleOpenURL(_ url: URL, options: [UIApplication.OpenURLOptionsKey: Any] = [:]) -> Bool { + cleanUp() + for wrapper in handlers { + if let handler = wrapper.value, handler.handleOpenURL(url, options: options) { + return true + } + } + return false + } + + public func applicationDidFinishLaunching(_ application: UIApplication) { + cleanUp() + handlers.forEach { $0.value?.applicationDidFinishLaunching(application) } + } + + public func applicationWillEnterForeground(_ application: UIApplication) { + cleanUp() + handlers.forEach { $0.value?.applicationWillEnterForeground(application) } + } + + public func applicationDidEnterBackground(_ application: UIApplication) { + cleanUp() + handlers.forEach { $0.value?.applicationDidEnterBackground(application) } + } + + public func applicationDidRegisterForRemoteNotifications(deviceToken: Data) { + cleanUp() + handlers.forEach { $0.value?.applicationDidRegisterForRemoteNotifications(deviceToken: deviceToken) } + } + + // MARK: - Private + + private func cleanUp() { + handlers.removeAll { $0.value == nil } + } +} diff --git a/application/login/Extension/Bundle+Login.swift b/application/login/Extension/Bundle+Login.swift new file mode 100644 index 00000000..8eda7113 --- /dev/null +++ b/application/login/Extension/Bundle+Login.swift @@ -0,0 +1,26 @@ +// +// Bundle+Login.swift +// Login +// + +import Foundation +import UIKit + +extension Bundle { + static let loginResources: Bundle = { + let frameworkBundle = Bundle(for: LoginBundleToken.self) + guard let url = frameworkBundle.url(forResource: "LoginResources", withExtension: "bundle"), + let bundle = Bundle(url: url) else { + return frameworkBundle + } + return bundle + }() +} + +private final class LoginBundleToken {} + +extension UIImage { + static func loginImage(named name: String) -> UIImage? { + return UIImage(named: name, in: Bundle.loginResources, compatibleWith: nil) + } +} diff --git a/application/login/Extension/LayoutDefine.swift b/application/login/Extension/LayoutDefine.swift new file mode 100644 index 00000000..6bf8039f --- /dev/null +++ b/application/login/Extension/LayoutDefine.swift @@ -0,0 +1,66 @@ +// +// LayoutDefine.swift +// login +// + +import UIKit + +let ScreenWidth = UIScreen.main.bounds.width +let ScreenHeight = UIScreen.main.bounds.height + +let kDeviceIsIphoneX: Bool = { + if UIDevice.current.userInterfaceIdiom == .pad { + return false + } + let size = UIScreen.main.bounds.size + let notchValue = Int(size.width / size.height * 100) + if notchValue == 216 || notchValue == 46 { + return true + } + return false +}() + +let kDeviceSafeTopHeight: CGFloat = { + if kDeviceIsIphoneX { + return 44 + } else { + return 20 + } +}() + +let kDeviceSafeBottomHeight: CGFloat = { + if kDeviceIsIphoneX { + return 34 + } else { + return 0 + } +}() + +func convertPixel(w: CGFloat) -> CGFloat { + return w / 375.0 * ScreenWidth +} + +func convertPixel(h: CGFloat) -> CGFloat { + return h / 812.0 * ScreenHeight +} + +func statusBarHeight() -> CGFloat { + var statusBarHeight: CGFloat = 0 + if #available(iOS 13.0, *) { + let scene = UIApplication.shared.connectedScenes.first + guard let windowScene = scene as? UIWindowScene else { return 0 } + guard let statusBarManager = windowScene.statusBarManager else { return 0 } + statusBarHeight = statusBarManager.statusBarFrame.height + } else { + statusBarHeight = UIApplication.shared.statusBarFrame.height + } + return statusBarHeight +} + +func navigationBarHeight() -> CGFloat { + return 44.0 +} + +func navigationFullHeight() -> CGFloat { + return statusBarHeight() + navigationBarHeight() +} diff --git a/application/login/Extension/PrivacyConfig.swift b/application/login/Extension/PrivacyConfig.swift new file mode 100644 index 00000000..1dba9669 --- /dev/null +++ b/application/login/Extension/PrivacyConfig.swift @@ -0,0 +1,30 @@ +// +// PrivacyConfig.swift +// Login +// + +import Foundation + +private let Privacy_PlistPath: String? = { + return Bundle.main.path(forResource: "Privacy", ofType: "plist") +}() + +private let Privacy_Info: NSDictionary = { + guard let privacyPath = Privacy_PlistPath, + let privacyInfo = NSDictionary(contentsOfFile: privacyPath) else { + return NSDictionary() + } + return privacyInfo +}() + +let WEBURL_Agreement: String = { + return (Privacy_Info["userProtocolURL"] as? String) ?? "" +}() + +let WEBURL_PrivacySummary: String = { + return (Privacy_Info["privacySummaryURL"] as? String) ?? "" +}() + +let WEBURL_Privacy: String = { + return (Privacy_Info["privacyURL"] as? String) ?? "" +}() diff --git a/application/login/Extension/TUIGlobalization+Extension.swift b/application/login/Extension/TUIGlobalization+Extension.swift new file mode 100644 index 00000000..e93a2b82 --- /dev/null +++ b/application/login/Extension/TUIGlobalization+Extension.swift @@ -0,0 +1,19 @@ +// +// TUIGlobalization+Extension.swift +// RTCube +// + +import UIKit +import TUICore + +extension TUIGlobalization { + + public class func isChineseAppLocale() -> Bool { + if let lang = self.getPreferredLanguage(), lang.hasPrefix("zh") { + return true + } else { + return false + } + } + +} diff --git a/application/login/Extension/UIView+ToastSwiftExtension.swift b/application/login/Extension/UIView+ToastSwiftExtension.swift new file mode 100644 index 00000000..6c4d2157 --- /dev/null +++ b/application/login/Extension/UIView+ToastSwiftExtension.swift @@ -0,0 +1,16 @@ +// +// UIView+ToastSwiftExtension.swift +// Login +// +// Created by gg on 2026/3/26. +// + +import Toast_Swift + +extension UIView { + func makeToast(_ message: String?, duration: TimeInterval = ToastManager.shared.duration, position: ToastPosition = ToastManager.shared.position, title: String? = nil, image: UIImage? = nil, style: ToastStyle = ToastManager.shared.style, completion: ((_ didTap: Bool) -> Void)? = nil) { + guard window != nil else { return } + guard let toast = try? toastViewForMessage(message, title: title, image: image, style: style) else { return } + showToast(toast, duration: duration, position: position, completion: completion) + } +} diff --git a/application/login/IOAAuth/IOAAuthManager.swift b/application/login/IOAAuth/IOAAuthManager.swift new file mode 100644 index 00000000..85084448 --- /dev/null +++ b/application/login/IOAAuth/IOAAuthManager.swift @@ -0,0 +1,71 @@ +// +// IOAAuthManager.swift +// login +// + +import Foundation +import UIKit +import ITLogin + +public final class IOAAuthManager: NSObject { + public static let shared = IOAAuthManager() + private override init() { super.init() } + + weak var activeNavigator: LoginNavigator? + + private var isIOAInitialized = false + + func setupIOA(appKey: String, appId: String) { + guard !isIOAInitialized else { return } + isIOAInitialized = true + + ITLogin.sharedInstance().start(withAppKey: appKey, appId: appId) + ITLogin.sharedInstance().disableLoginPage(true) + ITLogin.sharedInstance().delegate = self + + AppLifecycleRegistry.shared.register(self) + } +} + +// MARK: - AppLifecycleHandler + +extension IOAAuthManager: AppLifecycleHandler { + public func handleOpenURL(_ url: URL, options: [UIApplication.OpenURLOptionsKey: Any]) -> Bool { + guard isIOAInitialized else { return false } + if ITLogin.sharedInstance().shouldHandleSSO(url) { + ITLogin.sharedInstance().handleSSOURL(url) + return true + } + return false + } +} + +// MARK: - ITLoginDelegate + +extension IOAAuthManager: ITLoginDelegate { + public func didValidateLoginSuccess() { + let ticket = ITLogin.sharedInstance().getInfo().credentialkey + performIOALogin(ticket: ticket) + } + + public func didValidateLoginFailWithError(_ error: ITLoginError!) {} + + public func didValidateLoginFail(withError error: ITLoginError!) {} + + public func didTokenLoginSuccess() { + let ticket = ITLogin.sharedInstance().getInfo().credentialkey + performIOALogin(ticket: ticket) + } + + public func didTokenLoginFailWithError(_ error: ITLoginError!) {} + + public func didTokenLoginFail(withError error: ITLoginError!) {} + + public func didFinishLogout() {} + + // MARK: - Helper + + private func performIOALogin(ticket: String) { + activeNavigator?.handleIOATicket(ticket) + } +} diff --git a/application/login/IOAAuth/IOAAuthView.swift b/application/login/IOAAuth/IOAAuthView.swift new file mode 100644 index 00000000..25b1059a --- /dev/null +++ b/application/login/IOAAuth/IOAAuthView.swift @@ -0,0 +1,90 @@ +// +// IOAAuthView.swift +// login +// + +import UIKit +import AtomicX +import Combine +import Toast_Swift + +class IOAAuthView: UIView { + + // MARK: - Dependencies + + let store: IOAAuthStore + private var cancellables = Set() + + // MARK: - SubViews + + lazy var fullScreenLoadingView: FullScreenLoadingView = { + let view = FullScreenLoadingView() + return view + }() + + // MARK: - Init + + init(store: IOAAuthStore) { + self.store = store + super.init(frame: .zero) + backgroundColor = ThemeStore.shared.colorTokens.bgColorOperate + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + // MARK: - Lifecycle + + private var isViewReady = false + override func didMoveToWindow() { + super.didMoveToWindow() + guard !isViewReady else { return } + constructViewHierarchy() + activateConstraints() + bindInteraction() + setupViewStyle() + isViewReady = true + + store.showIOALogin(in: self) + } + + func constructViewHierarchy() { + addSubview(fullScreenLoadingView) + } + + func activateConstraints() { + fullScreenLoadingView.snp.makeConstraints { make in + make.edges.equalToSuperview() + } + } + + func bindInteraction() { + store.$state + .map(\.toastMessage) + .removeDuplicates() + .sink { [weak self] message in + guard !message.isEmpty else { return } + self?.makeToast(message) + } + .store(in: &cancellables) + + store.$state + .map(\.isFullScreenLoading) + .removeDuplicates() + .sink { [weak self] isFullScreenLoading in + guard let self = self else { return } + if isFullScreenLoading { + self.fullScreenLoadingView.show(with: self.store.state.fullScreenLoadingMessage) + } else { + self.fullScreenLoadingView.hide() + } + } + .store(in: &cancellables) + } + + func setupViewStyle() { + fullScreenLoadingView.hide() + } + +} diff --git a/application/login/IOAAuth/Store/IOAAuthStore.swift b/application/login/IOAAuth/Store/IOAAuthStore.swift new file mode 100644 index 00000000..1455bd09 --- /dev/null +++ b/application/login/IOAAuth/Store/IOAAuthStore.swift @@ -0,0 +1,85 @@ +// +// IOAAuthStore.swift +// login +// + +import UIKit +import Combine + +class IOAAuthStore: LoginSubStore { + + // MARK: - State + + @Published private(set) var state = IOAAuthState() + + // MARK: - LoginSubStore + + private let resultSubject = PassthroughSubject, Never>() + var resultPublisher: AnyPublisher, Never> { + resultSubject.eraseToAnyPublisher() + } + + // MARK: - Dependencies + + let ioaService = IOAService() + private let networkService = LoginNetworkService() + private var logoutCancellable: AnyCancellable? + + var onBack: (() -> Void)? + + // MARK: - Init + + init() { + logoutCancellable = subscribeLogout() + } + + // MARK: - LoginSubStore + + func resetState() { + state = IOAAuthState() + } + + // MARK: - Public Methods + + func showIOALogin(in parentView: UIView?) { + state.isLoading = true + + ioaService.setOnBackButtonTapped { [weak self] in + self?.state.isLoading = false + self?.onBack?() + } + + ioaService.showLoginView(in: parentView) + } + + func loginWithTicket(_ ticket: String) { + state.isFullScreenLoading = true + state.fullScreenLoadingMessage = LoginLocalize("Demo.TRTC.Login.ioaLoading") + + networkService.loginByMOA(ticket: ticket) { [weak self] result in + guard let self = self else { return } + self.state.isFullScreenLoading = false + self.state.isLoading = false + switch result { + case .success(let loginResult): + self.resultSubject.send(.success(loginResult)) + case .failure(let error): + self.state.toastMessage = error.message + } + } + } + + func goBack() { + ioaService.dismissLoginView() + onBack?() + } +} + +// MARK: - State + +public struct IOAAuthState { + public var isLoading: Bool = false + public var isFullScreenLoading: Bool = false + public var fullScreenLoadingMessage: String = "" + public var toastMessage: String = "" +} diff --git a/application/login/IOAAuth/Utils/IOAService.swift b/application/login/IOAAuth/Utils/IOAService.swift new file mode 100644 index 00000000..f18aad43 --- /dev/null +++ b/application/login/IOAAuth/Utils/IOAService.swift @@ -0,0 +1,73 @@ +// +// IOAService.swift +// login +// + +import UIKit +import ITLogin + +class IOAService { + + func showLoginView(in parentView: UIView?) { + ITLogin.sharedInstance().showView() + + DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) { + guard let parentView = parentView else { return } + + if let window = parentView.window { + for subview in window.subviews { + if NSStringFromClass(type(of: subview)).contains("ITLogin") { + window.bringSubviewToFront(subview) + self.addBackButton(to: subview) + break + } + } + } + + for subview in parentView.subviews { + if NSStringFromClass(type(of: subview)).contains("ITLogin") { + parentView.bringSubviewToFront(subview) + self.addBackButton(to: subview) + break + } + } + } + } + + func dismissLoginView() { + ITLogin.sharedInstance().dimissLoginView() + } + + // MARK: - Private + + private static let backButtonTag = 6343 + + private var onBackButtonTapped: (() -> Void)? + + func setOnBackButtonTapped(_ handler: @escaping () -> Void) { + onBackButtonTapped = handler + } + + private func addBackButton(to ioaView: UIView) { + if ioaView.viewWithTag(IOAService.backButtonTag) != nil { + return + } + + let closeButton = UIButton(type: .custom) + closeButton.tag = IOAService.backButtonTag + closeButton.setImage(UIImage.loginImage(named: "main_mine_about_back"), for: .normal) + closeButton.addTarget(self, action: #selector(closeButtonTapped), for: .touchUpInside) + + ioaView.addSubview(closeButton) + closeButton.snp.makeConstraints { make in + make.top.equalTo(ioaView.safeAreaLayoutGuide.snp.top).offset(10) + make.left.equalTo(ioaView).offset(10) + make.width.height.equalTo(40) + } + } + + @objc private func closeButtonTapped() { + dismissLoginView() + onBackButtonTapped?() + } +} diff --git a/application/login/InviteCode/AlphanumericKeyboardView.swift b/application/login/InviteCode/AlphanumericKeyboardView.swift new file mode 100644 index 00000000..a95aef42 --- /dev/null +++ b/application/login/InviteCode/AlphanumericKeyboardView.swift @@ -0,0 +1,228 @@ +// +// AlphanumericKeyboardView.swift +// login +// + +import UIKit +import AtomicX + +class AlphanumericKeyboardView: UIView { + + // MARK: - Callbacks + + var onKeyTapped: ((String) -> Void)? + var onDeleteTapped: (() -> Void)? + + // MARK: - Constants + + private let rows: [[String]] = [ + ["1", "2", "3", "4", "5", "6", "7", "8", "9", "0"], + ["Q", "W", "E", "R", "T", "Y", "U", "I", "O", "P"], + ["A", "S", "D", "F", "G", "H", "J", "K", "L"], + ["Z", "X", "C", "V", "B", "N", "M"] + ] + + private let keyboardBackgroundColor = ThemeStore.shared.colorTokens.bgColorDefault + private let keyBackgroundColor = ThemeStore.shared.colorTokens.bgColorOperate + private let keyTextColor = ThemeStore.shared.colorTokens.textColorPrimary + private let specialKeyBackgroundColor = ThemeStore.shared.colorTokens.buttonColorSecondaryDefault + private let keyShadowColor = ThemeStore.shared.colorTokens.shadowColor + + private let keyCornerRadius: CGFloat = 5 + private let keySpacingH: CGFloat = 6 + private let keySpacingV: CGFloat = 11 + private let keyHeight: CGFloat = 42 + private let sideInset: CGFloat = 3 + private let topInset: CGFloat = 8 + private let bottomInsetAboveKeys: CGFloat = 4 + + // MARK: - UI + + private var rowStackViews: [UIStackView] = [] + private var deleteButton: UIButton? + private var lastCalculatedHeight: CGFloat = 0 + + // MARK: - Init + + override init(frame: CGRect) { + super.init(frame: frame) + autoresizingMask = [.flexibleWidth, .flexibleHeight] + backgroundColor = keyboardBackgroundColor + setupKeys() + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + // MARK: - Intrinsic Size + + private var keysAreaHeight: CGFloat { + return topInset + keyHeight * CGFloat(rows.count) + keySpacingV * CGFloat(rows.count - 1) + bottomInsetAboveKeys + } + + override var intrinsicContentSize: CGSize { + let safeBottom = safeAreaInsets.bottom + let totalHeight = keysAreaHeight + safeBottom + return CGSize(width: UIView.noIntrinsicMetric, height: totalHeight) + } + + override func safeAreaInsetsDidChange() { + super.safeAreaInsetsDidChange() + let newHeight = keysAreaHeight + safeAreaInsets.bottom + if newHeight != lastCalculatedHeight { + lastCalculatedHeight = newHeight + invalidateIntrinsicContentSize() + } + } + + // MARK: - Setup + + private func setupKeys() { + let containerStack = UIStackView() + containerStack.axis = .vertical + containerStack.spacing = keySpacingV + containerStack.alignment = .center + addSubview(containerStack) + + containerStack.translatesAutoresizingMaskIntoConstraints = false + NSLayoutConstraint.activate([ + containerStack.topAnchor.constraint(equalTo: topAnchor, constant: topInset), + containerStack.leadingAnchor.constraint(equalTo: leadingAnchor, constant: sideInset), + containerStack.trailingAnchor.constraint(equalTo: trailingAnchor, constant: -sideInset), + ]) + + for (rowIndex, row) in rows.enumerated() { + if rowIndex == rows.count - 1 { + let rowContainer = UIView() + rowContainer.translatesAutoresizingMaskIntoConstraints = false + containerStack.addArrangedSubview(rowContainer) + rowContainer.widthAnchor.constraint(equalTo: containerStack.widthAnchor).isActive = true + rowContainer.heightAnchor.constraint(equalToConstant: keyHeight).isActive = true + + let letterStack = UIStackView() + letterStack.axis = .horizontal + letterStack.spacing = keySpacingH + letterStack.distribution = .fillEqually + rowContainer.addSubview(letterStack) + + for key in row { + let button = createKeyButton(title: key, isSpecial: false) + letterStack.addArrangedSubview(button) + } + + let delButton = createDeleteButton() + rowContainer.addSubview(delButton) + self.deleteButton = delButton + + letterStack.translatesAutoresizingMaskIntoConstraints = false + delButton.translatesAutoresizingMaskIntoConstraints = false + + NSLayoutConstraint.activate([ + delButton.trailingAnchor.constraint(equalTo: rowContainer.trailingAnchor), + delButton.topAnchor.constraint(equalTo: rowContainer.topAnchor), + delButton.bottomAnchor.constraint(equalTo: rowContainer.bottomAnchor), + delButton.widthAnchor.constraint(equalTo: rowContainer.widthAnchor, multiplier: 0.115), + + letterStack.centerXAnchor.constraint(equalTo: rowContainer.centerXAnchor, constant: -20), + letterStack.topAnchor.constraint(equalTo: rowContainer.topAnchor), + letterStack.bottomAnchor.constraint(equalTo: rowContainer.bottomAnchor), + ]) + + letterStack.widthAnchor.constraint(equalTo: rowContainer.widthAnchor, multiplier: 0.72).isActive = true + + } else { + let rowStack = UIStackView() + rowStack.axis = .horizontal + rowStack.spacing = keySpacingH + rowStack.distribution = .fillEqually + + for key in row { + let button = createKeyButton(title: key, isSpecial: false) + rowStack.addArrangedSubview(button) + } + + containerStack.addArrangedSubview(rowStack) + rowStack.translatesAutoresizingMaskIntoConstraints = false + rowStack.heightAnchor.constraint(equalToConstant: keyHeight).isActive = true + + if rowIndex == 0 || rowIndex == 1 { + rowStack.widthAnchor.constraint(equalTo: containerStack.widthAnchor).isActive = true + } else if rowIndex == 2 { + rowStack.widthAnchor.constraint(equalTo: containerStack.widthAnchor, multiplier: 0.885).isActive = true + } + + rowStackViews.append(rowStack) + } + } + } + + // MARK: - Key Creation + + private func createKeyButton(title: String, isSpecial: Bool) -> UIButton { + let button = UIButton(type: .custom) + button.setTitle(title, for: .normal) + button.setTitleColor(keyTextColor, for: .normal) + button.titleLabel?.font = UIFont.systemFont(ofSize: title.count == 1 && title.first?.isLetter == true ? 22.5 : 20, weight: .regular) + button.backgroundColor = isSpecial ? specialKeyBackgroundColor : keyBackgroundColor + button.layer.cornerRadius = keyCornerRadius + button.layer.shadowColor = keyShadowColor.cgColor + button.layer.shadowOffset = CGSize(width: 0, height: 1) + button.layer.shadowOpacity = 1.0 + button.layer.shadowRadius = 0 + button.layer.masksToBounds = false + + button.addTarget(self, action: #selector(keyTouchDown(_:)), for: .touchDown) + button.addTarget(self, action: #selector(keyTouchUp(_:)), for: [.touchUpInside, .touchUpOutside, .touchCancel]) + button.addTarget(self, action: #selector(keyTapped(_:)), for: .touchUpInside) + + return button + } + + private func createDeleteButton() -> UIButton { + let button = UIButton(type: .custom) + let config = UIImage.SymbolConfiguration(pointSize: 20, weight: .regular) + let image = UIImage(systemName: "delete.backward", withConfiguration: config) + button.setImage(image, for: .normal) + button.tintColor = keyTextColor + button.backgroundColor = specialKeyBackgroundColor + button.layer.cornerRadius = keyCornerRadius + button.layer.shadowColor = keyShadowColor.cgColor + button.layer.shadowOffset = CGSize(width: 0, height: 1) + button.layer.shadowOpacity = 1.0 + button.layer.shadowRadius = 0 + button.layer.masksToBounds = false + + button.addTarget(self, action: #selector(keyTouchDown(_:)), for: .touchDown) + button.addTarget(self, action: #selector(keyTouchUp(_:)), for: [.touchUpInside, .touchUpOutside, .touchCancel]) + button.addTarget(self, action: #selector(deleteTapped), for: .touchUpInside) + + return button + } + + // MARK: - Actions + + @objc private func keyTapped(_ sender: UIButton) { + guard let title = sender.title(for: .normal) else { return } + onKeyTapped?(title) + } + + @objc private func deleteTapped() { + onDeleteTapped?() + } + + @objc private func keyTouchDown(_ sender: UIButton) { + UIView.animate(withDuration: 0.05) { + sender.backgroundColor = sender.backgroundColor == self.specialKeyBackgroundColor + ? self.specialKeyBackgroundColor.withAlphaComponent(0.6) + : ThemeStore.shared.colorTokens.bgColorDefault + } + } + + @objc private func keyTouchUp(_ sender: UIButton) { + let isSpecial = (sender == self.deleteButton) + UIView.animate(withDuration: 0.15) { + sender.backgroundColor = isSpecial ? self.specialKeyBackgroundColor : self.keyBackgroundColor + } + } +} diff --git a/application/login/InviteCode/InviteCodeView.swift b/application/login/InviteCode/InviteCodeView.swift new file mode 100644 index 00000000..499cf2be --- /dev/null +++ b/application/login/InviteCode/InviteCodeView.swift @@ -0,0 +1,868 @@ +// +// InviteCodeView.swift +// login +// + +import UIKit +import Combine +import Toast_Swift +import SafariServices +import AtomicX + +// MARK: - CodeInputTextField + +class CodeInputTextField: UITextField { + + var onDeleteBackward: (() -> Void)? + + override func deleteBackward() { + onDeleteBackward?() + super.deleteBackward() + } + + override func closestPosition(to point: CGPoint) -> UITextPosition? { + if let text = self.text, !text.isEmpty { + return self.endOfDocument + } + return super.closestPosition(to: point) + } + + override func selectionRects(for range: UITextRange) -> [UITextSelectionRect] { + if let text = self.text, !text.isEmpty { + let endPosition = self.endOfDocument + let endRange = self.textRange(from: endPosition, to: endPosition) ?? UITextRange() + return super.selectionRects(for: endRange) + } + return super.selectionRects(for: range) + } + + override func canPerformAction(_ action: Selector, withSender sender: Any?) -> Bool { + if action == #selector(UIResponderStandardEditActions.copy(_:)) || + action == #selector(UIResponderStandardEditActions.paste(_:)) || + action == #selector(UIResponderStandardEditActions.cut(_:)) || + action == #selector(UIResponderStandardEditActions.select(_:)) || + action == #selector(UIResponderStandardEditActions.selectAll(_:)) { + return false + } + return super.canPerformAction(action, withSender: sender) + } + + override func textRange(from fromPosition: UITextPosition, to toPosition: UITextPosition) -> UITextRange? { + if let text = self.text, !text.isEmpty { + let endPosition = self.endOfDocument + return super.textRange(from: endPosition, to: endPosition) + } + return super.textRange(from: fromPosition, to: toPosition) + } + + override func becomeFirstResponder() -> Bool { + let result = super.becomeFirstResponder() + DispatchQueue.main.async { + if let text = self.text, !text.isEmpty { + let endPosition = self.endOfDocument + self.selectedTextRange = self.textRange(from: endPosition, to: endPosition) + } + } + return result + } +} + +// MARK: - InviteCodeView + +class InviteCodeView: UIView { + + // MARK: - Dependencies + + let store: InviteCodeStore + private var cancellables = Set() + private var codeInputFields: [CodeInputTextField] = [] + + private lazy var alphanumericKeyboard: AlphanumericKeyboardView = { + let keyboard = AlphanumericKeyboardView() + keyboard.onKeyTapped = { [weak self] key in + self?.handleKeyboardInput(key) + } + keyboard.onDeleteTapped = { [weak self] in + self?.handleKeyboardDelete() + } + return keyboard + }() + + // MARK: - UI Components + + private let backgroundImageView: UIImageView = { + let imageView = UIImageView() + imageView.contentMode = .scaleAspectFill + imageView.clipsToBounds = true + imageView.image = UIImage.loginImage(named: "login_background") + imageView.backgroundColor = UIColor("F3F5FA") + return imageView + }() + + private let backButton: UIButton = { + let button = UIButton(type: .system) + button.setImage(UIImage(systemName: "chevron.left"), for: .normal) + button.tintColor = UIColor("676A70") + return button + }() + + private let titleLabel: UILabel = { + let label = UILabel() + label.font = UIFont.boldSystemFont(ofSize: 22) + label.textColor = UIColor.black + label.textAlignment = .left + return label + }() + + private let descriptionLabel: UILabel = { + let label = UILabel() + label.font = ThemeStore.shared.typographyTokens.Regular12 + label.textColor = UIColor.black.withAlphaComponent(0.55) + label.numberOfLines = 0 + label.textAlignment = .left + return label + }() + + private let codeInputContainer: UIStackView = { + let stackView = UIStackView() + stackView.axis = .horizontal + stackView.distribution = .equalSpacing + stackView.alignment = .center + stackView.spacing = 7.8 + return stackView + }() + + private let resendLabel: UILabel = { + let label = UILabel() + label.font = ThemeStore.shared.typographyTokens.Regular12 + label.numberOfLines = 0 + label.textAlignment = .left + label.isUserInteractionEnabled = true + return label + }() + + private let getStartedButton: UIButton = { + let button = UIButton(type: .system) + button.setTitle(String.InvitationCode.getStarted, for: .normal) + button.titleLabel?.font = ThemeStore.shared.typographyTokens.Bold14 + button.setTitleColor(.white, for: .normal) + button.backgroundColor = ThemeStore.shared.colorTokens.buttonColorPrimaryDisabled + button.layer.cornerRadius = ThemeStore.shared.borderRadius.radius20 + button.isEnabled = false + return button + }() + + private let agreementContainer: UIView = { + return UIView() + }() + + private let termsCheckbox: UIButton = { + let button = UIButton(type: .custom) + button.setBackgroundImage(UIImage.loginImage(named: "checkbox"), for: .selected) + button.setBackgroundImage(nil, for: .normal) + button.layer.cornerRadius = 2.33 + button.layer.borderWidth = 1 + button.isSelected = false + return button + }() + + private let termsLabel: UILabel = { + let label = UILabel() + let text = String.InvitationCode.agreeToTermsText + let attributedString = NSMutableAttributedString(string: text) + + let baseFont = ThemeStore.shared.typographyTokens.Regular12 + let baseColor = UIColor.black.withAlphaComponent(0.55) + let linkColor = ThemeStore.shared.colorTokens.textColorLink + + attributedString.addAttribute(.font, value: baseFont, range: NSRange(location: 0, length: text.count)) + attributedString.addAttribute(.foregroundColor, value: baseColor, range: NSRange(location: 0, length: text.count)) + + [String.InvitationCode.termsOfService, String.InvitationCode.privacyPolicy].forEach { linkText in + if let range = text.range(of: linkText) { + let nsRange = NSRange(range, in: text) + attributedString.addAttribute(.foregroundColor, value: linkColor, range: nsRange) + } + } + + label.attributedText = attributedString + label.numberOfLines = 0 + label.isUserInteractionEnabled = true + return label + }() + + private let marketingCheckbox: UIButton = { + let button = UIButton(type: .custom) + button.setBackgroundImage(UIImage.loginImage(named: "checkbox"), for: .selected) + button.setBackgroundImage(nil, for: .normal) + button.layer.cornerRadius = 2.33 + button.layer.borderWidth = 1 + button.isSelected = false + return button + }() + + private let marketingLabel: UILabel = { + let label = UILabel() + label.text = String.InvitationCode.marketingInfo + label.font = ThemeStore.shared.typographyTokens.Regular12 + label.textColor = UIColor.black.withAlphaComponent(0.55) + label.numberOfLines = 0 + return label + }() + + private lazy var agreeCheckBubbleView: InvitationBubbleView = { + let view = InvitationBubbleView() + view.label.text = LoginLocalize("Demo.TRTC.Portal.Main.AgreeBeforeUse") + view.label.font = ThemeStore.shared.typographyTokens.Medium14 + view.label.adjustsFontSizeToFitWidth = true + view.triangleWidth = 10 + view.triangleOffset = 20 + view.layer.shadowColor = UIColor("46628C").cgColor + view.layer.shadowOpacity = 0.8 + view.layer.shadowOffset = CGSize(width: 0, height: 2) + view.layer.shadowRadius = 3 + view.isHidden = true + return view + }() + + // MARK: - Init + + init(store: InviteCodeStore) { + self.store = store + super.init(frame: .zero) + backgroundColor = ThemeStore.shared.colorTokens.bgColorOperate + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + // MARK: - Lifecycle + + private var isViewReady = false + override func didMoveToWindow() { + super.didMoveToWindow() + guard !isViewReady else { return } + setupUI() + setupConstraints() + setupActions() + setupCodeInputFields() + updateCheckboxAppearance(termsCheckbox) + updateCheckboxAppearance(marketingCheckbox) + bindStore() + updateGetStartedButtonState() + + DispatchQueue.main.async { + _ = self.codeInputFields.first?.becomeFirstResponder() + } + + store.sendInvitationCodeIfNeeded() + + isViewReady = true + } + + // MARK: - Setup UI + + private func setupUI() { + addSubview(backgroundImageView) + addSubview(backButton) + addSubview(titleLabel) + addSubview(descriptionLabel) + addSubview(codeInputContainer) + addSubview(getStartedButton) + addSubview(resendLabel) + addSubview(agreementContainer) + + agreementContainer.addSubview(termsCheckbox) + agreementContainer.addSubview(termsLabel) + agreementContainer.addSubview(marketingCheckbox) + agreementContainer.addSubview(marketingLabel) + + addSubview(agreeCheckBubbleView) + + titleLabel.text = store.state.titleText + descriptionLabel.text = store.state.descriptionText + marketingCheckbox.isHidden = !store.state.showMarketingCheckbox + marketingLabel.isHidden = !store.state.showMarketingCheckbox + } + + private func setupConstraints() { + backgroundImageView.snp.makeConstraints { make in + make.edges.equalToSuperview() + } + + backButton.snp.makeConstraints { make in + make.top.equalTo(safeAreaLayoutGuide).offset(9) + make.leading.equalToSuperview().offset(24) + make.width.equalTo(16) + make.height.equalTo(28) + } + + titleLabel.snp.makeConstraints { make in + make.top.equalTo(backButton.snp.bottom).offset(23) + make.leading.trailing.equalToSuperview().inset(24) + } + + descriptionLabel.snp.makeConstraints { make in + make.top.equalTo(titleLabel.snp.bottom).offset(4) + make.leading.trailing.equalToSuperview().inset(24) + } + + codeInputContainer.snp.makeConstraints { make in + make.top.equalTo(descriptionLabel.snp.bottom).offset(32) + make.leading.trailing.equalToSuperview().inset(24) + make.height.equalTo(48) + } + + resendLabel.snp.makeConstraints { make in + make.top.equalTo(codeInputContainer.snp.bottom).offset(8) + make.leading.trailing.equalToSuperview().inset(24) + } + + getStartedButton.snp.makeConstraints { make in + make.top.equalTo(resendLabel.snp.bottom).offset(48) + make.leading.trailing.equalToSuperview().inset(24) + make.height.equalTo(40) + } + + agreementContainer.snp.makeConstraints { make in + make.top.equalTo(getStartedButton.snp.bottom).offset(8) + make.leading.trailing.equalToSuperview().inset(24) + make.height.equalTo(44) + } + + let checkBoxSize = 14 + termsCheckbox.snp.makeConstraints { make in + make.centerY.equalTo(termsLabel.snp.centerY) + make.leading.equalToSuperview() + make.width.height.equalTo(checkBoxSize) + } + + termsLabel.snp.makeConstraints { make in + make.top.equalToSuperview() + make.leading.equalTo(termsCheckbox.snp.trailing).offset(8) + make.trailing.equalToSuperview() + make.height.equalTo(18) + } + + marketingCheckbox.snp.makeConstraints { make in + make.centerY.equalTo(marketingLabel.snp.centerY) + make.leading.equalToSuperview() + make.width.height.equalTo(checkBoxSize) + } + + marketingLabel.snp.makeConstraints { make in + make.top.equalTo(termsLabel.snp.bottom).offset(8) + make.leading.equalTo(marketingCheckbox.snp.trailing).offset(8) + make.trailing.equalToSuperview() + make.height.equalTo(18) + } + + let triangleOffset = agreeCheckBubbleView.triangleOffset ?? 20 + let triangleCenterX = triangleOffset + agreeCheckBubbleView.triangleWidth * 0.5 + let checkBoxCenterOffset = CGFloat(checkBoxSize) * 0.5 + let offsetX = triangleCenterX - checkBoxCenterOffset + agreeCheckBubbleView.snp.makeConstraints { make in + make.width.equalTo(217) + make.height.equalTo(36) + make.leading.equalTo(termsCheckbox.snp.leading).offset(-offsetX) + make.bottom.equalTo(termsCheckbox.snp.top).offset(-4) + } + } + + private func setupActions() { + backButton.addTarget(self, action: #selector(backButtonTapped), for: .touchUpInside) + getStartedButton.addTarget(self, action: #selector(getStartedButtonTapped), for: .touchUpInside) + termsCheckbox.addTarget(self, action: #selector(termsCheckboxTapped), for: .touchUpInside) + marketingCheckbox.addTarget(self, action: #selector(marketingCheckboxTapped), for: .touchUpInside) + + let resendTapGesture = UITapGestureRecognizer(target: self, action: #selector(resendLabelTapped)) + resendLabel.addGestureRecognizer(resendTapGesture) + + let termsLabelTapGesture = UITapGestureRecognizer(target: self, action: #selector(termsLabelTapped(_:))) + termsLabel.addGestureRecognizer(termsLabelTapGesture) + + let tapGesture = UITapGestureRecognizer(target: self, action: #selector(dismissKeyboard)) + addGestureRecognizer(tapGesture) + + let containerTapGesture = UITapGestureRecognizer(target: self, action: #selector(codeInputContainerTapped)) + codeInputContainer.addGestureRecognizer(containerTapGesture) + } + + private func setupCodeInputFields() { + codeInputFields = (0..<6).map { i in + let textField = createCodeInputField(tag: i) + codeInputContainer.addArrangedSubview(textField) + return textField + } + updateFieldAppearance(at: 0) + } + + private func createCodeInputField(tag: Int) -> CodeInputTextField { + let textField = CodeInputTextField() + textField.borderStyle = .none + textField.textAlignment = .center + textField.font = ThemeStore.shared.typographyTokens.Regular20 + textField.inputView = alphanumericKeyboard + textField.autocorrectionType = .no + textField.layer.cornerRadius = ThemeStore.shared.borderRadius.radius8 + textField.layer.borderWidth = 1 + textField.layer.borderColor = UIColor("E7ECF6").cgColor + textField.backgroundColor = .clear + textField.delegate = self + textField.tag = tag + textField.addTarget(self, action: #selector(textFieldDidChange(_:)), for: .editingChanged) + + textField.snp.makeConstraints { make in + make.width.height.equalTo(48) + } + + textField.onDeleteBackward = { [weak self] in + guard let self = self else { return } + self.handleDeleteBackward(for: textField) + } + + return textField + } + + // MARK: - Store Binding + + private func bindStore() { + store.$state + .map(\.toastMessage) + .removeDuplicates() + .sink { [weak self] message in + guard !message.isEmpty else { return } + self?.makeToast(message, position: .center) + } + .store(in: &cancellables) + + store.$state + .map(\.isValidating) + .removeDuplicates() + .receive(on: RunLoop.main) + .sink { [weak self] _ in + self?.updateGetStartedButtonState() + } + .store(in: &cancellables) + + store.$state + .map(\.isCodeInvalid) + .removeDuplicates() + .receive(on: RunLoop.main) + .sink { [weak self] isInvalid in + guard let self = self else { return } + if isInvalid { + self.setErrorState() + } + } + .store(in: &cancellables) + + store.$state + .map(\.showAgreeCheckBubble) + .removeDuplicates() + .receive(on: RunLoop.main) + .sink { [weak self] show in + self?.agreeCheckBubbleView.isHidden = !show + } + .store(in: &cancellables) + + store.$state + .map(\.remainingSeconds) + .removeDuplicates() + .receive(on: RunLoop.main) + .sink { [weak self] _ in + self?.updateResendLabel() + } + .store(in: &cancellables) + + store.$state + .map(\.inviteCode) + .removeDuplicates() + .filter { $0.isEmpty } + .dropFirst() + .receive(on: RunLoop.main) + .sink { [weak self] _ in + guard let self = self else { return } + self.codeInputFields.forEach { $0.text = "" } + self.updateGetStartedButtonState() + self.hideAllToasts() + } + .store(in: &cancellables) + } + + // MARK: - Actions + + @objc private func backButtonTapped() { + store.goBack() + } + + @objc private func getStartedButtonTapped() { + guard getStartedButton.isEnabled else { return } + let code = getInputInvitationCode() + store.updateInviteCode(code) + store.getStarted() + } + + @objc private func termsCheckboxTapped() { + store.toggleTermsCheckbox() + termsCheckbox.isSelected = store.state.isTermsAgreed + updateCheckboxAppearance(termsCheckbox) + updateGetStartedButtonState() + } + + @objc private func marketingCheckboxTapped() { + store.toggleMarketingCheckbox() + marketingCheckbox.isSelected = store.state.isMarketingAgreed + updateCheckboxAppearance(marketingCheckbox) + } + + @objc private func dismissKeyboard() { + endEditing(true) + } + + @objc private func codeInputContainerTapped() { + moveToCorrectField() + } + + @objc private func textFieldDidChange(_ textField: UITextField) { + updateGetStartedButtonState() + } + + @objc private func resendLabelTapped() { + store.resendInvitationCode() + } + + @objc private func termsLabelTapped(_ gesture: UITapGestureRecognizer) { + guard let label = gesture.view as? UILabel, + let attributedText = label.attributedText else { return } + + let text = attributedText.string + let tapLocation = gesture.location(in: label) + + let textContainer = NSTextContainer(size: label.bounds.size) + textContainer.lineFragmentPadding = 0 + textContainer.maximumNumberOfLines = label.numberOfLines + textContainer.lineBreakMode = label.lineBreakMode + + let layoutManager = NSLayoutManager() + layoutManager.addTextContainer(textContainer) + + let textStorage = NSTextStorage(attributedString: attributedText) + textStorage.addLayoutManager(layoutManager) + + let characterIndex = layoutManager.characterIndex(for: tapLocation, in: textContainer, fractionOfDistanceBetweenInsertionPoints: nil) + + if let termsRange = text.range(of: String.InvitationCode.termsOfService) { + let nsTermsRange = NSRange(termsRange, in: text) + if NSLocationInRange(characterIndex, nsTermsRange) { + provideTapFeedback() + openLink(with: URL(string: "https://trtc.io/app/service")) + return + } + } + + if let privacyRange = text.range(of: String.InvitationCode.privacyPolicy) { + let nsPrivacyRange = NSRange(privacyRange, in: text) + if NSLocationInRange(characterIndex, nsPrivacyRange) { + provideTapFeedback() + openLink(with: URL(string: "https://trtc.io/app/privacy")) + return + } + } + } + + // MARK: - Custom Keyboard Input Handling + + private func handleKeyboardInput(_ key: String) { + if store.state.isCodeInvalid { + clearErrorState() + } + + guard let currentField = codeInputFields.first(where: { $0.isFirstResponder }) else { return } + + if let text = currentField.text, !text.isEmpty { return } + + currentField.text = key.uppercased() + moveToNextField(from: currentField) + updateGetStartedButtonState() + } + + private func handleKeyboardDelete() { + if store.state.isCodeInvalid { + clearErrorState() + } + + guard let currentField = codeInputFields.first(where: { $0.isFirstResponder }) else { return } + + if let text = currentField.text, !text.isEmpty { + currentField.text = "" + updateFieldAppearance(at: currentField.tag) + updateGetStartedButtonState() + } else { + let previousTag = currentField.tag - 1 + if previousTag >= 0 { + let previousField = codeInputFields[previousTag] + previousField.text = "" + _ = previousField.becomeFirstResponder() + updateFieldAppearance(at: previousTag) + updateGetStartedButtonState() + } + } + } + + // MARK: - Delete Backward Handling + + private func handleDeleteBackward(for textField: UITextField) { + if textField.text?.isEmpty != false { + let previousTag = textField.tag - 1 + if previousTag >= 0 { + let previousField = codeInputFields[previousTag] + previousField.text = "" + _ = previousField.becomeFirstResponder() + updateFieldAppearance(at: previousTag) + updateGetStartedButtonState() + } + } else { + DispatchQueue.main.async { + self.updateGetStartedButtonState() + } + } + } + + // MARK: - Button State + + private func updateGetStartedButtonState() { + let invitationCode = codeInputFields.compactMap { $0.text }.joined() + let isCodeComplete = invitationCode.count == 6 + let isValidating = store.state.isValidating + + let shouldEnable = isCodeComplete && !isValidating + + getStartedButton.isEnabled = shouldEnable + + if isValidating { + getStartedButton.setTitle(String.InvitationCode.validating, for: .normal) + getStartedButton.backgroundColor = ThemeStore.shared.colorTokens.buttonColorPrimaryDisabled + } else { + getStartedButton.setTitle(String.InvitationCode.getStarted, for: .normal) + if shouldEnable { + getStartedButton.backgroundColor = ThemeStore.shared.colorTokens.buttonColorPrimaryDefault + } else { + getStartedButton.backgroundColor = ThemeStore.shared.colorTokens.buttonColorPrimaryDisabled + } + } + } + + // MARK: - Resend Label + + private func updateResendLabel() { + guard !store.state.isCodeInvalid, store.state.emailAddress != nil else { + resendLabel.attributedText = nil + return + } + + let isResendEnabled = store.state.isResendEnabled + let remainingSeconds = store.state.remainingSeconds + + let (text, highlightText, highlightColor): (String, String, UIColor) = isResendEnabled + ? (String.InvitationCode.resendClickable, String.InvitationCode.clickToResend, ThemeStore.shared.colorTokens.textColorLink) + : (String.InvitationCode.resendCountdown(remainingSeconds), String.InvitationCode.resendAfter(remainingSeconds), UIColor("ADCFFF")) + + let attributedString = NSMutableAttributedString(string: text) + let baseFont = ThemeStore.shared.typographyTokens.Regular12 + let baseColor = UIColor.black.withAlphaComponent(0.55) + + attributedString.addAttribute(.font, value: baseFont, range: NSRange(location: 0, length: text.count)) + attributedString.addAttribute(.foregroundColor, value: baseColor, range: NSRange(location: 0, length: text.count)) + + if let range = text.range(of: highlightText) { + let nsRange = NSRange(range, in: text) + attributedString.addAttribute(.foregroundColor, value: highlightColor, range: nsRange) + } + + resendLabel.attributedText = attributedString + } + + // MARK: - Error State + + private func setErrorState() { + updateFieldsErrorState(isError: true) + updateResendLabelToError() + let impactFeedback = UIImpactFeedbackGenerator(style: .medium) + impactFeedback.impactOccurred() + } + + private func clearErrorState() { + store.clearErrorState() + updateFieldsErrorState(isError: false) + updateResendLabel() + updateGetStartedButtonState() + moveToCorrectField() + } + + private func updateFieldsErrorState(isError: Bool) { + let borderColor = isError ? ThemeStore.shared.colorTokens.textColorError : UIColor("E7ECF6") + let textColor = isError ? ThemeStore.shared.colorTokens.textColorError : UIColor.black + + codeInputFields.forEach { field in + field.textColor = textColor + if isError || (field.text?.isEmpty != false) { + field.layer.borderColor = borderColor.cgColor + } else { + field.layer.borderColor = ThemeStore.shared.colorTokens.buttonColorPrimaryDefault.cgColor + } + } + } + + private func updateResendLabelToError() { + let text = String.InvitationCode.codeIncorrect + let attributedString = NSMutableAttributedString(string: text) + let font = ThemeStore.shared.typographyTokens.Regular12 + + attributedString.addAttribute(.font, value: font, range: NSRange(location: 0, length: text.count)) + attributedString.addAttribute(.foregroundColor, value: ThemeStore.shared.colorTokens.textColorError, range: NSRange(location: 0, length: text.count)) + + resendLabel.attributedText = attributedString + } + + // MARK: - Field Appearance + + private func updateFieldAppearance(at index: Int) { + if store.state.isCodeInvalid { clearErrorState() } + + codeInputFields.enumerated().forEach { (i, field) in + field.subviews.filter { $0.backgroundColor == ThemeStore.shared.colorTokens.buttonColorPrimaryDefault }.forEach { $0.removeFromSuperview() } + field.layer.borderColor = (i == index ? ThemeStore.shared.colorTokens.buttonColorPrimaryDefault : UIColor("E7ECF6")).cgColor + } + + let currentField = codeInputFields[index] + if currentField.text?.isEmpty == true { + let lineView = UIView() + lineView.backgroundColor = ThemeStore.shared.colorTokens.buttonColorPrimaryDefault + currentField.addSubview(lineView) + lineView.snp.makeConstraints { make in + make.center.equalToSuperview() + make.width.equalTo(1) + make.height.equalTo(24) + } + } + } + + private func updateCheckboxAppearance(_ checkbox: UIButton) { + if checkbox.isSelected { + checkbox.layer.borderColor = UIColor("4588F5").cgColor + } else { + checkbox.layer.borderColor = UIColor("E7ECF6").cgColor + } + } + + // MARK: - Navigation Helpers + + private func moveToNextField(from currentField: UITextField) { + let nextTag = currentField.tag + 1 + if nextTag < codeInputFields.count { + _ = codeInputFields[nextTag].becomeFirstResponder() + updateFieldAppearance(at: nextTag) + } else { + currentField.resignFirstResponder() + } + } + + private func moveToCorrectField() { + let targetIndex = codeInputFields.firstIndex { $0.text?.isEmpty != false } ?? (codeInputFields.count - 1) + focusField(at: targetIndex) + } + + private func focusField(at index: Int) { + _ = codeInputFields[index].becomeFirstResponder() + updateFieldAppearance(at: index) + } + + private func getInputInvitationCode() -> String { + return codeInputFields.compactMap { $0.text }.joined() + } + + // MARK: - Helpers + + private func provideTapFeedback() { + let impactFeedback = UIImpactFeedbackGenerator(style: .light) + impactFeedback.impactOccurred() + + UIView.animate(withDuration: 0.1, animations: { + self.termsLabel.alpha = 0.6 + }) { _ in + UIView.animate(withDuration: 0.1) { + self.termsLabel.alpha = 1.0 + } + } + } + + private func openLink(with url: URL?) { + guard let url = url else { return } + guard let vc = findViewController() else { return } + let controller = SFSafariViewController(url: url) + vc.present(controller, animated: true) + } + + private func findViewController() -> UIViewController? { + var responder: UIResponder? = self + while let r = responder { + if let vc = r as? UIViewController { + return vc + } + responder = r.next + } + return nil + } +} + +// MARK: - UITextFieldDelegate +extension InviteCodeView: UITextFieldDelegate { + func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool { + if store.state.isCodeInvalid { + clearErrorState() + } + + if !string.isEmpty { + let allowedCharacters = CharacterSet.alphanumerics + let characterSet = CharacterSet(charactersIn: string) + + if !allowedCharacters.isSuperset(of: characterSet) { + return false + } + + let currentText = textField.text ?? "" + let newLength = currentText.count + string.count - range.length + + if newLength > 1 { + return false + } + + textField.text = string.uppercased() + moveToNextField(from: textField) + updateGetStartedButtonState() + return false + } + + return true + } + + func textFieldDidBeginEditing(_ textField: UITextField) { + DispatchQueue.main.async { + if let text = textField.text, !text.isEmpty { + let endPosition = textField.endOfDocument + textField.selectedTextRange = textField.textRange(from: endPosition, to: endPosition) + } + } + updateFieldAppearance(at: textField.tag) + } + + func textFieldDidEndEditing(_ textField: UITextField) { + textField.subviews.filter { $0.backgroundColor == ThemeStore.shared.colorTokens.buttonColorPrimaryDefault }.forEach { $0.removeFromSuperview() } + + if textField.text?.isEmpty != false { + textField.layer.borderColor = UIColor("E7ECF6").cgColor + } + } +} diff --git a/application/login/InviteCode/Store/InviteCodeStore.swift b/application/login/InviteCode/Store/InviteCodeStore.swift new file mode 100644 index 00000000..0028b9f1 --- /dev/null +++ b/application/login/InviteCode/Store/InviteCodeStore.swift @@ -0,0 +1,275 @@ +// +// InviteCodeStore.swift +// login +// + +import Combine +import Foundation + +class InviteCodeStore: LoginSubStore { + // MARK: - State + + @Published private(set) var state = InviteCodeState() + + // MARK: - LoginSubStore + + private let resultSubject = PassthroughSubject, Never>() + var resultPublisher: AnyPublisher, Never> { + resultSubject.eraseToAnyPublisher() + } + + // MARK: - Dependencies + + private let networkService = LoginNetworkService() + private var logoutCancellable: AnyCancellable? + private var countdownTimer: Timer? + + var onBack: (() -> Void)? + + // MARK: - Init + + init(emailAddress: String? = nil) { + state.emailAddress = emailAddress + + if let email = emailAddress { + state.titleText = String.InvitationCode.checkYourEmail + state.descriptionText = String.InvitationCode.enterCodeSentToEmail(email) + state.showMarketingCheckbox = true + } else { + state.titleText = String.InvitationCode.enterInvitationCode + state.descriptionText = String.InvitationCode.enterCodeToGetStarted + state.showMarketingCheckbox = false + } + + logoutCancellable = subscribeLogout() + } + + deinit { + stopCountdown() + } + + // MARK: - LoginSubStore + + func resetState() { + stopCountdown() + state = InviteCodeState() + } + + // MARK: - Public Methods + + func updateInviteCode(_ code: String) { + state.inviteCode = code + } + + func toggleTermsCheckbox() { + state.isTermsAgreed.toggle() + if state.isTermsAgreed { + state.showAgreeCheckBubble = false + } + } + + func toggleMarketingCheckbox() { + state.isMarketingAgreed.toggle() + } + + func goBack() { + onBack?() + } + + func sendInvitationCodeIfNeeded() { + guard let email = state.emailAddress else { return } + sendInvitationCode(email: email) + startCountdown() + } + + func resendInvitationCode() { + guard state.isResendEnabled, let email = state.emailAddress else { return } + state.toastMessage = String.InvitationCode.resendingCode + clearErrorState() + sendInvitationCode(email: email) { [weak self] in + self?.startCountdown() + } failed: { [weak self] code, _ in + guard let self = self else { return } + if code == 230 { + self.state.toastMessage = LoginLocalize("Demo.TRTC.Portal.Main.EmailTooManyCodeRequest") + } else { + self.state.toastMessage = LoginLocalize("Demo.TRTC.Portal.Main.EmailIncorrect") + } + } + } + + func getStarted() { + let code = state.inviteCode + + guard code.count == 6 else { + state.toastMessage = String.InvitationCode.enterCompleteCode + return + } + + guard state.isTermsAgreed else { + state.showAgreeCheckBubble = true + return + } + + invitationCodeAuthLogin(code) + } + + func clearErrorState() { + state.isCodeInvalid = false + } + + // MARK: - Private Methods + + private func sendInvitationCode(email: String, + success: (() -> Void)? = nil, + failed: ((Int32, String) -> Void)? = nil) + { + networkService.requestInvitationCode(email: email) { result in + switch result { + case .success: + success?() + case .failure(let error): + if case .loginFailed(let code, let message) = error { + failed?(Int32(code), message) + } else { + failed?(-1, error.message) + } + } + } + } + + private func invitationCodeAuthLogin(_ code: String) { + state.isValidating = true + + if let email = state.emailAddress { + networkService.needReceiveEmail(email: email, marketingStatus: state.isMarketingAgreed) + } + + networkService.noneAuthLogin(invitationCode: code) { [weak self] result in + guard let self = self else { return } + self.state.isValidating = false + switch result { + case .success(let loginResult): + self.resultSubject.send(.success(loginResult)) + case .failure(let error): + self.handleValidationFailure() + if case .loginFailed(let errorCode, _) = error { + if errorCode == kAppLoginServiceUserInviteCodeBeUsed { + self.state.toastMessage = LoginLocalize("Demo.TRTC.Portal.Main.InviteCodeBeUsed") + } else if errorCode == kAppLoginServiceUserInviteIncorrect { + self.state.toastMessage = LoginLocalize("Demo.TRTC.Portal.Main.InviteCodeInvalid") + } else if errorCode == kAppLoginServiceUserInviteCodeExpire { + self.state.toastMessage = LoginLocalize("Demo.TRTC.Portal.Main.UserInviteCodeExpire") + } else { + self.state.toastMessage = error.message + } + } else { + self.state.toastMessage = error.message + } + } + } + } + + private func handleValidationFailure() { + state.isCodeInvalid = true + } + + // MARK: - Countdown + + private func startCountdown() { + stopCountdown() + state.remainingSeconds = 59 + state.isResendEnabled = false + + countdownTimer = Timer.scheduledTimer(withTimeInterval: 1.0, repeats: true) { [weak self] _ in + guard let self = self else { return } + if self.state.remainingSeconds > 1 { + self.state.remainingSeconds -= 1 + } else { + self.stopCountdown() + } + } + } + + private func stopCountdown() { + countdownTimer?.invalidate() + countdownTimer = nil + state.remainingSeconds = 0 + state.isResendEnabled = true + } +} + +// MARK: - State + +public struct InviteCodeState { + public var emailAddress: String? + public var inviteCode: String = "" + public var titleText: String = "" + public var descriptionText: String = "" + public var isValidating: Bool = false + public var isCodeInvalid: Bool = false + public var isTermsAgreed: Bool = false + public var isMarketingAgreed: Bool = false + public var showMarketingCheckbox: Bool = false + public var showAgreeCheckBubble: Bool = false + public var remainingSeconds: Int = 0 + public var isResendEnabled: Bool = false + public var toastMessage: String = "" +} + +// MARK: - String Constants + +extension String { + enum InvitationCode { + // MARK: - Titles + + static var checkYourEmail: String { LoginLocalize("Demo.TRTC.InviteCode.checkYourEmail") } + static var enterInvitationCode: String { LoginLocalize("Demo.TRTC.InviteCode.enterInvitationCode") } + + // MARK: - Descriptions + + static func enterCodeSentToEmail(_ email: String) -> String { + return String(format: LoginLocalize("Demo.TRTC.InviteCode.enterCodeSentToEmail"), email) + } + + static var enterCodeToGetStarted: String { LoginLocalize("Demo.TRTC.InviteCode.enterCodeToGetStarted") } + + // MARK: - Button Texts + + static var getStarted: String { LoginLocalize("Demo.TRTC.InviteCode.getStarted") } + static var validating: String { LoginLocalize("Demo.TRTC.InviteCode.validating") } + + // MARK: - Error Messages + + static var enterCompleteCode: String { LoginLocalize("Demo.TRTC.InviteCode.enterCompleteCode") } + static var codeIncorrect: String { LoginLocalize("Demo.TRTC.InviteCode.codeIncorrect") } + + // MARK: - Resend Messages + + static var resendClickable: String { LoginLocalize("Demo.TRTC.InviteCode.resendClickable") } + static var clickToResend: String { LoginLocalize("Demo.TRTC.InviteCode.clickToResend") } + static func resendCountdown(_ seconds: Int) -> String { + return String(format: LoginLocalize("Demo.TRTC.InviteCode.resendCountdown"), seconds) + } + + static func resendAfter(_ seconds: Int) -> String { + return String(format: LoginLocalize("Demo.TRTC.InviteCode.resendAfter"), seconds) + } + + static var resendingCode: String { LoginLocalize("Demo.TRTC.InviteCode.resendingCode") } + + // MARK: - Agreement Texts + + static var agreeToTermsText: String { + return LoginLocalize("Demo.TRTC.InviteCode.agreeToTermsPrefix") + + termsOfService + + LoginLocalize("Demo.TRTC.InviteCode.agreeToTermsMiddle") + + privacyPolicy + + LoginLocalize("Demo.TRTC.InviteCode.agreeToTermsSuffix") + } + + static var termsOfService: String { LoginLocalize("Demo.TRTC.InviteCode.termsOfService") } + static var privacyPolicy: String { LoginLocalize("Demo.TRTC.InviteCode.privacyPolicy") } + static var marketingInfo: String { LoginLocalize("Demo.TRTC.InviteCode.marketingInfo") } + } +} diff --git a/application/login/Login.podspec b/application/login/Login.podspec new file mode 100644 index 00000000..0fd97386 --- /dev/null +++ b/application/login/Login.podspec @@ -0,0 +1,43 @@ +Pod::Spec.new do |spec| + spec.name = 'Login' + spec.version = '1.0.0' + spec.platform = :ios + spec.ios.deployment_target = '13.0' + spec.license = { :type => 'MIT', :file => 'LICENSE' } + spec.homepage = 'https://cloud.tencent.com/document/product/269/3794' + spec.documentation_url = 'https://cloud.tencent.com/document/product/269/9147' + spec.authors = 'tencent video cloud' + spec.summary = 'RT-Cube Login Module — 登录模块,支持手机号/邮箱/iOA/邀请码/Debug 登录' + + spec.static_framework = true + spec.xcconfig = { 'VALID_ARCHS' => 'armv7 arm64 x86_64' } + spec.swift_version = '5.0' + + spec.source = { :path => './' } + + spec.dependency 'TUICore' + spec.dependency 'Alamofire' + spec.dependency 'SnapKit' + spec.dependency 'Kingfisher' + spec.dependency 'Toast-Swift' + spec.dependency 'AtomicX' + + spec.default_subspecs = 'OpenSource' + + spec.subspec 'OpenSource' do |ss| + ss.source_files = '**/*.{swift,h,m}' + ss.exclude_files = [ + 'Frameworks/**/*', + 'IOAAuth/*', + 'IOAAuth/**/*', + ] + ss.resource_bundles = { + 'LoginResources' => [ + 'Resource/**/*.xcassets', + 'Resource/**/*.strings', + 'Resource/**/*.html', + ] + } + end + +end diff --git a/application/login/LoginEntry.swift b/application/login/LoginEntry.swift new file mode 100644 index 00000000..905b2a16 --- /dev/null +++ b/application/login/LoginEntry.swift @@ -0,0 +1,330 @@ +// +// LoginEntry.swift +// login +// + +import Combine +import ImSDK_Plus +import UIKit + +public enum LoginMode: Int { + case phoneVerify = 1 + + case emailVerify = 2 + + case ioaAuth = 3 + + case inviteCode = 4 + + case debugAuth = 5 + + case menu = 6 +} + +private let loggedInKey = "com.rtcube.login.lastLoginMode" + +public final class LoginEntry: NSObject { + public static let shared = LoginEntry() + override private init() {} + + @Published public internal(set) var userModel: UserModel? + + public var hasLoggedIn: Bool { + loggedInMode != nil + } + + public var loggedInMode: LoginMode? { + let value = UserDefaults.standard.integer(forKey: loggedInKey) + if let mode = LoginMode(rawValue: value) { + return mode + } + return nil + } + + private func markLoggedIn(mode: LoginMode) { + if isAutoLoginEnabled { + UserDefaults.standard.set(mode.rawValue, forKey: loggedInKey) + } else { + UserDefaults.standard.removeObject(forKey: loggedInKey) + } + userInfoManager.startListener() + } + + private func clearLoggedIn() { + UserDefaults.standard.removeObject(forKey: loggedInKey) + userInfoManager.stopListener() + } + + public private(set) var config: LoginConfig = .default + + public private(set) var primaryConfig: LoginConfig = .default + + public var userSigGenerator: ((_ identifier: String, _ sdkAppId: Int, _ secretKey: String) -> String)? + + public var privacyLinkHandler: ((_ linkType: String, _ viewController: UIViewController?) -> Void)? + + public var onEnvironmentChanged: ((_ environment: ServerEnvironment) -> Void)? + + public var onPassiveLogout: (() -> Void)? + + public private(set) var testBaseUrl: String? + + public private(set) var debugConfig: LoginConfig? + + private var isInitialized = false + + private var pendingLaunchActions: [() -> Void] = [] + + let debugAuthStore = DebugAuthStore() + private var debugCancellable: AnyCancellable? + + private let userInfoManager = UserInfoManager() + + private var currentEnvironment: ServerEnvironment = .production + + public func initialize( + baseUrl: String, + testBaseUrl: String? = nil, + sdkAppId: Int = 0, + secretKey: String = "", + debugSdkAppId: Int? = nil, + debugSecretKey: String? = nil, + isSetupService: Bool = true, + apaasAppId: String = "", + ioaAppKey: String? = nil, + ioaAppId: String? = nil + ) { + TUILoginListenerHandler.shared.register() + + self.testBaseUrl = testBaseUrl + + let newConfig = LoginConfig( + httpBaseUrl: baseUrl, + isSetupService: isSetupService, + sdkAppId: sdkAppId, + apaasAppId: apaasAppId, + secretKey: secretKey + ) + + if let debugSdkAppId = debugSdkAppId { + debugConfig = LoginConfig( + httpBaseUrl: baseUrl, + isSetupService: false, + sdkAppId: debugSdkAppId, + apaasAppId: apaasAppId, + secretKey: debugSecretKey ?? secretKey + ) + } + + #if LOGIN_FULL + if let ioaAppKey = ioaAppKey, let ioaAppId = ioaAppId { + IOAAuthManager.shared.setupIOA(appKey: ioaAppKey, appId: ioaAppId) + } + #endif + + let oldSdkAppId = config.sdkAppId + let hasNetworkLoggedIn: Bool + if let loggedInMode = loggedInMode { + switch loggedInMode { + case .phoneVerify, .emailVerify, .ioaAuth, .inviteCode: + hasNetworkLoggedIn = true + default: + hasNetworkLoggedIn = false + } + } else { + hasNetworkLoggedIn = false + } + let needsLogout = hasNetworkLoggedIn + && oldSdkAppId != newConfig.sdkAppId + && config != .default + + primaryConfig = newConfig + applyConfig(newConfig) + + if needsLogout { + debugPrint(" sdkAppId changed (\(oldSdkAppId) → \(newConfig.sdkAppId)), logging out before re-initialize") + performLogout { [weak self] in + self?.markInitialized() + } + } else { + markInitialized() + } + } + + @discardableResult + public func launch( + mode: LoginMode, + completion: @escaping (Result) -> Void + ) -> UIViewController { + #if !LOGIN_FULL + if mode == .ioaAuth { + completion(.failure(.ioaAuthFailed( + message: "iOA login is not available in the open-source build" + ))) + return UIViewController() + } + #endif + + let wrappedCompletion: (Result) -> Void = { [weak self] result in + if case .success(let loginResult) = result { + self?.userModel = loginResult.userModel + self?.userInfoManager.updateSelfInfo(userModel: loginResult.userModel) + self?.markLoggedIn(mode: loginResult.loginMode) + } + self?.navigator = nil + completion(result) + } + currentEnvironment = .production + let navigator = LoginNavigator(completion: wrappedCompletion) + navigator.onLoginModeChanged = { [weak self] mode in + self?.switchConfig(for: mode) + } + navigator.onEnvironmentChanged = { [weak self] env in + self?.currentEnvironment = env + } + self.navigator = navigator + let viewController = navigator.buildViewController(mode: mode) + + #if LOGIN_FULL + IOAAuthManager.shared.activeNavigator = navigator + #endif + + let launchAction: () -> Void = { [weak self] in + guard let self = self else { return } + if let loggedInMode = loggedInMode { + switchConfig(for: loggedInMode) + switch loggedInMode { + case .phoneVerify, .emailVerify, .ioaAuth, .inviteCode: + performTokenAuth(originalMode: loggedInMode) { [weak self] result in + switch result { + case .success(let loginResult): + wrappedCompletion(.success(loginResult)) + case .failure(let error): + self?.clearLoggedIn() + LoginManager.shared.removeLoginCache() + ProfileManager.shared.removeLoginCache() + completion(.failure(error)) + } + } + case .debugAuth: + debugAuthStore.login() + debugCancellable = debugAuthStore.resultPublisher.receive(on: RunLoop.main) + .sink { [weak self] result in + switch result { + case .success(let loginResult): + wrappedCompletion(.success(loginResult)) + case .failure(let err): + self?.clearLoggedIn() + LoginManager.shared.removeLoginCache() + ProfileManager.shared.removeLoginCache() + completion(.failure(err)) + } + self?.debugCancellable = nil + } + default: break + } + } + } + + if isInitialized { + launchAction() + } else { + debugPrint(" initialize not yet complete, launch will be deferred") + pendingLaunchActions.append(launchAction) + } + + return viewController + } + + public func logout(completion: ((Result) -> Void)? = nil) { + performLogout { + completion?(.success(())) + } + } + + public func logoff(completion: @escaping (Result) -> Void) { + let networkService = LoginNetworkService() + networkService.deleteAccount { [weak self] result in + switch result { + case .success: + self?.clearLoggedIn() + self?.userModel = nil + LoginManager.shared.removeLoginCache() + ProfileManager.shared.removeLoginCache() + completion(.success(())) + case .failure(let error): + completion(.failure(error)) + } + } + } + + // MARK: - Private + + private func markInitialized() { + isInitialized = true + let actions = pendingLaunchActions + pendingLaunchActions.removeAll() + actions.forEach { $0() } + } + + private func applyConfig(_ newConfig: LoginConfig) { + debugPrint("Environment: set sdkappid: \(newConfig.sdkAppId)") + config = newConfig + HttpLogicRequest.resetSdkAppIdCache() + } + + func switchConfig(for mode: LoginMode) { + defer { + V2TIMManager.sharedInstance().unInitSDK() + debugPrint("Environment: set env: \(currentEnvironment.title)") + onEnvironmentChanged?(currentEnvironment) + } + var targetConfig: LoginConfig + switch mode { + case .debugAuth: + guard let debugConfig = debugConfig else { return } + targetConfig = debugConfig + default: + targetConfig = primaryConfig + } + if currentEnvironment == .test, let testUrl = testBaseUrl { + targetConfig = targetConfig.withBaseUrl(testUrl) + } + guard targetConfig != config else { return } + applyConfig(targetConfig) + } + + private func performLogout(completion: @escaping () -> Void) { + clearLoggedIn() + userModel = nil + LoginManager.shared.removeLoginCache() + ProfileManager.shared.removeLoginCache() + LoginSubStoreLogoutSignal.shared.subject.send() + let networkService = LoginNetworkService() + networkService.logout { _ in + completion() + } + } + + private func performTokenAuth(originalMode: LoginMode, completion: @escaping (Result) -> Void) { + tokenStore.resultPublisher + .first() + .receive(on: RunLoop.main) + .sink { result in + completion(result) + } + .store(in: &tokenCancellable) + tokenStore.performAutoLogin(originalMode: originalMode) + } + + private var tokenCancellable = Set() + private var navigator: LoginNavigator? + private lazy var tokenStore = TokenAuthStore() + + private static let autoLoginKey = "com.rtcube.login.autoLoginEnabled" + + public var isAutoLoginEnabled: Bool { + get { UserDefaults.standard.bool(forKey: Self.autoLoginKey) } + set { UserDefaults.standard.set(newValue, forKey: Self.autoLoginKey) } + } +} diff --git a/application/login/LoginNavigator.swift b/application/login/LoginNavigator.swift new file mode 100644 index 00000000..64bc0448 --- /dev/null +++ b/application/login/LoginNavigator.swift @@ -0,0 +1,428 @@ +// +// LoginNavigator.swift +// login +// + +import UIKit +import Combine +import Toast_Swift +#if LOGIN_FULL +import ITLogin +#endif + +final class LoginNavigator: NSObject { + + private let navigationController = UINavigationController() + private let completion: (Result) -> Void + + var onLoginModeChanged: ((LoginMode) -> Void)? + + var onEnvironmentChanged: ((ServerEnvironment) -> Void)? + + private var cancellables = Set() + private var hasFinished = false + private let networkService = LoginNetworkService() + private var currentMode: LoginMode = .phoneVerify + + init(completion: @escaping (Result) -> Void) { + self.completion = completion + } + + func buildViewController(mode: LoginMode) -> UIViewController { + currentMode = mode + navigationController.setNavigationBarHidden(true, animated: false) + navigationController.modalPresentationStyle = .fullScreen + navigationController.presentationController?.delegate = self + + if mode != .menu { + onLoginModeChanged?(mode) + } + + switch mode { + case .phoneVerify: + pushPhoneVerify(animated: false) + case .emailVerify: + pushEmailVerify(animated: false) + case .ioaAuth: + pushIOAAuth(animated: false) + case .inviteCode: + pushInviteCode(animated: false) + case .debugAuth: + pushDebugAuthDirect(animated: false) + case .menu: + pushDevLoginMenu(animated: false) + } + + return navigationController + } + + // MARK: - PhoneVerify + + func pushPhoneVerify(animated: Bool = true) { + let store = PhoneVerifyStore() + store.onSwitchToIOA = { [weak self] in + self?.pushIOAAuth() + } + subscribeStoreResult(store.resultPublisher) + + let vc = UIViewController() + let view = PhoneVerifyView(store: store) + view.navigationController = navigationController + vc.view = view + showViewController(vc, animated: animated) + } + + // MARK: - EmailVerify + + func pushEmailVerify(animated: Bool = true) { + let store = EmailVerifyStore() + store.onSwitchToIOA = { [weak self] in + self?.pushIOAAuth() + } + store.onNavigateToInviteCode = { [weak self] email in + self?.pushInviteCode(emailAddress: email) + } + subscribeStoreResult(store.resultPublisher) + + let vc = UIViewController() + let view = EmailVerifyView(store: store) + view.navigationController = navigationController + vc.view = view + showViewController(vc, animated: animated) + } + + // MARK: - IOAAuth + + func pushIOAAuth(animated: Bool = true) { + #if LOGIN_FULL + let store = IOAAuthStore() + store.onBack = { [weak self] in + self?.pop() + } + subscribeStoreResult(store.resultPublisher) + + let vc = UIViewController() + let view = IOAAuthView(store: store) + vc.view = view + showViewController(vc, animated: animated) + #endif + } + + #if LOGIN_FULL + func handleIOATicket(_ ticket: String) { + if let topView = navigationController.topViewController?.view as? IOAAuthView { + topView.store.loginWithTicket(ticket) + ITLogin.sharedInstance().dimissLoginView() + } + } + #endif + + // MARK: - InviteCode + + func pushInviteCode(emailAddress: String? = nil, animated: Bool = true) { + let store = InviteCodeStore(emailAddress: emailAddress) + store.onBack = { [weak self] in + self?.pop() + } + subscribeStoreResult(store.resultPublisher) + + let vc = UIViewController() + let view = InviteCodeView(store: store) + vc.view = view + showViewController(vc, animated: animated) + } + + // MARK: - DebugAuth + + private func pushDevLoginMenu(animated: Bool = true) { + let menuVC = DevLoginMenuViewController() + menuVC.onSelectMode = { [weak self] selectedMode in + guard let self = self else { return } + self.onLoginModeChanged?(selectedMode) + switch selectedMode { + case .phoneVerify: + self.pushPhoneVerify() + case .emailVerify: + self.pushEmailVerify() + case .ioaAuth: + self.pushIOAAuth() + case .inviteCode: + self.pushInviteCode() + case .debugAuth: + self.pushDebugAuthDirect() + default: + break + } + } + menuVC.onEnvironmentChanged = { [weak self] env in + self?.onEnvironmentChanged?(env) + } + showViewController(menuVC, animated: animated) + } + + private func pushDebugAuthDirect(animated: Bool = true) { + let store = LoginEntry.shared.debugAuthStore + store.onNeedsRegister = { [weak self] in + guard let self = self else { return } + self.pushDebugRegister(store: store) + } + subscribeStoreResult(store.resultPublisher) + + let vc = UIViewController() + let view = DebugAuthView(store: store) + vc.view = view + showViewController(vc, animated: animated) + } + + // MARK: - DebugRegister + + private func pushDebugRegister(store: DebugAuthStore) { + let vc = UIViewController() + vc.title = LoginLocalize("Demo.TRTC.Login.regist") + let registerView = RegisterView() + registerView.setAvatarURL(store.state.avatarURL) + + registerView.onRegisterButtonTapped = { [weak store] nickName, _ in + store?.register(nickName: nickName) + } + registerView.onHeadImageTapped = { [weak self, weak registerView] in + guard let self = self else { return } + let viewModel = AvatarViewModel() + let alertView = AvatarListAlertView(viewModel: viewModel) + alertView.didClickConfirmBtn = { [weak store, weak registerView] in + guard let selectedModel = viewModel.currentSelectAvatarModel else { return } + store?.updateAvatar(selectedModel.url) + registerView?.setAvatarURL(selectedModel.url) + } + if let window = self.navigationController.view.window { + window.addSubview(alertView) + alertView.snp.makeConstraints { make in + make.edges.equalToSuperview() + } + alertView.show() + } + } + + vc.view = registerView + navigationController.pushViewController(vc, animated: true) + } + + private func pushRegister(pendingResult: LoginResult) { + let vc = UIViewController() + vc.title = LoginLocalize("Demo.TRTC.Login.regist") + let registerView = RegisterView() + + registerView.onRegisterButtonTapped = { [weak self] nickName, avatarURL in + guard let self = self else { return } + self.performRegister(nickName: nickName, avatarURL: avatarURL, pendingResult: pendingResult) + } + + registerView.onHeadImageTapped = { [weak self, weak registerView] in + guard let self = self else { return } + let viewModel = AvatarViewModel() + let alertView = AvatarListAlertView(viewModel: viewModel) + alertView.didClickConfirmBtn = { [weak registerView] in + guard let selectedModel = viewModel.currentSelectAvatarModel else { return } + registerView?.setAvatarURL(selectedModel.url) + } + if let window = self.navigationController.view.window { + window.addSubview(alertView) + alertView.snp.makeConstraints { make in + make.edges.equalToSuperview() + } + alertView.show() + } + } + + vc.view = registerView + navigationController.pushViewController(vc, animated: true) + } + + private func performRegister(nickName: String, avatarURL: String, pendingResult: LoginResult) { + networkService.updateUserName(name: nickName) { [weak self] result in + guard let self = self else { return } + switch result { + case .success: + let latestUser: UserModel + if let rawUser = LoginManager.shared.getCurrentUser() { + latestUser = UserModel( + userId: rawUser.userId, + token: rawUser.token, + userSig: rawUser.userSig, + phone: rawUser.phone, + email: rawUser.email, + name: rawUser.name, + avatar: rawUser.avatar + ) + } else { + latestUser = UserModel( + userId: pendingResult.userModel.userId, + token: pendingResult.userModel.token, + userSig: pendingResult.userModel.userSig, + phone: pendingResult.userModel.phone, + email: pendingResult.userModel.email, + name: nickName, + avatar: avatarURL.isEmpty ? pendingResult.userModel.avatar : avatarURL + ) + } + let updatedResult = LoginResult(userModel: latestUser, mode: currentMode) + + if let topView = self.navigationController.topViewController?.view { + topView.makeToast(LoginLocalize("Demo.TRTC.Login.registsuccess")) + } + self.finish(result: .success(updatedResult)) + case .failure(let error): + if let topView = self.navigationController.topViewController?.view { + topView.makeToast(error.message) + } + DispatchQueue.main.asyncAfter(deadline: .now() + 1.0) { [weak self] in + self?.navigationController.popViewController(animated: true) + } + } + } + } + + // MARK: - LanguageSelect + + private func rebuildCurrentLoginPage() { + cancellables.removeAll() + + navigationController.setNavigationBarHidden(true, animated: false) + + switch currentMode { + case .phoneVerify: + rebuildPhoneVerify() + case .emailVerify: + rebuildEmailVerify() + case .debugAuth: + rebuildDebugAuth() + case .menu: + rebuildDebugMenu() + case .ioaAuth, .inviteCode: + navigationController.popViewController(animated: true) + } + } + + private func rebuildPhoneVerify() { + let store = PhoneVerifyStore() + store.onSwitchToIOA = { [weak self] in + self?.pushIOAAuth() + } + subscribeStoreResult(store.resultPublisher) + + let vc = UIViewController() + let view = PhoneVerifyView(store: store) + view.navigationController = navigationController + vc.view = view + navigationController.setViewControllers([vc], animated: false) + } + + private func rebuildEmailVerify() { + let store = EmailVerifyStore() + store.onSwitchToIOA = { [weak self] in + self?.pushIOAAuth() + } + store.onNavigateToInviteCode = { [weak self] email in + self?.pushInviteCode(emailAddress: email) + } + subscribeStoreResult(store.resultPublisher) + + let vc = UIViewController() + let view = EmailVerifyView(store: store) + view.navigationController = navigationController + vc.view = view + navigationController.setViewControllers([vc], animated: false) + } + + private func rebuildDebugAuth() { + let store = DebugAuthStore() + store.onNeedsRegister = { [weak self] in + guard let self = self else { return } + self.pushDebugRegister(store: store) + } + subscribeStoreResult(store.resultPublisher) + + let vc = UIViewController() + let view = DebugAuthView(store: store) + vc.view = view + navigationController.setViewControllers([vc], animated: false) + } + + private func rebuildDebugMenu() { + let menuVC = DevLoginMenuViewController() + menuVC.onSelectMode = { [weak self] selectedMode in + guard let self = self else { return } + self.onLoginModeChanged?(selectedMode) + switch selectedMode { + case .phoneVerify: + self.pushPhoneVerify() + case .emailVerify: + self.pushEmailVerify() + case .ioaAuth: + self.pushIOAAuth() + case .inviteCode: + self.pushInviteCode() + case .debugAuth: + self.pushDebugAuthDirect() + default: break + } + } + menuVC.onEnvironmentChanged = { [weak self] env in + self?.onEnvironmentChanged?(env) + } + navigationController.setViewControllers([menuVC], animated: false) + } + + private func showViewController(_ vc: UIViewController, animated: Bool) { + if navigationController.viewControllers.isEmpty { + navigationController.setViewControllers([vc], animated: false) + } else { + navigationController.pushViewController(vc, animated: animated) + } + } + + func pop(animated: Bool = true) { + navigationController.popViewController(animated: animated) + } + + private func subscribeStoreResult(_ publisher: AnyPublisher, Never>) { + publisher + .first() + .receive(on: RunLoop.main) + .sink { [weak self] result in + guard let self = self else { return } + switch result { + case .success(let loginResult): + self.handleLoginSuccessWithRegistrationCheck(loginResult: loginResult) + case .failure: + self.finish(result: result) + } + } + .store(in: &cancellables) + } + + private func handleLoginSuccessWithRegistrationCheck(loginResult: LoginResult) { + if case .debugAuth = currentMode { + finish(result: .success(loginResult)) + return + } + + if loginResult.userModel.avatar.isEmpty { + pushRegister(pendingResult: loginResult) + } else { + finish(result: .success(loginResult)) + } + } + + private func finish(result: Result) { + guard !hasFinished else { return } + hasFinished = true + completion(result) + } +} + +extension LoginNavigator: UIAdaptivePresentationControllerDelegate { + func presentationControllerDidDismiss(_ presentationController: UIPresentationController) { + finish(result: .failure(.cancelled)) + } +} diff --git a/application/login/LoginSubStore.swift b/application/login/LoginSubStore.swift new file mode 100644 index 00000000..83af09c0 --- /dev/null +++ b/application/login/LoginSubStore.swift @@ -0,0 +1,32 @@ +// +// LoginSubStore.swift +// login +// + +import Combine + +protocol LoginSubStore: AnyObject { + var resultPublisher: AnyPublisher, Never> { get } + + func resetState() +} + +extension LoginSubStore { + static var logoutSubject: PassthroughSubject { + LoginSubStoreLogoutSignal.shared.subject + } + + func subscribeLogout() -> AnyCancellable { + Self.logoutSubject + .receive(on: RunLoop.main) + .sink { [weak self] in + self?.resetState() + } + } +} + +final class LoginSubStoreLogoutSignal { + static let shared = LoginSubStoreLogoutSignal() + let subject = PassthroughSubject() + private init() {} +} diff --git a/application/login/PhoneVerify/PhoneVerifyView.swift b/application/login/PhoneVerify/PhoneVerifyView.swift new file mode 100644 index 00000000..2649a83e --- /dev/null +++ b/application/login/PhoneVerify/PhoneVerifyView.swift @@ -0,0 +1,403 @@ +// +// PhoneVerifyView.swift +// login +// + +import UIKit +import AtomicX +import Combine +import Toast_Swift + +class PhoneVerifyView: UIView { + + // MARK: - Dependencies + + let store: PhoneVerifyStore + private var cancellables = Set() + weak var navigationController: UINavigationController? + + // MARK: - SubViews + + lazy var headerView: LoginHeaderView = { + let view = LoginHeaderView() + return view + }() + + lazy var contentView: UIView = { + let view = UIView(frame: .zero) + view.backgroundColor = ThemeStore.shared.colorTokens.bgColorOperate + return view + }() + + lazy var phoneInputView: PhoneInputView = { + let view = PhoneInputView() + return view + }() + + lazy var verifyCodeInputView: VerifyCodeInputView = { + let view = VerifyCodeInputView() + return view + }() + + lazy var privacyAgreementView: PrivacyAgreementView = { + let view = PrivacyAgreementView() + return view + }() + + lazy var loginButton: UIButton = { + let button = UIButton(type: .custom) + button.setTitleColor(.white, for: .normal) + button.setTitle(LoginLocalize("V2.Live.LoginMock.login"), for: .normal) + button.adjustsImageWhenHighlighted = false + button.setBackgroundImage(ThemeStore.shared.colorTokens.buttonColorPrimaryDefault.trans2Image(), for: .normal) + button.titleLabel?.font = ThemeStore.shared.typographyTokens.Medium18 + button.layer.shadowColor = ThemeStore.shared.colorTokens.buttonColorPrimaryDefault.cgColor + button.layer.shadowOffset = CGSize(width: 0, height: 6) + button.layer.shadowRadius = 16 + button.layer.shadowOpacity = 0.4 + button.layer.masksToBounds = true + button.isEnabled = false + return button + }() + + lazy var dividerContainerView: UIView = { + let view = UIView() + return view + }() + + lazy var leftDividerLine: UIView = { + let line = UIView() + line.backgroundColor = ThemeStore.shared.colorTokens.strokeColorSecondary + return line + }() + + lazy var rightDividerLine: UIView = { + let line = UIView() + line.backgroundColor = ThemeStore.shared.colorTokens.strokeColorSecondary + return line + }() + + lazy var dividerLabel: UILabel = { + let label = UILabel() + label.text = LoginLocalize("Demo.TRTC.Login.ioatext") + label.textColor = ThemeStore.shared.colorTokens.textColorTertiary + label.font = ThemeStore.shared.typographyTokens.Regular14 + label.textAlignment = .center + return label + }() + + lazy var ioaLoginButton: UIButton = { + let button = UIButton(type: .custom) + button.backgroundColor = ThemeStore.shared.colorTokens.bgColorDefault.withAlphaComponent(0.7) + button.layer.cornerRadius = ThemeStore.shared.borderRadius.radius20 + button.clipsToBounds = true + button.setImage(UIImage.loginImage(named: "ioa_login_icon"), for: .normal) + button.imageView?.contentMode = .scaleAspectFit + button.contentEdgeInsets = .zero + button.imageEdgeInsets = UIEdgeInsets(top: 9, left: 9, bottom: 9, right: 9) + return button + }() + + lazy var fullScreenLoadingView: FullScreenLoadingView = { + let view = FullScreenLoadingView() + return view + }() + + // MARK: - Init + + init(store: PhoneVerifyStore) { + self.store = store + super.init(frame: .zero) + backgroundColor = ThemeStore.shared.colorTokens.bgColorOperate + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + // MARK: - Lifecycle + + override func draw(_ rect: CGRect) { + super.draw(rect) + loginButton.layer.cornerRadius = loginButton.frame.height * 0.5 + } + + override func touchesBegan(_ touches: Set, with event: UIEvent?) { + super.touchesBegan(touches, with: event) + window?.endEditing(true) + checkButtonStates() + } + + private var isViewReady = false + override func didMoveToWindow() { + super.didMoveToWindow() + guard !isViewReady else { return } + constructViewHierarchy() + activateConstraints() + bindInteraction() + setupViewStyle() + isViewReady = true + } + + // MARK: - UI Lifecycle Methods + + func constructViewHierarchy() { + addSubview(headerView) + addSubview(contentView) + contentView.addSubview(phoneInputView) + contentView.addSubview(verifyCodeInputView) + contentView.addSubview(privacyAgreementView) + contentView.addSubview(loginButton) + + #if LOGIN_FULL + addSubview(dividerContainerView) + dividerContainerView.addSubview(leftDividerLine) + dividerContainerView.addSubview(rightDividerLine) + dividerContainerView.addSubview(dividerLabel) + addSubview(ioaLoginButton) + #endif + + addSubview(fullScreenLoadingView) + } + + func activateConstraints() { + headerView.snp.makeConstraints { make in + make.top.leading.trailing.equalToSuperview() + make.height.equalTo(200 + statusBarHeight()) + } + + contentView.snp.makeConstraints { make in + make.top.equalTo(headerView.bgView.snp.bottom) + make.leading.trailing.bottom.equalToSuperview() + } + + phoneInputView.snp.makeConstraints { make in + make.top.equalToSuperview().offset(convertPixel(h: 40)) + make.leading.equalToSuperview().offset(convertPixel(w: 30)) + make.trailing.equalToSuperview().offset(-convertPixel(w: 30)) + make.height.equalTo(convertPixel(h: 57)) + } + + verifyCodeInputView.snp.makeConstraints { make in + make.leading.height.trailing.equalTo(phoneInputView) + make.top.equalTo(phoneInputView.snp.bottom).offset(convertPixel(h: 20)) + } + + privacyAgreementView.snp.makeConstraints { make in + make.top.equalTo(verifyCodeInputView.snp.bottom).offset(30) + make.leading.equalTo(verifyCodeInputView) + make.trailing.equalTo(verifyCodeInputView) + make.height.equalTo(convertPixel(h: 56)) + } + + loginButton.snp.makeConstraints { make in + make.top.equalTo(privacyAgreementView.snp.bottom).offset(convertPixel(h: 20)) + make.leading.equalToSuperview().offset(convertPixel(w: 20)) + make.trailing.equalToSuperview().offset(-convertPixel(w: 20)) + make.height.equalTo(convertPixel(h: 52)) + } + + #if LOGIN_FULL + dividerContainerView.snp.makeConstraints { make in + make.left.right.equalToSuperview().inset(40) + make.bottom.equalToSuperview().offset(-130) + make.height.equalTo(20) + } + + dividerLabel.snp.makeConstraints { make in + make.center.equalToSuperview() + } + + leftDividerLine.snp.makeConstraints { make in + make.left.equalToSuperview() + make.right.equalTo(dividerLabel.snp.left).offset(-12) + make.centerY.equalToSuperview() + make.height.equalTo(1) + } + + rightDividerLine.snp.makeConstraints { make in + make.left.equalTo(dividerLabel.snp.right).offset(12) + make.right.equalToSuperview() + make.centerY.equalToSuperview() + make.height.equalTo(1) + } + + ioaLoginButton.snp.makeConstraints { make in + make.centerX.equalToSuperview() + make.top.equalTo(dividerContainerView.snp.bottom).offset(20) + make.width.height.equalTo(40) + } + #endif + + fullScreenLoadingView.snp.makeConstraints { make in + make.edges.equalToSuperview() + } + } + + func bindInteraction() { + loginButton.addTarget(self, action: #selector(loginButtonClick), for: .touchUpInside) + verifyCodeInputView.getVerifyCodeButton.addTarget(self, action: #selector(getVerifyCodeButtonClick), for: .touchUpInside) + #if LOGIN_FULL + ioaLoginButton.addTarget(self, action: #selector(ioaLoginButtonClick), for: .touchUpInside) + #endif + + phoneInputView.onTextChanged = { [weak self] text in + guard let self = self else { return } + self.store.updatePhoneNumber(text) + self.checkButtonStates() + } + + verifyCodeInputView.onTextChanged = { [weak self] text in + guard let self = self else { return } + self.store.updateVerifyCode(text) + self.checkButtonStates() + } + + privacyAgreementView.hostViewController = navigationController + + // Subscribe to state changes + store.$state + .map(\.toastMessage) + .removeDuplicates() + .sink { [weak self] message in + guard !message.isEmpty else { return } + self?.makeToast(message) + } + .store(in: &cancellables) + + store.$state + .map(\.isLoading) + .removeDuplicates() + .sink { [weak self] isLoading in + // loading handled by individual buttons + } + .store(in: &cancellables) + + store.$state + .map(\.isFullScreenLoading) + .removeDuplicates() + .sink { [weak self] isFullScreenLoading in + guard let self = self else { return } + if isFullScreenLoading { + self.fullScreenLoadingView.show(with: self.store.state.fullScreenLoadingMessage) + } else { + self.fullScreenLoadingView.hide() + } + } + .store(in: &cancellables) + + store.$state + .map(\.countdownSeconds) + .removeDuplicates() + .sink { [weak self] seconds in + guard let self = self else { return } + if seconds > 0 { + self.verifyCodeInputView.getVerifyCodeButton.updateCountdown(seconds) + } else { + self.verifyCodeInputView.getVerifyCodeButton.stopCountdown() + } + } + .store(in: &cancellables) + + store.$state + .map(\.phoneNumber) + .removeDuplicates() + .filter { $0.isEmpty } + .dropFirst() + .receive(on: RunLoop.main) + .sink { [weak self] _ in + guard let self = self else { return } + self.phoneInputView.textField.text = "" + self.verifyCodeInputView.textField.text = "" + self.loginButton.isEnabled = false + self.hideAllToasts() + } + .store(in: &cancellables) + } + + func setupViewStyle() { + fullScreenLoadingView.hide() + } + + // MARK: - Actions + + @objc private func loginButtonClick() { + window?.endEditing(true) + guard privacyAgreementView.isAgreed else { + showPrivacyPanel { [weak self] in + self?.store.login() + } + return + } + store.login() + } + + @objc private func getVerifyCodeButtonClick() { + window?.endEditing(true) + guard privacyAgreementView.isAgreed else { + showPrivacyPanel { [weak self] in + guard let self = self else { return } + guard let phone = self.phoneInputView.textField.text, phone.count > 0 else { return } + self.store.sendVerifyCode() + } + return + } + guard let phone = phoneInputView.textField.text, phone.count > 0 else { return } + store.sendVerifyCode() + } + + @objc private func ioaLoginButtonClick() { + guard privacyAgreementView.isAgreed else { + showPrivacyPanel { [weak self] in + self?.store.switchToIOA() + } + return + } + store.switchToIOA() + } + + // MARK: - Helpers + + private func checkButtonStates() { + let phoneCount = phoneInputView.textField.text?.count ?? 0 + let codeCount = verifyCodeInputView.textField.text?.count ?? 0 + loginButton.isEnabled = phoneCount > 0 && codeCount == 6 + verifyCodeInputView.getVerifyCodeButton.isEnabled = phoneCount > 0 && store.state.countdownSeconds == 0 + } + + private func showPrivacyPanel(pendingAction: (() -> Void)? = nil) { + #if LOGIN_FULL + ioaLoginButton.isHidden = true + dividerContainerView.isHidden = true + #endif + + let privacyPanelView = PrivacyPanelView() + privacyPanelView.rootVC = findViewController() + privacyPanelView.onAgreeButtonClickedClosure = { [weak self] in + self?.privacyAgreementView.setAgreed(true) + pendingAction?() + } + privacyPanelView.onDismissClosure = { [weak self] in + #if LOGIN_FULL + self?.ioaLoginButton.isHidden = false + self?.dividerContainerView.isHidden = false + #endif + } + + addSubview(privacyPanelView) + privacyPanelView.snp.makeConstraints { make in + make.edges.equalToSuperview() + } + } + + private func findViewController() -> UIViewController? { + var responder: UIResponder? = self + while let r = responder { + if let vc = r as? UIViewController { + return vc + } + responder = r.next + } + return nil + } +} diff --git a/application/login/PhoneVerify/Store/PhoneVerifyState.swift b/application/login/PhoneVerify/Store/PhoneVerifyState.swift new file mode 100644 index 00000000..7efebfd5 --- /dev/null +++ b/application/login/PhoneVerify/Store/PhoneVerifyState.swift @@ -0,0 +1,18 @@ +// +// PhoneVerifyState.swift +// login +// + +import Foundation + +public struct PhoneVerifyState { + public var phoneNumber: String = "" + public var regionCode: String = "+86" + public var verifyCode: String = "" + public var sessionId: String = "" + public var isLoading: Bool = false + public var countdownSeconds: Int = 0 + public var toastMessage: String = "" + public var fullScreenLoadingMessage: String = "" + public var isFullScreenLoading: Bool = false +} diff --git a/application/login/PhoneVerify/Store/PhoneVerifyStore.swift b/application/login/PhoneVerify/Store/PhoneVerifyStore.swift new file mode 100644 index 00000000..f0282f93 --- /dev/null +++ b/application/login/PhoneVerify/Store/PhoneVerifyStore.swift @@ -0,0 +1,146 @@ +// +// PhoneVerifyStore.swift +// login +// + +import Foundation +import Combine + +public class PhoneVerifyStore: LoginSubStore { + + // MARK: - State + + @Published private(set) var state = PhoneVerifyState() + + // MARK: - LoginSubStore + + private let resultSubject = PassthroughSubject, Never>() + var resultPublisher: AnyPublisher, Never> { + resultSubject.eraseToAnyPublisher() + } + + // MARK: - Events + + public let eventPublisher = PassthroughSubject() + + // MARK: - Dependencies + + private let networkService = LoginNetworkService() + private let captchaService = CaptchaService() + private var countdownTimer: Timer? + private var logoutCancellable: AnyCancellable? + + var onSwitchToIOA: (() -> Void)? + + // MARK: - Init + + init() { + logoutCancellable = subscribeLogout() + } + + deinit { + countdownTimer?.invalidate() + } + + // MARK: - LoginSubStore + + func resetState() { + stopCountdown() + state = PhoneVerifyState() + } + + // MARK: - Public Methods + + func updatePhoneNumber(_ phone: String) { + state.phoneNumber = phone + } + + func updateVerifyCode(_ code: String) { + state.verifyCode = code + } + + func sendVerifyCode() { + let phone = state.regionCode + state.phoneNumber + guard phone.count > 1 else { return } + + state.isLoading = true + + captchaService.verify { [weak self] captchaResult in + guard let self = self else { return } + self.state.isLoading = false + self.networkService.sendSms(phone: phone, captcha: captchaResult) { [weak self] sessionId in + guard let self = self else { return } + self.state.sessionId = sessionId + self.state.toastMessage = LoginLocalize("V2.Live.LinkMicNew.verificationcodesent") + self.startCountdown() + } failed: { [weak self] error in + guard let self = self else { return } + self.state.toastMessage = error.message + } + } failed: { [weak self] errorMessage in + guard let self = self else { return } + self.state.isLoading = false + self.state.toastMessage = errorMessage + } cancelled: { [weak self] in + guard let self = self else { return } + self.state.isLoading = false + } + } + + func login() { + let phone = state.regionCode + state.phoneNumber + let code = state.verifyCode + let sessionId = state.sessionId + + guard !sessionId.isEmpty else { + state.toastMessage = LoginLocalize("V2.Live.LoginMock.sendtheverificatcode") + return + } + + state.isFullScreenLoading = true + state.fullScreenLoadingMessage = LoginLocalize("Demo.TRTC.Login.loading") + + networkService.loginByPhone(phone: phone, sessionId: sessionId, code: code) { [weak self] result in + guard let self = self else { return } + self.state.isFullScreenLoading = false + switch result { + case .success(let loginResult): + self.resultSubject.send(.success(loginResult)) + case .failure(let error): + self.state.toastMessage = error.message + } + } + } + + func switchToIOA() { + onSwitchToIOA?() + } + + // MARK: - Countdown + + private func startCountdown() { + stopCountdown() + state.countdownSeconds = 60 + countdownTimer = Timer.scheduledTimer(withTimeInterval: 1.0, repeats: true) { [weak self] _ in + guard let self = self else { return } + let current = self.state.countdownSeconds + if current > 1 { + self.state.countdownSeconds = current - 1 + } else { + self.stopCountdown() + } + } + } + + private func stopCountdown() { + countdownTimer?.invalidate() + countdownTimer = nil + state.countdownSeconds = 0 + } +} + +// MARK: - Events + +public enum PhoneVerifyEvent { + case showToast(message: String) +} diff --git a/application/login/PhoneVerify/SubViews/PhoneInputView.swift b/application/login/PhoneVerify/SubViews/PhoneInputView.swift new file mode 100644 index 00000000..6ab4a6b5 --- /dev/null +++ b/application/login/PhoneVerify/SubViews/PhoneInputView.swift @@ -0,0 +1,115 @@ +// +// PhoneInputView.swift +// login +// + +import UIKit +import AtomicX + +class PhoneInputView: UIView { + + var onTextChanged: ((String) -> Void)? + + let defaultLocaleCode = "+86" + + lazy var countryCodeLabel: UILabel = { + let label = UILabel() + label.text = defaultLocaleCode + label.font = ThemeStore.shared.typographyTokens.Regular16 + label.textColor = .darkGray + return label + }() + + private lazy var leftContainerView: UIView = { + let view = UIView(frame: CGRect(x: 0, y: 0, width: convertPixel(w: 96), height: convertPixel(h: 24))) + let iconView = UIImageView(frame: CGRect(x: 14, y: 0, width: 20, height: 20)) + iconView.contentMode = .scaleAspectFit + iconView.image = UIImage.loginImage(named: "login_phone") + iconView.center.y = view.center.y + view.addSubview(iconView) + view.addSubview(countryCodeLabel) + return view + }() + + lazy var textField: LoginTextField = { + let tf = LoginTextField(placeholder: LoginLocalize("V2.Live.LinkMicNew.enterphonenumber")) + tf.keyboardType = .phonePad + tf.layer.borderWidth = 1.0 + tf.layer.borderColor = ThemeStore.shared.colorTokens.strokeColorPrimary.cgColor + tf.layer.cornerRadius = 10.0 + tf.leftView = leftContainerView + tf.leftViewMode = .always + tf.delegate = self + return tf + }() + + override init(frame: CGRect) { + super.init(frame: frame) + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + private var isViewReady = false + override func didMoveToWindow() { + super.didMoveToWindow() + guard !isViewReady else { return } + constructViewHierarchy() + activateConstraints() + isViewReady = true + } + + func constructViewHierarchy() { + addSubview(textField) + leftContainerView.addSubview(countryCodeLabel) + } + + func activateConstraints() { + textField.snp.makeConstraints { make in + make.edges.equalToSuperview() + } + countryCodeLabel.sizeToFit() + updatePhoneAccountLeftView() + } + + func updatePhoneAccountLeftView() { + let buttonSize = countryCodeLabel.sizeThatFits(CGSize(width: CGFloat.greatestFiniteMagnitude, height: CGFloat.greatestFiniteMagnitude)) + countryCodeLabel.frame = CGRect(x: 40, + y: (leftContainerView.frame.height - convertPixel(h: 24)) / 2, + width: buttonSize.width, + height: convertPixel(h: 24)) + var leftContainerFrame = leftContainerView.frame + leftContainerFrame.size.width = 40 + buttonSize.width + 8.0 + leftContainerView.frame = leftContainerFrame + } +} + +extension PhoneInputView: UITextFieldDelegate { + func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool { + let maxCount = 11 + guard let textFieldText = textField.text, + let rangeOfTextToReplace = Range(range, in: textFieldText) else { + return false + } + let substringToReplace = textFieldText[rangeOfTextToReplace] + let count = textFieldText.count - substringToReplace.count + string.count + let res = count <= maxCount + if res { + DispatchQueue.main.asyncAfter(deadline: .now() + 0.05) { [weak self] in + self?.onTextChanged?(textField.text ?? "") + } + } + return res + } + + func textFieldDidEndEditing(_ textField: UITextField) { + textField.resignFirstResponder() + onTextChanged?(textField.text ?? "") + } + + func textFieldShouldReturn(_ textField: UITextField) -> Bool { + textField.resignFirstResponder() + return true + } +} diff --git a/application/login/PhoneVerify/Utils/PhoneValidator.swift b/application/login/PhoneVerify/Utils/PhoneValidator.swift new file mode 100644 index 00000000..40bd0c19 --- /dev/null +++ b/application/login/PhoneVerify/Utils/PhoneValidator.swift @@ -0,0 +1,21 @@ +// +// PhoneValidator.swift +// login +// + +import Foundation + +struct PhoneValidator { + static func isValid(_ phone: String) -> Bool { + let digits = phone.filter { $0.isNumber } + return digits.count > 0 && digits.count <= 11 + } + + static func isTestPhone(_ number: String) -> Bool { + let pattern = "^86100000000(0[1-9]|[1-4]\\d|50)$" + let regex = try? NSRegularExpression(pattern: pattern) + let range = NSRange(location: 0, length: number.utf16.count) + let matches = regex?.matches(in: number, options: [], range: range) + return matches?.count == 1 + } +} diff --git a/application/login/Resource/Assets/LoginAssets.xcassets/Contents.json b/application/login/Resource/Assets/LoginAssets.xcassets/Contents.json new file mode 100644 index 00000000..73c00596 --- /dev/null +++ b/application/login/Resource/Assets/LoginAssets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/login/Resource/Assets/LoginAssets.xcassets/checkbox.imageset/Contents.json b/application/login/Resource/Assets/LoginAssets.xcassets/checkbox.imageset/Contents.json new file mode 100644 index 00000000..5e5a6064 --- /dev/null +++ b/application/login/Resource/Assets/LoginAssets.xcassets/checkbox.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "checkbox@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "checkbox@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/login/Resource/Assets/LoginAssets.xcassets/checkbox.imageset/checkbox@2x.png b/application/login/Resource/Assets/LoginAssets.xcassets/checkbox.imageset/checkbox@2x.png new file mode 100644 index 00000000..7990ae24 Binary files /dev/null and b/application/login/Resource/Assets/LoginAssets.xcassets/checkbox.imageset/checkbox@2x.png differ diff --git a/application/login/Resource/Assets/LoginAssets.xcassets/checkbox.imageset/checkbox@3x.png b/application/login/Resource/Assets/LoginAssets.xcassets/checkbox.imageset/checkbox@3x.png new file mode 100644 index 00000000..d8ace948 Binary files /dev/null and b/application/login/Resource/Assets/LoginAssets.xcassets/checkbox.imageset/checkbox@3x.png differ diff --git a/application/login/Resource/Assets/LoginAssets.xcassets/checkbox_nor.imageset/Contents.json b/application/login/Resource/Assets/LoginAssets.xcassets/checkbox_nor.imageset/Contents.json new file mode 100644 index 00000000..ba9644d2 --- /dev/null +++ b/application/login/Resource/Assets/LoginAssets.xcassets/checkbox_nor.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "checkbox_nor@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "checkbox_nor@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/login/Resource/Assets/LoginAssets.xcassets/checkbox_nor.imageset/checkbox_nor@2x.png b/application/login/Resource/Assets/LoginAssets.xcassets/checkbox_nor.imageset/checkbox_nor@2x.png new file mode 100644 index 00000000..eb8f4b69 Binary files /dev/null and b/application/login/Resource/Assets/LoginAssets.xcassets/checkbox_nor.imageset/checkbox_nor@2x.png differ diff --git a/application/login/Resource/Assets/LoginAssets.xcassets/checkbox_nor.imageset/checkbox_nor@3x.png b/application/login/Resource/Assets/LoginAssets.xcassets/checkbox_nor.imageset/checkbox_nor@3x.png new file mode 100644 index 00000000..ffb51952 Binary files /dev/null and b/application/login/Resource/Assets/LoginAssets.xcassets/checkbox_nor.imageset/checkbox_nor@3x.png differ diff --git a/application/login/Resource/Assets/LoginAssets.xcassets/checkbox_sel.imageset/Contents.json b/application/login/Resource/Assets/LoginAssets.xcassets/checkbox_sel.imageset/Contents.json new file mode 100644 index 00000000..3695cd61 --- /dev/null +++ b/application/login/Resource/Assets/LoginAssets.xcassets/checkbox_sel.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "checkbox_sel@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "checkbox_sel@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/login/Resource/Assets/LoginAssets.xcassets/checkbox_sel.imageset/checkbox_sel@2x.png b/application/login/Resource/Assets/LoginAssets.xcassets/checkbox_sel.imageset/checkbox_sel@2x.png new file mode 100644 index 00000000..c843264c Binary files /dev/null and b/application/login/Resource/Assets/LoginAssets.xcassets/checkbox_sel.imageset/checkbox_sel@2x.png differ diff --git a/application/login/Resource/Assets/LoginAssets.xcassets/checkbox_sel.imageset/checkbox_sel@3x.png b/application/login/Resource/Assets/LoginAssets.xcassets/checkbox_sel.imageset/checkbox_sel@3x.png new file mode 100644 index 00000000..62dca946 Binary files /dev/null and b/application/login/Resource/Assets/LoginAssets.xcassets/checkbox_sel.imageset/checkbox_sel@3x.png differ diff --git a/application/login/Resource/Assets/LoginAssets.xcassets/detail.imageset/Contents.json b/application/login/Resource/Assets/LoginAssets.xcassets/detail.imageset/Contents.json new file mode 100644 index 00000000..ec731a93 --- /dev/null +++ b/application/login/Resource/Assets/LoginAssets.xcassets/detail.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "detail.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "detail@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "detail@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/login/Resource/Assets/LoginAssets.xcassets/detail.imageset/detail.png b/application/login/Resource/Assets/LoginAssets.xcassets/detail.imageset/detail.png new file mode 100644 index 00000000..504eb512 Binary files /dev/null and b/application/login/Resource/Assets/LoginAssets.xcassets/detail.imageset/detail.png differ diff --git a/application/login/Resource/Assets/LoginAssets.xcassets/detail.imageset/detail@2x.png b/application/login/Resource/Assets/LoginAssets.xcassets/detail.imageset/detail@2x.png new file mode 100644 index 00000000..5f9c44d7 Binary files /dev/null and b/application/login/Resource/Assets/LoginAssets.xcassets/detail.imageset/detail@2x.png differ diff --git a/application/login/Resource/Assets/LoginAssets.xcassets/detail.imageset/detail@3x.png b/application/login/Resource/Assets/LoginAssets.xcassets/detail.imageset/detail@3x.png new file mode 100644 index 00000000..7026dc05 Binary files /dev/null and b/application/login/Resource/Assets/LoginAssets.xcassets/detail.imageset/detail@3x.png differ diff --git a/application/login/Resource/Assets/LoginAssets.xcassets/ioa_login_icon.imageset/Contents.json b/application/login/Resource/Assets/LoginAssets.xcassets/ioa_login_icon.imageset/Contents.json new file mode 100644 index 00000000..b475c25c --- /dev/null +++ b/application/login/Resource/Assets/LoginAssets.xcassets/ioa_login_icon.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "ioa_login_icon.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "ioa_login_icon@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "ioa_login_icon@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/login/Resource/Assets/LoginAssets.xcassets/ioa_login_icon.imageset/ioa_login_icon.png b/application/login/Resource/Assets/LoginAssets.xcassets/ioa_login_icon.imageset/ioa_login_icon.png new file mode 100644 index 00000000..2a5e3094 Binary files /dev/null and b/application/login/Resource/Assets/LoginAssets.xcassets/ioa_login_icon.imageset/ioa_login_icon.png differ diff --git a/application/login/Resource/Assets/LoginAssets.xcassets/ioa_login_icon.imageset/ioa_login_icon@2x.png b/application/login/Resource/Assets/LoginAssets.xcassets/ioa_login_icon.imageset/ioa_login_icon@2x.png new file mode 100644 index 00000000..dd0a9769 Binary files /dev/null and b/application/login/Resource/Assets/LoginAssets.xcassets/ioa_login_icon.imageset/ioa_login_icon@2x.png differ diff --git a/application/login/Resource/Assets/LoginAssets.xcassets/ioa_login_icon.imageset/ioa_login_icon@3x.png b/application/login/Resource/Assets/LoginAssets.xcassets/ioa_login_icon.imageset/ioa_login_icon@3x.png new file mode 100644 index 00000000..ee2ab903 Binary files /dev/null and b/application/login/Resource/Assets/LoginAssets.xcassets/ioa_login_icon.imageset/ioa_login_icon@3x.png differ diff --git a/application/login/Resource/Assets/LoginAssets.xcassets/loading.imageset/Contents.json b/application/login/Resource/Assets/LoginAssets.xcassets/loading.imageset/Contents.json new file mode 100644 index 00000000..50f86318 --- /dev/null +++ b/application/login/Resource/Assets/LoginAssets.xcassets/loading.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "loading.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "loading@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "loading@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/login/Resource/Assets/LoginAssets.xcassets/loading.imageset/loading.png b/application/login/Resource/Assets/LoginAssets.xcassets/loading.imageset/loading.png new file mode 100644 index 00000000..96deeccb Binary files /dev/null and b/application/login/Resource/Assets/LoginAssets.xcassets/loading.imageset/loading.png differ diff --git a/application/login/Resource/Assets/LoginAssets.xcassets/loading.imageset/loading@2x.png b/application/login/Resource/Assets/LoginAssets.xcassets/loading.imageset/loading@2x.png new file mode 100644 index 00000000..72332419 Binary files /dev/null and b/application/login/Resource/Assets/LoginAssets.xcassets/loading.imageset/loading@2x.png differ diff --git a/application/login/Resource/Assets/LoginAssets.xcassets/loading.imageset/loading@3x.png b/application/login/Resource/Assets/LoginAssets.xcassets/loading.imageset/loading@3x.png new file mode 100644 index 00000000..f5cbf71c Binary files /dev/null and b/application/login/Resource/Assets/LoginAssets.xcassets/loading.imageset/loading@3x.png differ diff --git a/application/login/Resource/Assets/LoginAssets.xcassets/login_background.imageset/Contents.json b/application/login/Resource/Assets/LoginAssets.xcassets/login_background.imageset/Contents.json new file mode 100644 index 00000000..556a9e87 --- /dev/null +++ b/application/login/Resource/Assets/LoginAssets.xcassets/login_background.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "login_background@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/login/Resource/Assets/LoginAssets.xcassets/login_background.imageset/login_background@2x.png b/application/login/Resource/Assets/LoginAssets.xcassets/login_background.imageset/login_background@2x.png new file mode 100644 index 00000000..af8dd07f Binary files /dev/null and b/application/login/Resource/Assets/LoginAssets.xcassets/login_background.imageset/login_background@2x.png differ diff --git a/application/login/Resource/Assets/LoginAssets.xcassets/login_bg.imageset/Contents.json b/application/login/Resource/Assets/LoginAssets.xcassets/login_bg.imageset/Contents.json new file mode 100644 index 00000000..b06d62a3 --- /dev/null +++ b/application/login/Resource/Assets/LoginAssets.xcassets/login_bg.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "login_background@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "login_background@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/login/Resource/Assets/LoginAssets.xcassets/login_bg.imageset/login_background@2x.png b/application/login/Resource/Assets/LoginAssets.xcassets/login_bg.imageset/login_background@2x.png new file mode 100644 index 00000000..30513ecd Binary files /dev/null and b/application/login/Resource/Assets/LoginAssets.xcassets/login_bg.imageset/login_background@2x.png differ diff --git a/application/login/Resource/Assets/LoginAssets.xcassets/login_bg.imageset/login_background@3x.png b/application/login/Resource/Assets/LoginAssets.xcassets/login_bg.imageset/login_background@3x.png new file mode 100644 index 00000000..8d104587 Binary files /dev/null and b/application/login/Resource/Assets/LoginAssets.xcassets/login_bg.imageset/login_background@3x.png differ diff --git a/application/login/Resource/Assets/LoginAssets.xcassets/login_phone.imageset/Contents.json b/application/login/Resource/Assets/LoginAssets.xcassets/login_phone.imageset/Contents.json new file mode 100644 index 00000000..d3d49e27 --- /dev/null +++ b/application/login/Resource/Assets/LoginAssets.xcassets/login_phone.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "login_phone@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "login_phone@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/login/Resource/Assets/LoginAssets.xcassets/login_phone.imageset/login_phone@2x.png b/application/login/Resource/Assets/LoginAssets.xcassets/login_phone.imageset/login_phone@2x.png new file mode 100644 index 00000000..1e17b37a Binary files /dev/null and b/application/login/Resource/Assets/LoginAssets.xcassets/login_phone.imageset/login_phone@2x.png differ diff --git a/application/login/Resource/Assets/LoginAssets.xcassets/login_phone.imageset/login_phone@3x.png b/application/login/Resource/Assets/LoginAssets.xcassets/login_phone.imageset/login_phone@3x.png new file mode 100644 index 00000000..a372aa0f Binary files /dev/null and b/application/login/Resource/Assets/LoginAssets.xcassets/login_phone.imageset/login_phone@3x.png differ diff --git a/application/login/Resource/Assets/LoginAssets.xcassets/login_safe.imageset/Contents.json b/application/login/Resource/Assets/LoginAssets.xcassets/login_safe.imageset/Contents.json new file mode 100644 index 00000000..c6cde15e --- /dev/null +++ b/application/login/Resource/Assets/LoginAssets.xcassets/login_safe.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "login_safe@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "login_safe@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/login/Resource/Assets/LoginAssets.xcassets/login_safe.imageset/login_safe@2x.png b/application/login/Resource/Assets/LoginAssets.xcassets/login_safe.imageset/login_safe@2x.png new file mode 100644 index 00000000..ee3aa02a Binary files /dev/null and b/application/login/Resource/Assets/LoginAssets.xcassets/login_safe.imageset/login_safe@2x.png differ diff --git a/application/login/Resource/Assets/LoginAssets.xcassets/login_safe.imageset/login_safe@3x.png b/application/login/Resource/Assets/LoginAssets.xcassets/login_safe.imageset/login_safe@3x.png new file mode 100644 index 00000000..35878c58 Binary files /dev/null and b/application/login/Resource/Assets/LoginAssets.xcassets/login_safe.imageset/login_safe@3x.png differ diff --git a/application/App-UIKit/Assets.xcassets/main_english_logo.imageset/Contents.json b/application/login/Resource/Assets/LoginAssets.xcassets/main_english_logo.imageset/Contents.json similarity index 100% rename from application/App-UIKit/Assets.xcassets/main_english_logo.imageset/Contents.json rename to application/login/Resource/Assets/LoginAssets.xcassets/main_english_logo.imageset/Contents.json diff --git a/application/App-UIKit/Assets.xcassets/main_english_logo.imageset/main_english_logo@2x.png b/application/login/Resource/Assets/LoginAssets.xcassets/main_english_logo.imageset/main_english_logo@2x.png similarity index 100% rename from application/App-UIKit/Assets.xcassets/main_english_logo.imageset/main_english_logo@2x.png rename to application/login/Resource/Assets/LoginAssets.xcassets/main_english_logo.imageset/main_english_logo@2x.png diff --git a/application/login/Resource/Assets/LoginAssets.xcassets/main_mine_about_back.imageset/Contents.json b/application/login/Resource/Assets/LoginAssets.xcassets/main_mine_about_back.imageset/Contents.json new file mode 100644 index 00000000..ac3d45c4 --- /dev/null +++ b/application/login/Resource/Assets/LoginAssets.xcassets/main_mine_about_back.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "main_mine_about_back.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "main_mine_about_back@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "main_mine_about_back@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/login/Resource/Assets/LoginAssets.xcassets/main_mine_about_back.imageset/main_mine_about_back.png b/application/login/Resource/Assets/LoginAssets.xcassets/main_mine_about_back.imageset/main_mine_about_back.png new file mode 100644 index 00000000..c1b18270 Binary files /dev/null and b/application/login/Resource/Assets/LoginAssets.xcassets/main_mine_about_back.imageset/main_mine_about_back.png differ diff --git a/application/login/Resource/Assets/LoginAssets.xcassets/main_mine_about_back.imageset/main_mine_about_back@2x.png b/application/login/Resource/Assets/LoginAssets.xcassets/main_mine_about_back.imageset/main_mine_about_back@2x.png new file mode 100644 index 00000000..e0d845d1 Binary files /dev/null and b/application/login/Resource/Assets/LoginAssets.xcassets/main_mine_about_back.imageset/main_mine_about_back@2x.png differ diff --git a/application/login/Resource/Assets/LoginAssets.xcassets/main_mine_about_back.imageset/main_mine_about_back@3x.png b/application/login/Resource/Assets/LoginAssets.xcassets/main_mine_about_back.imageset/main_mine_about_back@3x.png new file mode 100644 index 00000000..ed992662 Binary files /dev/null and b/application/login/Resource/Assets/LoginAssets.xcassets/main_mine_about_back.imageset/main_mine_about_back@3x.png differ diff --git a/application/App-UIKit/Assets.xcassets/main_simplified_chinese_logo.imageset/Contents.json b/application/login/Resource/Assets/LoginAssets.xcassets/main_simplified_chinese_logo.imageset/Contents.json similarity index 100% rename from application/App-UIKit/Assets.xcassets/main_simplified_chinese_logo.imageset/Contents.json rename to application/login/Resource/Assets/LoginAssets.xcassets/main_simplified_chinese_logo.imageset/Contents.json diff --git a/application/App-UIKit/Assets.xcassets/main_simplified_chinese_logo.imageset/simplified_chinese_logo.png b/application/login/Resource/Assets/LoginAssets.xcassets/main_simplified_chinese_logo.imageset/simplified_chinese_logo.png similarity index 100% rename from application/App-UIKit/Assets.xcassets/main_simplified_chinese_logo.imageset/simplified_chinese_logo.png rename to application/login/Resource/Assets/LoginAssets.xcassets/main_simplified_chinese_logo.imageset/simplified_chinese_logo.png diff --git a/application/App-UIKit/Assets.xcassets/main_traditional_chinese_logo.imageset/Contents.json b/application/login/Resource/Assets/LoginAssets.xcassets/main_traditional_chinese_logo.imageset/Contents.json similarity index 100% rename from application/App-UIKit/Assets.xcassets/main_traditional_chinese_logo.imageset/Contents.json rename to application/login/Resource/Assets/LoginAssets.xcassets/main_traditional_chinese_logo.imageset/Contents.json diff --git a/application/App-UIKit/Assets.xcassets/main_traditional_chinese_logo.imageset/traditional_chinese_logo.png b/application/login/Resource/Assets/LoginAssets.xcassets/main_traditional_chinese_logo.imageset/traditional_chinese_logo.png similarity index 100% rename from application/App-UIKit/Assets.xcassets/main_traditional_chinese_logo.imageset/traditional_chinese_logo.png rename to application/login/Resource/Assets/LoginAssets.xcassets/main_traditional_chinese_logo.imageset/traditional_chinese_logo.png diff --git a/application/login/Resource/Assets/LoginAssets.xcassets/mine_change_language.imageset/Contents.json b/application/login/Resource/Assets/LoginAssets.xcassets/mine_change_language.imageset/Contents.json new file mode 100644 index 00000000..37507c03 --- /dev/null +++ b/application/login/Resource/Assets/LoginAssets.xcassets/mine_change_language.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "语言icon@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "语言icon@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git "a/application/login/Resource/Assets/LoginAssets.xcassets/mine_change_language.imageset/\350\257\255\350\250\200icon@2x.png" "b/application/login/Resource/Assets/LoginAssets.xcassets/mine_change_language.imageset/\350\257\255\350\250\200icon@2x.png" new file mode 100644 index 00000000..68eb587a Binary files /dev/null and "b/application/login/Resource/Assets/LoginAssets.xcassets/mine_change_language.imageset/\350\257\255\350\250\200icon@2x.png" differ diff --git "a/application/login/Resource/Assets/LoginAssets.xcassets/mine_change_language.imageset/\350\257\255\350\250\200icon@3x.png" "b/application/login/Resource/Assets/LoginAssets.xcassets/mine_change_language.imageset/\350\257\255\350\250\200icon@3x.png" new file mode 100644 index 00000000..c1f81151 Binary files /dev/null and "b/application/login/Resource/Assets/LoginAssets.xcassets/mine_change_language.imageset/\350\257\255\350\250\200icon@3x.png" differ diff --git a/application/login/Resource/Assets/LoginAssets.xcassets/rtc_logo.imageset/Contents.json b/application/login/Resource/Assets/LoginAssets.xcassets/rtc_logo.imageset/Contents.json new file mode 100644 index 00000000..3c3d540e --- /dev/null +++ b/application/login/Resource/Assets/LoginAssets.xcassets/rtc_logo.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "rtc_logo@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "rtc_logo@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/login/Resource/Assets/LoginAssets.xcassets/rtc_logo.imageset/rtc_logo@2x.png b/application/login/Resource/Assets/LoginAssets.xcassets/rtc_logo.imageset/rtc_logo@2x.png new file mode 100644 index 00000000..e9fefe1b Binary files /dev/null and b/application/login/Resource/Assets/LoginAssets.xcassets/rtc_logo.imageset/rtc_logo@2x.png differ diff --git a/application/login/Resource/Assets/LoginAssets.xcassets/rtc_logo.imageset/rtc_logo@3x.png b/application/login/Resource/Assets/LoginAssets.xcassets/rtc_logo.imageset/rtc_logo@3x.png new file mode 100644 index 00000000..347f5177 Binary files /dev/null and b/application/login/Resource/Assets/LoginAssets.xcassets/rtc_logo.imageset/rtc_logo@3x.png differ diff --git a/application/login/Resource/Localized/LoginLocalized.swift b/application/login/Resource/Localized/LoginLocalized.swift new file mode 100644 index 00000000..bb1a2a85 --- /dev/null +++ b/application/login/Resource/Localized/LoginLocalized.swift @@ -0,0 +1,18 @@ +// +// LoginLocalized.swift +// login +// + +import Foundation +import AtomicX + +private let LoginLocalizeTableName = "LoginLocalized" + +func LoginLocalize(_ key: String, _ args: CVarArg...) -> String { + return BundleLoader.moduleLocalized( + key: key, + in: Bundle.loginResources, + tableName: LoginLocalizeTableName, + arguments: args + ) +} diff --git a/application/login/Resource/Localized/en.lproj/LoginLocalized.strings b/application/login/Resource/Localized/en.lproj/LoginLocalized.strings new file mode 100644 index 00000000..d94716e1 --- /dev/null +++ b/application/login/Resource/Localized/en.lproj/LoginLocalized.strings @@ -0,0 +1,171 @@ +/* + LoginNetworkLocalized.strings + TXLiteAVDemo + + Created by adams on 2021/3/22. + Copyright © 2021 Tencent. All rights reserved. +*/ + +"Demo.TRTC.Login.registsuccess" = "Registration successful"; +"LoginNetwork.AppUtils.warmprompt" = "Note"; +"LoginNetwork.AppUtils.determine" = "OK"; +"Demo.TRTC.LiveRoom.prompt" = "Information"; +"Demo.TRTC.Home.newversionpublic" = "A new version is available"; +"Demo.TRTC.Home.devopsupdate" = "The current iOS new version is detected: %@, please use after upgrading."; +"Demo.TRTC.Home.updatenow" = "Update Now"; +"Demo.TRTC.Home.later" = "Later"; +"LoginNetwork.ProfileManager.sendfailed" = "Send failed. Please try again later."; +"Demo.TRTC.Login.done" = "Done"; +"Demo.TRTC.Login.setavatar" = "Change Profile Picture"; +"V2.Live.LoginMock.sendtheverificatcode" = "Please send the verification code"; +"LoginNetwork.ProfileManager.loginfailed" = "Login failed. Please try again later."; +"LoginNetwork.ProfileManager.queryfailed" = "Query failed. Please try again later."; +"LoginNetwork.ProfileManager.registerfailed" = "Registration failed. Please try again later"; +"LoginNetwork.ProfileManager.iotfailed" = "This phone number is an ICCID number. Please enter another phone number to log in."; +"Demo.TRTC.Login.welcome" = "Welcome to Tencent Cloud TRTC"; +"V2.Live.LinkMicNew.enterphonenumber" = "Enter a mobile number"; +"V2.Live.LinkMicNew.enteremail" = "Enter a email address"; +"V2.Live.LinkMicNew.entercorrectemail" = "Enter a valid email address"; +"V2.Live.LinkMicNew.enterverificationcode" = "Enter a verification code"; +"V2.Live.LinkMicNew.getverificationcode" = "Get"; +"V2.Live.LoginMock.login" = "Log In/Sign Up"; +"Demo.TRTC.Login.regist" = "Register"; +"Demo.TRTC.Login.enterusername" = "Please enter a nickname"; +"Demo.TRTC.Login.limit20count" = "Chinese characters, letters, numbers and underscores, 2 - 20 words"; +"V2.Live.LinkMicNew.verificationcodesent" = "Sent"; +"V2.Live.LinkMicNew.loginsuccess" = "Logged in"; +"V2.Live.LinkMicNew.termsandconditions" = "Terms and Conditions"; +"V2.Live.LinkMicNew.agree" = "Agree"; +"V2.Live.LinkMicNew.disagree" = "Disagree"; +"Demo.TRTC.Portal.privateandagreement" = "I have read and agree to the xxxyyy and zzz"; +"Demo.TRTC.Portal.agreeprivatefirst" = "You must agree to the Privacy Policy and Terms of Use first."; +"Demo.TRTC.Portal." = "《Privacy Policy Summary》"; +"Demo.TRTC.Portal." = "《Privacy Policy》"; +"Demo.TRTC.Portal." = "《Terms of Use》"; +"Demo.TRTC.Portal.privacysummary" = "Privacy Policy Summary"; +"Demo.TRTC.Portal.private" = "Privacy Policy"; +"Demo.TRTC.Portal.agreement" = "Terms of Use"; +"Demo.TRTC.Portal.readAndAgreeConditions" = "Acceptance of Terms and Conditions"; +"Demo.TRTC.Portal.agreeAndContinue" = "Agree & Continue"; +"Demo.TRTC.LoginMock.adduserinformationforfirstlogin" = "This is your first login. Please complete your profile."; +"Demo.TRTC.Login.modifyLaterInSettings" = "You can modify it later in settings"; +"Demo.TRTC.Portal.privatealertdescription" = "Welcome to TRTC. The Privacy Policy and Terms of Use agreements detail how we collect, use, and store your information, as well as the rights your are entitled to and how to exercise them. By tapping the button below, you agree to the content of the agreements."; +"Demo.TRTC.Login.enterUserName" = "Please enter username"; +"Demo.TRTC.Home.phoneoremailIsEmpty" = "phone or email is empty"; +"Demo.TRTC.Home.userIDIsEmpty" = "userid is empty"; +"Demo.TRTC.Home.useroverduemessage" = "Login expired, please login again"; + +"Demo.TRTC.LoginMock.username" = "User Name"; +"Demo.TRTC.LoginMock.fillinusernickname" = "Please fill in user nickname"; +"Demo.TRTC.LoginMock.nickname.Martijn" = "Martijn"; +"Demo.TRTC.LoginMock.nickname.irfan" = "irfan"; +"Demo.TRTC.LoginMock.nickname.Rosanna" = "Rosanna"; +"Demo.TRTC.LoginMock.nickname.Franklyn" = "Franklyn"; +"Demo.TRTC.LoginMock.nickname.Maren" = "Maren"; +"Demo.TRTC.LoginMock.nickname.bartel" = "bartel"; +"Demo.TRTC.LoginMock.nickname.Marianita" = "Marianita"; +"Demo.TRTC.LoginMock.nickname.Anneke" = "Anneke"; +"Demo.TRTC.LoginMock.nickname.elmira" = "elmira"; +"Demo.TRTC.LoginMock.nickname.ivet" = "ivet"; +"Demo.TRTC.LoginMock.nickname.clinton" = "clinton"; +"Demo.TRTC.LoginMock.nickname.virelai" = "virelai"; +"Demo.TRTC.LoginMock.nickname.Ace" = "Martijn"; +"Demo.TRTC.Login.phonetext" = "Log In with Mobile Number"; +"Demo.TRTC.Login.emailtext" = "Log In with Email"; +"Demo.TRTC.Login.ioatext" = "Signing in with iOA"; +"Demo.TRTC.Login.ioaLoading" = "Signing in with iOA..."; +"Demo.TRTC.Login.loading" = "Signing in,Please Waiting..."; + +"Demo.TRTC.login_custom_name_1" = "Alice"; +"Demo.TRTC.login_custom_name_2" = "Amy"; +"Demo.TRTC.login_custom_name_3" = "Anne"; +"Demo.TRTC.login_custom_name_4" = "Jane"; +"Demo.TRTC.login_custom_name_5" = "May"; +"Demo.TRTC.login_custom_name_6" = "Linda"; +"Demo.TRTC.login_custom_name_7" = "Emma"; +"Demo.TRTC.login_custom_name_8" = "Judy"; +"Demo.TRTC.login_custom_name_9" = "Mary"; +"Demo.TRTC.login_custom_name_10" = "Susan"; +"Demo.TRTC.login_custom_name_11" = "Monica"; +"Demo.TRTC.login_custom_name_12" = "Sally"; +"Demo.TRTC.login_custom_name_13" = "Lisa"; +"Demo.TRTC.login_custom_name_14" = "Barry"; +"Demo.TRTC.login_custom_name_15" = "Clark"; +"Demo.TRTC.login_custom_name_16" = "Henry"; +"Demo.TRTC.login_custom_name_17" = "Peter"; +"Demo.TRTC.login_custom_name_18" = "John"; +"Demo.TRTC.login_custom_name_19" = "Andrew"; +"Demo.TRTC.login_custom_name_20" = "Charles"; +"Demo.TRTC.login_custom_name_21" = "Carl"; +"Demo.TRTC.login_custom_name_22" = "Mark"; +"Demo.TRTC.login_custom_name_23" = "James"; +"Demo.TRTC.login_custom_name_24" = "Eddie"; +"Demo.TRTC.login_custom_name_25" = "Bill"; +"Demo.TRTC.login_custom_name_26" = "Ben"; +"Demo.TRTC.login_custom_name_27" = "Bob"; +"Demo.TRTC.login_custom_name_28" = "Cody"; +"Demo.TRTC.login_custom_name_29" = "Denny"; +"Demo.TRTC.login_custom_name_30" = "Darwin"; +"Demo.TRTC.login_custom_name_31" = "Derek"; +"Demo.TRTC.login_custom_name_32" = "Dylan"; +"Demo.TRTC.login_custom_name_33" = "Edison"; + +"Demo.TRTC.DevMenu.selectLoginMethod" = "Select Login Method"; +"Demo.TRTC.DevMenu.phoneLogin" = "Phone Login"; +"Demo.TRTC.DevMenu.phoneLoginDesc" = "Phone + Verification Code, switchable to iOA"; +"Demo.TRTC.DevMenu.emailLogin" = "Email Login"; +"Demo.TRTC.DevMenu.emailLoginDesc" = "Email + Verification Code, for overseas version"; +"Demo.TRTC.DevMenu.ioaLogin" = "iOA Enterprise Login"; +"Demo.TRTC.DevMenu.ioaLoginDesc" = "Login via iOA SDK ticket"; +"Demo.TRTC.DevMenu.inviteCodeLogin" = "Invite Code Login"; +"Demo.TRTC.DevMenu.inviteCodeLoginDesc" = "Login directly with invite code"; +"Demo.TRTC.DevMenu.debugLogin" = "Debug Login"; +"Demo.TRTC.DevMenu.debugLoginDesc" = "Enter userId directly (skip verification)"; +"Demo.TRTC.DevMenu.envProduction" = "Production"; +"Demo.TRTC.DevMenu.envTest" = "Test"; +"Demo.TRTC.DevMenu.autoLogin" = "Auto Login"; + +"Demo.TRTC.Login.userCancelled" = "User cancelled login"; +"Demo.TRTC.Login.tokenExpired" = "Token has expired"; + +"Demo.TRTC.Language.switchLanguage" = "Switch Language"; + +"Demo.TRTC.Main.welcomeRTCube" = "Welcome to RTCube"; +"Demo.TRTC.Main.logout" = "Log Out"; + +"Demo.TRTC.Portal.Main.InviteCodeBeUsed" = "User invite code be used"; +"Demo.TRTC.Portal.Main.InviteCodeInvalid" = "Invitation Code Invalid"; +"Demo.TRTC.Portal.Main.UserInviteCodeExpire" = "Invitation code has expired"; +"Demo.TRTC.Portal.Main.EmailIncorrect" = "Email sent failed"; +"Demo.TRTC.Portal.Main.EmailTooManyCodeRequest" = "Too many code-requests, please check your email for the sent codes."; +"Demo.TRTC.Portal.Main.AgreeBeforeUse" = "Agree to the terms before use."; + +"Demo.TRTC.Email.welcomeTitle" = "Welcome to RTC"; +"Demo.TRTC.Email.subtitle" = "Enter your email to get an invitation code."; +"Demo.TRTC.Email.emailPlaceholder" = "Email address"; +"Demo.TRTC.Email.continueButton" = "Continue"; +"Demo.TRTC.Email.requesting" = "Requesting..."; +"Demo.TRTC.Email.enterEmailError" = "Please enter your email address"; +"Demo.TRTC.Email.validEmailError" = "Please enter a valid email address"; +"Demo.TRTC.Email.bottomTextPrefix" = "Already have an invitation code? "; +"Demo.TRTC.Email.enterCodeLink" = "Enter code"; + +"Demo.TRTC.InviteCode.checkYourEmail" = "Check Your Email"; +"Demo.TRTC.InviteCode.enterInvitationCode" = "Enter Invitation Code"; +"Demo.TRTC.InviteCode.enterCodeSentToEmail" = "Please enter the invitation code we have sent to your email %@"; +"Demo.TRTC.InviteCode.enterCodeToGetStarted" = "If you already have an invitation code, please enter here to get started"; +"Demo.TRTC.InviteCode.getStarted" = "Get Started"; +"Demo.TRTC.InviteCode.validating" = "Validating..."; +"Demo.TRTC.InviteCode.enterCompleteCode" = "Please enter the complete 6-digit invitation code"; +"Demo.TRTC.InviteCode.codeIncorrect" = "The invitation code is incorrect"; +"Demo.TRTC.InviteCode.resendClickable" = "Didn't receive the code? Check your spam folder. \nResend code."; +"Demo.TRTC.InviteCode.clickToResend" = "Resend code."; +"Demo.TRTC.InviteCode.resendCountdown" = "Didn't receive the code? Check your spam folder. \nResend code in %ds"; +"Demo.TRTC.InviteCode.resendAfter" = "Resend code in %ds"; +"Demo.TRTC.InviteCode.resendingCode" = "Resending invitation code..."; +"Demo.TRTC.InviteCode.agreeToTermsPrefix" = "I agree to TRTC's "; +"Demo.TRTC.InviteCode.termsOfService" = "Terms of Service"; +"Demo.TRTC.InviteCode.agreeToTermsMiddle" = " and "; +"Demo.TRTC.InviteCode.privacyPolicy" = "Privacy Policy"; +"Demo.TRTC.InviteCode.agreeToTermsSuffix" = " "; +"Demo.TRTC.InviteCode.marketingInfo" = "I'd like to receive marketing information from TRTC"; diff --git a/application/login/Resource/Localized/zh-Hans.lproj/LoginLocalized.strings b/application/login/Resource/Localized/zh-Hans.lproj/LoginLocalized.strings new file mode 100644 index 00000000..ac090601 --- /dev/null +++ b/application/login/Resource/Localized/zh-Hans.lproj/LoginLocalized.strings @@ -0,0 +1,174 @@ +/* + LoginNetworkLocalized.strings + TXLiteAVDemo + + Created by adams on 2021/3/22. + Copyright © 2021 Tencent. All rights reserved. +*/ + +"Demo.TRTC.Login.registsuccess" = "注册成功"; +"LoginNetwork.AppUtils.warmprompt" = "温馨提示"; +"LoginNetwork.AppUtils.determine" = "确定"; +"Demo.TRTC.LiveRoom.prompt" = "提示"; +"Demo.TRTC.Home.newversionpublic" = "有新版本发布啦~"; +"Demo.TRTC.Home.devopsupdate" = "检测到当前iOS新版本:%@, 请升级后使用。"; +"Demo.TRTC.Home.updatenow" = "现在更新"; +"Demo.TRTC.Home.later" = "稍后再说"; +"LoginNetwork.ProfileManager.sendfailed" = "发送失败,请稍后重试"; +"LoginNetwork.ProfileManager.iotfailed" = "此手机号为物联网卡手机号,请输入其他手机号码登录"; +"Demo.TRTC.Login.done" = "确认"; +"Demo.TRTC.Login.setavatar" = "设置头像"; +"LoginNetwork.ProfileManager.sendfailed" = "发送失败,请稍后重试"; +"V2.Live.LoginMock.sendtheverificatcode" = "请发送验证码"; +"LoginNetwork.ProfileManager.loginfailed" = "登录失败,请稍后重试"; +"LoginNetwork.ProfileManager.queryfailed" = "查询失败,请稍候重试"; +"LoginNetwork.ProfileManager.registerfailed" = "注册失败,请稍后重试"; +"Demo.TRTC.Login.welcome" = "欢迎使用腾讯云音视频"; +"V2.Live.LinkMicNew.enterphonenumber" = "请输入手机号"; +"V2.Live.LinkMicNew.enteremail" = "请输入邮箱"; +"V2.Live.LinkMicNew.entercorrectemail" = "请填写正确的邮箱地址"; +"V2.Live.LinkMicNew.enterverificationcode" = "请输入验证码"; +"V2.Live.LinkMicNew.getverificationcode" = "获取验证码"; +"V2.Live.LoginMock.login" = "登录/注册"; +"Demo.TRTC.Login.regist" = "注册"; +"Demo.TRTC.Login.enterusername" = "请输入用户昵称"; +"Demo.TRTC.Login.limit20count" = "仅限中文、字母、数字和下划线,2-20个字"; +"V2.Live.LinkMicNew.verificationcodesent" = "验证码已发送"; +"V2.Live.LinkMicNew.loginsuccess" = "登录成功"; +"V2.Live.LinkMicNew.termsandconditions" = "用户协议"; +"V2.Live.LinkMicNew.agree" = "同意"; +"V2.Live.LinkMicNew.disagree" = "不同意"; +"Demo.TRTC.Login.enterUserName" = "请输入用户名"; +"Demo.TRTC.Home.phoneoremailIsEmpty" = "电话号码或邮箱是空的"; +"Demo.TRTC.Home.userIDIsEmpty" = "UserId是空的"; + +"Demo.TRTC.Portal.privateandagreement" = "我已阅读并同意xxxyyy和zzz"; +"Demo.TRTC.Portal.agreeprivatefirst" = "请先同意隐私条款条款和用户协议。"; +"Demo.TRTC.Portal." = "《隐私政策摘要》"; +"Demo.TRTC.Portal." = "《隐私保护指引》"; +"Demo.TRTC.Portal." = "《用户协议》"; +"Demo.TRTC.Portal.privacysummary" = "隐私政策摘要"; +"Demo.TRTC.Portal.private" = "隐私保护指引"; +"Demo.TRTC.Portal.agreement" = "用户协议"; +"Demo.TRTC.Portal.readAndAgreeConditions" = "请阅读并同意以下条款"; +"Demo.TRTC.Portal.agreeAndContinue" = "同意并继续"; +"Demo.TRTC.LoginMock.adduserinformationforfirstlogin" = "首次登录请补充用户信息"; +"Demo.TRTC.Login.modifyLaterInSettings" = "可在设置中修改"; +"Demo.TRTC.Portal.privatealertdescription" = "欢迎您使用腾讯云音视频(TRTC),我们将通过xxx和yyy帮助您了解我们收集、使用、存储个人信息的情况,此外您还可以了解到您所享有的相关权利和实现途径,如您同意请点击下方按钮开始接受我们的服务;"; +"Demo.TRTC.Home.useroverduemessage" = "登录状态失效,请重新登录"; +"Demo.TRTC.http.syserror"= "系统错误"; + +"Demo.TRTC.LoginMock.username" = "用户名"; +"Demo.TRTC.LoginMock.fillinusernickname" = "请填写用户昵称"; +"Demo.TRTC.LoginMock.nickname.Martijn" = "路飞"; +"Demo.TRTC.LoginMock.nickname.irfan" = "山治"; +"Demo.TRTC.LoginMock.nickname.Rosanna" = "娜美"; +"Demo.TRTC.LoginMock.nickname.Franklyn" = "乌索普"; +"Demo.TRTC.LoginMock.nickname.Maren" = "香克斯"; +"Demo.TRTC.LoginMock.nickname.bartel" = "弗兰奇"; +"Demo.TRTC.LoginMock.nickname.Marianita" = "罗宾"; +"Demo.TRTC.LoginMock.nickname.Anneke" = "钢铁侠"; +"Demo.TRTC.LoginMock.nickname.elmira" = "蜘蛛侠"; +"Demo.TRTC.LoginMock.nickname.ivet" = "乔巴"; +"Demo.TRTC.LoginMock.nickname.clinton" = "鸣人"; +"Demo.TRTC.LoginMock.nickname.virelai" = "黑胡子"; +"Demo.TRTC.LoginMock.nickname.Ace" = "艾斯"; +"Demo.TRTC.Login.phonetext" = "切换手机号登录>"; +"Demo.TRTC.Login.emailtext" = "切换邮箱登录>"; +"Demo.TRTC.Login.ioatext" = "iOA 登录"; +"Demo.TRTC.Login.ioaLoading" = "iOA 登录中,请稍等..."; +"Demo.TRTC.Login.loading" = "登录中,请稍等..."; + +"Demo.TRTC.login_custom_name_1" = "天津饭"; +"Demo.TRTC.login_custom_name_2" = "饺子"; +"Demo.TRTC.login_custom_name_3" = "龟仙人"; +"Demo.TRTC.login_custom_name_4" = "琪琪"; +"Demo.TRTC.login_custom_name_5" = "孙悟空"; +"Demo.TRTC.login_custom_name_6" = "孙悟饭"; +"Demo.TRTC.login_custom_name_7" = "孙悟天"; +"Demo.TRTC.login_custom_name_8" = "贝吉塔"; +"Demo.TRTC.login_custom_name_9" = "小林"; +"Demo.TRTC.login_custom_name_10" = "鸣人"; +"Demo.TRTC.login_custom_name_11" = "佐助"; +"Demo.TRTC.login_custom_name_12" = "卡卡西"; +"Demo.TRTC.login_custom_name_13" = "小樱"; +"Demo.TRTC.login_custom_name_14" = "自来也"; +"Demo.TRTC.login_custom_name_15" = "我爱罗"; +"Demo.TRTC.login_custom_name_16" = "迈特凯"; +"Demo.TRTC.login_custom_name_17" = "韩梅梅"; +"Demo.TRTC.login_custom_name_18" = "李雷雷"; +"Demo.TRTC.login_custom_name_19" = "樱木花道"; +"Demo.TRTC.login_custom_name_20" = "流川枫"; +"Demo.TRTC.login_custom_name_21" = "宫城良田"; +"Demo.TRTC.login_custom_name_22" = "三井寿"; +"Demo.TRTC.login_custom_name_23" = "赤木晴子"; +"Demo.TRTC.login_custom_name_24" = "冰河"; +"Demo.TRTC.login_custom_name_25" = "星矢"; +"Demo.TRTC.login_custom_name_26" = "紫龙"; +"Demo.TRTC.login_custom_name_27" = "瞬"; +"Demo.TRTC.login_custom_name_28" = "纱织"; +"Demo.TRTC.login_custom_name_29" = "撒加"; +"Demo.TRTC.login_custom_name_30" = "艾奥利亚"; +"Demo.TRTC.login_custom_name_31" = "沙加"; +"Demo.TRTC.login_custom_name_32" = "童虎"; +"Demo.TRTC.login_custom_name_33" = "米罗"; + +"Demo.TRTC.DevMenu.selectLoginMethod" = "选择登录方式"; +"Demo.TRTC.DevMenu.phoneLogin" = "手机号登录"; +"Demo.TRTC.DevMenu.phoneLoginDesc" = "手机号 + 验证码,页面内可切换至 iOA"; +"Demo.TRTC.DevMenu.emailLogin" = "邮箱登录"; +"Demo.TRTC.DevMenu.emailLoginDesc" = "邮箱 + 验证码,适用于海外版"; +"Demo.TRTC.DevMenu.ioaLogin" = "iOA 企业登录"; +"Demo.TRTC.DevMenu.ioaLoginDesc" = "通过 iOA SDK 票据登录"; +"Demo.TRTC.DevMenu.inviteCodeLogin" = "邀请码登录"; +"Demo.TRTC.DevMenu.inviteCodeLoginDesc" = "通过邀请码直接登录"; +"Demo.TRTC.DevMenu.debugLogin" = "Debug 登录"; +"Demo.TRTC.DevMenu.debugLoginDesc" = "直接输入 userId 登录(跳过验证码)"; +"Demo.TRTC.DevMenu.envProduction" = "正式环境"; +"Demo.TRTC.DevMenu.envTest" = "测试环境"; +"Demo.TRTC.DevMenu.autoLogin" = "自动登录"; + +"Demo.TRTC.Login.userCancelled" = "用户取消登录"; +"Demo.TRTC.Login.tokenExpired" = "Token 已过期"; + +"Demo.TRTC.Language.switchLanguage" = "切换语言"; + +"Demo.TRTC.Main.welcomeRTCube" = "欢迎使用 RTCube"; +"Demo.TRTC.Main.logout" = "登出"; + +"Demo.TRTC.Portal.Main.InviteCodeBeUsed" = "邀请码已被使用"; +"Demo.TRTC.Portal.Main.InviteCodeInvalid" = "邀请码无效"; +"Demo.TRTC.Portal.Main.UserInviteCodeExpire" = "邀请码已过期"; +"Demo.TRTC.Portal.Main.EmailIncorrect" = "邮件发送失败"; +"Demo.TRTC.Portal.Main.EmailTooManyCodeRequest" = "请求次数过多,请检查邮箱中已发送的邀请码。"; +"Demo.TRTC.Portal.Main.AgreeBeforeUse" = "请先同意服务条款后使用"; + +"Demo.TRTC.Email.welcomeTitle" = "欢迎使用 RTC"; +"Demo.TRTC.Email.subtitle" = "输入您的邮箱以获取邀请码。"; +"Demo.TRTC.Email.emailPlaceholder" = "邮箱地址"; +"Demo.TRTC.Email.continueButton" = "继续"; +"Demo.TRTC.Email.requesting" = "请求中..."; +"Demo.TRTC.Email.enterEmailError" = "请输入您的邮箱地址"; +"Demo.TRTC.Email.validEmailError" = "请输入有效的邮箱地址"; +"Demo.TRTC.Email.bottomTextPrefix" = "已有邀请码?"; +"Demo.TRTC.Email.enterCodeLink" = "输入邀请码"; + +"Demo.TRTC.InviteCode.checkYourEmail" = "检查您的邮箱"; +"Demo.TRTC.InviteCode.enterInvitationCode" = "输入邀请码"; +"Demo.TRTC.InviteCode.enterCodeSentToEmail" = "请输入我们发送到您邮箱 %@ 的邀请码"; +"Demo.TRTC.InviteCode.enterCodeToGetStarted" = "如果您已有邀请码,请在此输入以开始使用"; +"Demo.TRTC.InviteCode.getStarted" = "开始使用"; +"Demo.TRTC.InviteCode.validating" = "验证中..."; +"Demo.TRTC.InviteCode.enterCompleteCode" = "请输入完整的6位邀请码"; +"Demo.TRTC.InviteCode.codeIncorrect" = "邀请码不正确"; +"Demo.TRTC.InviteCode.resendClickable" = "没有收到邀请码?请检查垃圾邮件文件夹。\n重新发送邀请码。"; +"Demo.TRTC.InviteCode.clickToResend" = "重新发送邀请码。"; +"Demo.TRTC.InviteCode.resendCountdown" = "没有收到邀请码?请检查垃圾邮件文件夹。\n%d秒后重新发送"; +"Demo.TRTC.InviteCode.resendAfter" = "%d秒后重新发送"; +"Demo.TRTC.InviteCode.resendingCode" = "正在重新发送邀请码..."; +"Demo.TRTC.InviteCode.agreeToTermsPrefix" = "我同意 TRTC 的"; +"Demo.TRTC.InviteCode.termsOfService" = "服务条款"; +"Demo.TRTC.InviteCode.agreeToTermsMiddle" = "和"; +"Demo.TRTC.InviteCode.privacyPolicy" = "隐私政策"; +"Demo.TRTC.InviteCode.agreeToTermsSuffix" = " "; +"Demo.TRTC.InviteCode.marketingInfo" = "我希望收到 TRTC 的营销信息"; diff --git a/application/login/Resource/VerifyPicture.html b/application/login/Resource/VerifyPicture.html new file mode 100644 index 00000000..b6a4be62 --- /dev/null +++ b/application/login/Resource/VerifyPicture.html @@ -0,0 +1,37 @@ + + + + + + 验证码 + + + + + + diff --git a/application/login/TokenAuth/Store/TokenAuthStore.swift b/application/login/TokenAuth/Store/TokenAuthStore.swift new file mode 100644 index 00000000..2ced60e9 --- /dev/null +++ b/application/login/TokenAuth/Store/TokenAuthStore.swift @@ -0,0 +1,39 @@ +// +// TokenAuthStore.swift +// login +// + +import Foundation +import Combine + +class TokenAuthStore: LoginSubStore { + + // MARK: - LoginSubStore + + private let resultSubject = PassthroughSubject, Never>() + var resultPublisher: AnyPublisher, Never> { + resultSubject.eraseToAnyPublisher() + } + + // MARK: - Dependencies + + private let networkService = LoginNetworkService() + + // MARK: - Public Methods + + func performAutoLogin(originalMode: LoginMode) { + guard let credentials = TokenCacheManager.getCachedCredentials() else { + resultSubject.send(.failure(.tokenExpired)) + return + } + + networkService.loginByToken(userId: credentials.userId, token: credentials.token, originalMode: originalMode) { [weak self] result in + self?.resultSubject.send(result) + } + } + + // MARK: - LoginSubStore + + func resetState() { + } +} diff --git a/application/login/TokenAuth/Utils/TokenCacheManager.swift b/application/login/TokenAuth/Utils/TokenCacheManager.swift new file mode 100644 index 00000000..6bb288e5 --- /dev/null +++ b/application/login/TokenAuth/Utils/TokenCacheManager.swift @@ -0,0 +1,22 @@ +// +// TokenCacheManager.swift +// login +// + +import Foundation + +struct TokenCacheManager { + + static func getCachedCredentials() -> (userId: String, token: String)? { + guard let user = LoginManager.shared.getCurrentUser(), + !user.userId.isEmpty, + !user.token.isEmpty else { + return nil + } + return (userId: user.userId, token: user.token) + } + + static func clearCache() { + LoginManager.shared.removeLoginCache() + } +} diff --git a/application/login/UserInfoManager.swift b/application/login/UserInfoManager.swift new file mode 100644 index 00000000..e1c5a7cd --- /dev/null +++ b/application/login/UserInfoManager.swift @@ -0,0 +1,57 @@ +// +// UserInfoManager.swift +// Login +// +// Created by gg on 2026/3/26. +// + +import ImSDK_Plus + +class UserInfoManager: NSObject, V2TIMSDKListener { + private var hasAddedListener = false + + func startListener() { + guard !hasAddedListener else { return } + V2TIMManager.sharedInstance().addIMSDKListener(listener: self) + hasAddedListener = true + } + + func stopListener() { + guard hasAddedListener else { return } + V2TIMManager.sharedInstance().removeIMSDKListener(listener: self) + hasAddedListener = false + } + + func updateSelfInfo(userModel: UserModel) { + ProfileManager.shared.curUserModel?.name = userModel.name + LoginManager.shared.currentUser?.name = userModel.name + LoginEntry.shared.userModel?.name = userModel.name + + ProfileManager.shared.curUserModel?.avatar = userModel.avatar + LoginManager.shared.currentUser?.avatar = userModel.avatar + LoginEntry.shared.userModel?.avatar = userModel.avatar + + ProfileManager.shared.localizeUserModel() + if let userModel = LoginManager.shared.currentUser { + LoginManager.shared.syncUserModelLocalData(userModel) + } + } + + func onSelfInfoUpdated(info Info: V2TIMUserFullInfo!) { + guard let info = Info else { return } + if let nickName = info.nickName, !nickName.isEmpty { + ProfileManager.shared.curUserModel?.name = nickName + LoginManager.shared.currentUser?.name = nickName + LoginEntry.shared.userModel?.name = nickName + } + if let faceURL = info.faceURL, !faceURL.isEmpty { + ProfileManager.shared.curUserModel?.avatar = faceURL + LoginManager.shared.currentUser?.avatar = faceURL + LoginEntry.shared.userModel?.avatar = faceURL + } + ProfileManager.shared.localizeUserModel() + if let userModel = LoginManager.shared.currentUser { + LoginManager.shared.syncUserModelLocalData(userModel) + } + } +} diff --git a/application/main/Domestic/EntranceState.swift b/application/main/Domestic/EntranceState.swift new file mode 100644 index 00000000..7a3d855a --- /dev/null +++ b/application/main/Domestic/EntranceState.swift @@ -0,0 +1,17 @@ +// +// EntranceState.swift +// main +// + +import Foundation +import AppAssembly + +struct EntranceState { + var modules: [ResolvedModule] = [] + + var isReportViewVisible: Bool = false + + var userAvatarURL: String = "" + + var isNeedFaceAuth: Bool = false +} diff --git a/application/main/Domestic/EntranceStore.swift b/application/main/Domestic/EntranceStore.swift new file mode 100644 index 00000000..fd2870ad --- /dev/null +++ b/application/main/Domestic/EntranceStore.swift @@ -0,0 +1,80 @@ +// +// EntranceStore.swift +// main +// + +import Combine +import UIKit +import AppAssembly + +final class EntranceStore { + + @Published private(set) var state = EntranceState() + + private var cancellables = Set() + + func loadModules() { + var resolved = ModuleRegistry.shared.resolvedModules() + + resolved = ModulePermissionService.shared.filter(resolved) + + state.modules = resolved + + subscribeDynamicUpdates() + } + + func selectModule(at index: Int) -> UIViewController? { + guard index < state.modules.count else { return nil } + let module = state.modules[index] + + guard ModulePermissionService.shared.isModuleEnabled(module) else { + return nil + } + + if !module.config.analyticsEvent.isEmpty { + trackAnalytics(event: module.config.analyticsEvent) + } + + return module.config.targetProvider() + } + + func badgeCount(at index: Int) -> UInt64 { + guard index < state.modules.count else { return 0 } + return state.modules[index].badgeCount + } + + func updateBadgeCount(for identifier: String, count: UInt64) { + guard let index = state.modules.firstIndex(where: { $0.config.identifier == identifier }) else { return } + state.modules[index].badgeCount = count + } + + // MARK: - Private + + private func subscribeDynamicUpdates() { + cancellables.removeAll() + + for (index, module) in state.modules.enumerated() { + guard let provider = module.provider else { continue } + + provider.badgeCountPublisher + .receive(on: DispatchQueue.main) + .sink { [weak self] count in + guard let self = self, index < self.state.modules.count else { return } + self.state.modules[index].badgeCount = count + } + .store(in: &cancellables) + + provider.isVisiblePublisher + .receive(on: DispatchQueue.main) + .sink { [weak self] visible in + guard let self = self, index < self.state.modules.count else { return } + self.state.modules[index].isVisible = visible + } + .store(in: &cancellables) + } + } + + private func trackAnalytics(event: String) { + AppLogger.App.debug(" trackAnalytics: \(event)") + } +} diff --git a/application/main/Domestic/Service/ModulePermissionService.swift b/application/main/Domestic/Service/ModulePermissionService.swift new file mode 100644 index 00000000..2a44974c --- /dev/null +++ b/application/main/Domestic/Service/ModulePermissionService.swift @@ -0,0 +1,75 @@ +// +// ModulePermissionService.swift +// main +// + +import UIKit +import AppAssembly +import Login + +final class ModulePermissionService { + static let shared = ModulePermissionService() + private init() {} + + private(set) var bannedModuleIds: Set = [] + + private(set) var isHighRiskUser: Bool = false + + private(set) var isNeedFaceAuth: Bool = false + + func loadUserBlackList() { + LoginManager.shared.getUserModuleBlackList(success: { [weak self] _ in + guard let self = self else { return } + if let modules = LoginManager.shared.currentUser?.bannedModules { + self.updateBannedModules(modules) + } + AppLogger.App.info(" loadUserBlackList success, bannedModuleIds: \(self.bannedModuleIds)") + }, failed: { errorCode, errorMessage in + AppLogger.App.error(" loadUserBlackList failed: \(errorCode) \(errorMessage ?? "")") + }) + } + + func checkHighRiskUser() -> Bool { + guard let user = LoginManager.shared.getCurrentUser() else { return false } + let result = user.isHighRiskUser + if result { + isHighRiskUser = true + isNeedFaceAuth = true + } + AppLogger.App.info(" checkHighRiskUser called, isHighRisk: \(result)") + return result + } + + func updateBannedModules(_ modules: [String: Bool]) { + bannedModuleIds = Set(modules.filter { $0.value == true }.map { $0.key }) + } + + func updateHighRiskUser(_ isHighRisk: Bool) { + self.isHighRiskUser = isHighRisk + } + + func updateNeedFaceAuth(_ needFaceAuth: Bool) { + self.isNeedFaceAuth = needFaceAuth + } + + func isModuleEnabled(_ module: ResolvedModule) -> Bool { + if isNeedFaceAuth { + return false + } + + if isHighRiskUser { + return false + } + + if module.config.cardStyle == .banner { + return true + } + + return !bannedModuleIds.contains(module.config.identifier) + } + + func filter(_ modules: [ResolvedModule]) -> [ResolvedModule] { + // return modules.filter { $0.isVisible } + return modules + } +} diff --git a/application/main/Domestic/Views/EntranceCollectionCell.swift b/application/main/Domestic/Views/EntranceCollectionCell.swift new file mode 100644 index 00000000..c10d9cdf --- /dev/null +++ b/application/main/Domestic/Views/EntranceCollectionCell.swift @@ -0,0 +1,371 @@ +// +// EntranceCollectionCell.swift +// main +// + +import UIKit +import SnapKit +import Kingfisher +import TUICore +import AtomicX +import AppAssembly + +class EntranceCollectionCell: UICollectionViewCell { + + // MARK: - Properties + + private var gradientColors: [UIColor] = [] + private var cardStyle: EntranceCardStyle = .standard + + // MARK: - UI Elements + + let containerView: UIView = { + let view = UIView() + view.layer.cornerRadius = ThemeStore.shared.borderRadius.radius6 + view.layer.masksToBounds = true + view.backgroundColor = ThemeStore.shared.colorTokens.bgColorOperate + return view + }() + + private let titleLabel: UILabel = { + let label = UILabel(frame: .zero) + label.textColor = ThemeStore.shared.colorTokens.textColorPrimary + label.textAlignment = .left + label.numberOfLines = 0 + label.adjustsFontSizeToFitWidth = true + label.minimumScaleFactor = 0.5 + return label + }() + + private let iconImageView: UIImageView = { + let imageView = UIImageView(frame: .zero) + imageView.contentMode = .scaleAspectFit + return imageView + }() + + private let descLabel: UILabel = { + let label = UILabel(frame: .zero) + label.font = UIFont(name: "PingFangSC-Regular", size: convertPixel(w: 12)) + label.textColor = ThemeStore.shared.colorTokens.textColorSecondary + label.textAlignment = .left + label.numberOfLines = 0 + label.adjustsFontSizeToFitWidth = true + label.minimumScaleFactor = 0.8 + return label + }() + + private let hotLabel: UILabel = { + let label = UILabel() + label.text = MainLocalize("Demo.TRTC.Portal.Main.HotComponent") + label.textColor = .white + label.textAlignment = .center + label.isHidden = true + label.font = UIFont(name: "PingFangSC-Medium", size: convertPixel(h: 12)) + label.backgroundColor = ThemeStore.shared.colorTokens.textColorWarning + label.layer.cornerRadius = 2 + label.layer.masksToBounds = true + return label + }() + + private let uiComIconView: UIView = { + let view = UIView(frame: .zero) + view.backgroundColor = ThemeStore.shared.colorTokens.textColorLink + view.layer.cornerRadius = 2 + view.layer.masksToBounds = true + return view + }() + + private let uiComLabel: UILabel = { + let label = UILabel() + label.text = "" + label.textColor = .white + label.textAlignment = .center + return label + }() + + private let arrowImageView: UIImageView = { + let imageView = UIImageView(frame: .zero) + imageView.image = UIImage(named: "main_entrance_pusharrow") + imageView.contentMode = .scaleAspectFit + imageView.isHidden = true + return imageView + }() + + private let backgroundImageView: UIImageView = { + let imageView = UIImageView(frame: .zero) + imageView.contentMode = .scaleAspectFit + imageView.image = UIImage(named: "main_entrance_scenarios") + imageView.isHidden = true + return imageView + }() + + // MARK: - Init + + override init(frame: CGRect) { + super.init(frame: frame) + constructViewHierarchy() + activateConstraints() + titleLabel.font = UIFont(name: "PingFangSC-Medium", size: convertPixel(w: 17.0 - englishOffset)) + uiComLabel.font = UIFont(name: "PingFangSC-Semibold", size: convertPixel(w: 12.0 - englishOffset)) + if ScreenWidth <= 375.0 && isEnglishLanguage { + uiComIconView.isHidden = true + } + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + // MARK: - Draw + + override func draw(_ rect: CGRect) { + super.draw(rect) + let layer = containerView.gradient(colors: gradientColors) + if cardStyle == .banner { + layer.startPoint = CGPoint(x: 0.0, y: 0.5) + layer.endPoint = CGPoint(x: 1.0, y: 0.5) + } else { + layer.startPoint = CGPoint(x: 0.5, y: 0.0) + layer.endPoint = CGPoint(x: 0.5, y: 1.0) + } + } + + // MARK: - Setup + + private func constructViewHierarchy() { + contentView.addSubview(containerView) + containerView.addSubview(backgroundImageView) + containerView.addSubview(titleLabel) + containerView.addSubview(iconImageView) + uiComIconView.addSubview(uiComLabel) + containerView.addSubview(uiComIconView) + containerView.addSubview(arrowImageView) + containerView.addSubview(descLabel) + containerView.addSubview(hotLabel) + } + + private func activateConstraints() { + containerView.snp.makeConstraints { make in + make.top.left.equalToSuperview().offset(convertPixel(h: 4)) + make.bottom.right.equalToSuperview().offset(convertPixel(h: -4)) + } + + backgroundImageView.snp.makeConstraints { make in + make.leading.equalToSuperview() + make.bottom.equalToSuperview() + } + + iconImageView.snp.makeConstraints { make in + make.top.left.equalToSuperview().offset(16) + make.width.height.equalTo(24) + } + + titleLabel.snp.makeConstraints { make in + make.left.equalTo(iconImageView.snp.right).offset(convertPixel(w: 6)) + make.right.equalTo(uiComIconView.snp.left).offset(convertPixel(w: -6)) + make.centerY.equalTo(iconImageView) + } + + arrowImageView.snp.makeConstraints { make in + make.centerY.equalTo(iconImageView) + make.right.equalToSuperview().offset(-16) + make.size.equalTo(CGSize(width: 16.0, height: 16.0)) + } + + uiComLabel.snp.makeConstraints { make in + make.top.bottom.equalToSuperview() + make.leading.trailing.equalToSuperview().inset(4) + } + + uiComIconView.snp.makeConstraints { make in + make.left.equalTo(uiComLabel).offset(convertPixel(h: 6)) + make.bottom.top.equalTo(uiComLabel) + make.centerY.equalTo(titleLabel) + } + + descLabel.snp.makeConstraints { make in + make.left.equalToSuperview().offset(convertPixel(w: 14)) + make.right.equalToSuperview().offset(convertPixel(w: -14)) + make.top.equalTo(iconImageView.snp.bottom).offset(convertPixel(h: 6)).priority(.high) + make.bottom.lessThanOrEqualToSuperview().offset(convertPixel(h: -8)) + } + + hotLabel.snp.makeConstraints { make in + make.left.equalTo(uiComLabel).offset(convertPixel(h: 6)) + make.centerY.equalTo(titleLabel) + make.height.equalTo(18) + make.width.equalTo(32) + } + + titleLabel.setContentCompressionResistancePriority(.defaultLow, for: .horizontal) + } + + // MARK: - Public Config + + func config(_ module: ResolvedModule) { + self.cardStyle = module.config.cardStyle + switch module.config.cardStyle { + case .standard: + setupStandardConfig(module) + case .uiComponent: + setupUIComponentConfig(module) + case .banner: + setupBannerConfig(module) + } + } + + // MARK: - Style Configuration + + private func setupStandardConfig(_ module: ResolvedModule) { + let config = module.config + titleLabel.text = config.title + titleLabel.textColor = ThemeStore.shared.colorTokens.textColorPrimary + titleLabel.font = UIFont(name: "PingFangSC-Medium", size: convertPixel(w: 17.0 - englishOffset)) + descLabel.text = config.description + hotLabel.isHidden = !config.isHot + uiComIconView.isHidden = true + + gradientColors = [] + containerView.gradientLayer?.removeFromSuperlayer() + containerView.gradientLayer = nil + containerView.backgroundColor = ThemeStore.shared.colorTokens.bgColorOperate + + setIconImage(name: config.iconName, preloaded: config.iconImage) + + iconImageView.snp.remakeConstraints { make in + make.top.left.equalToSuperview().offset(16) + make.width.height.equalTo(24) + } + + titleLabel.snp.remakeConstraints { make in + make.left.equalTo(iconImageView.snp.right).offset(convertPixel(w: 6)) + if config.isHot { + make.right.equalTo(hotLabel.snp.left).offset(convertPixel(w: -6 + englishOffset)) + } else { + make.right.equalToSuperview() + } + make.centerY.equalTo(iconImageView) + } + + arrowImageView.snp.remakeConstraints { make in + make.centerY.equalTo(iconImageView) + make.right.equalToSuperview().offset(-16) + make.size.equalTo(CGSize(width: 16.0, height: 16.0)) + } + + descLabel.snp.remakeConstraints { make in + make.left.equalToSuperview().offset(convertPixel(w: 14)) + make.right.equalToSuperview().offset(convertPixel(w: -14)) + make.top.equalTo(iconImageView.snp.bottom).offset(convertPixel(h: 6)).priority(.high) + make.bottom.lessThanOrEqualToSuperview().offset(convertPixel(h: -8)) + } + + arrowImageView.isHidden = true + backgroundImageView.isHidden = true + } + + private func setupUIComponentConfig(_ module: ResolvedModule) { + let config = module.config + if !config.gradientColors.isEmpty { + gradientColors = config.gradientColors + uiComLabel.text = MainLocalize("Demo.TRTC.Portal.Main.UICompnent") + containerView.gradientLayer?.colors = config.gradientColors + containerView.gradient(colors: gradientColors, bounds: containerView.bounds, isVertical: true) + } + + titleLabel.text = config.title + titleLabel.textColor = ThemeStore.shared.colorTokens.textColorPrimary + titleLabel.font = UIFont(name: "PingFangSC-Medium", size: convertPixel(w: 17.0 - englishOffset)) + descLabel.text = config.description + hotLabel.isHidden = true + uiComIconView.isHidden = (ScreenWidth <= 375.0 && isEnglishLanguage) + + setIconImage(name: config.iconName, preloaded: config.iconImage) + + iconImageView.snp.remakeConstraints { make in + make.top.left.equalToSuperview().offset(16) + make.width.height.equalTo(24) + } + + arrowImageView.snp.remakeConstraints { make in + make.centerY.equalTo(iconImageView) + make.right.equalToSuperview().offset(-16) + make.size.equalTo(CGSize(width: 16.0, height: 16.0)) + } + + titleLabel.snp.remakeConstraints { make in + make.left.equalTo(iconImageView.snp.right).offset(convertPixel(w: 6)) + make.right.equalTo(uiComIconView.snp.left).offset(convertPixel(w: -6)) + make.centerY.equalTo(iconImageView) + } + + descLabel.snp.remakeConstraints { make in + make.left.equalToSuperview().offset(convertPixel(w: 14)) + make.right.equalToSuperview().offset(convertPixel(w: -14)) + make.top.equalTo(iconImageView.snp.bottom).offset(convertPixel(h: 6)).priority(.high) + make.bottom.lessThanOrEqualToSuperview().offset(convertPixel(h: -8)) + } + + arrowImageView.isHidden = true + backgroundImageView.isHidden = true + } + + private func setupBannerConfig(_ module: ResolvedModule) { + let config = module.config + if !config.gradientColors.isEmpty { + gradientColors = config.gradientColors + containerView.gradientLayer?.colors = config.gradientColors + containerView.gradient(colors: gradientColors, bounds: containerView.bounds, isVertical: false) + } + + titleLabel.text = config.title + titleLabel.textColor = ThemeStore.shared.colorTokens.textColorLink + titleLabel.font = ThemeStore.shared.typographyTokens.Medium14 + descLabel.text = config.description + arrowImageView.isHidden = false + uiComIconView.isHidden = true + hotLabel.isHidden = true + iconImageView.image = nil + + titleLabel.snp.remakeConstraints { make in + make.left.equalToSuperview().offset(convertPixel(w: 16)) + make.right.equalToSuperview().offset(convertPixel(w: -12)) + make.centerY.equalToSuperview() + } + + arrowImageView.snp.remakeConstraints { make in + make.centerY.equalTo(descLabel.snp.centerY) + make.leading.equalTo(descLabel.snp.trailing) + } + + descLabel.snp.remakeConstraints { make in + make.right.equalToSuperview().inset(convertPixel(w: 40)) + make.centerY.equalTo(titleLabel) + } + + backgroundImageView.isHidden = false + } + + // MARK: - Helpers + + private func setIconImage(name: String, preloaded: UIImage? = nil) { + if let preloaded = preloaded { + iconImageView.image = preloaded + } else if name.hasPrefix("http"), let imageURL = URL(string: name) { + iconImageView.kf.setImage(with: imageURL) + } else { + iconImageView.image = UIImage(named: name) + } + } + + private var englishOffset: CGFloat { + return isEnglishLanguage ? 2 : 0 + } + + private var isEnglishLanguage: Bool { + guard let language = TUIGlobalization.getPreferredLanguage() else { + return false + } + return !language.contains("zh") + } +} diff --git a/application/main/Domestic/Views/EntranceFooterView.swift b/application/main/Domestic/Views/EntranceFooterView.swift new file mode 100644 index 00000000..f5c7aea1 --- /dev/null +++ b/application/main/Domestic/Views/EntranceFooterView.swift @@ -0,0 +1,38 @@ +// +// EntranceFooterView.swift +// main +// + +import UIKit +import AtomicX + +class EntranceFooterView: UICollectionReusableView { + + let footerLabel: UILabel = { + let label = UILabel() + label.textAlignment = .left + label.font = ThemeStore.shared.typographyTokens.Regular12 + label.textColor = ThemeStore.shared.colorTokens.textColorTertiary + label.numberOfLines = 2 + return label + }() + + override init(frame: CGRect) { + super.init(frame: frame) + addSubview(footerLabel) + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + override func layoutSubviews() { + super.layoutSubviews() + footerLabel.frame = CGRect( + x: 16, + y: 0, + width: bounds.width - 32, + height: bounds.height + ) + } +} diff --git a/application/main/Domestic/Views/EntranceReportView.swift b/application/main/Domestic/Views/EntranceReportView.swift new file mode 100644 index 00000000..a31270ad --- /dev/null +++ b/application/main/Domestic/Views/EntranceReportView.swift @@ -0,0 +1,80 @@ +// +// EntranceReportView.swift +// main +// + +import UIKit +import SnapKit +import AtomicX + +class EntranceReportView: UIView { + + var reportHandler: (() -> Void)? + + // MARK: - UI Elements + + private let reportLabel: UILabel = { + let label = UILabel() + let font = ThemeStore.shared.typographyTokens.Regular12 + + let arrowImage = UIImage(named: "main_entrance_report_arrow") ?? UIImage() + let attachment = NSTextAttachment(image: arrowImage) + attachment.bounds = CGRect( + x: 0, + y: round(font.capHeight - arrowImage.size.height) / 2.0, + width: arrowImage.size.width, + height: arrowImage.size.height + ) + + let mutableAttrStr = NSMutableAttributedString(string: MainLocalize("Demo.TRTC.Portal.Main.Report")) + let arrowImageAttr = NSAttributedString(attachment: attachment) + mutableAttrStr.append(arrowImageAttr) + + label.attributedText = mutableAttrStr + label.font = font + label.numberOfLines = 0 + label.textColor = ThemeStore.shared.colorTokens.textColorError + return label + }() + + // MARK: - Lifecycle + + private var isViewReady = false + + override func didMoveToWindow() { + super.didMoveToWindow() + guard !isViewReady else { return } + isViewReady = true + + isUserInteractionEnabled = true + constructViewHierarchy() + activateConstraints() + bindInteraction() + } + + // MARK: - Setup + + private func constructViewHierarchy() { + addSubview(reportLabel) + } + + private func activateConstraints() { + reportLabel.snp.makeConstraints { make in + make.right.equalToSuperview().offset(-16) + make.left.equalToSuperview().offset(16) + make.bottom.equalToSuperview().offset(-8) + make.top.equalToSuperview().offset(8) + } + } + + private func bindInteraction() { + let tap = UITapGestureRecognizer(target: self, action: #selector(clickReportEvent)) + addGestureRecognizer(tap) + } + + // MARK: - Actions + + @objc private func clickReportEvent() { + reportHandler?() + } +} diff --git a/application/main/Domestic/Views/LeftAlignedFlowLayout.swift b/application/main/Domestic/Views/LeftAlignedFlowLayout.swift new file mode 100644 index 00000000..683e66ff --- /dev/null +++ b/application/main/Domestic/Views/LeftAlignedFlowLayout.swift @@ -0,0 +1,39 @@ +// +// LeftAlignedFlowLayout.swift +// main +// + +import UIKit + +class LeftAlignedFlowLayout: UICollectionViewFlowLayout { + + override func layoutAttributesForElements(in rect: CGRect) -> [UICollectionViewLayoutAttributes]? { + guard let attributes = super.layoutAttributesForElements(in: rect) else { return nil } + + var leftMargin = sectionInset.left + var maxY: CGFloat = -1.0 + + let modifiedAttributes = attributes.map { attribute -> UICollectionViewLayoutAttributes in + let attributesCopy = attribute.copy() as? UICollectionViewLayoutAttributes ?? attribute + + if attributesCopy.representedElementCategory == .cell { + if attributesCopy.frame.origin.y >= maxY { + leftMargin = sectionInset.left + } + + let isFullWidthCell = attributesCopy.frame.width > (self.collectionView?.bounds.width ?? 0) * 0.8 + + if !isFullWidthCell { + attributesCopy.frame.origin.x = leftMargin + leftMargin += attributesCopy.frame.width + minimumInteritemSpacing + } + + maxY = max(attributesCopy.frame.maxY, maxY) + } + + return attributesCopy + } + + return modifiedAttributes + } +} diff --git a/application/main/Domestic/Views/SafetyReminderView.swift b/application/main/Domestic/Views/SafetyReminderView.swift new file mode 100644 index 00000000..ddab0459 --- /dev/null +++ b/application/main/Domestic/Views/SafetyReminderView.swift @@ -0,0 +1,198 @@ +// +// SafetyReminderView.swift +// main +// + +import UIKit +import SnapKit +import AtomicX + +class SafetyReminderView: UIView { + + // MARK: - UI Elements + + private let contentView: UIView = { + let view = UIView() + view.backgroundColor = ThemeStore.shared.colorTokens.bgColorDefault + view.layer.masksToBounds = true + view.layer.cornerRadius = 15 + return view + }() + + private let safeTitle: UILabel = { + let label = UILabel() + label.text = MainLocalize("Demo.TRTC.Portal.Main.safetyReminderTitle") + label.font = ThemeStore.shared.typographyTokens.Medium18 + label.textColor = ThemeStore.shared.colorTokens.textColorPrimary + return label + }() + + private let reminderContentScrollView: UIScrollView = { + let scrollView = UIScrollView() + scrollView.bounces = false + return scrollView + }() + + private let reminderLabel: UILabel = { + let label = UILabel() + label.numberOfLines = 0 + + let firstPara = MainLocalize("Demo.TRTC.Portal.Main.safetyReminderFirstPara") + "\n" + let midPara = MainLocalize("Demo.TRTC.Portal.Main.safetyReminderMidPara") + "\n" + let endPara = MainLocalize("Demo.TRTC.Portal.Main.safetyReminderEndPara") + "\n" + let reminderText = firstPara + midPara + endPara + + let paragraphStyle = NSMutableParagraphStyle() + paragraphStyle.lineSpacing = 5 + + let regularFont = ThemeStore.shared.typographyTokens.Regular12 + let semiboldFont = ThemeStore.shared.typographyTokens.Bold12 + + let regularAttr: [NSAttributedString.Key: Any] = [ + .font: regularFont, + .paragraphStyle: paragraphStyle, + .foregroundColor: ThemeStore.shared.colorTokens.textColorPrimary, + ] + let attributedStr = NSMutableAttributedString(string: reminderText, attributes: regularAttr) + + let firstRange = NSRange(location: 0, length: firstPara.count) + attributedStr.addAttribute(.font, value: semiboldFont, range: firstRange) + + let endRange = NSRange(location: firstPara.count + midPara.count, length: endPara.count) + attributedStr.addAttribute(.font, value: semiboldFont, range: endRange) + + label.attributedText = attributedStr + return label + }() + + private let confirmButtonView: UIView = { + let view = UIView() + view.backgroundColor = ThemeStore.shared.colorTokens.buttonColorPrimaryDisabled + view.layer.masksToBounds = true + view.layer.cornerRadius = 18 + return view + }() + + private let confirmButton: UIButton = { + let button = UIButton(type: .system) + button.isEnabled = false + return button + }() + + private let buttonTitleLabel: UILabel = { + let label = UILabel() + label.font = .boldSystemFont(ofSize: 14) + label.textColor = ThemeStore.shared.colorTokens.textColorButtonDisabled + return label + }() + + // MARK: - Properties + + var confirmTimeCount: Int = 0 { + didSet { + buttonTitleLabel.text = MainLocalize("Demo.TRTC.Portal.Main.safetyReminderConfirm") + "(\(confirmTimeCount))" + } + } + + var clickConfirmBlock: () -> Void = {} + private var isViewReady = false + + // MARK: - Lifecycle + + override func didMoveToWindow() { + super.didMoveToWindow() + guard !isViewReady else { return } + isViewReady = true + + backgroundColor = ThemeStore.shared.colorTokens.bgColorMask + constructViewHierarchy() + activateConstraints() + bindInteraction() + configTimer() + reminderContentScrollView.contentSize = CGSize(width: 268, height: reminderLabel.frame.height) + } + + // MARK: - Setup + + private func constructViewHierarchy() { + addSubview(contentView) + contentView.addSubview(safeTitle) + contentView.addSubview(reminderContentScrollView) + reminderContentScrollView.addSubview(reminderLabel) + contentView.addSubview(confirmButtonView) + confirmButtonView.addSubview(buttonTitleLabel) + confirmButtonView.insertSubview(confirmButton, at: 0) + } + + private func activateConstraints() { + contentView.snp.makeConstraints { make in + make.height.equalTo(383) + make.width.equalTo(300) + make.center.equalToSuperview() + } + safeTitle.snp.makeConstraints { make in + make.top.equalToSuperview().offset(20) + make.centerX.equalToSuperview() + } + reminderLabel.snp.makeConstraints { make in + make.top.left.equalToSuperview() + make.width.equalTo(268) + } + reminderLabel.layoutIfNeeded() + buttonTitleLabel.snp.makeConstraints { make in + make.center.equalToSuperview() + } + confirmButtonView.snp.makeConstraints { make in + make.height.equalTo(36) + make.width.equalTo(120) + make.bottom.equalToSuperview().offset(-20) + make.centerX.equalToSuperview() + } + confirmButton.snp.makeConstraints { make in + make.edges.equalToSuperview() + } + reminderContentScrollView.snp.makeConstraints { make in + make.left.equalToSuperview().offset(16) + make.right.equalToSuperview().offset(-16) + make.top.equalTo(safeTitle.snp.bottom).offset(20) + make.bottom.equalTo(confirmButtonView.snp.top).offset(-20) + } + } + + private func bindInteraction() { + confirmButton.addTarget(self, action: #selector(confirmButtonClicked), for: .touchUpInside) + } + + // MARK: - Timer + + private func configTimer() { + var timeCount = confirmTimeCount + Timer.scheduledTimer(withTimeInterval: 1.0, repeats: true) { [weak self] timer in + if timeCount == 0 { + timer.invalidate() + self?.confirmButton.isEnabled = true + self?.buttonTitleLabel.text = MainLocalize("Demo.TRTC.Portal.Main.safetyReminderConfirm") + self?.buttonTitleLabel.textColor = ThemeStore.shared.colorTokens.textColorButton + self?.confirmButtonView.backgroundColor = ThemeStore.shared.colorTokens.buttonColorPrimaryDefault + } else { + timeCount -= 1 + self?.buttonTitleLabel.text = + MainLocalize("Demo.TRTC.Portal.Main.safetyReminderConfirm") + "(\(timeCount))" + } + } + } + + func resetTimer(timeCount: Int = 5) { + confirmTimeCount = timeCount + confirmButtonView.backgroundColor = ThemeStore.shared.colorTokens.buttonColorPrimaryDisabled + buttonTitleLabel.textColor = ThemeStore.shared.colorTokens.textColorButtonDisabled + confirmButton.isEnabled = false + configTimer() + } + + // MARK: - Actions + + @objc private func confirmButtonClicked() { + clickConfirmBlock() + } +} diff --git a/application/main/EntranceViewController.swift b/application/main/EntranceViewController.swift new file mode 100644 index 00000000..21ef4a81 --- /dev/null +++ b/application/main/EntranceViewController.swift @@ -0,0 +1,543 @@ +// +// EntranceViewController.swift +// main +// + +import AppAssembly +import AtomicX +import Combine +import Login +#if !OPEN_SOURCE +import RTCExperienceRoom +#endif +import SnapKit +import Toast_Swift +import TUICore +import UIKit +#if !RTCUBE_OVERSEAS && !OPEN_SOURCE +import HuiYanPublicSDK +#endif + +class EntranceViewController: UIViewController { + // MARK: - Properties + + private let store = EntranceStore() + private var cancellables = Set() + + private var hasPerformedRiskCheck = false + + // MARK: - UI Elements + + private let safeReminderWarningView: SafetyReminderView = { + let safeReminderView = SafetyReminderView() + safeReminderView.confirmTimeCount = 5 + safeReminderView.clickConfirmBlock = { + safeReminderView.removeFromSuperview() + } + return safeReminderView + }() + + private lazy var mainNavigationView: MainNavigationView = { + let view = MainNavigationView(frame: .zero) + view.delegate = self + return view + }() + + private lazy var collectionView: UICollectionView = { + let flowLayout = LeftAlignedFlowLayout() + flowLayout.sectionInset = UIEdgeInsets(top: 0, left: 12, bottom: 0, right: 12) + flowLayout.itemSize = CGSize(width: ScreenWidth / 2 - 12, height: 106) + flowLayout.minimumLineSpacing = 0 + flowLayout.minimumInteritemSpacing = 0 + + let cv = UICollectionView(frame: .zero, collectionViewLayout: flowLayout) + cv.register(EntranceCollectionCell.self, + forCellWithReuseIdentifier: "EntranceCollectionCell") + cv.register(EntranceFooterView.self, + forSupplementaryViewOfKind: UICollectionView.elementKindSectionFooter, + withReuseIdentifier: "footer") + cv.backgroundColor = .clear + cv.delegate = self + cv.dataSource = self + cv.isScrollEnabled = true + cv.isPagingEnabled = true + return cv + }() + + private let reportView: EntranceReportView = { + let view = EntranceReportView() + view.backgroundColor = ThemeStore.shared.colorTokens.toastColorError + view.reportHandler = { + if let url = URL(string: "https://cloud.tencent.com/act/event/report-platform") { + UIApplication.shared.open(url, options: [:], completionHandler: nil) + } + } + return view + }() + + // MARK: - Lifecycle + + override func viewDidLoad() { + super.viewDidLoad() + + let appEnvironment = ModuleEnvironment( + beautyLicenseURL: "https://license.example.com/live", + beautyLicenseKey: "YOUR_SECRET_KEY_123", + getCurrentUserModel: { + LoginEntry.shared.userModel + }, + generateUserSig: { userId in + GenerateTestUserSig.genTestUserSig(identifier: userId, sdkAppId: SDKAPPID, secretKey: SECRETKEY) + } + ) + + #if !RTCUBE_LAB + AppAssembly.shared.privacyActionHandler = { action in + switch action { + case .showAntifraudReminder: + AntifraudAlertManager.showAntifraudReminder() + case .showScreenShareAntifraud(let completion): + AntifraudAlertManager.showScreenShareAntifraudReminder(completion: completion) + case .checkRealNameAuth(let userId, let token, let completion): + AntifraudAlertManager.checkRealNameAuth(userId: userId, token: token, completion: completion) + case .showFaceIdTokenVerify(let userId, let token, let completion): + AntifraudAlertManager.checkRealNameToAuthFace(userId: userId, token: token, completion: completion) + case .showLiveTimeLimitAlert: + TimeLimitPresenter.showLiveTimeLimitAlert() + case .showLiveRemainingOneMinToast: + TimeLimitPresenter.showRemainingOneMinToast() + case .showHighRiskIPAlert: + RoomRiskIPPresenter.showHighRiskIPAlert() + case .showLiveTimeOutAlert(let onDismiss): + TimeLimitPresenter.showLiveTimeOutAlert(onDismiss: onDismiss) + } + } + #else + PrivacyEntry.enableIdCardVerification = false + #endif + + #if RTCUBE_OVERSEAS + let providers = AppAssembly.shared.allModuleProviders(target: .overseas) + #elseif RTCUBE_LAB + let providers = AppAssembly.shared.allModuleProviders(target: .lab) + #else + let providers = AppAssembly.shared.allModuleProviders(target: .domestic) + #endif + let registry = ModuleRegistry.shared + for provider in providers { + provider.setup(with: appEnvironment) + registry.register(provider) + } + + AppAssembly.shared.registerLifecycleHandlers() + + setupUI() + + store.loadModules() + + bindStoreState() + + ModulePermissionService.shared.loadUserBlackList() + + #if !RTCUBE_OVERSEAS && !OPEN_SOURCE + HuiYanSDKKit.sharedInstance().initSDK(with: self) + #endif + + } + + override func viewWillAppear(_ animated: Bool) { + super.viewWillAppear(animated) + navigationController?.setNavigationBarHidden(true, animated: true) + setupToast() + } + + override func viewDidAppear(_ animated: Bool) { + super.viewDidAppear(animated) + performRiskCheckIfNeeded() + } + + override var preferredStatusBarStyle: UIStatusBarStyle { + if #available(iOS 13.0, *) { + return .darkContent + } + return .default + } + + override var prefersStatusBarHidden: Bool { + return false + } + + // MARK: - UI Setup + + private func setupUI() { + view.backgroundColor = ThemeStore.shared.colorTokens.bgColorDefault + + constructViewHierarchy() + activateConstraints() + } + + private var shouldShowReportView: Bool { + #if RTCUBE_LAB + return false + #else + guard TUIGlobalization.isChineseAppLocale() else { return false } + guard let userModel = LoginManager.shared.getCurrentUser() else { return true } + return !userModel.isMoa() + #endif + } + + private func constructViewHierarchy() { + view.addSubview(mainNavigationView) + + if shouldShowReportView { + view.addSubview(reportView) + } + + view.addSubview(collectionView) + } + + private func activateConstraints() { + let statusBarH = statusBarHeight() + + mainNavigationView.snp.makeConstraints { make in + make.top.equalToSuperview().offset(statusBarH) + make.height.equalTo(44) + make.left.equalToSuperview().offset(20) + make.right.equalToSuperview().offset(-20) + } + + if shouldShowReportView { + reportView.snp.makeConstraints { make in + make.top.equalTo(mainNavigationView.snp.bottom) + make.left.right.equalToSuperview() + let height: CGFloat = TUIGlobalization.isChineseAppLocale() ? 52 : 0 + make.height.equalTo(height) + } + + collectionView.snp.makeConstraints { make in + make.top.equalTo(reportView.snp.bottom).offset(12) + make.left.right.bottom.equalToSuperview() + } + } else { + collectionView.snp.makeConstraints { make in + make.top.equalTo(mainNavigationView.snp.bottom).offset(12) + make.left.right.bottom.equalToSuperview() + } + } + } + + // MARK: - State Binding + + private func bindStoreState() { + store.$state + .receive(on: DispatchQueue.main) + .sink { [weak self] _ in + self?.collectionView.reloadData() + } + .store(in: &cancellables) + } + + // MARK: - Toast + + private func setupToast() { + ToastManager.shared.position = .bottom + } + + private func showBannedToast() { + guard !ModulePermissionService.shared.isNeedFaceAuth else { return } + view.makeToast(MainLocalize("Demo.TRTC.Portal.Main.MoudleBannedMessage")) + } + + // MARK: - Risk Check Entry Point + + private func performRiskCheckIfNeeded() { + #if RTCUBE_LAB + return + #endif + + if presentedViewController != nil { + hasPerformedRiskCheck = false + return + } + guard !hasPerformedRiskCheck else { return } + guard let userModel = LoginManager.shared.getCurrentUser(), !userModel.isMoa() else { return } + + hasPerformedRiskCheck = true + + #if !RTCUBE_OVERSEAS + if ModulePermissionService.shared.checkHighRiskUser() { + showFaceAuthAlert(user: userModel) + } else { + showSafetyReminderAlert() + } + #endif + } + + #if !RTCUBE_OVERSEAS + private func showFaceAuthAlert(user: BSUserModel) { + AppAssembly.shared.privacyActionHandler?(.showFaceIdTokenVerify(userId: user.userId, token: user.token, completion: { [weak self] isAuth, faceToken in + guard let self = self else { return } + if isAuth { + getFaceAuth(token: faceToken) + } else { + DispatchQueue.main.async { [weak self] in + guard let self = self else { return } + showSafetyReminderAlert() + } + } + })) + } + #endif + + #if !RTCUBE_OVERSEAS + private func getFaceAuth(token: String) { + #if !OPEN_SOURCE + let config = AuthConfig() + config.token = token + if let path = Bundle.main.path(forResource: "HuiYanPublicSDK", ofType: "license") { + config.licencePath = path + } + + HuiYanSDKKit.sharedInstance().startHuiYanAuth( + with: config, + withProcessSucceed: { [weak self] resultInfo, _ in + guard let self = self else { return } + DispatchQueue.main.async { + self.dismiss(animated: true) + ModulePermissionService.shared.updateNeedFaceAuth(false) + self.showSafetyReminderAlert() + } + AppLogger.App.info(" startHuiYanAuth succeed: \(resultInfo)") + }, + withProcessFailedBlock: { [weak self] error, _ in + guard let self = self else { return } + DispatchQueue.main.async { + self.view.makeToast( + MainLocalize("Demo.TRTC.Portal.Main.FaceAuthFailedMessage"), + position: .bottom + ) + } + AppLogger.App.info(" startHuiYanAuth error: \(error) - \(error.localizedDescription)") + } + ) + #endif + } + #endif + + // MARK: - Safety Reminder + + private func showSafetyReminderAlert() { + safeReminderWarningView.resetTimer() + view.addSubview(safeReminderWarningView) + safeReminderWarningView.snp.makeConstraints { make in + make.edges.equalToSuperview() + } + } +} + +// MARK: - UICollectionViewDataSource + +extension EntranceViewController: UICollectionViewDataSource { + func collectionView(_ collectionView: UICollectionView, + numberOfItemsInSection section: Int) -> Int + { + return store.state.modules.filter { $0.isVisible }.count + } + + func collectionView(_ collectionView: UICollectionView, + cellForItemAt indexPath: IndexPath) -> UICollectionViewCell + { + let cell = collectionView.dequeueReusableCell( + withReuseIdentifier: "EntranceCollectionCell", + for: indexPath + ) as! EntranceCollectionCell + + let visibleModules = store.state.modules.filter { $0.isVisible } + if indexPath.row < visibleModules.count { + cell.config(visibleModules[indexPath.row]) + } + return cell + } + + func collectionView(_ collectionView: UICollectionView, + viewForSupplementaryElementOfKind kind: String, + at indexPath: IndexPath) -> UICollectionReusableView + { + if kind == UICollectionView.elementKindSectionFooter { + let footerView = collectionView.dequeueReusableSupplementaryView( + ofKind: kind, + withReuseIdentifier: "footer", + for: indexPath + ) as! EntranceFooterView + + footerView.footerLabel.text = MainLocalize("Demo.TRTC.Portal.Main.trial") + return footerView + } + return UICollectionReusableView() + } +} + +// MARK: - UICollectionViewDelegate + +extension EntranceViewController: UICollectionViewDelegate { + func collectionView(_ collectionView: UICollectionView, + didSelectItemAt indexPath: IndexPath) + { + let visibleModules = store.state.modules.filter { $0.isVisible } + guard indexPath.row < visibleModules.count else { return } + let module = visibleModules[indexPath.row] + + guard ModulePermissionService.shared.isModuleEnabled(module) else { + #if !RTCUBE_OVERSEAS + if ModulePermissionService.shared.isNeedFaceAuth, + let user = LoginManager.shared.getCurrentUser() + { + showFaceAuthAlert(user: user) + } else { + showBannedToast() + } + #endif + return + } + + if !module.config.analyticsEvent.isEmpty { + trackSensorData(module.config.analyticsEvent) + } + + if let targetVC = module.config.targetProvider() { + if targetVC.modalPresentationStyle == .fullScreen { + present(targetVC, animated: true) + } else { + navigationController?.pushViewController(targetVC, animated: true) + } + } + } +} + +// MARK: - UICollectionViewDelegateFlowLayout + +extension EntranceViewController: UICollectionViewDelegateFlowLayout { + func collectionView(_ collectionView: UICollectionView, + layout collectionViewLayout: UICollectionViewLayout, + sizeForItemAt indexPath: IndexPath) -> CGSize + { + let visibleModules = store.state.modules.filter { $0.isVisible } + guard indexPath.item < visibleModules.count else { + return CGSize(width: ScreenWidth / 2 - 13, height: 106) + } + + let module = visibleModules[indexPath.item] + return module.config.cardStyle == .banner + ? CGSize(width: ScreenWidth - 24, height: 58) + : CGSize(width: ScreenWidth / 2 - 13, height: 106) + } + + func collectionView(_ collectionView: UICollectionView, + layout collectionViewLayout: UICollectionViewLayout, + referenceSizeForFooterInSection section: Int) -> CGSize + { + let text = MainLocalize("Demo.TRTC.Portal.Main.trial") + let font = ThemeStore.shared.typographyTokens.Regular12 + let attributes: [NSAttributedString.Key: Any] = [.font: font] + let attributedString = NSAttributedString(string: text, attributes: attributes) + let maxSize = CGSize(width: 200, height: CGFloat.greatestFiniteMagnitude) + let options: NSStringDrawingOptions = [.usesLineFragmentOrigin, .usesFontLeading] + let boundingRect = attributedString.boundingRect(with: maxSize, + options: options, + context: nil) + let textHeight = ceil(boundingRect.height) + return CGSize(width: collectionView.frame.width, height: textHeight) + } +} + +// MARK: - MainNavigationViewDelegate + +extension EntranceViewController: MainNavigationViewDelegate { + func jumpProfileController() { + let mineVC = MineEntry.shared.buildMineViewController( + onLogout: { [weak self] in + guard let self = self else { return } + hasPerformedRiskCheck = false + LoginEntry.shared.logout { [weak self] result in + AppLogger.App.info(" logout result: \(result)") + guard let scene = UIApplication.shared.connectedScenes.first(where: { $0.activationState == .foregroundActive }) as? UIWindowScene, + let sceneDelegate = scene.delegate as? SceneDelegate else { return } + sceneDelegate.showLogin() + self?.navigationController?.popToRootViewController(animated: false) + } + }, + onLanguageChanged: { [weak self] languageID in + self?.hasPerformedRiskCheck = false + AppLogger.App.info(" language changed to: \(languageID)") + guard let scene = UIApplication.shared.connectedScenes.first(where: { $0.activationState == .foregroundActive }) as? UIWindowScene, + let sceneDelegate = scene.delegate as? SceneDelegate else { return } + sceneDelegate.showLogin() + }, + onExperienceRoomClicked: { [weak self] in + #if !OPEN_SOURCE + let vc = RTCExperienceRoomLoginViewController( + userId: TUILogin.getUserID() ?? "", + language: LanguageEntry.shared.currentLanguageID + ) + self?.navigationController?.pushViewController(vc, animated: true) + #endif + } + ) + navigationController?.pushViewController(mineVC, animated: true) + } + + func showLogUploadView(pressGesture: UILongPressGestureRecognizer) { + if pressGesture.state == .began { + LogUploadManager.sharedInstance.startUpload(withSuccessHandler: nil) { + AppLogger.App.info(" Log upload cancelled") + } + } + } + + func dismissLogUploadView(tapGesture: UITapGestureRecognizer) { + // No-op for now + } +} + +// MARK: - Analytics + +extension EntranceViewController { + private func trackSensorData(_ event: String) { + let loginType = resolveLoginType() + AppAnalytics.trackMainClick( + eventName: "rtcube_main_click_event", + mainEvent: event, + loginType: loginType + ) + } + + private func resolveLoginType() -> String { + guard let userModel = LoginManager.shared.getCurrentUser() else { + return "external" + } + + if userModel.isMoa() { + return "internal_moa" + } + + if !userModel.phone.isEmpty { + let phone = userModel.phone.trimmingCharacters(in: .whitespaces) + + let phoneLength = 11 + let phoneToCheck: String + if phone.count > phoneLength { + phoneToCheck = String(phone.suffix(phoneLength)) + } else { + phoneToCheck = phone + } + + if let phoneNumber = Int64(phoneToCheck), + phoneNumber >= 10000000001 && phoneNumber <= 10000000050 + { + return "internal_test" + } + } + + return "external" + } +} diff --git a/application/main/Overseas/ContactUsButtonView.swift b/application/main/Overseas/ContactUsButtonView.swift new file mode 100644 index 00000000..95cf77d7 --- /dev/null +++ b/application/main/Overseas/ContactUsButtonView.swift @@ -0,0 +1,55 @@ +// +// ContactUsButtonView.swift +// main +// + +import UIKit +import SnapKit + +class ContactUsButtonView: UIView { + + var contactBtnClickClosure: () -> Void = {} + + // MARK: - UI + + private lazy var consultBtn: UIButton = { + let button = UIButton(type: .custom) + button.setBackgroundImage(UIImage(named: "main_entrance_contact"), for: .normal) + return button + }() + + // MARK: - Lifecycle + + private var isViewReady = false + + override func didMoveToWindow() { + super.didMoveToWindow() + guard !isViewReady else { return } + isViewReady = true + constructViewHierarchy() + activateConstraints() + bindInteraction() + } + + // MARK: - Setup + + private func constructViewHierarchy() { + addSubview(consultBtn) + } + + private func activateConstraints() { + consultBtn.snp.makeConstraints { make in + make.edges.equalToSuperview() + } + } + + private func bindInteraction() { + consultBtn.addTarget(self, action: #selector(onConsultBtnClicked), for: .touchUpInside) + } + + // MARK: - Action + + @objc private func onConsultBtnClicked() { + contactBtnClickClosure() + } +} diff --git a/application/main/Overseas/ContactUsConstants.swift b/application/main/Overseas/ContactUsConstants.swift new file mode 100644 index 00000000..f6317fba --- /dev/null +++ b/application/main/Overseas/ContactUsConstants.swift @@ -0,0 +1,11 @@ +// +// ContactUsConstants.swift +// main +// + +import Foundation + +let TUICore_ContactUsService = "TUICore_ContactUsService" +let TUICore_ContactService_ShowContactEntrance = "TUICore_ContactService_ShowContactEntrance" +let TUICore_ContactService_HideContactEntrance = "TUICore_ContactService_HideContactEntrance" +let TUICore_ContactService_gotoContactUS = "TUICore_ContactService_gotoContactUS" diff --git a/application/main/Overseas/ContactUsService.swift b/application/main/Overseas/ContactUsService.swift new file mode 100644 index 00000000..7523384d --- /dev/null +++ b/application/main/Overseas/ContactUsService.swift @@ -0,0 +1,122 @@ +// +// ContactUsService.swift +// main +// + +import UIKit +import SafariServices +import SnapKit +import TUICore + +// MARK: - ContactUsService + +class ContactUsService: NSObject, TUIServiceProtocol { + + static let shared = ContactUsService() + private override init() {} + + static func registerService() { + TUICore.registerService(TUICore_ContactUsService, object: ContactUsService.shared) + } + + // MARK: - Entrance Button + + private lazy var contactEntranceView: ContactUsButtonView = { + let view = ContactUsButtonView(frame: .zero) + view.isHidden = true + view.contactBtnClickClosure = { [weak self] in + self?.goToContactUs() + } + return view + }() + + private var isViewAdded = false + + private func ensureViewAdded() { + guard !isViewAdded else { return } + guard let window = Self.getCurrentWindow() else { return } + window.clipsToBounds = false + window.addSubview(contactEntranceView) + contactEntranceView.snp.makeConstraints { make in + make.trailing.equalToSuperview() + make.bottom.equalToSuperview().offset(-(61 + kDeviceSafeBottomHeight)) + } + isViewAdded = true + } + + // MARK: - TUIServiceProtocol + + func onCall(_ method: String, param: [AnyHashable: Any]?) -> Any? { + ensureViewAdded() + if method == TUICore_ContactService_ShowContactEntrance { + showContactEntrance() + return true + } + if method == TUICore_ContactService_HideContactEntrance { + hideContactEntrance() + return true + } + if method == TUICore_ContactService_gotoContactUS { + goToContactUs() + return true + } + return false + } + + func onCall(_ method: String, param: [AnyHashable: Any]?, resultCallback: @escaping TUICallServiceResultCallback) -> Any? { + return false + } + + // MARK: - Actions + + private func showContactEntrance() { + let bundleID = Bundle.main.bundleIdentifier + if bundleID == "com.tencent.rtc.app" { + contactEntranceView.isHidden = false + } + } + + private func hideContactEntrance() { + contactEntranceView.isHidden = true + } + + private func goToContactUs() { + if !contactEntranceView.isHidden { + contactEntranceView.isHidden = true + } + + guard let url = URL(string: "https://trtc.io/contact") else { return } + let safariVC = SFSafariViewController(url: url) + safariVC.preferredControlTintColor = .systemBlue + + guard let topVC = Self.topViewController() else { return } + topVC.present(safariVC, animated: true, completion: nil) + } + + private static func topViewController() -> UIViewController? { + guard let rootVC = getCurrentWindow()?.rootViewController else { return nil } + return findTopViewController(from: rootVC) + } + + private static func findTopViewController(from vc: UIViewController) -> UIViewController { + if let nav = vc as? UINavigationController, let visible = nav.visibleViewController { + return findTopViewController(from: visible) + } + if let tab = vc as? UITabBarController, let selected = tab.selectedViewController { + return findTopViewController(from: selected) + } + if let presented = vc.presentedViewController { + return findTopViewController(from: presented) + } + return vc + } + + // MARK: - Window Utilities + + private static func getCurrentWindow() -> UIWindow? { + return UIApplication.shared.connectedScenes + .compactMap { $0 as? UIWindowScene } + .flatMap { $0.windows } + .first { $0.isKeyWindow } + } +} diff --git a/application/main/Overseas/ContactUsTipsView.swift b/application/main/Overseas/ContactUsTipsView.swift new file mode 100644 index 00000000..17b8b989 --- /dev/null +++ b/application/main/Overseas/ContactUsTipsView.swift @@ -0,0 +1,78 @@ +// +// ContactUsTipsView.swift +// main +// + +import UIKit +import SnapKit +import AtomicX + +class ContactUsTipsView: UIView { + + var contactUsHandler: () -> Void = {} + + // MARK: - UI Elements + + private let reportLabel: UILabel = { + let label = UILabel() + + let replace = MainLocalize("Demo.TRTC.Portal.Main.contactUs") + let descStr = MainLocalize("Demo.TRTC.Portal.Main.contactUsxxx", replace) + + let font = ThemeStore.shared.typographyTokens.Regular10 + let contactRange = (descStr as NSString).range(of: replace) + let mutableAttrStr = NSMutableAttributedString( + string: descStr, + attributes: [.font: font, .foregroundColor: ThemeStore.shared.colorTokens.textColorSecondary] + ) + mutableAttrStr.addAttribute(.foregroundColor, + value: ThemeStore.shared.colorTokens.textColorLink, + range: contactRange) + label.attributedText = mutableAttrStr + label.numberOfLines = 0 + return label + }() + + // MARK: - Lifecycle + + private var isViewReady = false + + override func didMoveToWindow() { + super.didMoveToWindow() + guard !isViewReady else { return } + isViewReady = true + + backgroundColor = .clear + isUserInteractionEnabled = true + constructViewHierarchy() + activateConstraints() + bindInteraction() + } + + // MARK: - Setup + + private func constructViewHierarchy() { + addSubview(reportLabel) + } + + private func activateConstraints() { + reportLabel.snp.makeConstraints { make in + make.right.equalToSuperview().offset(-16) + make.left.equalToSuperview().offset(16) + make.bottom.equalToSuperview().offset(-4) + make.top.equalToSuperview().offset(4) + } + } + + private func bindInteraction() { + let tap = UITapGestureRecognizer(target: self, action: #selector(clickContactUs)) + isUserInteractionEnabled = true + addGestureRecognizer(tap) + } + + // MARK: - Action + + @objc private func clickContactUs() { + contactUsHandler() + } +} diff --git a/application/main/Overseas/OverseasCollectionCell.swift b/application/main/Overseas/OverseasCollectionCell.swift new file mode 100644 index 00000000..f51709c5 --- /dev/null +++ b/application/main/Overseas/OverseasCollectionCell.swift @@ -0,0 +1,217 @@ +// +// OverseasCollectionCell.swift +// main +// + +import UIKit +import SnapKit +import Kingfisher +import AppAssembly +import AtomicX + +class OverseasCollectionCell: UICollectionViewCell { + + // MARK: - UI Elements + + let containerView: UIView = { + let view = UIView(frame: .zero) + view.backgroundColor = ThemeStore.shared.colorTokens.bgColorOperate + return view + }() + + private let iconImageView: UIImageView = { + let imageView = UIImageView(frame: .zero) + imageView.contentMode = .scaleAspectFill + return imageView + }() + + private let titleLabel: UILabel = { + let label = UILabel(frame: .zero) + label.font = .boldSystemFont(ofSize: 20) + label.textColor = ThemeStore.shared.colorTokens.textColorPrimary + label.textAlignment = .left + label.numberOfLines = 2 + label.adjustsFontSizeToFitWidth = true + return label + }() + + private let descLabel: UILabel = { + let label = UILabel(frame: .zero) + label.font = ThemeStore.shared.typographyTokens.Regular12 + label.textColor = ThemeStore.shared.colorTokens.textColorSecondary + label.textAlignment = .left + label.numberOfLines = 0 + label.adjustsFontSizeToFitWidth = true + label.minimumScaleFactor = 0.8 + return label + }() + + private let uiComIconView: UIView = { + let view = UIView(frame: .zero) + view.backgroundColor = ThemeStore.shared.colorTokens.textColorLink + view.layer.cornerRadius = 2 + view.layer.masksToBounds = true + return view + }() + + private let uiComLabel: UILabel = { + let label = UILabel() + label.text = "" + label.textColor = .white + label.textAlignment = .center + label.font = UIFont(name: "PingFangSC-Medium", size: convertPixel(h: 12)) + return label + }() + + private let hotLabel: UILabel = { + let label = UILabel() + label.text = MainLocalize("Demo.TRTC.Portal.Main.HotComponent") + label.textColor = .white + label.textAlignment = .center + label.isHidden = true + label.font = UIFont(name: "PingFangSC-Medium", size: convertPixel(h: 12)) + label.backgroundColor = ThemeStore.shared.colorTokens.textColorWarning + label.layer.cornerRadius = 2 + label.layer.masksToBounds = true + return label + }() + + private let arrowImageView: UIImageView = { + let imageView = UIImageView(frame: .zero) + imageView.image = UIImage(named: "main_entrance_pusharrow") + imageView.contentMode = .scaleAspectFit + return imageView + }() + + private let unreadImageView: UIImageView = { + let imageView = UIImageView(image: UIImage(named: "main_chat_unread")) + imageView.contentMode = .scaleAspectFit + imageView.isHidden = true + return imageView + }() + + // MARK: - Init + + override init(frame: CGRect) { + super.init(frame: frame) + constructViewHierarchy() + activateConstraints() + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + // MARK: - Draw + + override func draw(_ rect: CGRect) { + super.draw(rect) + containerView.roundedRect( + rect: containerView.bounds, + byRoundingCorners: .allCorners, + cornerRadii: CGSize(width: 10, height: 10) + ) + } + + // MARK: - Setup + + private func constructViewHierarchy() { + contentView.addSubview(containerView) + containerView.addSubview(iconImageView) + containerView.addSubview(titleLabel) + containerView.addSubview(descLabel) + containerView.addSubview(arrowImageView) + uiComIconView.addSubview(uiComLabel) + containerView.addSubview(uiComIconView) + containerView.addSubview(hotLabel) + containerView.addSubview(unreadImageView) + } + + private func activateConstraints() { + containerView.snp.makeConstraints { make in + make.edges.equalToSuperview() + } + + iconImageView.snp.makeConstraints { make in + make.left.equalToSuperview().offset(convertPixel(w: 16)) + make.topMargin.equalToSuperview().offset(convertPixel(h: 12)) + make.size.equalTo(CGSize(width: convertPixel(w: 24), height: convertPixel(h: 24))) + } + + titleLabel.snp.makeConstraints { make in + make.left.equalTo(iconImageView.snp.right).offset(convertPixel(w: 6)) + make.centerY.equalTo(iconImageView) + } + + arrowImageView.snp.makeConstraints { make in + make.centerY.equalTo(iconImageView) + make.right.equalToSuperview().offset(-22) + make.size.equalTo(CGSize(width: convertPixel(w: 16), height: convertPixel(w: 16))) + } + + uiComLabel.snp.makeConstraints { make in + make.top.bottom.equalToSuperview() + make.leading.trailing.equalToSuperview().inset(convertPixel(w: 4)) + } + + uiComIconView.snp.makeConstraints { make in + make.left.equalTo(uiComLabel).offset(convertPixel(w: 6)) + make.leading.equalTo(titleLabel.snp.trailing).offset(convertPixel(w: 10)) + make.bottom.top.equalTo(uiComLabel) + make.centerY.equalTo(titleLabel) + } + + hotLabel.snp.makeConstraints { make in + make.leading.equalTo(titleLabel.snp.trailing).offset(convertPixel(w: 10)) + make.centerY.equalTo(titleLabel) + make.height.equalTo(18) + make.width.equalTo(32) + } + + descLabel.snp.makeConstraints { make in + make.top.equalTo(iconImageView.snp.bottom).offset(convertPixel(h: 8)) + make.left.equalToSuperview().offset(convertPixel(w: 15)) + make.right.equalToSuperview().offset(convertPixel(w: -15)) + make.bottom.equalToSuperview().offset(convertPixel(h: -12)) + } + + unreadImageView.snp.makeConstraints { make in + make.centerY.equalTo(iconImageView) + make.right.equalTo(arrowImageView.snp.left).offset(-8) + make.width.height.equalTo(8) + } + } + + // MARK: - Public Config + + func config(_ module: ResolvedModule) { + let config = module.config + + setIconImage(name: config.iconName, preloaded: config.iconImage) + + titleLabel.text = config.title + descLabel.text = config.description + + let showUIKit = config.cardStyle == .uiComponent + uiComIconView.isHidden = !showUIKit + if showUIKit { + uiComLabel.text = MainLocalize("Demo.TRTC.Portal.Main.UIkit") + } + + hotLabel.isHidden = !config.isHot + + unreadImageView.isHidden = module.badgeCount == 0 + } + + // MARK: - Helpers + + private func setIconImage(name: String, preloaded: UIImage? = nil) { + if let preloaded = preloaded { + iconImageView.image = preloaded + } else if name.hasPrefix("http"), let imageURL = URL(string: name) { + iconImageView.kf.setImage(with: imageURL) + } else { + iconImageView.image = UIImage(named: name) + } + } +} diff --git a/application/main/Overseas/OverseasFooterView.swift b/application/main/Overseas/OverseasFooterView.swift new file mode 100644 index 00000000..1e1fe6d2 --- /dev/null +++ b/application/main/Overseas/OverseasFooterView.swift @@ -0,0 +1,126 @@ +// +// OverseasFooterView.swift +// main +// + +import UIKit +import SnapKit +import AtomicX + +class OverseasFooterView: UICollectionReusableView { + + // MARK: - UI Elements + + let containerView: UIView = { + let view = UIView(frame: .zero) + view.backgroundColor = .clear + return view + }() + + private let iconImageView: UIImageView = { + let imageView = UIImageView(frame: .zero) + imageView.contentMode = .scaleAspectFill + imageView.image = UIImage(named: "main_entrance_experience") + return imageView + }() + + private let titleLabel: UILabel = { + let label = UILabel(frame: .zero) + label.font = .boldSystemFont(ofSize: 20) + label.textColor = ThemeStore.shared.colorTokens.textColorPrimary + label.textAlignment = .left + label.numberOfLines = 2 + label.adjustsFontSizeToFitWidth = true + label.text = MainLocalize("Demo.TRTC.Portal.Main.ScenarioExperience") + return label + }() + + private let descLabel: UILabel = { + let label = UILabel(frame: .zero) + label.font = ThemeStore.shared.typographyTokens.Regular12 + label.textColor = ThemeStore.shared.colorTokens.textColorSecondary + label.textAlignment = .left + label.numberOfLines = 2 + label.adjustsFontSizeToFitWidth = true + label.minimumScaleFactor = 0.8 + label.text = MainLocalize("Demo.TRTC.Portal.Main.ScenarioExperienceDesc") + return label + }() + + private let arrowImageView: UIImageView = { + let imageView = UIImageView(frame: .zero) + imageView.image = UIImage(named: "main_entrance_pusharrow") + imageView.contentMode = .scaleAspectFit + return imageView + }() + + // MARK: - Init + + override init(frame: CGRect) { + super.init(frame: frame) + constructViewHierarchy() + activateConstraints() + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + // MARK: - Draw + + override func draw(_ rect: CGRect) { + super.draw(rect) + containerView.roundedRect( + rect: containerView.bounds, + byRoundingCorners: .allCorners, + cornerRadii: CGSize(width: 10, height: 10) + ) + containerView.gradient( + colors: [ThemeStore.shared.colorTokens.buttonColorPrimaryDisabled, .white], + bounds: containerView.bounds, + isVertical: true + ) + } + + // MARK: - Setup + + private func constructViewHierarchy() { + addSubview(containerView) + containerView.addSubview(iconImageView) + containerView.addSubview(titleLabel) + containerView.addSubview(descLabel) + containerView.addSubview(arrowImageView) + } + + private func activateConstraints() { + containerView.snp.makeConstraints { make in + make.leading.equalToSuperview().offset(20) + make.trailing.equalToSuperview().offset(-20) + make.top.bottom.equalToSuperview() + } + + iconImageView.snp.makeConstraints { make in + make.left.equalToSuperview().offset(convertPixel(w: 16)) + make.topMargin.equalToSuperview().offset(convertPixel(h: 12)) + make.size.equalTo(CGSize(width: convertPixel(w: 24), height: convertPixel(h: 24))) + } + + titleLabel.snp.makeConstraints { make in + make.left.equalTo(iconImageView.snp.right).offset(convertPixel(w: 6)) + make.centerY.equalTo(iconImageView) + } + + arrowImageView.snp.makeConstraints { make in + make.centerY.equalTo(iconImageView) + make.right.equalToSuperview().offset(-22) + make.size.equalTo(CGSize(width: convertPixel(w: 16), height: convertPixel(w: 16))) + } + + descLabel.snp.makeConstraints { make in + make.top.equalTo(iconImageView.snp.bottom).offset(convertPixel(h: 8)) + make.left.equalToSuperview().offset(convertPixel(w: 15)) + make.right.equalToSuperview().offset(convertPixel(w: -15)) + make.bottom.equalToSuperview().offset(convertPixel(h: -12)) + } + } +} diff --git a/application/main/Overseas/OverseasMainViewController.swift b/application/main/Overseas/OverseasMainViewController.swift new file mode 100644 index 00000000..0e3c79bf --- /dev/null +++ b/application/main/Overseas/OverseasMainViewController.swift @@ -0,0 +1,440 @@ +// +// OverseasMainViewController.swift +// main +// + +import UIKit +import Combine +import SnapKit +import Toast_Swift +import ImSDK_Plus +import TUICore +import AppAssembly +import Login +import AtomicX + +class OverseasMainViewController: UIViewController { + + // MARK: - Properties + + private let store = EntranceStore() + private var cancellables = Set() + + private let discoveryIdentifiers: Set = ["player", "ugsv"] + + private var productsModules: [ResolvedModule] = [] + private var discoveryModules: [ResolvedModule] = [] + + // MARK: - UI Elements + + private let topSegmentedView: UISegmentedControl = { + let segmentedView = UISegmentedControl(items: [ + MainLocalize("Demo.TRTC.Portal.Main.Products"), + MainLocalize("Demo.TRTC.Portal.Main.DiscoveryLab"), + ]) + segmentedView.selectedSegmentIndex = 0 + segmentedView.setTitleTextAttributes([ + .foregroundColor: ThemeStore.shared.colorTokens.textColorSecondary, + .font: ThemeStore.shared.typographyTokens.Regular12, + ], for: .normal) + segmentedView.setTitleTextAttributes([ + .foregroundColor: ThemeStore.shared.colorTokens.textColorLink, + .font: UIFont.boldSystemFont(ofSize: 12), + ], for: .selected) + return segmentedView + }() + + private lazy var scrollView: UIScrollView = { + let scrollView = UIScrollView(frame: .zero) + scrollView.backgroundColor = .clear + scrollView.isPagingEnabled = true + scrollView.bounces = true + scrollView.delegate = self + scrollView.showsHorizontalScrollIndicator = false + return scrollView + }() + + private let containerView: UIView = { + let view = UIView() + return view + }() + + private lazy var productsCollectionView: UICollectionView = { + let flowLayout = UICollectionViewFlowLayout() + flowLayout.sectionInset = UIEdgeInsets(top: 0, left: 0, bottom: 12, right: 0) + flowLayout.minimumLineSpacing = 8 + flowLayout.minimumInteritemSpacing = 0 + + let collectionView = UICollectionView(frame: .zero, collectionViewLayout: flowLayout) + collectionView.register(OverseasCollectionCell.self, + forCellWithReuseIdentifier: "OverseasCollectionCell") + collectionView.register(OverseasFooterView.self, + forSupplementaryViewOfKind: UICollectionView.elementKindSectionFooter, + withReuseIdentifier: "OverseasFooter") + collectionView.backgroundColor = .clear + collectionView.delegate = self + collectionView.dataSource = self + collectionView.showsVerticalScrollIndicator = false + return collectionView + }() + + private lazy var discoveryCollectionView: UICollectionView = { + let flowLayout = UICollectionViewFlowLayout() + flowLayout.sectionInset = UIEdgeInsets(top: 0, left: 0, bottom: 12, right: 0) + flowLayout.minimumLineSpacing = 8 + flowLayout.minimumInteritemSpacing = 0 + + let collectionView = UICollectionView(frame: .zero, collectionViewLayout: flowLayout) + collectionView.register(OverseasCollectionCell.self, + forCellWithReuseIdentifier: "OverseasCollectionCell") + collectionView.backgroundColor = .clear + collectionView.delegate = self + collectionView.dataSource = self + collectionView.showsVerticalScrollIndicator = false + return collectionView + }() + + private let contactUsTipsView: ContactUsTipsView = { + let view = ContactUsTipsView() + view.contactUsHandler = { + TUICore.callService(TUICore_ContactUsService, + method: TUICore_ContactService_gotoContactUS, + param: [:]) + } + return view + }() + + // MARK: - Lifecycle + + override func viewDidLoad() { + super.viewDidLoad() + + let appEnvironment = ModuleEnvironment( + beautyLicenseURL: "https://license.example.com/live", + beautyLicenseKey: "YOUR_SECRET_KEY_123", + getCurrentUserModel: { + return LoginEntry.shared.userModel + }, + generateUserSig: { userId in + GenerateTestUserSig.genTestUserSig(identifier: userId, sdkAppId: SDKAPPID, secretKey: SECRETKEY) + } + ) + + PrivacyEntry.enableIdCardVerification = false + + #if !OPEN_SOURCE + AppAssembly.shared.privacyActionHandler = { action in + switch action { + case .showHighRiskIPAlert: + RoomRiskIPPresenter.showHighRiskIPAlert() + case .showAntifraudReminder: + AntifraudAlertManager.showAntifraudReminder() + case .showScreenShareAntifraud(let completion): + AntifraudAlertManager.showScreenShareAntifraudReminder(completion: completion) + case .checkRealNameAuth(let userId, let token, let completion): + AntifraudAlertManager.checkRealNameAuth(userId: userId, token: token, completion: completion) + case .showFaceIdTokenVerify(let userId, let token, let completion): + AntifraudAlertManager.checkRealNameToAuthFace(userId: userId, token: token, completion: completion) + case .showLiveTimeLimitAlert: + TimeLimitPresenter.showLiveTimeLimitAlert() + case .showLiveRemainingOneMinToast: + TimeLimitPresenter.showRemainingOneMinToast() + case .showLiveTimeOutAlert(let onDismiss): + TimeLimitPresenter.showLiveTimeOutAlert(onDismiss: onDismiss) + } + } + #endif + #if RTCUBE_OVERSEAS + let providers = AppAssembly.shared.allModuleProviders(target: .overseas) + #elseif RTCUBE_LAB + let providers = AppAssembly.shared.allModuleProviders(target: .lab) + #else + let providers = AppAssembly.shared.allModuleProviders(target: .domestic) + #endif + let registry = ModuleRegistry.shared + for provider in providers { + provider.setup(with: appEnvironment) + registry.register(provider) + } + + AppAssembly.shared.registerLifecycleHandlers() + + constructViewHierarchy() + activateConstraints() + bindInteraction() + + store.loadModules() + splitModules() + + bindStoreState() + + setupToast() + } + + override var preferredStatusBarStyle: UIStatusBarStyle { + if #available(iOS 13.0, *) { + return .darkContent + } + return .default + } + + override var prefersStatusBarHidden: Bool { + false + } + + // MARK: - Module Split + + private func splitModules() { + let allModules = store.state.modules.filter { $0.isVisible } + productsModules = allModules.filter { !discoveryIdentifiers.contains($0.config.identifier) } + discoveryModules = allModules.filter { discoveryIdentifiers.contains($0.config.identifier) } + } + + // MARK: - State Binding + + private func bindStoreState() { + store.$state + .receive(on: DispatchQueue.main) + .sink { [weak self] _ in + guard let self = self else { return } + self.splitModules() + self.productsCollectionView.reloadData() + self.discoveryCollectionView.reloadData() + } + .store(in: &cancellables) + } + + // MARK: - Public + + func updateUnreadCount(_ totalUnreadCount: UInt64) { + guard !productsModules.isEmpty else { return } + let identifier = productsModules[0].config.identifier + store.updateBadgeCount(for: identifier, count: totalUnreadCount) + splitModules() + DispatchQueue.main.async { + self.productsCollectionView.reloadItems(at: [IndexPath(item: 0, section: 0)]) + } + } +} + +// MARK: - UI Setup + +extension OverseasMainViewController { + + private func constructViewHierarchy() { + view.addSubview(topSegmentedView) + view.addSubview(scrollView) + scrollView.addSubview(containerView) + containerView.addSubview(productsCollectionView) + containerView.addSubview(contactUsTipsView) + containerView.addSubview(discoveryCollectionView) + } + + private func activateConstraints() { + topSegmentedView.snp.makeConstraints { make in + make.leading.equalToSuperview().offset(16) + make.trailing.equalToSuperview().offset(-16) + make.top.equalToSuperview().offset(44 + statusBarHeight() + 8) + make.height.equalTo(32) + } + + scrollView.snp.makeConstraints { make in + make.top.equalTo(topSegmentedView.snp.bottom).offset(8) + make.leading.trailing.equalToSuperview() + make.bottom.equalToSuperview() + } + + containerView.snp.makeConstraints { make in + make.edges.equalToSuperview() + make.height.equalToSuperview() + } + + productsCollectionView.snp.makeConstraints { make in + make.top.equalToSuperview() + make.width.equalTo(ScreenWidth) + make.left.equalToSuperview() + make.bottom.equalToSuperview().offset(-12) + } + + contactUsTipsView.snp.makeConstraints { make in + make.top.equalToSuperview() + make.leading.equalTo(productsCollectionView.snp.trailing) + make.trailing.equalToSuperview() + } + + discoveryCollectionView.snp.makeConstraints { make in + make.top.equalTo(contactUsTipsView.snp.bottom).offset(4) + make.width.equalTo(ScreenWidth) + make.leading.equalTo(productsCollectionView.snp.trailing) + make.trailing.equalToSuperview() + make.bottom.equalToSuperview().offset(-12) + } + } + + private func bindInteraction() { + topSegmentedView.addTarget(self, action: #selector(segmentChanged(_:)), for: .valueChanged) + } + + @objc private func segmentChanged(_ sender: UISegmentedControl) { + let page = sender.selectedSegmentIndex + let targetOffset = CGPoint(x: CGFloat(page) * scrollView.frame.width, y: 0) + scrollView.setContentOffset(scrollView.contentOffset, animated: false) + + UIView.animate(withDuration: 0.3, delay: 0, options: .curveEaseOut) { + self.scrollView.contentOffset = targetOffset + } + } + + private func setupToast() { + ToastManager.shared.position = .bottom + } +} + +// MARK: - UIScrollViewDelegate + +extension OverseasMainViewController: UIScrollViewDelegate { + func scrollViewDidScroll(_ scrollView: UIScrollView) { + guard scrollView == self.scrollView else { return } + let page = scrollView.contentOffset.x / scrollView.frame.width + topSegmentedView.selectedSegmentIndex = Int(round(page)) + } +} + +// MARK: - UICollectionViewDelegateFlowLayout + +extension OverseasMainViewController: UICollectionViewDelegateFlowLayout { + + func collectionView(_ collectionView: UICollectionView, + layout collectionViewLayout: UICollectionViewLayout, + sizeForItemAt indexPath: IndexPath) -> CGSize { + return CGSize(width: view.bounds.width - 40.0, height: 74) + } + + func collectionView(_ collectionView: UICollectionView, + layout collectionViewLayout: UICollectionViewLayout, + referenceSizeForFooterInSection section: Int) -> CGSize { + if collectionView == productsCollectionView { + return CGSize(width: view.bounds.width - 40.0, height: 92) + } + return .zero + } +} + +// MARK: - UICollectionViewDelegate + +extension OverseasMainViewController: UICollectionViewDelegate { + + func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { + let module: ResolvedModule + if collectionView == productsCollectionView { + guard indexPath.item < productsModules.count else { return } + module = productsModules[indexPath.item] + } else { + guard indexPath.item < discoveryModules.count else { return } + module = discoveryModules[indexPath.item] + } + + if !module.config.analyticsEvent.isEmpty { + trackSensorData(module.config.analyticsEvent) + } + + if let targetVC = module.config.targetProvider() { + if targetVC.modalPresentationStyle == .fullScreen { + present(targetVC, animated: true) + } else { + navigationController?.pushViewController(targetVC, animated: true) + } + } + } +} + +// MARK: - UICollectionViewDataSource + +extension OverseasMainViewController: UICollectionViewDataSource { + + func collectionView(_ collectionView: UICollectionView, + numberOfItemsInSection section: Int) -> Int { + if collectionView == productsCollectionView { + return productsModules.count + } else { + return discoveryModules.count + } + } + + func collectionView(_ collectionView: UICollectionView, + cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { + let cell = collectionView.dequeueReusableCell( + withReuseIdentifier: "OverseasCollectionCell", + for: indexPath + ) as! OverseasCollectionCell + + if collectionView == productsCollectionView { + if indexPath.item < productsModules.count { + cell.config(productsModules[indexPath.item]) + } + } else { + if indexPath.item < discoveryModules.count { + cell.config(discoveryModules[indexPath.item]) + } + } + return cell + } + + func collectionView(_ collectionView: UICollectionView, + viewForSupplementaryElementOfKind kind: String, + at indexPath: IndexPath) -> UICollectionReusableView { + if collectionView == productsCollectionView, + kind == UICollectionView.elementKindSectionFooter { + let footerView = collectionView.dequeueReusableSupplementaryView( + ofKind: kind, + withReuseIdentifier: "OverseasFooter", + for: indexPath + ) as! OverseasFooterView + let tap = UITapGestureRecognizer(target: self, action: #selector(goScenarioExperience)) + footerView.isUserInteractionEnabled = true + footerView.addGestureRecognizer(tap) + return footerView + } + return UICollectionReusableView() + } +} + +// MARK: - Navigation + +extension OverseasMainViewController { + + @objc private func goScenarioExperience() { + if let scenesModule = store.state.modules.first(where: { $0.config.identifier == "scenesApplication" }) { + if let targetVC = scenesModule.config.targetProvider() { + targetVC.title = MainLocalize("Demo.TRTC.Portal.Main.ScenarioExperience") + navigationController?.pushViewController(targetVC, animated: true) + } + } + } +} + +// MARK: - Analytics + +extension OverseasMainViewController { + + private func trackSensorData(_ event: String) { + let loginType = resolveLoginType() + AppAnalytics.trackMainClick( + eventName: "tencent_rtc_main_click_event", + mainEvent: event, + loginType: loginType + ) + } + + private func resolveLoginType() -> String { + guard let userModel = LoginManager.shared.getCurrentUser() else { + return "external" + } + + if userModel.isMoa() { + return "internal_moa" + } + + return "external" + } +} diff --git a/application/main/Overseas/OverseasNavigationView.swift b/application/main/Overseas/OverseasNavigationView.swift new file mode 100644 index 00000000..57e871d3 --- /dev/null +++ b/application/main/Overseas/OverseasNavigationView.swift @@ -0,0 +1,110 @@ +// +// OverseasNavigationView.swift +// main +// + +import UIKit +import Kingfisher +import SnapKit +import AtomicX + +// MARK: - View + +class OverseasNavigationView: UIView { + + weak var delegate: MainNavigationViewDelegate? + + // MARK: - UI Elements + + private lazy var iconView: UIImageView = { + let imageView = UIImageView(frame: .zero) + imageView.isUserInteractionEnabled = true + imageView.image = UIImage(named: "main_english_logo") + imageView.contentMode = .scaleAspectFill + return imageView + }() + + private lazy var mineCenterBtn: UIButton = { + let button = UIButton(type: .custom) + button.layer.cornerRadius = ThemeStore.shared.borderRadius.radius16 + button.clipsToBounds = true + return button + }() + + // MARK: - Lifecycle + + private var isViewReady = false + + override func didMoveToWindow() { + super.didMoveToWindow() + guard !isViewReady else { return } + isViewReady = true + + backgroundColor = ThemeStore.shared.colorTokens.bgColorOperate + constructViewHierarchy() + activateConstraints() + bindInteraction() + } + + // MARK: - Setup + + private func constructViewHierarchy() { + addSubview(iconView) + addSubview(mineCenterBtn) + } + + private func activateConstraints() { + iconView.snp.makeConstraints { make in + make.left.centerY.equalToSuperview() + make.width.equalTo(166) + make.height.equalTo(32) + } + + mineCenterBtn.snp.makeConstraints { make in + make.right.centerY.equalToSuperview() + make.width.height.equalTo(32) + } + } + + private func bindInteraction() { + mineCenterBtn.addTarget(self, action: #selector(goMine(sender:)), for: .touchUpInside) + + let tapGesture = UITapGestureRecognizer(target: self, action: #selector(handleTap(tapGesture:))) + iconView.addGestureRecognizer(tapGesture) + + let pressGesture = UILongPressGestureRecognizer(target: self, action: #selector(handleLongPress(pressGesture:))) + pressGesture.minimumPressDuration = 2.0 + pressGesture.numberOfTouchesRequired = 1 + iconView.addGestureRecognizer(pressGesture) + + tapGesture.require(toFail: pressGesture) + } + + // MARK: - Public + + func updateAvatarImage(urlString: String?) { + guard let urlString = urlString, let url = URL(string: urlString) else { + self.mineCenterBtn.setBackgroundImage(UIImage(named: "default_avatar"), for: .normal) + return + } + self.mineCenterBtn.kf.setBackgroundImage( + with: url, + for: .normal, + placeholder: UIImage(named: "default_avatar") + ) + } + + // MARK: - Actions + + @objc private func handleTap(tapGesture: UITapGestureRecognizer) { + delegate?.dismissLogUploadView(tapGesture: tapGesture) + } + + @objc private func handleLongPress(pressGesture: UILongPressGestureRecognizer) { + delegate?.showLogUploadView(pressGesture: pressGesture) + } + + @objc private func goMine(sender: UIButton) { + delegate?.jumpProfileController() + } +} diff --git a/application/main/OverseasHomeViewController.swift b/application/main/OverseasHomeViewController.swift new file mode 100644 index 00000000..a6ced22a --- /dev/null +++ b/application/main/OverseasHomeViewController.swift @@ -0,0 +1,192 @@ +// +// OverseasHomeViewController.swift +// main +// + +import UIKit +import AtomicX +import SnapKit +import TUICore +import Toast_Swift +import ImSDK_Plus +import Login +#if !OPEN_SOURCE +import RTCExperienceRoom +#endif + +class OverseasHomeViewController: UIViewController { + + // MARK: - Properties + + private var logFilesArray: [String] = [] + private let mainViewController = OverseasMainViewController() + + // MARK: - UI Elements + + private lazy var naviBackView: UIView = { + let view = UIView(frame: .zero) + view.backgroundColor = ThemeStore.shared.colorTokens.bgColorOperate + return view + }() + + private lazy var mainNavigationView: OverseasNavigationView = { + let view = OverseasNavigationView(frame: .zero) + view.delegate = self + return view + }() + + // MARK: - Lifecycle + + override func viewDidLoad() { + super.viewDidLoad() + + ContactUsService.registerService() + + addChild(mainViewController) + view.addSubview(mainViewController.view) + mainViewController.didMove(toParent: self) + + constructViewHierarchy() + activateConstraints() + } + + override func viewWillAppear(_ animated: Bool) { + super.viewWillAppear(animated) + navigationController?.setNavigationBarHidden(true, animated: true) + + let result = TUICore.callService(TUICore_ContactUsService, + method: TUICore_ContactService_ShowContactEntrance, + param: [:]) + AppLogger.App.debug("TUICore_ConsultService: \(String(describing: result))") + + updateMineCenterImage() + setupIMUnreadListener() + } + + override func viewWillDisappear(_ animated: Bool) { + super.viewWillDisappear(animated) + + let result = TUICore.callService(TUICore_ContactUsService, + method: TUICore_ContactService_HideContactEntrance, + param: [:]) + AppLogger.App.debug("TUICore_ConsultService: \(String(describing: result))") + } + + override func viewDidLayoutSubviews() { + super.viewDidLayoutSubviews() + let gradientLayer = view.gradient(colors: [ + UIColor(red: 247 / 255.0, green: 249 / 255.0, blue: 252 / 255.0, alpha: 1), + UIColor(red: 240 / 255.0, green: 242 / 255.0, blue: 245 / 255.0, alpha: 1), + ]) + gradientLayer.startPoint = CGPoint(x: 0.5, y: 0.0) + gradientLayer.endPoint = CGPoint(x: 0.5, y: 1.0) + } + + override var preferredStatusBarStyle: UIStatusBarStyle { + if #available(iOS 13.0, *) { + return .darkContent + } + return .default + } + + override var prefersStatusBarHidden: Bool { + return false + } +} + +// MARK: - UI Setup + +extension OverseasHomeViewController { + + private func constructViewHierarchy() { + view.addSubview(naviBackView) + view.addSubview(mainNavigationView) + } + + private func activateConstraints() { + let statusBarH = statusBarHeight() + + naviBackView.snp.makeConstraints { make in + make.top.equalToSuperview() + make.height.equalTo(44 + statusBarH) + make.left.right.equalToSuperview() + } + + mainNavigationView.snp.makeConstraints { make in + make.top.equalToSuperview().offset(statusBarH) + make.height.equalTo(44) + make.left.equalToSuperview().offset(20) + make.right.equalToSuperview().offset(-20) + } + } + + private func updateMineCenterImage() { + let avatarURL = LoginManager.shared.getCurrentUser()?.avatar + mainNavigationView.updateAvatarImage(urlString: avatarURL) + } + + private func setupIMUnreadListener() { + V2TIMManager.sharedInstance().addConversationListener(listener: self) + V2TIMManager.sharedInstance().getTotalUnreadMessageCount { _ in + } fail: { _, _ in + } + } +} + +// MARK: - MainNavigationViewDelegate + +extension OverseasHomeViewController: MainNavigationViewDelegate { + + func jumpProfileController() { + let mineVC = MineEntry.shared.buildMineViewController( + onLogout: { + LoginEntry.shared.logout { result in + AppLogger.App.info(" logout result: \(result)") + guard let scene = UIApplication.shared.connectedScenes.first(where: { $0.activationState == .foregroundActive }) as? UIWindowScene, + let sceneDelegate = scene.delegate as? SceneDelegate else { return } + sceneDelegate.showLogin() + } + }, + onLanguageChanged: { languageID in + AppLogger.App.info(" language changed to: \(languageID)") + guard let scene = UIApplication.shared.connectedScenes.first(where: { $0.activationState == .foregroundActive }) as? UIWindowScene, + let sceneDelegate = scene.delegate as? SceneDelegate else { return } + sceneDelegate.showLogin() + } + ) + navigationController?.pushViewController(mineVC, animated: true) + } + + func showLogUploadView(pressGesture: UILongPressGestureRecognizer) { + if pressGesture.state == .began { + LogUploadManager.sharedInstance.startUpload(withSuccessHandler: nil) { + AppLogger.App.info(" Log upload cancelled") + } + } + } + + func dismissLogUploadView(tapGesture: UITapGestureRecognizer) { + // No-op + } +} + +// MARK: - V2TIMConversationListener + +extension OverseasHomeViewController: V2TIMConversationListener { + func onTotalUnreadMessageCountChanged(totalUnreadCount: UInt64) { + mainViewController.updateUnreadCount(totalUnreadCount) + } +} + +// MARK: - Toast + +extension OverseasHomeViewController { + + private func setupToast() { + ToastManager.shared.position = .bottom + } + + func makeToast(message: String) { + view.makeToast(message) + } +} diff --git a/application/main/Resource/Assets/MainAssets.xcassets/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/Contents.json new file mode 100644 index 00000000..73c00596 --- /dev/null +++ b/application/main/Resource/Assets/MainAssets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/main/Resource/Assets/MainAssets.xcassets/arrow_up.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/arrow_up.imageset/Contents.json new file mode 100644 index 00000000..82d3d498 --- /dev/null +++ b/application/main/Resource/Assets/MainAssets.xcassets/arrow_up.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "arrow_up.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "arrow_up@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "arrow_up@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/main/Resource/Assets/MainAssets.xcassets/arrow_up.imageset/arrow_up.png b/application/main/Resource/Assets/MainAssets.xcassets/arrow_up.imageset/arrow_up.png new file mode 100644 index 00000000..50ac3eec Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/arrow_up.imageset/arrow_up.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/arrow_up.imageset/arrow_up@2x.png b/application/main/Resource/Assets/MainAssets.xcassets/arrow_up.imageset/arrow_up@2x.png new file mode 100644 index 00000000..00d2b8a7 Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/arrow_up.imageset/arrow_up@2x.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/arrow_up.imageset/arrow_up@3x.png b/application/main/Resource/Assets/MainAssets.xcassets/arrow_up.imageset/arrow_up@3x.png new file mode 100644 index 00000000..601ae8ae Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/arrow_up.imageset/arrow_up@3x.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/default_avatar.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/default_avatar.imageset/Contents.json new file mode 100644 index 00000000..cac10e62 --- /dev/null +++ b/application/main/Resource/Assets/MainAssets.xcassets/default_avatar.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "room_default_avatar.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "room_default_avatar@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "room_default_avatar@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/App-UIKit/Assets.xcassets/default_avatar.imageset/default_avatar.png b/application/main/Resource/Assets/MainAssets.xcassets/default_avatar.imageset/room_default_avatar.png similarity index 100% rename from application/App-UIKit/Assets.xcassets/default_avatar.imageset/default_avatar.png rename to application/main/Resource/Assets/MainAssets.xcassets/default_avatar.imageset/room_default_avatar.png diff --git a/application/App-UIKit/Assets.xcassets/default_avatar.imageset/default_avatar@2x.png b/application/main/Resource/Assets/MainAssets.xcassets/default_avatar.imageset/room_default_avatar@2x.png similarity index 100% rename from application/App-UIKit/Assets.xcassets/default_avatar.imageset/default_avatar@2x.png rename to application/main/Resource/Assets/MainAssets.xcassets/default_avatar.imageset/room_default_avatar@2x.png diff --git a/application/App-UIKit/Assets.xcassets/default_avatar.imageset/default_avatar@3x.png b/application/main/Resource/Assets/MainAssets.xcassets/default_avatar.imageset/room_default_avatar@3x.png similarity index 100% rename from application/App-UIKit/Assets.xcassets/default_avatar.imageset/default_avatar@3x.png rename to application/main/Resource/Assets/MainAssets.xcassets/default_avatar.imageset/room_default_avatar@3x.png diff --git a/application/main/Resource/Assets/MainAssets.xcassets/drop_down.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/drop_down.imageset/Contents.json new file mode 100644 index 00000000..3bc89f8d --- /dev/null +++ b/application/main/Resource/Assets/MainAssets.xcassets/drop_down.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "drop_down.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "drop_down@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "drop_down@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/main/Resource/Assets/MainAssets.xcassets/drop_down.imageset/drop_down.png b/application/main/Resource/Assets/MainAssets.xcassets/drop_down.imageset/drop_down.png new file mode 100644 index 00000000..c393f2f8 Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/drop_down.imageset/drop_down.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/drop_down.imageset/drop_down@2x.png b/application/main/Resource/Assets/MainAssets.xcassets/drop_down.imageset/drop_down@2x.png new file mode 100644 index 00000000..1dd955ba Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/drop_down.imageset/drop_down@2x.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/drop_down.imageset/drop_down@3x.png b/application/main/Resource/Assets/MainAssets.xcassets/drop_down.imageset/drop_down@3x.png new file mode 100644 index 00000000..dbdbbe9d Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/drop_down.imageset/drop_down@3x.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_chat_unread.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/main_chat_unread.imageset/Contents.json new file mode 100644 index 00000000..2a115532 --- /dev/null +++ b/application/main/Resource/Assets/MainAssets.xcassets/main_chat_unread.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "main_chat_unread@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "main_chat_unread@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_chat_unread.imageset/main_chat_unread@2x.png b/application/main/Resource/Assets/MainAssets.xcassets/main_chat_unread.imageset/main_chat_unread@2x.png new file mode 100644 index 00000000..9f53724a Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/main_chat_unread.imageset/main_chat_unread@2x.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_chat_unread.imageset/main_chat_unread@3x.png b/application/main/Resource/Assets/MainAssets.xcassets/main_chat_unread.imageset/main_chat_unread@3x.png new file mode 100644 index 00000000..19c46335 Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/main_chat_unread.imageset/main_chat_unread@3x.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_communication.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/main_communication.imageset/Contents.json new file mode 100644 index 00000000..dec4a49f --- /dev/null +++ b/application/main/Resource/Assets/MainAssets.xcassets/main_communication.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "main_communication@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_communication.imageset/main_communication@3x.png b/application/main/Resource/Assets/MainAssets.xcassets/main_communication.imageset/main_communication@3x.png new file mode 100644 index 00000000..c14fc069 Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/main_communication.imageset/main_communication@3x.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_communication_sele.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/main_communication_sele.imageset/Contents.json new file mode 100644 index 00000000..929739ad --- /dev/null +++ b/application/main/Resource/Assets/MainAssets.xcassets/main_communication_sele.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "main_communication_sele@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_communication_sele.imageset/main_communication_sele@3x.png b/application/main/Resource/Assets/MainAssets.xcassets/main_communication_sele.imageset/main_communication_sele@3x.png new file mode 100644 index 00000000..04ab60a7 Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/main_communication_sele.imageset/main_communication_sele@3x.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_edu.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/main_edu.imageset/Contents.json new file mode 100644 index 00000000..4c2d4422 --- /dev/null +++ b/application/main/Resource/Assets/MainAssets.xcassets/main_edu.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "main_edu@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_edu.imageset/main_edu@3x.png b/application/main/Resource/Assets/MainAssets.xcassets/main_edu.imageset/main_edu@3x.png new file mode 100644 index 00000000..bea40494 Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/main_edu.imageset/main_edu@3x.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_edu_hover.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/main_edu_hover.imageset/Contents.json new file mode 100644 index 00000000..5c995be8 --- /dev/null +++ b/application/main/Resource/Assets/MainAssets.xcassets/main_edu_hover.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "main_edu_hover@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_edu_hover.imageset/main_edu_hover@3x.png b/application/main/Resource/Assets/MainAssets.xcassets/main_edu_hover.imageset/main_edu_hover@3x.png new file mode 100644 index 00000000..abf16fb1 Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/main_edu_hover.imageset/main_edu_hover@3x.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_english_logo.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/main_english_logo.imageset/Contents.json new file mode 100644 index 00000000..23b38d17 --- /dev/null +++ b/application/main/Resource/Assets/MainAssets.xcassets/main_english_logo.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "main_english_logo@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_english_logo.imageset/main_english_logo@2x.png b/application/main/Resource/Assets/MainAssets.xcassets/main_english_logo.imageset/main_english_logo@2x.png new file mode 100644 index 00000000..f4b587b9 Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/main_english_logo.imageset/main_english_logo@2x.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_entertainment.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/main_entertainment.imageset/Contents.json new file mode 100644 index 00000000..f86a9959 --- /dev/null +++ b/application/main/Resource/Assets/MainAssets.xcassets/main_entertainment.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "main_entertainment@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_entertainment.imageset/main_entertainment@3x.png b/application/main/Resource/Assets/MainAssets.xcassets/main_entertainment.imageset/main_entertainment@3x.png new file mode 100644 index 00000000..6907450b Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/main_entertainment.imageset/main_entertainment@3x.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_entertainment_sele.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/main_entertainment_sele.imageset/Contents.json new file mode 100644 index 00000000..28a9ec6c --- /dev/null +++ b/application/main/Resource/Assets/MainAssets.xcassets/main_entertainment_sele.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "main_entertainment_sele@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_entertainment_sele.imageset/main_entertainment_sele@3x.png b/application/main/Resource/Assets/MainAssets.xcassets/main_entertainment_sele.imageset/main_entertainment_sele@3x.png new file mode 100644 index 00000000..e4ab2a5e Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/main_entertainment_sele.imageset/main_entertainment_sele@3x.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_ai.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_ai.imageset/Contents.json new file mode 100644 index 00000000..b5a36c97 --- /dev/null +++ b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_ai.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "main_entrance_ai@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "main_entrance_ai@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_ai.imageset/main_entrance_ai@2x.png b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_ai.imageset/main_entrance_ai@2x.png new file mode 100644 index 00000000..92b59dd8 Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_ai.imageset/main_entrance_ai@2x.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_ai.imageset/main_entrance_ai@3x.png b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_ai.imageset/main_entrance_ai@3x.png new file mode 100644 index 00000000..2d0eb4a4 Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_ai.imageset/main_entrance_ai@3x.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_avatar.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_avatar.imageset/Contents.json new file mode 100644 index 00000000..96f12e39 --- /dev/null +++ b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_avatar.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "main_entrance_avatar@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "main_entrance_avatar@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_avatar.imageset/main_entrance_avatar@2x.png b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_avatar.imageset/main_entrance_avatar@2x.png new file mode 100644 index 00000000..4ca3d1d0 Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_avatar.imageset/main_entrance_avatar@2x.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_avatar.imageset/main_entrance_avatar@3x.png b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_avatar.imageset/main_entrance_avatar@3x.png new file mode 100644 index 00000000..1119d006 Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_avatar.imageset/main_entrance_avatar@3x.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_beauty.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_beauty.imageset/Contents.json new file mode 100644 index 00000000..9e48283c --- /dev/null +++ b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_beauty.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "main_entrance_beauty@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "main_entrance_beauty@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_beauty.imageset/main_entrance_beauty@2x.png b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_beauty.imageset/main_entrance_beauty@2x.png new file mode 100644 index 00000000..268bfef2 Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_beauty.imageset/main_entrance_beauty@2x.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_beauty.imageset/main_entrance_beauty@3x.png b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_beauty.imageset/main_entrance_beauty@3x.png new file mode 100644 index 00000000..c76e07ee Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_beauty.imageset/main_entrance_beauty@3x.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_call.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_call.imageset/Contents.json new file mode 100644 index 00000000..1ec4aab2 --- /dev/null +++ b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_call.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "通话@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "通话@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git "a/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_call.imageset/\351\200\232\350\257\235@2x.png" "b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_call.imageset/\351\200\232\350\257\235@2x.png" new file mode 100644 index 00000000..5a4b8bde Binary files /dev/null and "b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_call.imageset/\351\200\232\350\257\235@2x.png" differ diff --git "a/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_call.imageset/\351\200\232\350\257\235@3x.png" "b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_call.imageset/\351\200\232\350\257\235@3x.png" new file mode 100644 index 00000000..d9249d03 Binary files /dev/null and "b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_call.imageset/\351\200\232\350\257\235@3x.png" differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_chat.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_chat.imageset/Contents.json new file mode 100644 index 00000000..a3ba28a8 --- /dev/null +++ b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_chat.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "会话聊天@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "会话聊天@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git "a/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_chat.imageset/\344\274\232\350\257\235\350\201\212\345\244\251@2x.png" "b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_chat.imageset/\344\274\232\350\257\235\350\201\212\345\244\251@2x.png" new file mode 100644 index 00000000..cd716f25 Binary files /dev/null and "b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_chat.imageset/\344\274\232\350\257\235\350\201\212\345\244\251@2x.png" differ diff --git "a/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_chat.imageset/\344\274\232\350\257\235\350\201\212\345\244\251@3x.png" "b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_chat.imageset/\344\274\232\350\257\235\350\201\212\345\244\251@3x.png" new file mode 100644 index 00000000..e24e885f Binary files /dev/null and "b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_chat.imageset/\344\274\232\350\257\235\350\201\212\345\244\251@3x.png" differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_contact.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_contact.imageset/Contents.json new file mode 100644 index 00000000..a45497d0 --- /dev/null +++ b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_contact.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "main_entrance_contact.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "main_entrance_contact@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "main_entrance_contact@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_contact.imageset/main_entrance_contact.png b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_contact.imageset/main_entrance_contact.png new file mode 100644 index 00000000..55dc356b Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_contact.imageset/main_entrance_contact.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_contact.imageset/main_entrance_contact@2x.png b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_contact.imageset/main_entrance_contact@2x.png new file mode 100644 index 00000000..bf600f17 Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_contact.imageset/main_entrance_contact@2x.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_contact.imageset/main_entrance_contact@3x.png b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_contact.imageset/main_entrance_contact@3x.png new file mode 100644 index 00000000..5f655166 Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_contact.imageset/main_entrance_contact@3x.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_forward_arrow.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_forward_arrow.imageset/Contents.json new file mode 100644 index 00000000..a680b4a1 --- /dev/null +++ b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_forward_arrow.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "Framemain_entrance_arrow@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "Framemain_entrance_arrow@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/App-UIKit/Assets.xcassets/main_arrow.imageset/main_arrow@2x.png b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_forward_arrow.imageset/Framemain_entrance_arrow@2x.png similarity index 100% rename from application/App-UIKit/Assets.xcassets/main_arrow.imageset/main_arrow@2x.png rename to application/main/Resource/Assets/MainAssets.xcassets/main_entrance_forward_arrow.imageset/Framemain_entrance_arrow@2x.png diff --git a/application/App-UIKit/Assets.xcassets/main_arrow.imageset/main_arrow@3x.png b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_forward_arrow.imageset/Framemain_entrance_arrow@3x.png similarity index 100% rename from application/App-UIKit/Assets.xcassets/main_arrow.imageset/main_arrow@3x.png rename to application/main/Resource/Assets/MainAssets.xcassets/main_entrance_forward_arrow.imageset/Framemain_entrance_arrow@3x.png diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_live.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_live.imageset/Contents.json new file mode 100644 index 00000000..b0a3a94b --- /dev/null +++ b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_live.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "直播@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "直播@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git "a/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_live.imageset/\347\233\264\346\222\255@2x.png" "b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_live.imageset/\347\233\264\346\222\255@2x.png" new file mode 100644 index 00000000..daaf6491 Binary files /dev/null and "b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_live.imageset/\347\233\264\346\222\255@2x.png" differ diff --git "a/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_live.imageset/\347\233\264\346\222\255@3x.png" "b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_live.imageset/\347\233\264\346\222\255@3x.png" new file mode 100644 index 00000000..d72b0a3b Binary files /dev/null and "b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_live.imageset/\347\233\264\346\222\255@3x.png" differ diff --git a/application/App-UIKit/Assets.xcassets/main_pusharrow.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_pusharrow.imageset/Contents.json similarity index 100% rename from application/App-UIKit/Assets.xcassets/main_pusharrow.imageset/Contents.json rename to application/main/Resource/Assets/MainAssets.xcassets/main_entrance_pusharrow.imageset/Contents.json diff --git a/application/App-UIKit/Assets.xcassets/main_pusharrow.imageset/main_entrance_pusharrow@2x.png b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_pusharrow.imageset/main_entrance_pusharrow@2x.png similarity index 100% rename from application/App-UIKit/Assets.xcassets/main_pusharrow.imageset/main_entrance_pusharrow@2x.png rename to application/main/Resource/Assets/MainAssets.xcassets/main_entrance_pusharrow.imageset/main_entrance_pusharrow@2x.png diff --git a/application/App-UIKit/Assets.xcassets/main_pusharrow.imageset/main_entrance_pusharrow@3x.png b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_pusharrow.imageset/main_entrance_pusharrow@3x.png similarity index 100% rename from application/App-UIKit/Assets.xcassets/main_pusharrow.imageset/main_entrance_pusharrow@3x.png rename to application/main/Resource/Assets/MainAssets.xcassets/main_entrance_pusharrow.imageset/main_entrance_pusharrow@3x.png diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_report_arrow.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_report_arrow.imageset/Contents.json new file mode 100644 index 00000000..c4c358be --- /dev/null +++ b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_report_arrow.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "main_entrance_report_arrow@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "main_entrance_report_arrow@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_report_arrow.imageset/main_entrance_report_arrow@2x.png b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_report_arrow.imageset/main_entrance_report_arrow@2x.png new file mode 100644 index 00000000..25c945fc Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_report_arrow.imageset/main_entrance_report_arrow@2x.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_report_arrow.imageset/main_entrance_report_arrow@3x.png b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_report_arrow.imageset/main_entrance_report_arrow@3x.png new file mode 100644 index 00000000..04cc1494 Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_report_arrow.imageset/main_entrance_report_arrow@3x.png differ diff --git a/application/App-UIKit/Assets.xcassets/main_scenarios.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_scenarios.imageset/Contents.json similarity index 100% rename from application/App-UIKit/Assets.xcassets/main_scenarios.imageset/Contents.json rename to application/main/Resource/Assets/MainAssets.xcassets/main_entrance_scenarios.imageset/Contents.json diff --git a/application/App-UIKit/Assets.xcassets/main_scenarios.imageset/main_entrance_scenarios@2x.png b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_scenarios.imageset/main_entrance_scenarios@2x.png similarity index 100% rename from application/App-UIKit/Assets.xcassets/main_scenarios.imageset/main_entrance_scenarios@2x.png rename to application/main/Resource/Assets/MainAssets.xcassets/main_entrance_scenarios.imageset/main_entrance_scenarios@2x.png diff --git a/application/App-UIKit/Assets.xcassets/main_scenarios.imageset/main_entrance_scenarios@3x.png b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_scenarios.imageset/main_entrance_scenarios@3x.png similarity index 100% rename from application/App-UIKit/Assets.xcassets/main_scenarios.imageset/main_entrance_scenarios@3x.png rename to application/main/Resource/Assets/MainAssets.xcassets/main_entrance_scenarios.imageset/main_entrance_scenarios@3x.png diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_tuikaraok.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_tuikaraok.imageset/Contents.json new file mode 100644 index 00000000..d47a04dc --- /dev/null +++ b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_tuikaraok.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "main_entrance_uikaraok@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "main_entrance_uikaraok@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_tuikaraok.imageset/main_entrance_uikaraok@2x.png b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_tuikaraok.imageset/main_entrance_uikaraok@2x.png new file mode 100644 index 00000000..5648bff6 Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_tuikaraok.imageset/main_entrance_uikaraok@2x.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_tuikaraok.imageset/main_entrance_uikaraok@3x.png b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_tuikaraok.imageset/main_entrance_uikaraok@3x.png new file mode 100644 index 00000000..fe095217 Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_tuikaraok.imageset/main_entrance_uikaraok@3x.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_tuiplayer.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_tuiplayer.imageset/Contents.json new file mode 100644 index 00000000..199ac1fc --- /dev/null +++ b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_tuiplayer.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "main_entrance_player@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "main_entrance_player@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_tuiplayer.imageset/main_entrance_player@2x.png b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_tuiplayer.imageset/main_entrance_player@2x.png new file mode 100644 index 00000000..47eadde8 Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_tuiplayer.imageset/main_entrance_player@2x.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_tuiplayer.imageset/main_entrance_player@3x.png b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_tuiplayer.imageset/main_entrance_player@3x.png new file mode 100644 index 00000000..6fe7ce80 Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_tuiplayer.imageset/main_entrance_player@3x.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_tuiroom.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_tuiroom.imageset/Contents.json new file mode 100644 index 00000000..426d05fa --- /dev/null +++ b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_tuiroom.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "main_entrance_uiroom@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "main_entrance_uiroom@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_tuiroom.imageset/main_entrance_uiroom@2x.png b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_tuiroom.imageset/main_entrance_uiroom@2x.png new file mode 100644 index 00000000..2ba80732 Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_tuiroom.imageset/main_entrance_uiroom@2x.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_tuiroom.imageset/main_entrance_uiroom@3x.png b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_tuiroom.imageset/main_entrance_uiroom@3x.png new file mode 100644 index 00000000..cbed083c Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_tuiroom.imageset/main_entrance_uiroom@3x.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_ugckit.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_ugckit.imageset/Contents.json new file mode 100644 index 00000000..454ebd6e --- /dev/null +++ b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_ugckit.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "main_entrance_ucgkit@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "main_entrance_ucgkit@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_ugckit.imageset/main_entrance_ucgkit@2x.png b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_ugckit.imageset/main_entrance_ucgkit@2x.png new file mode 100644 index 00000000..386bae73 Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_ugckit.imageset/main_entrance_ucgkit@2x.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_ugckit.imageset/main_entrance_ucgkit@3x.png b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_ugckit.imageset/main_entrance_ucgkit@3x.png new file mode 100644 index 00000000..94435a19 Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_ugckit.imageset/main_entrance_ucgkit@3x.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_uicomponents.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_uicomponents.imageset/Contents.json new file mode 100644 index 00000000..a3c1faab --- /dev/null +++ b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_uicomponents.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "main_entrance_uicom@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "main_entrance_uicom@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_uicomponents.imageset/main_entrance_uicom@2x.png b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_uicomponents.imageset/main_entrance_uicom@2x.png new file mode 100644 index 00000000..af46db6a Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_uicomponents.imageset/main_entrance_uicom@2x.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_uicomponents.imageset/main_entrance_uicom@3x.png b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_uicomponents.imageset/main_entrance_uicom@3x.png new file mode 100644 index 00000000..76723d23 Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_uicomponents.imageset/main_entrance_uicom@3x.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_videoplay.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_videoplay.imageset/Contents.json new file mode 100644 index 00000000..4453aa7f --- /dev/null +++ b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_videoplay.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "视频播放@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "视频播放@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git "a/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_videoplay.imageset/\350\247\206\351\242\221\346\222\255\346\224\276@2x.png" "b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_videoplay.imageset/\350\247\206\351\242\221\346\222\255\346\224\276@2x.png" new file mode 100644 index 00000000..7b71c566 Binary files /dev/null and "b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_videoplay.imageset/\350\247\206\351\242\221\346\222\255\346\224\276@2x.png" differ diff --git "a/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_videoplay.imageset/\350\247\206\351\242\221\346\222\255\346\224\276@3x.png" "b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_videoplay.imageset/\350\247\206\351\242\221\346\222\255\346\224\276@3x.png" new file mode 100644 index 00000000..26a153fa Binary files /dev/null and "b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_videoplay.imageset/\350\247\206\351\242\221\346\222\255\346\224\276@3x.png" differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_xmagic.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_xmagic.imageset/Contents.json new file mode 100644 index 00000000..0346edbb --- /dev/null +++ b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_xmagic.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "main_entrance_xmagic@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "main_entrance_xmagic@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_xmagic.imageset/main_entrance_xmagic@2x.png b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_xmagic.imageset/main_entrance_xmagic@2x.png new file mode 100644 index 00000000..e5d3ef0a Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_xmagic.imageset/main_entrance_xmagic@2x.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_xmagic.imageset/main_entrance_xmagic@3x.png b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_xmagic.imageset/main_entrance_xmagic@3x.png new file mode 100644 index 00000000..52cfefdf Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/main_entrance_xmagic.imageset/main_entrance_xmagic@3x.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_home_audiocall.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/main_home_audiocall.imageset/Contents.json new file mode 100644 index 00000000..3760e93d --- /dev/null +++ b/application/main/Resource/Assets/MainAssets.xcassets/main_home_audiocall.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "配图15@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "配图15@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git "a/application/main/Resource/Assets/MainAssets.xcassets/main_home_audiocall.imageset/\351\205\215\345\233\27615@2x.png" "b/application/main/Resource/Assets/MainAssets.xcassets/main_home_audiocall.imageset/\351\205\215\345\233\27615@2x.png" new file mode 100644 index 00000000..ccba05ad Binary files /dev/null and "b/application/main/Resource/Assets/MainAssets.xcassets/main_home_audiocall.imageset/\351\205\215\345\233\27615@2x.png" differ diff --git "a/application/main/Resource/Assets/MainAssets.xcassets/main_home_audiocall.imageset/\351\205\215\345\233\27615@3x.png" "b/application/main/Resource/Assets/MainAssets.xcassets/main_home_audiocall.imageset/\351\205\215\345\233\27615@3x.png" new file mode 100644 index 00000000..256b0f6b Binary files /dev/null and "b/application/main/Resource/Assets/MainAssets.xcassets/main_home_audiocall.imageset/\351\205\215\345\233\27615@3x.png" differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_home_chatroom.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/main_home_chatroom.imageset/Contents.json new file mode 100644 index 00000000..9aba4359 --- /dev/null +++ b/application/main/Resource/Assets/MainAssets.xcassets/main_home_chatroom.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "配图13@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "配图13@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git "a/application/main/Resource/Assets/MainAssets.xcassets/main_home_chatroom.imageset/\351\205\215\345\233\27613@2x.png" "b/application/main/Resource/Assets/MainAssets.xcassets/main_home_chatroom.imageset/\351\205\215\345\233\27613@2x.png" new file mode 100644 index 00000000..beba7826 Binary files /dev/null and "b/application/main/Resource/Assets/MainAssets.xcassets/main_home_chatroom.imageset/\351\205\215\345\233\27613@2x.png" differ diff --git "a/application/main/Resource/Assets/MainAssets.xcassets/main_home_chatroom.imageset/\351\205\215\345\233\27613@3x.png" "b/application/main/Resource/Assets/MainAssets.xcassets/main_home_chatroom.imageset/\351\205\215\345\233\27613@3x.png" new file mode 100644 index 00000000..fbb777b2 Binary files /dev/null and "b/application/main/Resource/Assets/MainAssets.xcassets/main_home_chatroom.imageset/\351\205\215\345\233\27613@3x.png" differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_home_chatsalon.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/main_home_chatsalon.imageset/Contents.json new file mode 100644 index 00000000..31415e13 --- /dev/null +++ b/application/main/Resource/Assets/MainAssets.xcassets/main_home_chatsalon.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "配图14@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "配图14@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git "a/application/main/Resource/Assets/MainAssets.xcassets/main_home_chatsalon.imageset/\351\205\215\345\233\27614@2x.png" "b/application/main/Resource/Assets/MainAssets.xcassets/main_home_chatsalon.imageset/\351\205\215\345\233\27614@2x.png" new file mode 100644 index 00000000..ed2bfeb3 Binary files /dev/null and "b/application/main/Resource/Assets/MainAssets.xcassets/main_home_chatsalon.imageset/\351\205\215\345\233\27614@2x.png" differ diff --git "a/application/main/Resource/Assets/MainAssets.xcassets/main_home_chatsalon.imageset/\351\205\215\345\233\27614@3x.png" "b/application/main/Resource/Assets/MainAssets.xcassets/main_home_chatsalon.imageset/\351\205\215\345\233\27614@3x.png" new file mode 100644 index 00000000..2adc458e Binary files /dev/null and "b/application/main/Resource/Assets/MainAssets.xcassets/main_home_chatsalon.imageset/\351\205\215\345\233\27614@3x.png" differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_home_chorus.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/main_home_chorus.imageset/Contents.json new file mode 100644 index 00000000..aeca20e8 --- /dev/null +++ b/application/main/Resource/Assets/MainAssets.xcassets/main_home_chorus.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "main_home_chorus@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "main_home_chorus@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_home_chorus.imageset/main_home_chorus@2x.png b/application/main/Resource/Assets/MainAssets.xcassets/main_home_chorus.imageset/main_home_chorus@2x.png new file mode 100644 index 00000000..7d4259d2 Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/main_home_chorus.imageset/main_home_chorus@2x.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_home_chorus.imageset/main_home_chorus@3x.png b/application/main/Resource/Assets/MainAssets.xcassets/main_home_chorus.imageset/main_home_chorus@3x.png new file mode 100644 index 00000000..4df09135 Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/main_home_chorus.imageset/main_home_chorus@3x.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_home_communityChat.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/main_home_communityChat.imageset/Contents.json new file mode 100644 index 00000000..f398e27a --- /dev/null +++ b/application/main/Resource/Assets/MainAssets.xcassets/main_home_communityChat.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "配图32@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "配图32@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git "a/application/main/Resource/Assets/MainAssets.xcassets/main_home_communityChat.imageset/\351\205\215\345\233\27632@2x.png" "b/application/main/Resource/Assets/MainAssets.xcassets/main_home_communityChat.imageset/\351\205\215\345\233\27632@2x.png" new file mode 100644 index 00000000..e23ae851 Binary files /dev/null and "b/application/main/Resource/Assets/MainAssets.xcassets/main_home_communityChat.imageset/\351\205\215\345\233\27632@2x.png" differ diff --git "a/application/main/Resource/Assets/MainAssets.xcassets/main_home_communityChat.imageset/\351\205\215\345\233\27632@3x.png" "b/application/main/Resource/Assets/MainAssets.xcassets/main_home_communityChat.imageset/\351\205\215\345\233\27632@3x.png" new file mode 100644 index 00000000..207419d4 Binary files /dev/null and "b/application/main/Resource/Assets/MainAssets.xcassets/main_home_communityChat.imageset/\351\205\215\345\233\27632@3x.png" differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_home_contacts.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/main_home_contacts.imageset/Contents.json new file mode 100644 index 00000000..845ebe27 --- /dev/null +++ b/application/main/Resource/Assets/MainAssets.xcassets/main_home_contacts.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "配图33@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "配图33@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git "a/application/main/Resource/Assets/MainAssets.xcassets/main_home_contacts.imageset/\351\205\215\345\233\27633@2x.png" "b/application/main/Resource/Assets/MainAssets.xcassets/main_home_contacts.imageset/\351\205\215\345\233\27633@2x.png" new file mode 100644 index 00000000..099241ea Binary files /dev/null and "b/application/main/Resource/Assets/MainAssets.xcassets/main_home_contacts.imageset/\351\205\215\345\233\27633@2x.png" differ diff --git "a/application/main/Resource/Assets/MainAssets.xcassets/main_home_contacts.imageset/\351\205\215\345\233\27633@3x.png" "b/application/main/Resource/Assets/MainAssets.xcassets/main_home_contacts.imageset/\351\205\215\345\233\27633@3x.png" new file mode 100644 index 00000000..af77b3d9 Binary files /dev/null and "b/application/main/Resource/Assets/MainAssets.xcassets/main_home_contacts.imageset/\351\205\215\345\233\27633@3x.png" differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_home_conversationalChat.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/main_home_conversationalChat.imageset/Contents.json new file mode 100644 index 00000000..75ade825 --- /dev/null +++ b/application/main/Resource/Assets/MainAssets.xcassets/main_home_conversationalChat.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "配图31@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "配图31@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git "a/application/main/Resource/Assets/MainAssets.xcassets/main_home_conversationalChat.imageset/\351\205\215\345\233\27631@2x.png" "b/application/main/Resource/Assets/MainAssets.xcassets/main_home_conversationalChat.imageset/\351\205\215\345\233\27631@2x.png" new file mode 100644 index 00000000..eba21caa Binary files /dev/null and "b/application/main/Resource/Assets/MainAssets.xcassets/main_home_conversationalChat.imageset/\351\205\215\345\233\27631@2x.png" differ diff --git "a/application/main/Resource/Assets/MainAssets.xcassets/main_home_conversationalChat.imageset/\351\205\215\345\233\27631@3x.png" "b/application/main/Resource/Assets/MainAssets.xcassets/main_home_conversationalChat.imageset/\351\205\215\345\233\27631@3x.png" new file mode 100644 index 00000000..b9f05625 Binary files /dev/null and "b/application/main/Resource/Assets/MainAssets.xcassets/main_home_conversationalChat.imageset/\351\205\215\345\233\27631@3x.png" differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_home_disc.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/main_home_disc.imageset/Contents.json new file mode 100644 index 00000000..3a1ee9c7 --- /dev/null +++ b/application/main/Resource/Assets/MainAssets.xcassets/main_home_disc.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "main_home_disc@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_home_disc.imageset/main_home_disc@3x.png b/application/main/Resource/Assets/MainAssets.xcassets/main_home_disc.imageset/main_home_disc@3x.png new file mode 100644 index 00000000..6b332620 Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/main_home_disc.imageset/main_home_disc@3x.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_home_disc_sele.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/main_home_disc_sele.imageset/Contents.json new file mode 100644 index 00000000..400d1311 --- /dev/null +++ b/application/main/Resource/Assets/MainAssets.xcassets/main_home_disc_sele.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "main_home_disc_sele@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_home_disc_sele.imageset/main_home_disc_sele@3x.png b/application/main/Resource/Assets/MainAssets.xcassets/main_home_disc_sele.imageset/main_home_disc_sele@3x.png new file mode 100644 index 00000000..1054809f Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/main_home_disc_sele.imageset/main_home_disc_sele@3x.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_home_ktv.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/main_home_ktv.imageset/Contents.json new file mode 100644 index 00000000..15f4d5c7 --- /dev/null +++ b/application/main/Resource/Assets/MainAssets.xcassets/main_home_ktv.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "配图12@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "配图12@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git "a/application/main/Resource/Assets/MainAssets.xcassets/main_home_ktv.imageset/\351\205\215\345\233\27612@2x.png" "b/application/main/Resource/Assets/MainAssets.xcassets/main_home_ktv.imageset/\351\205\215\345\233\27612@2x.png" new file mode 100644 index 00000000..4beb6bbb Binary files /dev/null and "b/application/main/Resource/Assets/MainAssets.xcassets/main_home_ktv.imageset/\351\205\215\345\233\27612@2x.png" differ diff --git "a/application/main/Resource/Assets/MainAssets.xcassets/main_home_ktv.imageset/\351\205\215\345\233\27612@3x.png" "b/application/main/Resource/Assets/MainAssets.xcassets/main_home_ktv.imageset/\351\205\215\345\233\27612@3x.png" new file mode 100644 index 00000000..fff46c2e Binary files /dev/null and "b/application/main/Resource/Assets/MainAssets.xcassets/main_home_ktv.imageset/\351\205\215\345\233\27612@3x.png" differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_home_meeting.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/main_home_meeting.imageset/Contents.json new file mode 100644 index 00000000..b9d3972d --- /dev/null +++ b/application/main/Resource/Assets/MainAssets.xcassets/main_home_meeting.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "main_home_meeting@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "main_home_meeting@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_home_meeting.imageset/main_home_meeting@2x.png b/application/main/Resource/Assets/MainAssets.xcassets/main_home_meeting.imageset/main_home_meeting@2x.png new file mode 100644 index 00000000..2967ae6e Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/main_home_meeting.imageset/main_home_meeting@2x.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_home_meeting.imageset/main_home_meeting@3x.png b/application/main/Resource/Assets/MainAssets.xcassets/main_home_meeting.imageset/main_home_meeting@3x.png new file mode 100644 index 00000000..d2f4af23 Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/main_home_meeting.imageset/main_home_meeting@3x.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_home_nor.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/main_home_nor.imageset/Contents.json new file mode 100644 index 00000000..27deda89 --- /dev/null +++ b/application/main/Resource/Assets/MainAssets.xcassets/main_home_nor.imageset/Contents.json @@ -0,0 +1,24 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "main_home_nor.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + }, + "properties" : { + "template-rendering-intent" : "original" + } +} diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_home_nor.imageset/main_home_nor.png b/application/main/Resource/Assets/MainAssets.xcassets/main_home_nor.imageset/main_home_nor.png new file mode 100644 index 00000000..e939f555 Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/main_home_nor.imageset/main_home_nor.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_home_sel.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/main_home_sel.imageset/Contents.json new file mode 100644 index 00000000..70049f35 --- /dev/null +++ b/application/main/Resource/Assets/MainAssets.xcassets/main_home_sel.imageset/Contents.json @@ -0,0 +1,24 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "main_home_sel.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + }, + "properties" : { + "template-rendering-intent" : "original" + } +} diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_home_sel.imageset/main_home_sel.png b/application/main/Resource/Assets/MainAssets.xcassets/main_home_sel.imageset/main_home_sel.png new file mode 100644 index 00000000..6f0f27c6 Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/main_home_sel.imageset/main_home_sel.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_home_shortVideo.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/main_home_shortVideo.imageset/Contents.json new file mode 100644 index 00000000..36743a88 --- /dev/null +++ b/application/main/Resource/Assets/MainAssets.xcassets/main_home_shortVideo.imageset/Contents.json @@ -0,0 +1,26 @@ +{ + "images" : [ + { + "filename" : "main_home_shortVideo.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "main_home_shortVideo@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "main_home_shortVideo@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + }, + "properties" : { + "template-rendering-intent" : "original" + } +} diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_home_shortVideo.imageset/main_home_shortVideo.png b/application/main/Resource/Assets/MainAssets.xcassets/main_home_shortVideo.imageset/main_home_shortVideo.png new file mode 100644 index 00000000..8056fb4c Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/main_home_shortVideo.imageset/main_home_shortVideo.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_home_shortVideo.imageset/main_home_shortVideo@2x.png b/application/main/Resource/Assets/MainAssets.xcassets/main_home_shortVideo.imageset/main_home_shortVideo@2x.png new file mode 100644 index 00000000..8056fb4c Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/main_home_shortVideo.imageset/main_home_shortVideo@2x.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_home_shortVideo.imageset/main_home_videoPlay@3x.png b/application/main/Resource/Assets/MainAssets.xcassets/main_home_shortVideo.imageset/main_home_videoPlay@3x.png new file mode 100644 index 00000000..8056fb4c Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/main_home_shortVideo.imageset/main_home_videoPlay@3x.png differ diff --git "a/application/main/Resource/Assets/MainAssets.xcassets/main_home_shortVideo.imageset/\351\205\215\345\233\27642@2x.png" "b/application/main/Resource/Assets/MainAssets.xcassets/main_home_shortVideo.imageset/\351\205\215\345\233\27642@2x.png" new file mode 100644 index 00000000..e36d2192 Binary files /dev/null and "b/application/main/Resource/Assets/MainAssets.xcassets/main_home_shortVideo.imageset/\351\205\215\345\233\27642@2x.png" differ diff --git "a/application/main/Resource/Assets/MainAssets.xcassets/main_home_shortVideo.imageset/\351\205\215\345\233\27642@3x.png" "b/application/main/Resource/Assets/MainAssets.xcassets/main_home_shortVideo.imageset/\351\205\215\345\233\27642@3x.png" new file mode 100644 index 00000000..d75f93fa Binary files /dev/null and "b/application/main/Resource/Assets/MainAssets.xcassets/main_home_shortVideo.imageset/\351\205\215\345\233\27642@3x.png" differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_home_showlive.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/main_home_showlive.imageset/Contents.json new file mode 100644 index 00000000..676d7a12 --- /dev/null +++ b/application/main/Resource/Assets/MainAssets.xcassets/main_home_showlive.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "配图21@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "配图21@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git "a/application/main/Resource/Assets/MainAssets.xcassets/main_home_showlive.imageset/\351\205\215\345\233\27621@2x.png" "b/application/main/Resource/Assets/MainAssets.xcassets/main_home_showlive.imageset/\351\205\215\345\233\27621@2x.png" new file mode 100644 index 00000000..ee91c520 Binary files /dev/null and "b/application/main/Resource/Assets/MainAssets.xcassets/main_home_showlive.imageset/\351\205\215\345\233\27621@2x.png" differ diff --git "a/application/main/Resource/Assets/MainAssets.xcassets/main_home_showlive.imageset/\351\205\215\345\233\27621@3x.png" "b/application/main/Resource/Assets/MainAssets.xcassets/main_home_showlive.imageset/\351\205\215\345\233\27621@3x.png" new file mode 100644 index 00000000..478409d5 Binary files /dev/null and "b/application/main/Resource/Assets/MainAssets.xcassets/main_home_showlive.imageset/\351\205\215\345\233\27621@3x.png" differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_home_singleFunction.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/main_home_singleFunction.imageset/Contents.json new file mode 100644 index 00000000..cacde5cb --- /dev/null +++ b/application/main/Resource/Assets/MainAssets.xcassets/main_home_singleFunction.imageset/Contents.json @@ -0,0 +1,25 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "main_home_singleFunction@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "main_home_singleFunction@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + }, + "properties" : { + "template-rendering-intent" : "original" + } +} diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_home_singleFunction.imageset/main_home_singleFunction.png b/application/main/Resource/Assets/MainAssets.xcassets/main_home_singleFunction.imageset/main_home_singleFunction.png new file mode 100644 index 00000000..6351c656 Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/main_home_singleFunction.imageset/main_home_singleFunction.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_home_singleFunction.imageset/main_home_singleFunction@2x.png b/application/main/Resource/Assets/MainAssets.xcassets/main_home_singleFunction.imageset/main_home_singleFunction@2x.png new file mode 100644 index 00000000..30c845d7 Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/main_home_singleFunction.imageset/main_home_singleFunction@2x.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_home_singleFunction.imageset/main_home_singleFunction@3x.png b/application/main/Resource/Assets/MainAssets.xcassets/main_home_singleFunction.imageset/main_home_singleFunction@3x.png new file mode 100644 index 00000000..7d0a0ac8 Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/main_home_singleFunction.imageset/main_home_singleFunction@3x.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_home_standlive.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/main_home_standlive.imageset/Contents.json new file mode 100644 index 00000000..cbe74c4c --- /dev/null +++ b/application/main/Resource/Assets/MainAssets.xcassets/main_home_standlive.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "main_home_standlive.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_home_standlive.imageset/main_home_standlive.png b/application/main/Resource/Assets/MainAssets.xcassets/main_home_standlive.imageset/main_home_standlive.png new file mode 100644 index 00000000..09125d67 Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/main_home_standlive.imageset/main_home_standlive.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_home_standplay.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/main_home_standplay.imageset/Contents.json new file mode 100644 index 00000000..2a3a7404 --- /dev/null +++ b/application/main/Resource/Assets/MainAssets.xcassets/main_home_standplay.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "配图23@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "配图23@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git "a/application/main/Resource/Assets/MainAssets.xcassets/main_home_standplay.imageset/\351\205\215\345\233\27623@2x.png" "b/application/main/Resource/Assets/MainAssets.xcassets/main_home_standplay.imageset/\351\205\215\345\233\27623@2x.png" new file mode 100644 index 00000000..d1d89f33 Binary files /dev/null and "b/application/main/Resource/Assets/MainAssets.xcassets/main_home_standplay.imageset/\351\205\215\345\233\27623@2x.png" differ diff --git "a/application/main/Resource/Assets/MainAssets.xcassets/main_home_standplay.imageset/\351\205\215\345\233\27623@3x.png" "b/application/main/Resource/Assets/MainAssets.xcassets/main_home_standplay.imageset/\351\205\215\345\233\27623@3x.png" new file mode 100644 index 00000000..29d360a6 Binary files /dev/null and "b/application/main/Resource/Assets/MainAssets.xcassets/main_home_standplay.imageset/\351\205\215\345\233\27623@3x.png" differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_home_standpush.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/main_home_standpush.imageset/Contents.json new file mode 100644 index 00000000..8a713cb5 --- /dev/null +++ b/application/main/Resource/Assets/MainAssets.xcassets/main_home_standpush.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "配图24@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "配图24@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git "a/application/main/Resource/Assets/MainAssets.xcassets/main_home_standpush.imageset/\351\205\215\345\233\27624@2x.png" "b/application/main/Resource/Assets/MainAssets.xcassets/main_home_standpush.imageset/\351\205\215\345\233\27624@2x.png" new file mode 100644 index 00000000..3483cca9 Binary files /dev/null and "b/application/main/Resource/Assets/MainAssets.xcassets/main_home_standpush.imageset/\351\205\215\345\233\27624@2x.png" differ diff --git "a/application/main/Resource/Assets/MainAssets.xcassets/main_home_standpush.imageset/\351\205\215\345\233\27624@3x.png" "b/application/main/Resource/Assets/MainAssets.xcassets/main_home_standpush.imageset/\351\205\215\345\233\27624@3x.png" new file mode 100644 index 00000000..d6af0e39 Binary files /dev/null and "b/application/main/Resource/Assets/MainAssets.xcassets/main_home_standpush.imageset/\351\205\215\345\233\27624@3x.png" differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_home_titleicon.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/main_home_titleicon.imageset/Contents.json new file mode 100644 index 00000000..757ad059 --- /dev/null +++ b/application/main/Resource/Assets/MainAssets.xcassets/main_home_titleicon.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "navigationbar_back@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "navigationbar_back@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_home_titleicon.imageset/navigationbar_back@2x.png b/application/main/Resource/Assets/MainAssets.xcassets/main_home_titleicon.imageset/navigationbar_back@2x.png new file mode 100644 index 00000000..bae790a3 Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/main_home_titleicon.imageset/navigationbar_back@2x.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_home_titleicon.imageset/navigationbar_back@3x.png b/application/main/Resource/Assets/MainAssets.xcassets/main_home_titleicon.imageset/navigationbar_back@3x.png new file mode 100644 index 00000000..9e3a05af Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/main_home_titleicon.imageset/navigationbar_back@3x.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_home_tuiroom.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/main_home_tuiroom.imageset/Contents.json new file mode 100644 index 00000000..a160072b --- /dev/null +++ b/application/main/Resource/Assets/MainAssets.xcassets/main_home_tuiroom.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "配图11@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "配图11@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git "a/application/main/Resource/Assets/MainAssets.xcassets/main_home_tuiroom.imageset/\351\205\215\345\233\27611@2x.png" "b/application/main/Resource/Assets/MainAssets.xcassets/main_home_tuiroom.imageset/\351\205\215\345\233\27611@2x.png" new file mode 100644 index 00000000..84256ada Binary files /dev/null and "b/application/main/Resource/Assets/MainAssets.xcassets/main_home_tuiroom.imageset/\351\205\215\345\233\27611@2x.png" differ diff --git "a/application/main/Resource/Assets/MainAssets.xcassets/main_home_tuiroom.imageset/\351\205\215\345\233\27611@3x.png" "b/application/main/Resource/Assets/MainAssets.xcassets/main_home_tuiroom.imageset/\351\205\215\345\233\27611@3x.png" new file mode 100644 index 00000000..20c6d734 Binary files /dev/null and "b/application/main/Resource/Assets/MainAssets.xcassets/main_home_tuiroom.imageset/\351\205\215\345\233\27611@3x.png" differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_home_videoPlay.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/main_home_videoPlay.imageset/Contents.json new file mode 100644 index 00000000..cc8350eb --- /dev/null +++ b/application/main/Resource/Assets/MainAssets.xcassets/main_home_videoPlay.imageset/Contents.json @@ -0,0 +1,25 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "配图41@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "配图41@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + }, + "properties" : { + "template-rendering-intent" : "original" + } +} diff --git "a/application/main/Resource/Assets/MainAssets.xcassets/main_home_videoPlay.imageset/\351\205\215\345\233\27641@2x.png" "b/application/main/Resource/Assets/MainAssets.xcassets/main_home_videoPlay.imageset/\351\205\215\345\233\27641@2x.png" new file mode 100644 index 00000000..a3289320 Binary files /dev/null and "b/application/main/Resource/Assets/MainAssets.xcassets/main_home_videoPlay.imageset/\351\205\215\345\233\27641@2x.png" differ diff --git "a/application/main/Resource/Assets/MainAssets.xcassets/main_home_videoPlay.imageset/\351\205\215\345\233\27641@3x.png" "b/application/main/Resource/Assets/MainAssets.xcassets/main_home_videoPlay.imageset/\351\205\215\345\233\27641@3x.png" new file mode 100644 index 00000000..2a0c3df5 Binary files /dev/null and "b/application/main/Resource/Assets/MainAssets.xcassets/main_home_videoPlay.imageset/\351\205\215\345\233\27641@3x.png" differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_home_videocall.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/main_home_videocall.imageset/Contents.json new file mode 100644 index 00000000..4f0e4a63 --- /dev/null +++ b/application/main/Resource/Assets/MainAssets.xcassets/main_home_videocall.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "配图16@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "配图16@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git "a/application/main/Resource/Assets/MainAssets.xcassets/main_home_videocall.imageset/\351\205\215\345\233\27616@2x.png" "b/application/main/Resource/Assets/MainAssets.xcassets/main_home_videocall.imageset/\351\205\215\345\233\27616@2x.png" new file mode 100644 index 00000000..69d435b9 Binary files /dev/null and "b/application/main/Resource/Assets/MainAssets.xcassets/main_home_videocall.imageset/\351\205\215\345\233\27616@2x.png" differ diff --git "a/application/main/Resource/Assets/MainAssets.xcassets/main_home_videocall.imageset/\351\205\215\345\233\27616@3x.png" "b/application/main/Resource/Assets/MainAssets.xcassets/main_home_videocall.imageset/\351\205\215\345\233\27616@3x.png" new file mode 100644 index 00000000..c94a5f4e Binary files /dev/null and "b/application/main/Resource/Assets/MainAssets.xcassets/main_home_videocall.imageset/\351\205\215\345\233\27616@3x.png" differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_home_videolive.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/main_home_videolive.imageset/Contents.json new file mode 100644 index 00000000..bfa632d0 --- /dev/null +++ b/application/main/Resource/Assets/MainAssets.xcassets/main_home_videolive.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "配图22@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "配图22@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git "a/application/main/Resource/Assets/MainAssets.xcassets/main_home_videolive.imageset/\351\205\215\345\233\27622@2x.png" "b/application/main/Resource/Assets/MainAssets.xcassets/main_home_videolive.imageset/\351\205\215\345\233\27622@2x.png" new file mode 100644 index 00000000..1d7e4315 Binary files /dev/null and "b/application/main/Resource/Assets/MainAssets.xcassets/main_home_videolive.imageset/\351\205\215\345\233\27622@2x.png" differ diff --git "a/application/main/Resource/Assets/MainAssets.xcassets/main_home_videolive.imageset/\351\205\215\345\233\27622@3x.png" "b/application/main/Resource/Assets/MainAssets.xcassets/main_home_videolive.imageset/\351\205\215\345\233\27622@3x.png" new file mode 100644 index 00000000..a1d9d228 Binary files /dev/null and "b/application/main/Resource/Assets/MainAssets.xcassets/main_home_videolive.imageset/\351\205\215\345\233\27622@3x.png" differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_mine_about.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/main_mine_about.imageset/Contents.json new file mode 100644 index 00000000..f2036470 --- /dev/null +++ b/application/main/Resource/Assets/MainAssets.xcassets/main_mine_about.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "main_mine_about@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "main_mine_about@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_mine_about.imageset/main_mine_about@2x.png b/application/main/Resource/Assets/MainAssets.xcassets/main_mine_about.imageset/main_mine_about@2x.png new file mode 100644 index 00000000..81297777 Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/main_mine_about.imageset/main_mine_about@2x.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_mine_about.imageset/main_mine_about@3x.png b/application/main/Resource/Assets/MainAssets.xcassets/main_mine_about.imageset/main_mine_about@3x.png new file mode 100644 index 00000000..39e1c5cf Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/main_mine_about.imageset/main_mine_about@3x.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_mine_about_back.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/main_mine_about_back.imageset/Contents.json new file mode 100644 index 00000000..ac3d45c4 --- /dev/null +++ b/application/main/Resource/Assets/MainAssets.xcassets/main_mine_about_back.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "main_mine_about_back.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "main_mine_about_back@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "main_mine_about_back@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_mine_about_back.imageset/main_mine_about_back.png b/application/main/Resource/Assets/MainAssets.xcassets/main_mine_about_back.imageset/main_mine_about_back.png new file mode 100644 index 00000000..c1b18270 Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/main_mine_about_back.imageset/main_mine_about_back.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_mine_about_back.imageset/main_mine_about_back@2x.png b/application/main/Resource/Assets/MainAssets.xcassets/main_mine_about_back.imageset/main_mine_about_back@2x.png new file mode 100644 index 00000000..e0d845d1 Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/main_mine_about_back.imageset/main_mine_about_back@2x.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_mine_about_back.imageset/main_mine_about_back@3x.png b/application/main/Resource/Assets/MainAssets.xcassets/main_mine_about_back.imageset/main_mine_about_back@3x.png new file mode 100644 index 00000000..ed992662 Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/main_mine_about_back.imageset/main_mine_about_back@3x.png differ diff --git a/application/App-UIKit/Assets.xcassets/main_mine_choose.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/main_mine_choose.imageset/Contents.json similarity index 100% rename from application/App-UIKit/Assets.xcassets/main_mine_choose.imageset/Contents.json rename to application/main/Resource/Assets/MainAssets.xcassets/main_mine_choose.imageset/Contents.json diff --git a/application/App-UIKit/Assets.xcassets/main_mine_choose.imageset/Rectangle.png b/application/main/Resource/Assets/MainAssets.xcassets/main_mine_choose.imageset/Rectangle.png similarity index 100% rename from application/App-UIKit/Assets.xcassets/main_mine_choose.imageset/Rectangle.png rename to application/main/Resource/Assets/MainAssets.xcassets/main_mine_choose.imageset/Rectangle.png diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_mine_debug.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/main_mine_debug.imageset/Contents.json new file mode 100644 index 00000000..f46bc70f --- /dev/null +++ b/application/main/Resource/Assets/MainAssets.xcassets/main_mine_debug.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "main_mine_debug.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "main_mine_debug@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "main_mine_debug@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_mine_debug.imageset/main_mine_debug.png b/application/main/Resource/Assets/MainAssets.xcassets/main_mine_debug.imageset/main_mine_debug.png new file mode 100644 index 00000000..5897f479 Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/main_mine_debug.imageset/main_mine_debug.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_mine_debug.imageset/main_mine_debug@2x.png b/application/main/Resource/Assets/MainAssets.xcassets/main_mine_debug.imageset/main_mine_debug@2x.png new file mode 100644 index 00000000..5945bdd9 Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/main_mine_debug.imageset/main_mine_debug@2x.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_mine_debug.imageset/main_mine_debug@3x.png b/application/main/Resource/Assets/MainAssets.xcassets/main_mine_debug.imageset/main_mine_debug@3x.png new file mode 100644 index 00000000..b80f06e8 Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/main_mine_debug.imageset/main_mine_debug@3x.png differ diff --git a/application/App-UIKit/Assets.xcassets/mine_detail.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/main_mine_detail.imageset/Contents.json similarity index 100% rename from application/App-UIKit/Assets.xcassets/mine_detail.imageset/Contents.json rename to application/main/Resource/Assets/MainAssets.xcassets/main_mine_detail.imageset/Contents.json diff --git a/application/App-UIKit/Assets.xcassets/mine_detail.imageset/main_mine_detail.png b/application/main/Resource/Assets/MainAssets.xcassets/main_mine_detail.imageset/main_mine_detail.png similarity index 100% rename from application/App-UIKit/Assets.xcassets/mine_detail.imageset/main_mine_detail.png rename to application/main/Resource/Assets/MainAssets.xcassets/main_mine_detail.imageset/main_mine_detail.png diff --git a/application/App-UIKit/Assets.xcassets/mine_detail.imageset/main_mine_detail@2x.png b/application/main/Resource/Assets/MainAssets.xcassets/main_mine_detail.imageset/main_mine_detail@2x.png similarity index 100% rename from application/App-UIKit/Assets.xcassets/mine_detail.imageset/main_mine_detail@2x.png rename to application/main/Resource/Assets/MainAssets.xcassets/main_mine_detail.imageset/main_mine_detail@2x.png diff --git a/application/App-UIKit/Assets.xcassets/mine_detail.imageset/main_mine_detail@3x.png b/application/main/Resource/Assets/MainAssets.xcassets/main_mine_detail.imageset/main_mine_detail@3x.png similarity index 100% rename from application/App-UIKit/Assets.xcassets/mine_detail.imageset/main_mine_detail@3x.png rename to application/main/Resource/Assets/MainAssets.xcassets/main_mine_detail.imageset/main_mine_detail@3x.png diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_mine_disclaimer.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/main_mine_disclaimer.imageset/Contents.json new file mode 100644 index 00000000..4610173d --- /dev/null +++ b/application/main/Resource/Assets/MainAssets.xcassets/main_mine_disclaimer.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "main_mine_disclaimer@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_mine_disclaimer.imageset/main_mine_disclaimer@2x.png b/application/main/Resource/Assets/MainAssets.xcassets/main_mine_disclaimer.imageset/main_mine_disclaimer@2x.png new file mode 100644 index 00000000..95c58c2e Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/main_mine_disclaimer.imageset/main_mine_disclaimer@2x.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_mine_edit.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/main_mine_edit.imageset/Contents.json new file mode 100644 index 00000000..502674fe --- /dev/null +++ b/application/main/Resource/Assets/MainAssets.xcassets/main_mine_edit.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "main_mine_edit.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "main_mine_edit@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "main_mine_edit@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_mine_edit.imageset/main_mine_edit.png b/application/main/Resource/Assets/MainAssets.xcassets/main_mine_edit.imageset/main_mine_edit.png new file mode 100644 index 00000000..4a42d37a Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/main_mine_edit.imageset/main_mine_edit.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_mine_edit.imageset/main_mine_edit@2x.png b/application/main/Resource/Assets/MainAssets.xcassets/main_mine_edit.imageset/main_mine_edit@2x.png new file mode 100644 index 00000000..2ffa392a Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/main_mine_edit.imageset/main_mine_edit@2x.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_mine_edit.imageset/main_mine_edit@3x.png b/application/main/Resource/Assets/MainAssets.xcassets/main_mine_edit.imageset/main_mine_edit@3x.png new file mode 100644 index 00000000..e2df4a85 Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/main_mine_edit.imageset/main_mine_edit@3x.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_mine_headerbg.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/main_mine_headerbg.imageset/Contents.json new file mode 100644 index 00000000..862e77c6 --- /dev/null +++ b/application/main/Resource/Assets/MainAssets.xcassets/main_mine_headerbg.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "main_mine_headerbg@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "main_mine_headerbg@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_mine_headerbg.imageset/main_mine_headerbg@2x.png b/application/main/Resource/Assets/MainAssets.xcassets/main_mine_headerbg.imageset/main_mine_headerbg@2x.png new file mode 100644 index 00000000..551e8f8f Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/main_mine_headerbg.imageset/main_mine_headerbg@2x.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_mine_headerbg.imageset/main_mine_headerbg@3x.png b/application/main/Resource/Assets/MainAssets.xcassets/main_mine_headerbg.imageset/main_mine_headerbg@3x.png new file mode 100644 index 00000000..01bd4bdc Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/main_mine_headerbg.imageset/main_mine_headerbg@3x.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_mine_icp.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/main_mine_icp.imageset/Contents.json new file mode 100644 index 00000000..7b8763d8 --- /dev/null +++ b/application/main/Resource/Assets/MainAssets.xcassets/main_mine_icp.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "main_mine_icp@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "main_mine_icp@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_mine_icp.imageset/main_mine_icp@2x.png b/application/main/Resource/Assets/MainAssets.xcassets/main_mine_icp.imageset/main_mine_icp@2x.png new file mode 100644 index 00000000..3d2c42cb Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/main_mine_icp.imageset/main_mine_icp@2x.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_mine_icp.imageset/main_mine_icp@3x.png b/application/main/Resource/Assets/MainAssets.xcassets/main_mine_icp.imageset/main_mine_icp@3x.png new file mode 100644 index 00000000..21a6007a Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/main_mine_icp.imageset/main_mine_icp@3x.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_mine_nor.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/main_mine_nor.imageset/Contents.json new file mode 100644 index 00000000..ae6c0988 --- /dev/null +++ b/application/main/Resource/Assets/MainAssets.xcassets/main_mine_nor.imageset/Contents.json @@ -0,0 +1,25 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "main_mine_nor@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "main_mine_nor@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + }, + "properties" : { + "template-rendering-intent" : "original" + } +} diff --git a/application/App-UIKit/Assets.xcassets/main_mine_nor.imageset/main_mine_nor@2x.png b/application/main/Resource/Assets/MainAssets.xcassets/main_mine_nor.imageset/main_mine_nor@2x.png similarity index 100% rename from application/App-UIKit/Assets.xcassets/main_mine_nor.imageset/main_mine_nor@2x.png rename to application/main/Resource/Assets/MainAssets.xcassets/main_mine_nor.imageset/main_mine_nor@2x.png diff --git a/application/App-UIKit/Assets.xcassets/main_mine_nor.imageset/main_mine_nor@3x.png b/application/main/Resource/Assets/MainAssets.xcassets/main_mine_nor.imageset/main_mine_nor@3x.png similarity index 100% rename from application/App-UIKit/Assets.xcassets/main_mine_nor.imageset/main_mine_nor@3x.png rename to application/main/Resource/Assets/MainAssets.xcassets/main_mine_nor.imageset/main_mine_nor@3x.png diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_mine_privacy.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/main_mine_privacy.imageset/Contents.json new file mode 100644 index 00000000..4da3010a --- /dev/null +++ b/application/main/Resource/Assets/MainAssets.xcassets/main_mine_privacy.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "main_mine_privacy@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "main_mine_privacy@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_mine_privacy.imageset/main_mine_privacy@2x.png b/application/main/Resource/Assets/MainAssets.xcassets/main_mine_privacy.imageset/main_mine_privacy@2x.png new file mode 100644 index 00000000..6b3fd767 Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/main_mine_privacy.imageset/main_mine_privacy@2x.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_mine_privacy.imageset/main_mine_privacy@3x.png b/application/main/Resource/Assets/MainAssets.xcassets/main_mine_privacy.imageset/main_mine_privacy@3x.png new file mode 100644 index 00000000..c926c4af Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/main_mine_privacy.imageset/main_mine_privacy@3x.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_mine_sel.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/main_mine_sel.imageset/Contents.json new file mode 100644 index 00000000..d94bd49d --- /dev/null +++ b/application/main/Resource/Assets/MainAssets.xcassets/main_mine_sel.imageset/Contents.json @@ -0,0 +1,24 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "main_mine_sel.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + }, + "properties" : { + "template-rendering-intent" : "original" + } +} diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_mine_sel.imageset/main_mine_sel.png b/application/main/Resource/Assets/MainAssets.xcassets/main_mine_sel.imageset/main_mine_sel.png new file mode 100644 index 00000000..53fd53a2 Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/main_mine_sel.imageset/main_mine_sel.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_player_tabbar_sv.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/main_player_tabbar_sv.imageset/Contents.json new file mode 100644 index 00000000..0e91907d --- /dev/null +++ b/application/main/Resource/Assets/MainAssets.xcassets/main_player_tabbar_sv.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "main_player_tabbar_sv@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "main_player_tabbar_sv@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_player_tabbar_sv.imageset/main_player_tabbar_sv@2x.png b/application/main/Resource/Assets/MainAssets.xcassets/main_player_tabbar_sv.imageset/main_player_tabbar_sv@2x.png new file mode 100644 index 00000000..c69d7561 Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/main_player_tabbar_sv.imageset/main_player_tabbar_sv@2x.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_player_tabbar_sv.imageset/main_player_tabbar_sv@3x.png b/application/main/Resource/Assets/MainAssets.xcassets/main_player_tabbar_sv.imageset/main_player_tabbar_sv@3x.png new file mode 100644 index 00000000..e2801781 Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/main_player_tabbar_sv.imageset/main_player_tabbar_sv@3x.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_player_tabbar_sv_u.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/main_player_tabbar_sv_u.imageset/Contents.json new file mode 100644 index 00000000..253165a5 --- /dev/null +++ b/application/main/Resource/Assets/MainAssets.xcassets/main_player_tabbar_sv_u.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "main_player_tabbar_sv_u@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "main_player_tabbar_sv_u@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_player_tabbar_sv_u.imageset/main_player_tabbar_sv_u@2x.png b/application/main/Resource/Assets/MainAssets.xcassets/main_player_tabbar_sv_u.imageset/main_player_tabbar_sv_u@2x.png new file mode 100644 index 00000000..d8dda5f1 Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/main_player_tabbar_sv_u.imageset/main_player_tabbar_sv_u@2x.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_player_tabbar_sv_u.imageset/main_player_tabbar_sv_u@3x.png b/application/main/Resource/Assets/MainAssets.xcassets/main_player_tabbar_sv_u.imageset/main_player_tabbar_sv_u@3x.png new file mode 100644 index 00000000..8dec2450 Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/main_player_tabbar_sv_u.imageset/main_player_tabbar_sv_u@3x.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_simplified_chinese_logo.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/main_simplified_chinese_logo.imageset/Contents.json new file mode 100644 index 00000000..5e4ec7ac --- /dev/null +++ b/application/main/Resource/Assets/MainAssets.xcassets/main_simplified_chinese_logo.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "simplified_chinese_logo.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_simplified_chinese_logo.imageset/simplified_chinese_logo.png b/application/main/Resource/Assets/MainAssets.xcassets/main_simplified_chinese_logo.imageset/simplified_chinese_logo.png new file mode 100644 index 00000000..0d3a6461 Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/main_simplified_chinese_logo.imageset/simplified_chinese_logo.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_traditional_chinese_logo.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/main_traditional_chinese_logo.imageset/Contents.json new file mode 100644 index 00000000..26a51b2d --- /dev/null +++ b/application/main/Resource/Assets/MainAssets.xcassets/main_traditional_chinese_logo.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "traditional_chinese_logo.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/main/Resource/Assets/MainAssets.xcassets/main_traditional_chinese_logo.imageset/traditional_chinese_logo.png b/application/main/Resource/Assets/MainAssets.xcassets/main_traditional_chinese_logo.imageset/traditional_chinese_logo.png new file mode 100644 index 00000000..0d1f899c Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/main_traditional_chinese_logo.imageset/traditional_chinese_logo.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/mine_back.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/mine_back.imageset/Contents.json new file mode 100644 index 00000000..2ec45742 --- /dev/null +++ b/application/main/Resource/Assets/MainAssets.xcassets/mine_back.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images": [ + { + "filename": "mine_back.png", + "idiom": "universal", + "scale": "1x" + }, + { + "filename": "mine_back@2x.png", + "idiom": "universal", + "scale": "2x" + }, + { + "filename": "mine_back@3x.png", + "idiom": "universal", + "scale": "3x" + } + ], + "info": { + "author": "xcode", + "version": 1 + } +} diff --git a/application/main/Resource/Assets/MainAssets.xcassets/mine_back.imageset/mine_back.png b/application/main/Resource/Assets/MainAssets.xcassets/mine_back.imageset/mine_back.png new file mode 100644 index 00000000..c1b18270 Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/mine_back.imageset/mine_back.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/mine_back.imageset/mine_back@2x.png b/application/main/Resource/Assets/MainAssets.xcassets/mine_back.imageset/mine_back@2x.png new file mode 100644 index 00000000..e0d845d1 Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/mine_back.imageset/mine_back@2x.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/mine_back.imageset/mine_back@3x.png b/application/main/Resource/Assets/MainAssets.xcassets/mine_back.imageset/mine_back@3x.png new file mode 100644 index 00000000..ed992662 Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/mine_back.imageset/mine_back@3x.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/mine_bg_icon.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/mine_bg_icon.imageset/Contents.json new file mode 100644 index 00000000..a7129aef --- /dev/null +++ b/application/main/Resource/Assets/MainAssets.xcassets/mine_bg_icon.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "个人中心底图@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "个人中心底图@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/App-UIKit/Assets.xcassets/mine_bg_icon.imageset/mine_bg_icon@2x.png "b/application/main/Resource/Assets/MainAssets.xcassets/mine_bg_icon.imageset/\344\270\252\344\272\272\344\270\255\345\277\203\345\272\225\345\233\276@2x.png" similarity index 100% rename from application/App-UIKit/Assets.xcassets/mine_bg_icon.imageset/mine_bg_icon@2x.png rename to "application/main/Resource/Assets/MainAssets.xcassets/mine_bg_icon.imageset/\344\270\252\344\272\272\344\270\255\345\277\203\345\272\225\345\233\276@2x.png" diff --git a/application/App-UIKit/Assets.xcassets/mine_bg_icon.imageset/mine_bg_icon@3x.png "b/application/main/Resource/Assets/MainAssets.xcassets/mine_bg_icon.imageset/\344\270\252\344\272\272\344\270\255\345\277\203\345\272\225\345\233\276@3x.png" similarity index 100% rename from application/App-UIKit/Assets.xcassets/mine_bg_icon.imageset/mine_bg_icon@3x.png rename to "application/main/Resource/Assets/MainAssets.xcassets/mine_bg_icon.imageset/\344\270\252\344\272\272\344\270\255\345\277\203\345\272\225\345\233\276@3x.png" diff --git a/application/main/Resource/Assets/MainAssets.xcassets/mine_change_language.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/mine_change_language.imageset/Contents.json new file mode 100644 index 00000000..37507c03 --- /dev/null +++ b/application/main/Resource/Assets/MainAssets.xcassets/mine_change_language.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "语言icon@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "语言icon@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git "a/application/main/Resource/Assets/MainAssets.xcassets/mine_change_language.imageset/\350\257\255\350\250\200icon@2x.png" "b/application/main/Resource/Assets/MainAssets.xcassets/mine_change_language.imageset/\350\257\255\350\250\200icon@2x.png" new file mode 100644 index 00000000..68eb587a Binary files /dev/null and "b/application/main/Resource/Assets/MainAssets.xcassets/mine_change_language.imageset/\350\257\255\350\250\200icon@2x.png" differ diff --git "a/application/main/Resource/Assets/MainAssets.xcassets/mine_change_language.imageset/\350\257\255\350\250\200icon@3x.png" "b/application/main/Resource/Assets/MainAssets.xcassets/mine_change_language.imageset/\350\257\255\350\250\200icon@3x.png" new file mode 100644 index 00000000..c1f81151 Binary files /dev/null and "b/application/main/Resource/Assets/MainAssets.xcassets/mine_change_language.imageset/\350\257\255\350\250\200icon@3x.png" differ diff --git a/application/App-UIKit/Assets.xcassets/mine_goback.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/mine_goback.imageset/Contents.json similarity index 100% rename from application/App-UIKit/Assets.xcassets/mine_goback.imageset/Contents.json rename to application/main/Resource/Assets/MainAssets.xcassets/mine_goback.imageset/Contents.json diff --git a/application/App-UIKit/Assets.xcassets/mine_goback.imageset/back@2x.png b/application/main/Resource/Assets/MainAssets.xcassets/mine_goback.imageset/back@2x.png similarity index 100% rename from application/App-UIKit/Assets.xcassets/mine_goback.imageset/back@2x.png rename to application/main/Resource/Assets/MainAssets.xcassets/mine_goback.imageset/back@2x.png diff --git a/application/App-UIKit/Assets.xcassets/mine_goback.imageset/back@3x.png b/application/main/Resource/Assets/MainAssets.xcassets/mine_goback.imageset/back@3x.png similarity index 100% rename from application/App-UIKit/Assets.xcassets/mine_goback.imageset/back@3x.png rename to application/main/Resource/Assets/MainAssets.xcassets/mine_goback.imageset/back@3x.png diff --git a/application/main/Resource/Assets/MainAssets.xcassets/player_back_home.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/player_back_home.imageset/Contents.json new file mode 100644 index 00000000..e0aebf92 --- /dev/null +++ b/application/main/Resource/Assets/MainAssets.xcassets/player_back_home.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "player_back_home@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "player_back_home@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/main/Resource/Assets/MainAssets.xcassets/player_back_home.imageset/player_back_home@2x.png b/application/main/Resource/Assets/MainAssets.xcassets/player_back_home.imageset/player_back_home@2x.png new file mode 100644 index 00000000..9faa87a5 Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/player_back_home.imageset/player_back_home@2x.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/player_back_home.imageset/player_back_home@3x.png b/application/main/Resource/Assets/MainAssets.xcassets/player_back_home.imageset/player_back_home@3x.png new file mode 100644 index 00000000..d9c2d543 Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/player_back_home.imageset/player_back_home@3x.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/player_tab_sf_selected.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/player_tab_sf_selected.imageset/Contents.json new file mode 100644 index 00000000..9a111848 --- /dev/null +++ b/application/main/Resource/Assets/MainAssets.xcassets/player_tab_sf_selected.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "player_tab_sf_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "player_tab_sf_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/main/Resource/Assets/MainAssets.xcassets/player_tab_sf_selected.imageset/player_tab_sf_selected@2x.png b/application/main/Resource/Assets/MainAssets.xcassets/player_tab_sf_selected.imageset/player_tab_sf_selected@2x.png new file mode 100644 index 00000000..b1a46079 Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/player_tab_sf_selected.imageset/player_tab_sf_selected@2x.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/player_tab_sf_selected.imageset/player_tab_sf_selected@3x.png b/application/main/Resource/Assets/MainAssets.xcassets/player_tab_sf_selected.imageset/player_tab_sf_selected@3x.png new file mode 100644 index 00000000..31f4f81f Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/player_tab_sf_selected.imageset/player_tab_sf_selected@3x.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/player_tab_sf_unselect.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/player_tab_sf_unselect.imageset/Contents.json new file mode 100644 index 00000000..4da19a32 --- /dev/null +++ b/application/main/Resource/Assets/MainAssets.xcassets/player_tab_sf_unselect.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "player_tab_sf_unselect@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "player_tab_sf_unselect@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/main/Resource/Assets/MainAssets.xcassets/player_tab_sf_unselect.imageset/player_tab_sf_unselect@2x.png b/application/main/Resource/Assets/MainAssets.xcassets/player_tab_sf_unselect.imageset/player_tab_sf_unselect@2x.png new file mode 100644 index 00000000..9c02f8e0 Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/player_tab_sf_unselect.imageset/player_tab_sf_unselect@2x.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/player_tab_sf_unselect.imageset/player_tab_sf_unselect@3x.png b/application/main/Resource/Assets/MainAssets.xcassets/player_tab_sf_unselect.imageset/player_tab_sf_unselect@3x.png new file mode 100644 index 00000000..ef5bdd9c Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/player_tab_sf_unselect.imageset/player_tab_sf_unselect@3x.png differ diff --git a/application/main/Resource/Assets/MainAssets.xcassets/resign.imageset/Contents.json b/application/main/Resource/Assets/MainAssets.xcassets/resign.imageset/Contents.json new file mode 100644 index 00000000..198454d4 --- /dev/null +++ b/application/main/Resource/Assets/MainAssets.xcassets/resign.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "resign.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/main/Resource/Assets/MainAssets.xcassets/resign.imageset/resign.png b/application/main/Resource/Assets/MainAssets.xcassets/resign.imageset/resign.png new file mode 100644 index 00000000..dcbda04f Binary files /dev/null and b/application/main/Resource/Assets/MainAssets.xcassets/resign.imageset/resign.png differ diff --git a/application/main/Resource/Localized/MainLocalized.swift b/application/main/Resource/Localized/MainLocalized.swift new file mode 100644 index 00000000..8a432177 --- /dev/null +++ b/application/main/Resource/Localized/MainLocalized.swift @@ -0,0 +1,26 @@ +// +// MainLocalized.swift +// main +// + +import Foundation +import AtomicX + +private let MainLocalizeTableName = "MainLocalized" + +func MainLocalize(_ key: String, _ args: CVarArg...) -> String { + return BundleLoader.moduleLocalized( + key: key, + in: Bundle.main, + tableName: MainLocalizeTableName, + arguments: args + ) +} + +// MARK: - String Extension for MainLocalize + +extension String { + static func mainLocalized(_ key: String) -> String { + return MainLocalize(key) + } +} diff --git a/application/main/Resource/Localized/en.lproj/MainLocalized.strings b/application/main/Resource/Localized/en.lproj/MainLocalized.strings new file mode 100644 index 00000000..defa9cbd --- /dev/null +++ b/application/main/Resource/Localized/en.lproj/MainLocalized.strings @@ -0,0 +1,93 @@ +/* + MainLocalized.strings + main + + English localization for Main module + Migrated from iOS/App/RT-Cube/Main/resource/localized/en.lproj/MainLocalized.strings +*/ +"App.PortalViewController.sharelog" = "Share and Upload Logs"; +"App.PortalViewController.share" = "share"; +"App.PortalViewController.cancel" = "cancel"; + +"AppCommon.TCUtil.sendhttprequest" = "Unable to convert parameter value to JSON string due to sendHttpRequest failure"; +"AppCommon.TCUtil.parametererror" = "Parameter error"; +"AppCommon.TCUtil.serverrequesterror" = "Server request error"; + +"Demo.TRTC.Portal.Mine.personalcenter" = "Personal Center"; +"Demo.TRTC.Portal.Mine.about" = "About"; + +"Demo.TRTC.Portal.App.title" = "Tencent Cloud Media Services"; +"Demo.TRTC.Portal.confirm" = "Done"; +"Demo.TRTC.Portal.enterusername" = "Please enter a nickname"; +"Demo.TRTC.Portal.privacy" = "Privacy"; +"Demo.TRTC.Portal.disclaimer" = "Disclaimer"; +"Demo.TRTC.Portal.sdkversion" = "SDK Version"; +"Demo.TRTC.Portal.appversion" = "Application Version"; +"Demo.TRTC.Portal.limit20count" = "Chinese characters, letters, numbers and underscores, 2 - 20 words"; +"Demo.TRTC.Portal.changenickname" = "Change Your Nickname"; +"Demo.TRTC.Portal.disclaimerdesc" = "TRTC (this app) is a tryout app, whose copyright is owned by Tencent Cloud. This app is for tryout only and must not be used commercially.\nIn accordance with relevant regulations, this app forbids pornographic, abusive, terrorism, and politically sensitive content. All audio/video interactions are recorded and archived."; +"Demo.TRTC.Home.appusetoshowfunc" = "This app demonstrates the features of Tencent Video Cloud terminal products."; + +"Demo.TRTC.Portal.Main.call" = "Call"; +"Demo.TRTC.Portal.Main.callContent" = "Ringtone/Floating window/Less stutter"; +"Demo.TRTC.Portal.Main.tuiRoom" = "Conference"; +"Demo.TRTC.Portal.Main.tuiRoomContent" = "Quick meeting/Invite/Manage participants/Share screen"; +"Demo.TRTC.Portal.Main.live" = "Live"; +"Demo.TRTC.Portal.Main.liveContent" = "Live preview/Beauty filters/Multi-host"; +"Demo.TRTC.Portal.Main.uichat" = "Chat"; +"Demo.TRTC.Portal.Main.uichatContent" = "Group chat/Contacts/Audio chat/Data sync"; +"Demo.TRTC.Portal.Main.beautyEffects" = "Beauty AR"; +"Demo.TRTC.Portal.Main.beautyEffectsContent" = "Beautify/Makeup/Filters/Stickers"; +"Demo.TRTC.Portal.Main.video" = "Video Play"; +"Demo.TRTC.Portal.Main.videoContent" = "Adaptive bitrate/Change video quality & speed"; +"Demo.TRTC.Portal.Main.shortVideo" = "UGSV"; +"Demo.TRTC.Portal.Main.shortVideoContent" = "Photo & video editor/Split screen/Transition effects"; +"Demo.TRTC.Portal.Main.VoiceRoom" = "Voice Room"; +"Demo.TRTC.Portal.Main.VoiceRoomContent" = "High audio quality/Large room/Smooth mic on/off"; +"Demo.TRTC.Portal.Main.ktv" = "Karaoke"; +"Demo.TRTC.Portal.Main.ktvContent" = "Music library/Duet/Real-time scoring"; +"Demo.TRTC.Portal.Main.AI" = "Conversational AI"; +"Demo.TRTC.Portal.Main.AiDesc" = "Realtime Call · AI Noise Suppression · Smart Interruption"; +"Demo.TRTC.Portal.Main.HotComponent" = "Hot"; +"Demo.TRTC.Portal.Main.Interpretation" = "AI Translation"; +"Demo.TRTC.Portal.Main.InterpretationDesc" = "Simultaneous interpretation · Multi-languages"; +"Demo.TRTC.Portal.Main.IndustryScenarioPractice" = "Industry Scenario Practice"; +"Demo.TRTC.Portal.Main.Exploremore" = "Explore more"; +"Demo.TRTC.Portal.Main.UICompnent" = "UIKit"; +"Demo.TRTC.Portal.Main.trial" = "*The \"UI\" label indicates that the component comes with a ready-to-use UI kit."; +"Demo.TRTC.Portal.Main.Report" = "Attention: This is a DEMO APP. Do not trust anyone asking you to transfer money. Report scam"; +"Demo.TRTC.Portal.Main.MoudleBannedMessage" = "Your account is at risk and has been restricted."; +"Demo.TRTC.Portal.Main.FaceAuthFailedMessage" = "Verification failed. Please try again."; +"Demo.TRTC.Portal.Main.safetyReminderTitle" = "Safety Reminder"; +"Demo.TRTC.Portal.Main.safetyReminderFirstPara" = "Tencent Cloud Media Services App provides you with the demonstration and experience of Tencent Cloud Audio and Video and Communication Cloud Services. Please note:"; +"Demo.TRTC.Portal.Main.safetyReminderEndPara" = "Thank you for your understanding and support, wish you a pleasant use!"; +"Demo.TRTC.Portal.Main.safetyReminderMidPara" = "1. This App is for demonstration and experience purposes only, and should not be used for daily communication or business transactions.\n2. Please do not disclose your personal information, account password, or other sensitive information to strangers to protect your privacy and security.\n3. Be vigilant about remittance, winning a prize, and other money-related information to avoid being deceived.\n4. If you encounter any suspicious situations, please report to us promptly, and we will verify and handle it as soon as possible."; +"Demo.TRTC.Portal.Main.safetyReminderConfirm" = "GOT IT"; + +"Demo.TRTC.Language.switchLanguage" = "Switch Language"; + +"Demo.TRTC.LiveRoom.videoLive" = "Video Live"; +"Demo.TRTC.LiveRoom.createroom" = "Go Live"; + +"Demo.TRTC.VoiceRoom.voicechatroom" = "Voice Room"; +"Demo.TRTC.VoiceRoom.createroom" = "Create Room"; + +"Demo.TRTC.Home.prompt" = "Notice"; +"Demo.TRTC.Home.newversionpublic" = "A new version is available!"; +"Demo.TRTC.Home.updatenow" = "Update Now"; +"Demo.TRTC.Home.later" = "Later"; + +// Overseas homepage +"Demo.TRTC.Portal.Main.Products" = "Products"; +"Demo.TRTC.Portal.Main.DiscoveryLab" = "Discovery Lab"; +"Demo.TRTC.Portal.Main.UIkit" = "UIKit"; +"Demo.TRTC.Portal.Main.BeautyAR" = "Beauty AR"; +"Demo.TRTC.Portal.Main.BeautyARDesc" = "Beauty Enhancement · Makeup · Filter · Sticker"; +"Demo.TRTC.Portal.Main.ScenarioExperience" = "Scenario Experience"; +"Demo.TRTC.Portal.Main.ScenarioExperienceDesc" = "Claw Machine · 1v1 Social · Online Education · Financial Service"; +"Demo.TRTC.Portal.Home.videoCallDesc" = "Call Notification · Floating Window · Stutter Optimization"; +"Demo.TRTC.Portal.Home.tuiRoomDesc" = "Fast Meeting · In-meeting Control · Screen Sharing"; +"Demo.TRTC.Portal.Main.call.tuiRoom" = "Conference"; +"Demo.TRTC.Portal.Main.contactUsxxx" = "Products below are under exploration. If you have needs, please xxx"; +"Demo.TRTC.Portal.Main.contactUs" = "contact us >"; +"Demo.TRTC.Portal.Main.LoginFailed" = "Connection failed. Please check your internet connection and restart the app again."; diff --git a/application/main/Resource/Localized/zh-Hans.lproj/MainLocalized.strings b/application/main/Resource/Localized/zh-Hans.lproj/MainLocalized.strings new file mode 100644 index 00000000..da310ef9 --- /dev/null +++ b/application/main/Resource/Localized/zh-Hans.lproj/MainLocalized.strings @@ -0,0 +1,92 @@ +/* + MainLocalized.strings + main + + 简体中文本地化 + 从 iOS/App/RT-Cube/Main/resource/localized/zh-Hans.lproj/MainLocalized.strings 迁移 +*/ +"App.PortalViewController.sharelog" = "分享上传日志"; +"App.PortalViewController.share" = "分享"; +"App.PortalViewController.cancel" = "取消"; +"AppCommon.TCUtil.sendhttprequest" = "sendHttpRequest failed,参数转成json格式失败"; +"AppCommon.TCUtil.parametererror" = "参数错误"; +"AppCommon.TCUtil.serverrequesterror" = "服务请求失败"; + +"Demo.TRTC.Portal.Mine.personalcenter" = "个人中心"; +"Demo.TRTC.Portal.Mine.about" = "关于"; + +"Demo.TRTC.Portal.App.title" = "腾讯云音视频"; +"Demo.TRTC.Portal.confirm" = "确认"; +"Demo.TRTC.Portal.enterusername" = "请输入用户昵称"; +"Demo.TRTC.Portal.privacy" = "隐私保护指引"; +"Demo.TRTC.Portal.disclaimer" = "免责声明"; +"Demo.TRTC.Portal.sdkversion" = "SDK 版本"; +"Demo.TRTC.Portal.appversion" = "商店版本"; +"Demo.TRTC.Portal.limit20count" = "仅限中文、字母、数字和下划线,2-20个字"; +"Demo.TRTC.Portal.changenickname" = "修改用户昵称"; +"Demo.TRTC.Portal.disclaimerdesc" = "腾讯云音视频 TRTC(\"本产品\")是由腾讯云提供的一款测试产品,腾讯云享有本产品的著作权和所有权。本产品仅用于功能体验,不得用于任何商业用途。\n为配合相关部门监管要求,本产品音视频互动全程均有录音录像存档,严禁在使用中有任何色情、辱骂、暴恐、涉政等违规内容的传播。"; +"Demo.TRTC.Home.appusetoshowfunc" = "本APP用于展示腾讯视频云终端产品的各类功能"; + +"Demo.TRTC.Portal.Main.call" = "通话"; +"Demo.TRTC.Portal.Main.callContent" = "响铃通知·通话悬浮窗·通话卡顿优化"; +"Demo.TRTC.Portal.Main.tuiRoom" = "会议"; +"Demo.TRTC.Portal.Main.tuiRoomContent" = "快速会议·邀请入会·会中管控·共享屏幕"; +"Demo.TRTC.Portal.Main.live" = "直播"; +"Demo.TRTC.Portal.Main.liveContent" = "开播预览·智能美颜·连麦PK"; +"Demo.TRTC.Portal.Main.uichat" = "聊天"; +"Demo.TRTC.Portal.Main.uichatContent" = "群组聊天·好友通讯录·语音消息·资料多端同步"; +"Demo.TRTC.Portal.Main.beautyEffects" = "美颜特效"; +"Demo.TRTC.Portal.Main.beautyEffectsContent" = "美颜·美妆·滤镜·贴纸"; +"Demo.TRTC.Portal.Main.video" = "视频播放"; +"Demo.TRTC.Portal.Main.videoContent" = "自适应拉流·视频切换·倍速播放"; +"Demo.TRTC.Portal.Main.shortVideo" = "短视频制作"; +"Demo.TRTC.Portal.Main.shortVideoContent" = "图片视频编辑·多屏合拍·图片转场"; +"Demo.TRTC.Portal.Main.VoiceRoom" = "语聊房"; +"Demo.TRTC.Portal.Main.VoiceRoomContent" = "高音质·大房间·平滑上下麦"; +"Demo.TRTC.Portal.Main.ktv" = "在线K歌"; +"Demo.TRTC.Portal.Main.ktvContent" = "曲库点唱·实时合唱·互动抢唱·实时评分"; +"Demo.TRTC.Portal.Main.AI" = "AI 对话"; +"Demo.TRTC.Portal.Main.AiDesc" = "实时语音对话·AI 降噪·智能打断"; +"Demo.TRTC.Portal.Main.HotComponent" = "热门"; +"Demo.TRTC.Portal.Main.Interpretation" = "AI 同声传译"; +"Demo.TRTC.Portal.Main.InterpretationDesc" = "超低延迟·精准翻译·多语言覆盖"; +"Demo.TRTC.Portal.Main.IndustryScenarioPractice" = "行业应用场景"; +"Demo.TRTC.Portal.Main.Exploremore" = "探索更多"; +"Demo.TRTC.Portal.Main.UICompnent" = "UI组件"; +"Demo.TRTC.Portal.Main.trial" = "* UI组件指该产品提供含UI快速集成方案,30分钟上线同款能力"; +"Demo.TRTC.Portal.Main.Report" = "仅用于业务功能体验,请勿轻信汇款、中奖等涉及钱款的信息,谨防上当受骗,立即举报"; +"Demo.TRTC.Portal.Main.MoudleBannedMessage" = "您的账户存在风险,已被限制使用"; +"Demo.TRTC.Portal.Main.FaceAuthFailedMessage" = "核验失败,请重试"; +"Demo.TRTC.Portal.Main.safetyReminderTitle" = "安全提示"; +"Demo.TRTC.Portal.Main.safetyReminderFirstPara" = "腾讯云音视频 App 为您提供腾讯云音视频及通信云服务的演示与体验。请注意:"; +"Demo.TRTC.Portal.Main.safetyReminderEndPara" = "感谢您的理解与支持,祝您使用愉快!"; +"Demo.TRTC.Portal.Main.safetyReminderMidPara" = "1. 本App用途仅适用于演示和体验,请勿用于日常沟通或商业交易。\n2. 请勿向陌生人透露您的个人信息、账号密码等敏感信息,以保护您的隐私安全。\n3. 请务必警惕汇款、中奖等涉及钱款的信息,避免上当受骗。\n4. 如遇到可疑情况,请及时向我们反馈,我们将尽快为您核实处理。"; +"Demo.TRTC.Portal.Main.safetyReminderConfirm" = "我知道了"; + +"Demo.TRTC.Language.switchLanguage" = "切换语言"; + +"Demo.TRTC.LiveRoom.videoLive" = "在线直播"; +"Demo.TRTC.LiveRoom.createroom" = "开直播"; + +"Demo.TRTC.VoiceRoom.voicechatroom" = "语聊房"; +"Demo.TRTC.VoiceRoom.createroom" = "创建房间"; + +"Demo.TRTC.Home.prompt" = "提示"; +"Demo.TRTC.Home.newversionpublic" = "有新版本发布啦~"; +"Demo.TRTC.Home.updatenow" = "现在更新"; +"Demo.TRTC.Home.later" = "稍后再说"; + +// 海外版首页 +"Demo.TRTC.Portal.Main.Products" = "产品"; +"Demo.TRTC.Portal.Main.DiscoveryLab" = "发现实验室"; +"Demo.TRTC.Portal.Main.UIkit" = "UIKit"; +"Demo.TRTC.Portal.Main.BeautyAR" = "美颜特效"; +"Demo.TRTC.Portal.Main.BeautyARDesc" = "美颜·美妆·滤镜·贴纸"; +"Demo.TRTC.Portal.Main.ScenarioExperience" = "场景体验"; +"Demo.TRTC.Portal.Main.ScenarioExperienceDesc" = "抓娃娃机·1v1社交·在线教育·金融服务"; +"Demo.TRTC.Portal.Home.videoCallDesc" = "响铃通知·通话悬浮窗·通话卡顿优化"; +"Demo.TRTC.Portal.Home.tuiRoomDesc" = "快速会议·会中管控·共享屏幕"; +"Demo.TRTC.Portal.Main.call.tuiRoom" = "会议"; +"Demo.TRTC.Portal.Main.contactUsxxx" = "以下产品尚在探索中,如有需要请xxx"; +"Demo.TRTC.Portal.Main.contactUs" = "联系我们 >"; +"Demo.TRTC.Portal.Main.LoginFailed" = "连接失败,请检查网络连接后重新启动应用。"; diff --git a/application/main/Shared/Model/ResolvedModule.swift b/application/main/Shared/Model/ResolvedModule.swift new file mode 100644 index 00000000..0c36dd71 --- /dev/null +++ b/application/main/Shared/Model/ResolvedModule.swift @@ -0,0 +1,17 @@ +// +// ResolvedModule.swift +// main +// + +import Foundation +import AppAssembly + +struct ResolvedModule { + let config: ModuleConfig + + var badgeCount: UInt64 = 0 + + var isVisible: Bool = true + + weak var provider: ModuleProvider? +} diff --git a/application/main/Shared/ModuleRegistry.swift b/application/main/Shared/ModuleRegistry.swift new file mode 100644 index 00000000..0cd83ae7 --- /dev/null +++ b/application/main/Shared/ModuleRegistry.swift @@ -0,0 +1,32 @@ +// +// ModuleRegistry.swift +// main +// + +import Foundation +import AppAssembly + +final class ModuleRegistry { + static let shared = ModuleRegistry() + private init() {} + + private(set) var providers: [ModuleProvider] = [] + + func register(_ provider: ModuleProvider) { + guard !providers.contains(where: { $0.config.identifier == provider.config.identifier }) else { + AppLogger.App.warn(" 重复注册被忽略: \(provider.config.identifier)") + return + } + providers.append(provider) + } + + func resolvedModules() -> [ResolvedModule] { + return providers.map { provider in + ResolvedModule(config: provider.config, provider: provider) + } + } + + func reset() { + providers.removeAll() + } +} diff --git a/application/main/Shared/Views/MainNavigationView.swift b/application/main/Shared/Views/MainNavigationView.swift new file mode 100644 index 00000000..58ad0533 --- /dev/null +++ b/application/main/Shared/Views/MainNavigationView.swift @@ -0,0 +1,148 @@ +// +// MainNavigationView.swift +// main +// + +import UIKit +import Combine +import Kingfisher +import TUICore +import SnapKit +import Login +import AtomicX + +// MARK: - Delegate + +protocol MainNavigationViewDelegate: NSObjectProtocol { + func jumpProfileController() + + func showLogUploadView(pressGesture: UILongPressGestureRecognizer) + + func dismissLogUploadView(tapGesture: UITapGestureRecognizer) +} + +// MARK: - View + +class MainNavigationView: UIView { + + weak var delegate: MainNavigationViewDelegate? + + private var cancellables = Set() + + // MARK: - UI Elements + + private lazy var iconView: UIImageView = { + let imageView = UIImageView(frame: .zero) + imageView.isUserInteractionEnabled = true + imageView.image = UIImage(named: Self.mainLogoImageName()) + imageView.contentMode = .scaleAspectFill + return imageView + }() + + private lazy var mineCenterBtn: UIButton = { + let button = UIButton(type: .custom) + button.layer.cornerRadius = ThemeStore.shared.borderRadius.radius16 + button.clipsToBounds = true + return button + }() + + // MARK: - Lifecycle + + private var isViewReady = false + + override func didMoveToWindow() { + super.didMoveToWindow() + guard !isViewReady else { return } + isViewReady = true + + backgroundColor = ThemeStore.shared.colorTokens.bgColorDefault + constructViewHierarchy() + activateConstraints() + bindInteraction() + } + + // MARK: - Setup + + private func constructViewHierarchy() { + addSubview(iconView) + addSubview(mineCenterBtn) + } + + private func activateConstraints() { + iconView.snp.makeConstraints { make in + make.left.centerY.equalToSuperview() + make.width.equalTo(142) + make.height.equalTo(32) + } + + mineCenterBtn.snp.makeConstraints { make in + make.right.centerY.equalToSuperview() + make.width.height.equalTo(32) + } + } + + private func bindInteraction() { + mineCenterBtn.addTarget(self, action: #selector(goMine(sender:)), for: .touchUpInside) + + let tapGesture = UITapGestureRecognizer(target: self, action: #selector(handleTap(tapGesture:))) + iconView.addGestureRecognizer(tapGesture) + + let pressGesture = UILongPressGestureRecognizer(target: self, action: #selector(handleLongPress(pressGesture:))) + pressGesture.minimumPressDuration = 2.0 + pressGesture.numberOfTouchesRequired = 1 + iconView.addGestureRecognizer(pressGesture) + + tapGesture.require(toFail: pressGesture) + + LoginEntry.shared.$userModel + .receive(on: DispatchQueue.main) + .sink { [weak self] userModel in + self?.updateAvatarImage(urlString: userModel?.avatar) + } + .store(in: &cancellables) + } + + // MARK: - Public + + func updateAvatarImage(urlString: String?) { + guard let urlString = urlString, let url = URL(string: urlString) else { + self.mineCenterBtn.setBackgroundImage(UIImage(named: "default_avatar"), for: .normal) + return + } + self.mineCenterBtn.kf.setBackgroundImage( + with: url, + for: .normal, + placeholder: UIImage(named: "default_avatar") + ) + } + + // MARK: - Actions + + @objc private func handleTap(tapGesture: UITapGestureRecognizer) { + delegate?.dismissLogUploadView(tapGesture: tapGesture) + } + + @objc private func handleLongPress(pressGesture: UILongPressGestureRecognizer) { + delegate?.showLogUploadView(pressGesture: pressGesture) + } + + @objc private func goMine(sender: UIButton) { + delegate?.jumpProfileController() + } + + // MARK: - Logo + + private static func mainLogoImageName() -> String { + guard let language = TUIGlobalization.tk_localizableLanguageKey() else { + return "main_english_logo" + } + + if language.contains("zh-Hans") { + return "main_simplified_chinese_logo" + } else if language.contains("zh-Hant") { + return "main_traditional_chinese_logo" + } else { + return "main_english_logo" + } + } +} diff --git a/application/mine/MineEntry.swift b/application/mine/MineEntry.swift new file mode 100644 index 00000000..ce700982 --- /dev/null +++ b/application/mine/MineEntry.swift @@ -0,0 +1,31 @@ +// +// MineEntry.swift +// mine +// +// let mineVC = MineEntry.shared.buildMineViewController( +// onLogout: { ... }, +// onLanguageChanged: { ... }, +// onExperienceRoomClicked: { ... } +// ) +// navigationController?.pushViewController(mineVC, animated: true) +// + +import UIKit +import Login + +public final class MineEntry { + public static let shared = MineEntry() + private init() {} + + public func buildMineViewController( + onLogout: @escaping () -> Void, + onLanguageChanged: ((String) -> Void)? = nil, + onExperienceRoomClicked: (() -> Void)? = nil + ) -> UIViewController { + let vc = MineViewController() + vc.onLogout = onLogout + vc.onLanguageChanged = onLanguageChanged + vc.onExperienceRoomClicked = onExperienceRoomClicked + return vc + } +} diff --git a/application/mine/Model/MineViewModel.swift b/application/mine/Model/MineViewModel.swift new file mode 100644 index 00000000..fa75ec56 --- /dev/null +++ b/application/mine/Model/MineViewModel.swift @@ -0,0 +1,65 @@ +// +// MineViewModel.swift +// mine +// + +import Foundation +import UIKit +import TUICore + +enum MineListType { + case privacy + case disclaimer + case icp + case about +} + +class MineViewModel: NSObject { + + private lazy var isRTCApp: Bool = { + #if RTCUBE_OVERSEAS + return true + #else + return false + #endif + }() + + lazy var tableDataSource: [MineTableViewCellModel] = { + var res: [MineTableViewCellModel] = [] + tableTypeSource.forEach { type in + switch type { + case .privacy: + let model = MineTableViewCellModel(title: MineLocalize("Demo.TRTC.Portal.privacy"), + image: UIImage(named: "main_mine_privacy"), type: type) + res.append(model) + case .disclaimer: + let model = MineTableViewCellModel(title: MineLocalize("Demo.TRTC.Portal.disclaimer"), + image: UIImage(named: "main_mine_disclaimer"), type: type) + if !isRTCApp { + res.append(model) + } + case .icp: + let model = MineTableViewCellModel(title: MineLocalize("Demo.TRTC.Portal.Mine.ICPNumber"), + image: UIImage(named: "main_mine_icp"), type: type) + if !isRTCApp { + res.append(model) + } + case .about: + let model = MineTableViewCellModel(title: MineLocalize("Demo.TRTC.Portal.Mine.about"), + image: UIImage(named: "main_mine_about"), type: type) + res.append(model) + } + } + return res + }() + + lazy var tableTypeSource: [MineListType] = { + return [.privacy, .disclaimer, .icp, .about] + }() + + func validate(userName: String) -> Bool { + let reg = "^[a-z0-9A-Z\\u4e00-\\u9fa5\\_]{2,20}$" + let predicate = NSPredicate(format: "SELF MATCHES %@", reg) + return predicate.evaluate(with: userName) + } +} diff --git a/application/mine/Model/ProfileInfoModel.swift b/application/mine/Model/ProfileInfoModel.swift new file mode 100644 index 00000000..cc2f270c --- /dev/null +++ b/application/mine/Model/ProfileInfoModel.swift @@ -0,0 +1,26 @@ +// +// ProfileInfoModel.swift +// mine +// + +import UIKit + +class ProfileInfoModel: NSObject { + var title: String? + var detail: String? + var imageName: String? + var selectHandler: (() -> Void)? + var cellHeight: CGFloat + + init(title: String? = nil, + detail: String? = nil, + imageName: String? = nil, + cellHeight: CGFloat, + selectHandler: (() -> Void)? = nil) { + self.title = title + self.detail = detail + self.imageName = imageName + self.selectHandler = selectHandler + self.cellHeight = cellHeight + } +} diff --git a/application/mine/Resource/Localized/MineLocalized.swift b/application/mine/Resource/Localized/MineLocalized.swift new file mode 100644 index 00000000..d9dc6bf7 --- /dev/null +++ b/application/mine/Resource/Localized/MineLocalized.swift @@ -0,0 +1,18 @@ +// +// MineLocalized.swift +// mine +// + +import Foundation +import AtomicX + +private let MineLocalizeTableName = "MineLocalized" + +func MineLocalize(_ key: String, _ args: CVarArg...) -> String { + return BundleLoader.moduleLocalized( + key: key, + in: Bundle.main, + tableName: MineLocalizeTableName, + arguments: args + ) +} diff --git a/application/mine/Resource/Localized/en.lproj/MineLocalized.strings b/application/mine/Resource/Localized/en.lproj/MineLocalized.strings new file mode 100644 index 00000000..c920ef7f --- /dev/null +++ b/application/mine/Resource/Localized/en.lproj/MineLocalized.strings @@ -0,0 +1,51 @@ +/* + MineLocalized.strings + mine + + 个人中心模块 — English +*/ + +"Demo.TRTC.Portal.Mine.about" = "About"; +"Demo.TRTC.Portal.sdkversion" = "SDK Version"; +"Demo.TRTC.Portal.appversion" = "Application Version"; +"Demo.TRTC.Portal.privacy" = "Privacy"; +"Demo.TRTC.Portal.disclaimer" = "Disclaimer"; +"Demo.TRTC.Portal.changenickname" = "Change Your Nickname"; +"Demo.TRTC.Portal.confirm" = "Done"; +"Demo.TRTC.Portal.enterusername" = "Please enter a nickname"; +"Demo.TRTC.Portal.limit20count" = "Chinese characters, letters, numbers and underscores, 2 - 20 words"; +"Demo.TRTC.Portal.Mine.personalcenter" = "Personal Center"; +"Demo.TRTC.Portal.disclaimerdesc" = "TRTC is a product provided by Tencent Cloud Computing (Beijing) Co., Ltd., This app is for tryout only and must not be used commercially.\nIn accordance with relevant regulations, this app forbids pornographic, abusive, terrorism, and politically sensitive content. All audio/video interactions are recorded and archived."; + +"Demo.TRTC.Portal.resignaccount" = "Delete Account"; +"Demo.TRTC.Portal.resignsuccess" = "Account deleted"; +"Demo.TRTC.Portal.resigntips" = "You can no longer use this account after deletion. Its data will also be deleted and cannot be retrieved."; +"Demo.TRTC.Portal.currentaccount" = "Account: xxx"; +"Demo.TRTC.Portal.confirmresign" = "Delete"; +"Demo.TRTC.Portal.alerttoresign" = "Are you sure you want to delete this account?"; +"App.PortalViewController.cancel" = "Cancel"; + +"Demo.TRTC.Portal.agreement" = "Terms of Use"; + +"Demo.TRTC.Portal.Mine.logout" = "Log out"; +"Demo.TRTC.Portal.Mine.areYouSureLogOut" = "Are you sure you want to log out?"; +"Demo.TRTC.Portal.Mine.cancel" = "Cancel"; +"Demo.TRTC.Portal.Mine.determine" = "Yes"; +"Demo.TRTC.Portal.Mine.profilePhoto" = "Profile photo"; +"Demo.TRTC.Portal.Mine.profileName" = "Name"; +"Demo.TRTC.Portal.Mine.profileAccount" = "Account"; +"Demo.TRTC.Portal.Mine.profileSignature" = "status"; +"Demo.TRTC.Portal.Mine.profileGender" = "gender"; +"Demo.TRTC.Portal.Mine.profileRandom" = "Random"; +"Demo.TRTC.Portal.Mine.profileOK" = "OK"; +"Demo.TRTC.Portal.Mine.profileUpdateSucc" = "update sucess"; +"Demo.TRTC.Portal.Mine.profileUpdateFailed" = "update failed"; +"Demo.TRTC.Portal.Mine.profileBirth" = "Birthday"; +"Demo.TRTC.Portal.Mine.profileEditAliasDesc" = "Only letters, digits, underscores, and Chinese characters."; +"Demo.TRTC.Portal.Mine.profileEditGender" = "Gender"; +"Demo.TRTC.Portal.Mine.profileFemaleGender" = "Female"; +"Demo.TRTC.Portal.Mine.profileMaleGender" = "Male"; +"Demo.TRTC.Portal.Mine.profileDetail" = "Details"; +"Demo.TRTC.Portal.Mine.ICPNumber" = "ICP Number"; +"Demo.TRTC.Portal.Mine.quickOnlineDebug" = "Quick Online Debug"; +"Demo.TRTC.Portal.Mine.ICPDetailNumber" = "粤B2-20090059-1801A"; diff --git a/application/mine/Resource/Localized/zh-Hans.lproj/MineLocalized.strings b/application/mine/Resource/Localized/zh-Hans.lproj/MineLocalized.strings new file mode 100644 index 00000000..34211776 --- /dev/null +++ b/application/mine/Resource/Localized/zh-Hans.lproj/MineLocalized.strings @@ -0,0 +1,51 @@ +/* + MineLocalized.strings + mine + + 个人中心模块 — 简体中文 +*/ + +"Demo.TRTC.Portal.Mine.about" = "关于"; +"Demo.TRTC.Portal.sdkversion" = "SDK 版本"; +"Demo.TRTC.Portal.appversion" = "商店版本"; +"Demo.TRTC.Portal.privacy" = "隐私"; +"Demo.TRTC.Portal.disclaimer" = "免责声明"; +"Demo.TRTC.Portal.changenickname" = "修改用户昵称"; +"Demo.TRTC.Portal.confirm" = "确认"; +"Demo.TRTC.Portal.enterusername" = "请输入用户昵称"; +"Demo.TRTC.Portal.limit20count" = "仅限中文、字母、数字和下划线,2-20个字"; +"Demo.TRTC.Portal.Mine.personalcenter" = "个人中心"; +"Demo.TRTC.Portal.disclaimerdesc" = "腾讯云音视频是一款由深圳市腾讯计算机系统有限公司(以下简称为\"本产品\")提供的产品,腾讯云享有本产品的著作权和所有权。本产品仅用于功能体验,不得用于任何商业用途。\n为配合相关部门监管要求,本产品音视频互动全程均有录音录像存档,严禁在使用中有任何色情、辱骂、暴恐、涉政等违规内容的传播。"; + +"Demo.TRTC.Portal.resignaccount" = "注销账户"; +"Demo.TRTC.Portal.resignsuccess" = "注销成功"; +"Demo.TRTC.Portal.resigntips" = "注销后,您将无法使用当前账号,相关数据也将删除无法找回"; +"Demo.TRTC.Portal.currentaccount" = "当前账号: xxx"; +"Demo.TRTC.Portal.confirmresign" = "确认注销"; +"Demo.TRTC.Portal.alerttoresign" = "确定要注销账户吗?"; +"App.PortalViewController.cancel" = "取消"; + +"Demo.TRTC.Portal.agreement" = "用户协议"; + +"Demo.TRTC.Portal.Mine.logout" = "退出登录"; +"Demo.TRTC.Portal.Mine.areYouSureLogOut" = "确定要退出登录吗?"; +"Demo.TRTC.Portal.Mine.cancel" = "取消"; +"Demo.TRTC.Portal.Mine.determine" = "确定"; +"Demo.TRTC.Portal.Mine.profilePhoto" = "头像"; +"Demo.TRTC.Portal.Mine.profileName" = "昵称"; +"Demo.TRTC.Portal.Mine.profileAccount" = "账号"; +"Demo.TRTC.Portal.Mine.profileSignature" = "个性签名"; +"Demo.TRTC.Portal.Mine.profileGender" = "性别"; +"Demo.TRTC.Portal.Mine.profileRandom" = "随机"; +"Demo.TRTC.Portal.Mine.profileOK" = "确认"; +"Demo.TRTC.Portal.Mine.profileUpdateSucc" = "更改成功"; +"Demo.TRTC.Portal.Mine.profileUpdateFailed" = "更改失败"; +"Demo.TRTC.Portal.Mine.profileBirth" = "出生日期"; +"Demo.TRTC.Portal.Mine.profileEditAliasDesc" = "仅限中文、字母、数字和下划线"; +"Demo.TRTC.Portal.Mine.profileEditGender" = "修改性别"; +"Demo.TRTC.Portal.Mine.profileFemaleGender" = "女"; +"Demo.TRTC.Portal.Mine.profileMaleGender" = "男"; +"Demo.TRTC.Portal.Mine.profileDetail" = "详细资料"; +"Demo.TRTC.Portal.Mine.ICPNumber" = "ICP 备案号"; +"Demo.TRTC.Portal.Mine.quickOnlineDebug" = "快速在线调试"; +"Demo.TRTC.Portal.Mine.ICPDetailNumber" = "粤B2-20090059-1801A"; diff --git a/application/mine/Views/AvatarPickerViewController.swift b/application/mine/Views/AvatarPickerViewController.swift new file mode 100644 index 00000000..bc5e23c5 --- /dev/null +++ b/application/mine/Views/AvatarPickerViewController.swift @@ -0,0 +1,251 @@ +// +// AvatarPickerViewController.swift +// mine +// +// https://im.sdk.qcloud.com/download/tuikit-resource/avatar/avatar_N.png, N ∈ [1, 26]。 +// + +import UIKit +import SnapKit +import Kingfisher +import AtomicX + +enum AvatarPickerURLs { + static let count = 26 + + static func url(at index: Int) -> String { + return "https://im.sdk.qcloud.com/download/tuikit-resource/avatar/avatar_\(index).png" + } + + static var all: [String] { + return (1...count).map { url(at: $0) } + } +} + +/// +/// ```swift +/// let vc = AvatarPickerViewController() +/// vc.currentAvatarURL = profile?.faceURL +/// vc.onConfirm = { [weak self] url in ... } +/// navigationController?.pushViewController(vc, animated: true) +/// ``` +final class AvatarPickerViewController: UIViewController { + + // MARK: - Public + + var currentAvatarURL: String? + + var onConfirm: ((String) -> Void)? + + // MARK: - Private State + + private let avatarURLs: [String] = AvatarPickerURLs.all + + private var initialMatchedIndex: Int? + + private var selectedIndex: Int? + + // MARK: - Layout Constants + + private let columnCount: Int = 4 + private let sectionInset: CGFloat = 16 + private let itemSpacing: CGFloat = 12 + + // MARK: - UI + + private lazy var flowLayout: UICollectionViewFlowLayout = { + let layout = UICollectionViewFlowLayout() + layout.minimumLineSpacing = itemSpacing + layout.minimumInteritemSpacing = itemSpacing + layout.sectionInset = UIEdgeInsets( + top: sectionInset, + left: sectionInset, + bottom: sectionInset, + right: sectionInset + ) + return layout + }() + + private lazy var collectionView: UICollectionView = { + let cv = UICollectionView(frame: .zero, collectionViewLayout: flowLayout) + cv.backgroundColor = ThemeStore.shared.colorTokens.bgColorDefault + cv.alwaysBounceVertical = true + cv.dataSource = self + cv.delegate = self + cv.register(AvatarPickerCell.self, forCellWithReuseIdentifier: AvatarPickerCell.reuseID) + return cv + }() + + private lazy var confirmButton: AtomicButton = { + let button = AtomicButton( + variant: .text, + colorType: .primary, + size: .xsmall, + content: .textOnly(text: MineLocalize("Demo.TRTC.Portal.Mine.profileOK")) + ) + button.setClickAction { [weak self] _ in + self?.onConfirmTapped() + } + return button + }() + + // MARK: - Lifecycle + + override func viewDidLoad() { + super.viewDidLoad() + setupUI() + syncSelectedIndex() + updateConfirmButtonEnabled() + } + + override func viewWillLayoutSubviews() { + super.viewWillLayoutSubviews() + updateItemSize() + } + + // MARK: - Setup + + private func setupUI() { + title = MineLocalize("Demo.TRTC.Portal.Mine.profilePhoto") + view.backgroundColor = ThemeStore.shared.colorTokens.bgColorDefault + navigationItem.rightBarButtonItem = UIBarButtonItem(customView: confirmButton) + + view.addSubview(collectionView) + collectionView.snp.makeConstraints { make in + make.edges.equalTo(view.safeAreaLayoutGuide) + } + } + + private func updateConfirmButtonEnabled() { + confirmButton.isEnabled = (selectedIndex != nil) + } + + private func syncSelectedIndex() { + guard let current = currentAvatarURL, !current.isEmpty else { return } + if let idx = avatarURLs.firstIndex(of: current) { + initialMatchedIndex = idx + } + } + + private func updateItemSize() { + let totalWidth = collectionView.bounds.width + guard totalWidth > 0 else { return } + let available = totalWidth - sectionInset * 2 - itemSpacing * CGFloat(columnCount - 1) + let side = floor(available / CGFloat(columnCount)) + guard side > 0, flowLayout.itemSize.width != side else { return } + flowLayout.itemSize = CGSize(width: side, height: side) + flowLayout.invalidateLayout() + } + + // MARK: - Actions + + @objc private func onConfirmTapped() { + guard let idx = selectedIndex else { return } + onConfirm?(avatarURLs[idx]) + navigationController?.popViewController(animated: true) + } +} + +// MARK: - UICollectionViewDataSource / Delegate + +extension AvatarPickerViewController: UICollectionViewDataSource, UICollectionViewDelegate { + + func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { + return avatarURLs.count + } + + func collectionView(_ collectionView: UICollectionView, + cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { + let cell = collectionView.dequeueReusableCell( + withReuseIdentifier: AvatarPickerCell.reuseID, + for: indexPath + ) as! AvatarPickerCell + let url = avatarURLs[indexPath.item] + let highlightIndex = selectedIndex ?? initialMatchedIndex + cell.configure(url: url, selected: indexPath.item == highlightIndex) + return cell + } + + func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { + let previousHighlight = selectedIndex ?? initialMatchedIndex + selectedIndex = indexPath.item + var reloadPaths: [IndexPath] = [indexPath] + if let prev = previousHighlight, prev != indexPath.item { + reloadPaths.append(IndexPath(item: prev, section: 0)) + } + collectionView.reloadItems(at: reloadPaths) + updateConfirmButtonEnabled() + } +} + +// MARK: - Cell + +private final class AvatarPickerCell: UICollectionViewCell { + + static let reuseID = "AvatarPickerCell" + + private let imageView: UIImageView = { + let iv = UIImageView() + iv.contentMode = .scaleAspectFill + iv.clipsToBounds = true + iv.layer.cornerRadius = 8 + iv.backgroundColor = ThemeStore.shared.colorTokens.bgColorOperate + return iv + }() + + private let selectionOverlay: UIView = { + let v = UIView() + v.layer.cornerRadius = 8 + v.layer.borderWidth = 0 + v.isUserInteractionEnabled = false + return v + }() + + override init(frame: CGRect) { + super.init(frame: frame) + contentView.backgroundColor = .clear + contentView.addSubview(imageView) + contentView.addSubview(selectionOverlay) + + imageView.snp.makeConstraints { make in + make.edges.equalToSuperview() + } + selectionOverlay.snp.makeConstraints { make in + make.edges.equalToSuperview() + } + applyDefaultBorder() + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + override func prepareForReuse() { + super.prepareForReuse() + imageView.kf.cancelDownloadTask() + imageView.image = nil + applyDefaultBorder() + } + + func configure(url: String, selected: Bool) { + if let u = URL(string: url) { + imageView.kf.setImage(with: u) + } else { + imageView.image = nil + } + + if selected { + selectionOverlay.layer.borderWidth = 3 + selectionOverlay.layer.borderColor = + ThemeStore.shared.colorTokens.buttonColorPrimaryDefault.cgColor + } else { + applyDefaultBorder() + } + } + + private func applyDefaultBorder() { + selectionOverlay.layer.borderWidth = 1 + selectionOverlay.layer.borderColor = + ThemeStore.shared.colorTokens.strokeColorSecondary.cgColor + } +} diff --git a/application/mine/Views/MineAboutResignViewController.swift b/application/mine/Views/MineAboutResignViewController.swift new file mode 100644 index 00000000..afa715c5 --- /dev/null +++ b/application/mine/Views/MineAboutResignViewController.swift @@ -0,0 +1,163 @@ +// +// MineAboutResignViewController.swift +// mine +// + +import UIKit +import AtomicX +import Login +import SnapKit +import Toast_Swift + +class MineAboutResignViewController: UIViewController { + + lazy var imageView: UIImageView = { + let imageView = UIImageView(image: UIImage(named: "resign")) + return imageView + }() + + lazy var tipsLabel: UILabel = { + let label = UILabel(frame: .zero) + label.font = ThemeStore.shared.typographyTokens.Regular16 + label.textColor = ThemeStore.shared.colorTokens.textColorPrimary + label.numberOfLines = 0 + label.adjustsFontSizeToFitWidth = true + label.minimumScaleFactor = 0.5 + label.text = MineLocalize("Demo.TRTC.Portal.resigntips") + return label + }() + + lazy var numberLabel: UILabel = { + let label = UILabel(frame: .zero) + label.font = ThemeStore.shared.typographyTokens.Regular16 + label.textColor = ThemeStore.shared.colorTokens.textColorPrimary + label.numberOfLines = 0 + label.adjustsFontSizeToFitWidth = true + label.minimumScaleFactor = 0.5 + return label + }() + + lazy var confirmBtn: UIButton = { + let btn = UIButton(type: .custom) + btn.setTitle(MineLocalize("Demo.TRTC.Portal.confirmresign"), for: .normal) + btn.backgroundColor = ThemeStore.shared.colorTokens.buttonColorPrimaryDefault + btn.addTarget(self, action: #selector(resignBtnClick), for: .touchUpInside) + return btn + }() + + lazy var loading: UIActivityIndicatorView = { + if #available(iOS 13.0, *) { + return UIActivityIndicatorView(style: .large) + } else { + return UIActivityIndicatorView(style: .whiteLarge) + } + }() + + override func viewDidLoad() { + super.viewDidLoad() + + view.backgroundColor = ThemeStore.shared.colorTokens.bgColorOperate + + self.title = MineLocalize("Demo.TRTC.Portal.resignaccount") + navigationController?.navigationBar.titleTextAttributes = [ + NSAttributedString.Key.foregroundColor: UIColor.black, + NSAttributedString.Key.font: ThemeStore.shared.typographyTokens.Bold18 + ] + navigationController?.navigationBar.barTintColor = .white + navigationController?.navigationBar.isTranslucent = false + + let backBtn = UIButton(type: .custom) + backBtn.setImage(UIImage(named: "main_mine_about_back"), for: .normal) + backBtn.addTarget(self, action: #selector(backBtnClick), for: .touchUpInside) + backBtn.sizeToFit() + let item = UIBarButtonItem(customView: backBtn) + item.tintColor = .black + navigationItem.leftBarButtonItem = item + + view.addSubview(imageView) + imageView.snp.makeConstraints { make in + make.centerX.equalToSuperview() + make.top.equalToSuperview().offset(40) + } + + view.addSubview(tipsLabel) + tipsLabel.snp.makeConstraints { make in + make.top.equalTo(imageView.snp.bottom).offset(20) + make.centerX.equalToSuperview() + make.leading.greaterThanOrEqualToSuperview().offset(40) + make.trailing.lessThanOrEqualToSuperview().offset(-40) + } + + view.addSubview(numberLabel) + numberLabel.snp.makeConstraints { make in + make.top.equalTo(tipsLabel.snp.bottom).offset(10) + make.centerX.equalToSuperview() + make.leading.greaterThanOrEqualToSuperview().offset(40) + make.trailing.lessThanOrEqualToSuperview().offset(-40) + } + + view.addSubview(confirmBtn) + confirmBtn.snp.makeConstraints { make in + make.top.equalTo(numberLabel.snp.bottom).offset(20) + make.leading.equalToSuperview().offset(40) + make.trailing.equalToSuperview().offset(-40) + make.height.equalTo(56) + } + + numberLabel.text = MineLocalize( + "Demo.TRTC.Portal.currentaccount", + LoginEntry.shared.userModel?.userId ?? "" + ) + + view.addSubview(loading) + loading.snp.makeConstraints { make in + make.width.height.equalTo(40) + make.centerX.centerY.equalTo(view) + } + } + + @objc func resignBtnClick() { + let alert = UIAlertController( + title: MineLocalize("Demo.TRTC.Portal.alerttoresign"), + message: "", + preferredStyle: .alert + ) + let cancel = UIAlertAction( + title: MineLocalize("App.PortalViewController.cancel"), + style: .cancel, handler: nil + ) + let confirm = UIAlertAction( + title: MineLocalize("Demo.TRTC.Portal.confirmresign"), + style: .default + ) { [weak self] _ in + self?.resignPhoneNumber() + } + alert.addAction(cancel) + alert.addAction(confirm) + present(alert, animated: true, completion: nil) + } + + @objc func resignPhoneNumber() { + loading.startAnimating() + LoginEntry.shared.logoff { [weak self] result in + guard let self = self else { return } + self.loading.stopAnimating() + switch result { + case .success: + if let windowScene = UIApplication.shared.connectedScenes.first as? UIWindowScene, + let window = windowScene.windows.first(where: { $0.isKeyWindow }) { + window.makeToast(MineLocalize("Demo.TRTC.Portal.resignsuccess")) + } + if let mineVC = self.navigationController?.viewControllers.first(where: { $0 is MineViewController }) as? MineViewController { + mineVC.onLogout?() + } + case .failure(let error): + self.view.makeToast("\(error)") + } + } + } + + @objc func backBtnClick() { + navigationController?.popViewController(animated: true) + } +} diff --git a/application/mine/Views/MineAboutViewController.swift b/application/mine/Views/MineAboutViewController.swift new file mode 100644 index 00000000..1da76c40 --- /dev/null +++ b/application/mine/Views/MineAboutViewController.swift @@ -0,0 +1,261 @@ +// +// MineAboutViewController.swift +// mine +// + +import UIKit +import AtomicX +import SnapKit +import TXLiteAVSDK_Professional + +class MineAboutViewController: UIViewController { + override func viewDidLoad() { + super.viewDidLoad() + + view.backgroundColor = ThemeStore.shared.colorTokens.bgColorOperate + + self.title = MineLocalize("Demo.TRTC.Portal.Mine.about") + navigationController?.navigationBar.titleTextAttributes = [ + NSAttributedString.Key.foregroundColor: UIColor.black, + NSAttributedString.Key.font: ThemeStore.shared.typographyTokens.Bold18 + ] + + let backBtn = UIButton(type: .custom) + backBtn.setImage(UIImage(named: "main_mine_about_back"), for: .normal) + backBtn.addTarget(self, action: #selector(backBtnClick), for: .touchUpInside) + backBtn.sizeToFit() + let item = UIBarButtonItem(customView: backBtn) + item.tintColor = .black + navigationItem.leftBarButtonItem = item + + view.addSubview(tableView) + tableView.snp.makeConstraints { make in + make.edges.equalToSuperview() + } + } + + @objc func backBtnClick() { + navigationController?.popViewController(animated: true) + } + + override func viewWillAppear(_ animated: Bool) { + super.viewWillAppear(animated) + navigationController?.setNavigationBarHidden(false, animated: false) + } + + lazy var tableView: UITableView = { + let tableView = UITableView(frame: .zero, style: .plain) + tableView.backgroundColor = .clear + tableView.separatorStyle = .none + tableView.dataSource = self + tableView.delegate = self + tableView.contentInset = UIEdgeInsets(top: 20, left: 0, bottom: 20, right: 0) + tableView.register(MineAboutTableViewCell.self, forCellReuseIdentifier: "MineAboutTableViewCell") + tableView.register(MineAboutDetailCell.self, forCellReuseIdentifier: "MineAboutDetailCell") + return tableView + }() + + lazy var dataSource: [MineAboutModel] = { + var res: [MineAboutModel] = [] + let sdkVersion = TRTCCloud.getSDKVersion() + let sdk = MineAboutModel(title: MineLocalize("Demo.TRTC.Portal.sdkversion"), value: sdkVersion) + res.append(sdk) + + let version = Self.appVersionWithBuild + let storeVersion = MineAboutModel(title: MineLocalize("Demo.TRTC.Portal.appversion"), value: version) + res.append(storeVersion) + + let resign = MineAboutModel(title: MineLocalize("Demo.TRTC.Portal.resignaccount"), type: .resign) + res.append(resign) + + return res + }() + + override var preferredStatusBarStyle: UIStatusBarStyle { + if #available(iOS 13.0, *) { + return .darkContent + } else { + return .default + } + } + + override var prefersStatusBarHidden: Bool { + return false + } + + // MARK: - Version Helper + + private static var appVersionWithBuild: String { + let version = Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as? String ?? "1.0" + let build = Bundle.main.object(forInfoDictionaryKey: "CFBundleVersion") as? String ?? "1" + return "\(version)(\(build))" + } +} + +// MARK: - UITableViewDataSource + +extension MineAboutViewController: UITableViewDataSource { + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + return dataSource.count + } + + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + let model = dataSource[indexPath.row] + switch model.type { + case .normal: + let cell = tableView.dequeueReusableCell(withIdentifier: "MineAboutTableViewCell", for: indexPath) + if let scell = cell as? MineAboutTableViewCell { + scell.titleLabel.text = model.title + scell.descLabel.text = model.value + } + return cell + case .resign: + let cell = tableView.dequeueReusableCell(withIdentifier: "MineAboutDetailCell", for: indexPath) + if let scell = cell as? MineAboutDetailCell { + scell.titleLabel.text = model.title + } + return cell + } + } + + func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { + return 56 + } +} + +// MARK: - UITableViewDelegate + +extension MineAboutViewController: UITableViewDelegate { + func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { + let model = dataSource[indexPath.row] + if model.type == .resign { + let vc = MineAboutResignViewController() + navigationController?.pushViewController(vc, animated: true) + } + } +} + +// MARK: - Models & Cells + +enum MineAboutCellType { + case normal + case resign +} + +class MineAboutModel: NSObject { + let title: String + let value: String + let type: MineAboutCellType + init(title: String, value: String = "", type: MineAboutCellType = .normal) { + self.title = title + self.value = value + self.type = type + super.init() + } +} + +class MineAboutDetailCell: UITableViewCell { + lazy var titleLabel: UILabel = { + let label = UILabel(frame: .zero) + label.font = ThemeStore.shared.typographyTokens.Regular16 + label.textColor = ThemeStore.shared.colorTokens.textColorPrimary + return label + }() + lazy var lineView: UIView = { + let view = UIView(frame: .zero) + view.backgroundColor = ThemeStore.shared.colorTokens.strokeColorSecondary + return view + }() + lazy var detailImageView: UIImageView = { + let imageView = UIImageView(image: UIImage(named: "main_mine_detail")) + return imageView + }() + + override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { + super.init(style: style, reuseIdentifier: reuseIdentifier) + selectionStyle = .none + backgroundColor = .clear + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + var isViewReady = false + override func didMoveToWindow() { + super.didMoveToWindow() + guard !isViewReady else { return } + isViewReady = true + contentView.addSubview(titleLabel) + contentView.addSubview(detailImageView) + contentView.addSubview(lineView) + titleLabel.snp.makeConstraints { make in + make.leading.equalToSuperview().offset(20) + make.centerY.equalToSuperview() + } + detailImageView.snp.makeConstraints { make in + make.trailing.equalToSuperview().offset(-20) + make.centerY.equalToSuperview() + } + lineView.snp.makeConstraints { make in + make.leading.equalTo(titleLabel) + make.trailing.equalToSuperview().offset(-20) + make.bottom.equalToSuperview() + make.height.equalTo(1) + } + } +} + +class MineAboutTableViewCell: UITableViewCell { + lazy var titleLabel: UILabel = { + let label = UILabel(frame: .zero) + label.font = ThemeStore.shared.typographyTokens.Regular16 + label.textColor = ThemeStore.shared.colorTokens.textColorPrimary + return label + }() + lazy var descLabel: UILabel = { + let label = UILabel(frame: .zero) + label.font = ThemeStore.shared.typographyTokens.Regular16 + label.textColor = ThemeStore.shared.colorTokens.textColorSecondary + return label + }() + lazy var lineView: UIView = { + let view = UIView(frame: .zero) + view.backgroundColor = ThemeStore.shared.colorTokens.strokeColorSecondary + return view + }() + + override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { + super.init(style: style, reuseIdentifier: reuseIdentifier) + selectionStyle = .none + backgroundColor = .clear + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + var isViewReady = false + override func didMoveToWindow() { + super.didMoveToWindow() + guard !isViewReady else { return } + isViewReady = true + contentView.addSubview(titleLabel) + contentView.addSubview(descLabel) + contentView.addSubview(lineView) + titleLabel.snp.makeConstraints { make in + make.leading.equalToSuperview().offset(20) + make.centerY.equalToSuperview() + } + descLabel.snp.makeConstraints { make in + make.trailing.equalToSuperview().offset(-20) + make.centerY.equalToSuperview() + } + lineView.snp.makeConstraints { make in + make.leading.equalTo(titleLabel) + make.trailing.equalTo(descLabel) + make.bottom.equalToSuperview() + make.height.equalTo(1) + } + } +} diff --git a/application/mine/Views/MineRootView.swift b/application/mine/Views/MineRootView.swift new file mode 100644 index 00000000..c94a1dbf --- /dev/null +++ b/application/mine/Views/MineRootView.swift @@ -0,0 +1,487 @@ +// +// MineRootView.swift +// mine +// + +import Foundation +import Kingfisher +import SnapKit +import TUICore +import UIKit +import AtomicX + +protocol MineRootViewDelegate: NSObjectProtocol { + func goBack() + func jumpProfileController() + func jumpExperienceRoom() + func logout() +} + +class MineRootView: UIView { + let viewModel: MineViewModel + weak var delegate: MineViewController? + + init(viewModel: MineViewModel, frame: CGRect = .zero) { + self.viewModel = viewModel + super.init(frame: frame) + } + + @available(*, unavailable) + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + // MARK: - UI Elements + + private lazy var backBtn: UIButton = { + let btn = UIButton(type: .system) + btn.setBackgroundImage(UIImage(named: "mine_goback"), for: .normal) + btn.sizeToFit() + return btn + }() + + lazy var titleLabel: UILabel = { + let label = UILabel(frame: .zero) + label.font = ThemeStore.shared.typographyTokens.Bold16 + label.text = MineLocalize("Demo.TRTC.Portal.Mine.personalcenter") + label.textAlignment = .center + label.textColor = ThemeStore.shared.colorTokens.textColorPrimary + return label + }() + + lazy var bgImageView: UIImageView = { + let imageView = UIImageView(frame: .zero) + imageView.contentMode = .scaleAspectFill + imageView.image = UIImage(named: "mine_bg_icon") + return imageView + }() + + let headImageDiameter: CGFloat = 72 + + lazy var headImageView: UIImageView = { + let imageV = UIImageView(frame: .zero) + imageV.contentMode = .scaleAspectFill + imageV.layer.cornerRadius = headImageDiameter / 2 + imageV.clipsToBounds = true + return imageV + }() + + lazy var userNameBtn: UIButton = { + let btn = UIButton(type: .custom) + btn.setTitle("USERID", for: .normal) + btn.titleLabel?.lineBreakMode = .byTruncatingTail + btn.adjustsImageWhenHighlighted = false + btn.setTitleColor(ThemeStore.shared.colorTokens.textColorPrimary, for: .normal) + btn.titleLabel?.font = ThemeStore.shared.typographyTokens.Bold18 + btn.setImage(UIImage(named: "main_mine_edit"), for: .normal) + return btn + }() + + lazy var userIdLabel: UILabel = { + let label = UILabel(frame: .zero) + label.font = ThemeStore.shared.typographyTokens.Regular12 + label.textColor = ThemeStore.shared.colorTokens.textColorSecondary + return label + }() + + private let containerView: UIView = { + let view = UIView(frame: .zero) + view.backgroundColor = ThemeStore.shared.colorTokens.bgColorOperate + return view + }() + + lazy var tableView: UITableView = { + let tableView = UITableView(frame: .zero, style: .plain) + tableView.backgroundColor = .clear + tableView.separatorStyle = .none + tableView.contentInset = UIEdgeInsets(top: 0, left: 0, bottom: 48, right: 0) + tableView.isScrollEnabled = false + return tableView + }() + + #if !RTCUBE_OVERSEAS + private let rtcExperienceRoomBtn: RTCExperienceRoomButtonView = { + let btn = RTCExperienceRoomButtonView() + btn.configure( + with: MineLocalize("Demo.TRTC.Portal.Mine.quickOnlineDebug"), + leftImageName: "main_mine_debug", + rightImageName: "main_mine_detail" + ) + btn.backgroundColor = ThemeStore.shared.colorTokens.bgColorOperate + return btn + }() + #endif + + private lazy var logoutBtn: UIButton = { + let btn = UIButton(type: .custom) + btn.setTitle(MineLocalize("Demo.TRTC.Portal.Mine.logout"), for: .normal) + btn.setTitleColor(ThemeStore.shared.colorTokens.textColorError, for: .normal) + btn.titleLabel?.font = ThemeStore.shared.typographyTokens.Bold16 + btn.backgroundColor = ThemeStore.shared.colorTokens.bgColorOperate + btn.sizeToFit() + return btn + }() + + // MARK: - Layout + + override func draw(_ rect: CGRect) { + super.draw(rect) + containerView.roundedRect(rect: containerView.bounds, + byRoundingCorners: .allCorners, + cornerRadii: CGSize(width: 10, height: 10)) + + #if !RTCUBE_OVERSEAS + rtcExperienceRoomBtn.roundedRect(rect: rtcExperienceRoomBtn.bounds, + byRoundingCorners: .allCorners, + cornerRadii: CGSize(width: 10, height: 10)) + #endif + logoutBtn.roundedRect(rect: logoutBtn.bounds, + byRoundingCorners: .allCorners, + cornerRadii: CGSize(width: 10, height: 10)) + } + + var isViewReady = false + override func didMoveToWindow() { + super.didMoveToWindow() + guard !isViewReady else { return } + backgroundColor = ThemeStore.shared.colorTokens.bgColorDefault + isViewReady = true + constructViewHierarchy() + activateConstraints() + bindInteraction() + } + + func constructViewHierarchy() { + addSubview(bgImageView) + addSubview(backBtn) + addSubview(titleLabel) + addSubview(headImageView) + addSubview(userNameBtn) + addSubview(userIdLabel) + addSubview(containerView) + containerView.addSubview(tableView) + #if !RTCUBE_OVERSEAS + addSubview(rtcExperienceRoomBtn) + #endif + addSubview(logoutBtn) + } + + func activateConstraints() { + let navFullHeight = navigationFullHeight() + let statusBarH = statusBarHeight() + + bgImageView.snp.makeConstraints { make in + make.top.centerX.equalToSuperview() + make.width.equalTo(ScreenWidth) + make.height.equalTo(ScreenWidth * (112.0 / 375.0) + navFullHeight) + } + backBtn.snp.makeConstraints { make in + make.centerY.equalTo(titleLabel) + make.left.equalToSuperview().offset(20) + make.width.height.equalTo(24) + } + titleLabel.snp.makeConstraints { make in + make.top.equalToSuperview().offset(statusBarH) + make.centerX.equalToSuperview() + make.width.equalTo(ScreenWidth / 2.0) + make.height.equalTo(44) + } + headImageView.snp.makeConstraints { make in + make.bottom.centerX.equalTo(bgImageView) + make.size.equalTo(CGSize(width: headImageDiameter, height: headImageDiameter)) + } + userNameBtn.snp.makeConstraints { make in + make.top.equalTo(headImageView.snp.bottom).offset(12) + make.leading.equalToSuperview().offset(20) + make.trailing.equalToSuperview().offset(-20) + make.centerX.equalToSuperview() + } + userIdLabel.snp.makeConstraints { make in + make.top.equalTo(userNameBtn.snp.bottom).offset(2) + make.centerX.equalToSuperview() + } + containerView.snp.makeConstraints { make in + make.top.equalTo(userIdLabel.snp.bottom).offset(20) + make.leading.equalToSuperview().offset(20) + make.trailing.equalToSuperview().offset(-20) + make.height.equalTo(58 * viewModel.tableDataSource.count + 16) + } + tableView.snp.makeConstraints { make in + make.top.equalToSuperview().offset(8) + make.leading.trailing.equalToSuperview() + make.bottom.equalToSuperview().offset(-8) + } + #if !RTCUBE_OVERSEAS + rtcExperienceRoomBtn.snp.makeConstraints { make in + make.top.equalTo(containerView.snp.bottom).offset(12) + make.leading.equalToSuperview().offset(20) + make.trailing.equalToSuperview().offset(-20) + make.height.equalTo(60) + } + #endif + + logoutBtn.snp.makeConstraints { make in + #if !RTCUBE_OVERSEAS + make.top.equalTo(rtcExperienceRoomBtn.snp.bottom).offset(12) + #else + make.top.equalTo(containerView.snp.bottom).offset(12) + #endif + make.leading.equalToSuperview().offset(20) + make.trailing.equalToSuperview().offset(-20) + make.height.equalTo(52) + } + } + + func bindInteraction() { + userNameBtn.addTarget(self, action: #selector(userIdBtnClick(btn:)), for: .touchUpInside) + backBtn.addTarget(self, action: #selector(goBack(sender:)), for: .touchUpInside) + logoutBtn.addTarget(self, action: #selector(logout(sender:)), for: .touchUpInside) + + tableView.register(MineTableViewCell.self, forCellReuseIdentifier: "MineTableViewCell") + tableView.delegate = self + tableView.dataSource = self + + let tap = UITapGestureRecognizer(target: self, action: #selector(headBtnClick)) + headImageView.addGestureRecognizer(tap) + headImageView.isUserInteractionEnabled = true + + #if !RTCUBE_OVERSEAS + rtcExperienceRoomBtn.onClicked = { [weak self] in + self?.delegate?.jumpExperienceRoom() + } + #endif + + updateProfile() + } + + // MARK: - Profile Updates + + func updateProfile() { + DispatchQueue.main.async { + self.updateHeadImage() + self.updateName() + self.updateUserId() + } + } + + func updateHeadImage() { + if let url = URL(string: TUILogin.getFaceUrl() ?? "") { + headImageView.kf.setImage(with: .network(url), placeholder: UIImage(named: "room_default_avatar")) + } else { + headImageView.image = UIImage(named: "default_avatar") + } + } + + func updateUserId() { + userIdLabel.text = "ID:\(TUILogin.getUserID() ?? "")" + } + + func updateName() { + if let nickName = TUILogin.getNickName() { + userNameBtn.setTitle(nickName, for: .normal) + userNameBtn.sizeToFit() + let totalWidth = userNameBtn.frame.width + guard let imageView = userNameBtn.imageView else { return } + let imageWidth = imageView.frame.width + let titleWidth = totalWidth - imageWidth + let spacing = CGFloat(4) + let maxBtnWidth = ScreenWidth - 80 + let targetBtnWidth = totalWidth + spacing + userNameBtn.titleEdgeInsets = UIEdgeInsets(top: 0, left: -imageWidth - spacing * 0.5, bottom: 0, right: imageWidth + spacing * 0.5) + userNameBtn.imageEdgeInsets = UIEdgeInsets(top: 0, left: titleWidth + spacing * 0.5, bottom: 0, right: -titleWidth - spacing * 0.5) + userNameBtn.snp.remakeConstraints { make in + make.top.equalTo(headImageView.snp.bottom).offset(12) + make.centerX.equalToSuperview() + make.width.equalTo((targetBtnWidth > maxBtnWidth) ? maxBtnWidth : targetBtnWidth) + } + } + } + + // MARK: - Hit Test + + override func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? { + guard let superview = headImageView.superview else { + return super.hitTest(point, with: event) + } + let rect = superview.convert(headImageView.frame, to: self) + if rect.contains(point) { + return headImageView + } + return super.hitTest(point, with: event) + } + + // MARK: - Actions + + @objc func userIdBtnClick(btn: UIButton) { + delegate?.jumpProfileController() + } + + @objc func headBtnClick() { + delegate?.jumpProfileController() + } + + @objc private func goBack(sender: UIButton) { + delegate?.goBack() + } + + @objc private func logout(sender: UIButton) { + delegate?.logout() + } +} + +// MARK: - UITableViewDataSource + +extension MineRootView: UITableViewDataSource { + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + return viewModel.tableDataSource.count + } + + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + let cell = tableView.dequeueReusableCell(withIdentifier: "MineTableViewCell", for: indexPath) + if let scell = cell as? MineTableViewCell { + let model = viewModel.tableDataSource[indexPath.row] + scell.model = model + } + return cell + } + + func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { + return 58 + } +} + +// MARK: - UITableViewDelegate + +extension MineRootView: UITableViewDelegate { + func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { + let model = viewModel.tableDataSource[indexPath.row] + switch model.type { + case .about: + let vc = MineAboutViewController() + vc.hidesBottomBarWhenPushed = true + delegate?.navigationController?.pushViewController(vc, animated: true) + + case .privacy: + PrivacyEntry.pushPrivacyPage(.privacyCenter, from: delegate) + + case .disclaimer: + let alert = UIAlertController( + title: MineLocalize("Demo.TRTC.Portal.disclaimerdesc"), + message: "", + preferredStyle: .alert + ) + let action = UIAlertAction(title: MineLocalize("Demo.TRTC.Portal.confirm"), style: .default, handler: nil) + alert.addAction(action) + delegate?.present(alert, animated: true, completion: nil) + + case .icp: + let openUrl = "https://beian.miit.gov.cn/#/home" + TUITool.openLink(with: URL(string: openUrl)) + } + } +} + +// MARK: - MineTableViewCellModel + +class MineTableViewCellModel: NSObject { + let title: String + let image: UIImage? + let type: MineListType + init(title: String, image: UIImage?, type: MineListType) { + self.title = title + self.image = image + self.type = type + super.init() + } +} + +// MARK: - MineTableViewCell + +class MineTableViewCell: UITableViewCell { + lazy var titleImageView: UIImageView = { + let imageV = UIImageView(frame: .zero) + return imageV + }() + + lazy var titleLabel: UILabel = { + let label = UILabel(frame: .zero) + label.font = ThemeStore.shared.typographyTokens.Bold14 + label.textColor = ThemeStore.shared.colorTokens.textColorPrimary + return label + }() + + lazy var detailLabel: UILabel = { + let label = UILabel(frame: .zero) + label.font = ThemeStore.shared.typographyTokens.Regular12 + label.isHidden = true + label.textColor = ThemeStore.shared.colorTokens.textColorSecondary + label.textAlignment = .left + return label + }() + + lazy var detailImageView: UIImageView = { + let imageV = UIImageView(image: UIImage(named: "main_mine_detail")) + return imageV + }() + + var model: MineTableViewCellModel? { + didSet { + guard let model = model else { return } + titleImageView.image = model.image + titleLabel.text = model.title + if model.type == .icp { + detailLabel.isHidden = false + detailLabel.text = MineLocalize("Demo.TRTC.Portal.Mine.ICPDetailNumber") + } + } + } + + override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { + super.init(style: style, reuseIdentifier: reuseIdentifier) + selectionStyle = .none + backgroundColor = .clear + } + + @available(*, unavailable) + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + var isViewReady = false + override func didMoveToWindow() { + super.didMoveToWindow() + guard !isViewReady else { return } + isViewReady = true + constructViewHierarchy() + activateConstraints() + } + + func constructViewHierarchy() { + contentView.addSubview(titleImageView) + contentView.addSubview(titleLabel) + contentView.addSubview(detailImageView) + contentView.addSubview(detailLabel) + } + + func activateConstraints() { + titleImageView.snp.makeConstraints { make in + make.centerX.equalTo(contentView.snp.leading).offset(36) + make.centerY.equalToSuperview() + make.width.height.equalTo(24) + } + detailImageView.snp.makeConstraints { make in + make.trailing.equalToSuperview().offset(-20) + make.centerY.equalTo(titleImageView) + make.width.height.equalTo(18) + } + titleLabel.snp.makeConstraints { make in + make.centerY.equalTo(titleImageView) + make.leading.equalTo(titleImageView.snp.centerX).offset(28) + make.trailing.lessThanOrEqualTo(detailImageView.snp.leading).offset(-10) + } + detailLabel.snp.makeConstraints { make in + make.right.equalTo(detailImageView.snp.left).offset(-4) + make.centerY.equalTo(titleImageView) + } + } +} diff --git a/application/mine/Views/MineViewController.swift b/application/mine/Views/MineViewController.swift new file mode 100644 index 00000000..129447e2 --- /dev/null +++ b/application/mine/Views/MineViewController.swift @@ -0,0 +1,103 @@ +// +// MineViewController.swift +// mine +// + +import UIKit +import AtomicX +import TUICore +import Login + +class MineViewController: UIViewController { + + var onLogout: (() -> Void)? + + var onLanguageChanged: ((String) -> Void)? + + var onExperienceRoomClicked: (() -> Void)? + + var isNeedUpdateProfile = false + + private lazy var rootView: MineRootView = { + let viewModel = MineViewModel() + let view = MineRootView(viewModel: viewModel) + view.delegate = self + return view + }() + + override func loadView() { + super.loadView() + view = rootView + } + + override func viewDidLoad() { + super.viewDidLoad() + view.backgroundColor = ThemeStore.shared.colorTokens.bgColorDefault + } + + override func viewWillAppear(_ animated: Bool) { + super.viewWillAppear(animated) + navigationController?.setNavigationBarHidden(true, animated: true) + + if isNeedUpdateProfile { + rootView.updateProfile() + isNeedUpdateProfile = false + } + } + + override func viewWillDisappear(_ animated: Bool) { + super.viewWillDisappear(animated) + navigationController?.setNavigationBarHidden(false, animated: false) + } + + override var preferredStatusBarStyle: UIStatusBarStyle { + if #available(iOS 13.0, *) { + return .darkContent + } else { + return .default + } + } + + override var prefersStatusBarHidden: Bool { + return false + } +} + +// MARK: - MineRootViewDelegate + +extension MineViewController: MineRootViewDelegate { + func goBack() { + navigationController?.popViewController(animated: true) + } + + func jumpProfileController() { + isNeedUpdateProfile = true + let profileController = ProfileController() + navigationController?.pushViewController(profileController, animated: true) + } + + func jumpExperienceRoom() { + onExperienceRoomClicked?() + } + + func logout() { + let alertVC = UIAlertController( + title: MineLocalize("Demo.TRTC.Portal.Mine.areYouSureLogOut"), + message: nil, + preferredStyle: .alert + ) + let cancelAction = UIAlertAction( + title: MineLocalize("Demo.TRTC.Portal.Mine.cancel"), + style: .cancel, handler: nil + ) + let sureAction = UIAlertAction( + title: MineLocalize("Demo.TRTC.Portal.Mine.determine"), + style: .default + ) { [weak self] _ in + self?.onLogout?() + } + alertVC.addAction(cancelAction) + alertVC.addAction(sureAction) + navigationController?.present(alertVC, animated: true, completion: nil) + } +} diff --git a/application/mine/Views/ProfileController.swift b/application/mine/Views/ProfileController.swift new file mode 100644 index 00000000..98eda25a --- /dev/null +++ b/application/mine/Views/ProfileController.swift @@ -0,0 +1,347 @@ +// +// ProfileController.swift +// mine +// + +import UIKit +import AtomicX +import ImSDK_Plus +import Login +import SnapKit +import TUICore +import Toast_Swift + +class ProfileController: UIViewController { + + var profileData: [[ProfileInfoModel]] = [] + + private lazy var isRTCApp: Bool = { + #if RTCUBE_OVERSEAS + return true + #else + return false + #endif + }() + + var profile: V2TIMUserFullInfo? + + private lazy var tableView: UITableView = { + let table = UITableView(frame: .zero) + table.isScrollEnabled = false + table.dataSource = self + table.delegate = self + table.backgroundColor = UIColor.clear + table.showsVerticalScrollIndicator = false + table.separatorColor = .clear + table.register(ProfileTableViewCell.self, + forCellReuseIdentifier: ProfileTableViewCell.cellReuseIdentifier) + return table + }() + + override func viewDidLoad() { + super.viewDidLoad() + title = MineLocalize("Demo.TRTC.Portal.Mine.profileDetail") + let backBtn = UIButton(type: .custom) + backBtn.setImage(UIImage(named: "mine_back"), for: .normal) + backBtn.addTarget(self, action: #selector(backBtnClick), for: .touchUpInside) + let item = UIBarButtonItem(customView: backBtn) + item.tintColor = UIColor.black + navigationItem.leftBarButtonItem = item + view.backgroundColor = ThemeStore.shared.colorTokens.bgColorDefault + + guard let userid = V2TIMManager.sharedInstance()?.getLoginUser() else { return } + V2TIMManager.sharedInstance().getUsersInfo([userid]) { [weak self] infoList in + guard let self = self else { return } + self.profile = infoList?.first ?? profile + self.configData() + } fail: { _, _ in } + + configData() + constructViewHierarchy() + activateConstraints() + } +} + +// MARK: - UITableViewDataSource & UITableViewDelegate + +extension ProfileController: UITableViewDataSource, UITableViewDelegate { + func numberOfSections(in tableView: UITableView) -> Int { + return profileData.count + } + + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + let rowData = profileData[section] + return rowData.count + } + + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + let reuseID = ProfileTableViewCell.cellReuseIdentifier + let rowData = profileData[indexPath.section] + let cell = tableView.dequeueReusableCell(withIdentifier: reuseID, for: indexPath) as! ProfileTableViewCell + cell.selectionStyle = .none + cell.config(with: rowData[indexPath.row]) + return cell + } + + func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { + let rowData = profileData[indexPath.section] + let model = rowData[indexPath.row] + return model.cellHeight + } + + func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat { + return 8.0 + } + + func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? { + return UIView() + } + + func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { + let rowData = profileData[indexPath.section] + let model = rowData[indexPath.row] + model.selectHandler?() + } +} + +// MARK: - Data + +extension ProfileController { + func configData() { + profileData = [ + [ + ProfileInfoModel( + title: MineLocalize("Demo.TRTC.Portal.Mine.profilePhoto"), + imageName: profile?.faceURL, + cellHeight: navigationFullHeight(), + selectHandler: { [weak self] in + self?.didSelectChangeHead() + } + ), + ], + [ + ProfileInfoModel( + title: MineLocalize("Demo.TRTC.Portal.Mine.profileName"), + detail: profile?.showName(), + cellHeight: 58.0, + selectHandler: { [weak self] in + self?.didSelectChangeNick() + } + ), + ProfileInfoModel( + title: MineLocalize("Demo.TRTC.Portal.Mine.profileAccount"), + detail: profile?.userID, + cellHeight: 58.0 + ), + ], + ] + + let rtcubeData = [ + ProfileInfoModel( + title: MineLocalize("Demo.TRTC.Portal.Mine.profileSignature"), + detail: profile?.selfSignature, + cellHeight: 58.0, + selectHandler: { [weak self] in + self?.didSelectChangeSignature() + } + ), + ProfileInfoModel( + title: MineLocalize("Demo.TRTC.Portal.Mine.profileGender"), + detail: profile?.showGender(), + cellHeight: 58.0, + selectHandler: { [weak self] in + self?.didSelectChangeGender() + } + ), + ProfileInfoModel( + title: MineLocalize("Demo.TRTC.Portal.Mine.profileBirth"), + detail: birthString(with: profile?.birthday), + cellHeight: 58.0, + selectHandler: { [weak self] in + self?.didSelectChangeBirth() + } + ), + ] + if !isRTCApp { + profileData.append(rtcubeData) + } + tableView.reloadData() + } +} + +// MARK: - View Hierarchy + +extension ProfileController { + func constructViewHierarchy() { + view.addSubview(tableView) + } + + func activateConstraints() { + tableView.snp.makeConstraints { make in + make.edges.equalToSuperview() + } + } +} + +// MARK: - Profile Edit Actions + +extension ProfileController { + + @objc func didSelectChangeNick() { + var viewType = UpdateInfoViewType.hasInput + if isRTCApp { + viewType = .noInput + } else { + viewType = .hasInput + } + let view = ProfileUpdateInfoView(viewType: viewType, oldInfo: profile?.showName()) + view.show(in: self) + view.submitClosure = { [weak self] newName in + guard let self = self else { return } + let info = V2TIMUserFullInfo() + info.nickName = newName + V2TIMManager.sharedInstance().setSelfInfo(info: info) { [weak self] in + guard let self = self else { return } + self.profile?.nickName = newName + self.view.makeToast(MineLocalize("Demo.TRTC.Portal.Mine.profileUpdateSucc")) + self.configData() + } fail: { code, err in + self.view.makeToast(MineLocalize("Demo.TRTC.Portal.Mine.profileUpdateFailed")) + AppLogger.App.warn("updateUserInfoWithUserModel:\(code)==\(String(describing: err))") + } + } + } + + @objc func didSelectChangeHead() { + let avatarVC = AvatarPickerViewController() + avatarVC.currentAvatarURL = self.profile?.faceURL + avatarVC.onConfirm = { [weak self] urlString in + guard let self = self else { return } + let info = V2TIMUserFullInfo() + info.faceURL = urlString + V2TIMManager.sharedInstance().setSelfInfo(info: info) { + LoginManager.shared.getCurrentUser()?.avatar = urlString + self.profile?.faceURL = urlString + self.configData() + } fail: { code, err in + self.view.makeToast(MineLocalize("Demo.TRTC.Portal.Mine.profileUpdateFailed")) + AppLogger.App.warn("updateUserInfoWithUserModel:\(code)==\(String(describing: err))") + } + } + self.navigationController?.pushViewController(avatarVC, animated: true) + } + + @objc func didSelectChangeSignature() { + let viewType = UpdateInfoViewType.hasInput + let view = ProfileUpdateInfoView(viewType: viewType, oldInfo: self.profile?.selfSignature) + view.show(in: self) + view.submitClosure = { [weak self] newSignature in + guard let self = self else { return } + let info = V2TIMUserFullInfo() + info.selfSignature = newSignature + V2TIMManager.sharedInstance().setSelfInfo(info: info) { [weak self] in + guard let self = self else { return } + self.profile?.selfSignature = newSignature + self.view.makeToast(MineLocalize("Demo.TRTC.Portal.Mine.profileUpdateSucc")) + self.configData() + } fail: { code, err in + self.view.makeToast(MineLocalize("Demo.TRTC.Portal.Mine.profileUpdateFailed")) + AppLogger.App.warn("updateUserInfoWithUserModel:\(code)==\(String(describing: err))") + } + } + } + + @objc func didSelectChangeGender() { + let alertController = UIAlertController( + title: MineLocalize("Demo.TRTC.Portal.Mine.profileEditGender"), + message: nil, + preferredStyle: .actionSheet + ) + let selectMaleAction = UIAlertAction( + title: MineLocalize("Demo.TRTC.Portal.Mine.profileMaleGender"), + style: .default + ) { [weak self] _ in + self?.setProfile(withGender: .GENDER_MALE) + } + let selectFemaleAction = UIAlertAction( + title: MineLocalize("Demo.TRTC.Portal.Mine.profileFemaleGender"), + style: .default + ) { [weak self] _ in + self?.setProfile(withGender: .GENDER_FEMALE) + } + let cancelAction = UIAlertAction( + title: MineLocalize("Demo.TRTC.Portal.Mine.cancel"), + style: .cancel + ) + alertController.addAction(selectMaleAction) + alertController.addAction(selectFemaleAction) + alertController.addAction(cancelAction) + present(alertController, animated: true, completion: nil) + } + + private func setProfile(withGender gender: V2TIMGender) { + let info = V2TIMUserFullInfo() + info.gender = gender + V2TIMManager.sharedInstance().setSelfInfo(info: info) { + self.profile?.gender = info.gender + self.configData() + } fail: { code, message in + self.view.makeToast(MineLocalize("Demo.TRTC.Portal.Mine.profileUpdateFailed")) + AppLogger.App.warn("updateUserInfoWithUserModel:\(code)==\(String(describing: message))") + } + } + + @objc func didSelectChangeBirth() { + let datePicker = ProfileDatePickerView( + withProfile: profile, + frame: CGRect(x: 0, y: 0, width: ScreenWidth, height: ScreenHeight) + ) + datePicker.confirmClosure = { [weak self] dateStr in + guard let self = self else { return } + guard let birthday = UInt32(dateStr) else { return } + let info = V2TIMUserFullInfo() + info.birthday = birthday + V2TIMManager.sharedInstance()?.setSelfInfo(info: info, succ: { + self.profile?.birthday = birthday + self.configData() + }, fail: nil) + } + datePicker.hideClosure = { + datePicker.removeFromSuperview() + } + if let windowScene = UIApplication.shared.connectedScenes.first as? UIWindowScene, + let window = windowScene.windows.first(where: { $0.isKeyWindow }) { + window.addSubview(datePicker) + } + } +} + +// MARK: - Navigation + +extension ProfileController { + @objc func backBtnClick() { + navigationController?.popViewController(animated: true) + } +} + +// MARK: - Birthday Formatter + +extension ProfileController { + func birthString(with birthNum: UInt32?) -> String { + let formatter = DateFormatter() + formatter.dateFormat = "yyyyMMdd" + guard let birthday = birthNum else { + let date = Date() + formatter.dateFormat = "yyyy-MM-dd" + return formatter.string(from: date) + } + if let date = formatter.date(from: String(birthday)) { + formatter.dateFormat = "yyyy-MM-dd" + return formatter.string(from: date) + } else { + let date = Date() + formatter.dateFormat = "yyyy-MM-dd" + return formatter.string(from: date) + } + } +} diff --git a/application/mine/Views/ProfileDatePickerView.swift b/application/mine/Views/ProfileDatePickerView.swift new file mode 100644 index 00000000..685271dc --- /dev/null +++ b/application/mine/Views/ProfileDatePickerView.swift @@ -0,0 +1,125 @@ +// +// ProfileDatePickerView.swift +// mine +// + +import UIKit +import AtomicX +import TUICore + +class ProfileDatePickerView: UIView { + var profile: V2TIMUserFullInfo? + var confirmClosure: (String) -> Void = { _ in } + var hideClosure: () -> Void = {} + + convenience init(withProfile profile: V2TIMUserFullInfo?, frame: CGRect) { + self.init(frame: frame) + self.profile = profile + } + + private var themedInterfaceStyle: UIUserInterfaceStyle { + switch ThemeStore.shared.currentMode { + case .dark: return .dark + case .light: return .light + case .system: return .unspecified + } + } + + lazy var picker: UIDatePicker = { + let picker = UIDatePicker() + let language = TUIGlobalization.getPreferredLanguage() + picker.locale = Locale(identifier: language ?? "en") + if profile?.birthday != 0 { + guard let number = profile?.birthday else { return picker } + let numberString = String(number) + let dateFormatter = DateFormatter() + dateFormatter.dateFormat = "yyyyMMdd" + if let date = dateFormatter.date(from: numberString) { + picker.date = date + } else { + picker.date = Date() + } + } else { + picker.date = Date() + } + picker.maximumDate = Date() + if #available(iOS 13.4, *) { + picker.preferredDatePickerStyle = .wheels + } + picker.backgroundColor = ThemeStore.shared.colorTokens.bgColorOperate + picker.datePickerMode = .date + picker.overrideUserInterfaceStyle = themedInterfaceStyle + return picker + }() + + lazy var menuView: UIView = { + let menuView = UIView() + menuView.backgroundColor = ThemeStore.shared.colorTokens.bgColorOperate + menuView.overrideUserInterfaceStyle = themedInterfaceStyle + return menuView + }() + + lazy var cancelButton: UIButton = { + let cancelButton = UIButton(type: .custom) + cancelButton.setTitle(MineLocalize("Demo.TRTC.Portal.Mine.cancel"), for: .normal) + cancelButton.setTitleColor(ThemeStore.shared.colorTokens.textColorPrimary, for: .normal) + cancelButton.titleLabel?.font = ThemeStore.shared.typographyTokens.Regular16 + cancelButton.addTarget(self, action: #selector(onViewHide), for: .touchUpInside) + return cancelButton + }() + + lazy var okButton: UIButton = { + let okButton = UIButton(type: .custom) + okButton.setTitle(MineLocalize("Demo.TRTC.Portal.Mine.determine"), for: .normal) + okButton.setTitleColor(ThemeStore.shared.colorTokens.textColorPrimary, for: .normal) + okButton.titleLabel?.font = ThemeStore.shared.typographyTokens.Regular16 + okButton.addTarget(self, action: #selector(onConfirmClicked), for: .touchUpInside) + return okButton + }() + + var isViewReady = false + override func didMoveToWindow() { + guard !isViewReady else { return } + isViewReady = true + backgroundColor = UIColor(red: 0, green: 0, blue: 0, alpha: 0.5) + let tap = UITapGestureRecognizer(target: self, action: #selector(onViewHide)) + isUserInteractionEnabled = true + addGestureRecognizer(tap) + constructViewHierarchy() + activateConstraints() + } + + func constructViewHierarchy() { + addSubview(menuView) + menuView.addSubview(cancelButton) + menuView.addSubview(okButton) + addSubview(picker) + } + + func activateConstraints() { + menuView.frame = CGRect(x: 0, y: UIScreen.main.bounds.size.height - 340, + width: UIScreen.main.bounds.size.width, height: 40) + cancelButton.frame = CGRect(x: 10, y: 0, width: 60, height: 35) + okButton.frame = CGRect(x: bounds.size.width - 10 - 60, y: 0, width: 60, height: 35) + picker.frame = CGRect(x: 0, y: menuView.frame.maxY, + width: bounds.size.width, height: 300) + } +} + +// MARK: - Actions + +extension ProfileDatePickerView { + @objc func onViewHide() { + hideClosure() + } + + @objc func onConfirmClicked() { + let date = self.picker.date + let dateFormatter = DateFormatter() + dateFormatter.dateFormat = "yyyy-MM-dd" + var dateStr = dateFormatter.string(from: date) + dateStr = dateStr.replacingOccurrences(of: "-", with: "") + confirmClosure(dateStr) + onViewHide() + } +} diff --git a/application/mine/Views/ProfileTableViewCell.swift b/application/mine/Views/ProfileTableViewCell.swift new file mode 100644 index 00000000..d912ffa9 --- /dev/null +++ b/application/mine/Views/ProfileTableViewCell.swift @@ -0,0 +1,118 @@ +// +// ProfileTableViewCell.swift +// mine +// + +import UIKit +import AtomicX +import Kingfisher +import SnapKit + +class ProfileTableViewCell: UITableViewCell { + + static let cellIdentifier = "ProfileTableViewCell" + + let profTitleLabel: UILabel = { + let label = UILabel() + label.textColor = ThemeStore.shared.colorTokens.textColorPrimary + label.font = ThemeStore.shared.typographyTokens.Regular16 + return label + }() + + let profDetailLabel: UILabel = { + let label = UILabel() + label.textAlignment = .right + label.textColor = ThemeStore.shared.colorTokens.textColorPrimary + label.font = ThemeStore.shared.typographyTokens.Regular16 + return label + }() + + let profImage: UIImageView = { + let imageView = UIImageView(frame: .zero) + return imageView + }() + + let arrowImage: UIImageView = { + let imageView = UIImageView(frame: .zero) + imageView.image = UIImage(named: "main_entrance_pusharrow") + imageView.sizeToFit() + return imageView + }() + + let intervalLine: UIView = { + let view = UIView(frame: .zero) + view.backgroundColor = ThemeStore.shared.colorTokens.bgColorDefault + return view + }() + + override func prepareForReuse() { + super.prepareForReuse() + profImage.image = nil + } + + override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { + super.init(style: style, reuseIdentifier: reuseIdentifier) + backgroundColor = ThemeStore.shared.colorTokens.bgColorOperate + constructViewHierarchy() + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } +} + +extension ProfileTableViewCell { + func constructViewHierarchy() { + contentView.addSubview(profTitleLabel) + contentView.addSubview(profImage) + contentView.addSubview(profDetailLabel) + contentView.addSubview(arrowImage) + contentView.addSubview(intervalLine) + } + + func activateConstraints() { + profTitleLabel.snp.makeConstraints { make in + make.centerY.equalToSuperview() + make.left.equalToSuperview().offset(convertPixel(w: 16)) + } + profImage.snp.makeConstraints { make in + make.right.equalTo(arrowImage.snp.left) + make.centerY.equalToSuperview() + make.size.equalTo(CGSize(width: convertPixel(w: 46), height: convertPixel(h: 46))) + } + arrowImage.snp.makeConstraints { make in + make.centerY.equalToSuperview() + make.width.equalTo(convertPixel(w: 18)) + make.right.equalToSuperview().offset(convertPixel(w: -16)) + } + profDetailLabel.snp.makeConstraints { make in + make.centerY.equalToSuperview() + make.leading.equalTo(profTitleLabel.snp.trailing).offset(convertPixel(w: 10)) + make.right.equalTo(arrowImage.snp.left) + } + intervalLine.snp.makeConstraints { make in + make.left.right.equalToSuperview().inset(convertPixel(w: 16)) + make.bottom.equalToSuperview() + make.height.equalTo(convertPixel(h: 1)) + } + } +} + +extension ProfileTableViewCell { + func config(with model: ProfileInfoModel) { + profTitleLabel.text = model.title + if let imageName = model.imageName { + if let url = URL(string: imageName) { + profImage.kf.setImage(with: url, placeholder: UIImage(named: "room_default_avatar")) + } else { + profImage.image = UIImage(named: "room_default_avatar") + } + } + profDetailLabel.text = model.detail + arrowImage.isHidden = (model.selectHandler == nil) + arrowImage.snp.updateConstraints { make in + make.width.equalTo(convertPixel(w: arrowImage.isHidden ? 0 : 18)) + } + activateConstraints() + } +} diff --git a/application/mine/Views/ProfileUpdateInfoView.swift b/application/mine/Views/ProfileUpdateInfoView.swift new file mode 100644 index 00000000..71db7e63 --- /dev/null +++ b/application/mine/Views/ProfileUpdateInfoView.swift @@ -0,0 +1,341 @@ +// +// ProfileUpdateInfoView.swift +// mine +// + +import UIKit +import AtomicX +import SnapKit + +private class CustomRefreshButton: UIButton { + var isViewReady = false + override func didMoveToWindow() { + guard !isViewReady else { return } + isViewReady = true + super.didMoveToWindow() + let imageWidth: CGFloat = 12.5 + let imageHeight: CGFloat = 12.5 + let imageX: CGFloat = 0 + let imageY: CGFloat = (bounds.height - imageHeight) / 2 + imageView?.frame = CGRect(x: imageX, y: imageY, width: imageWidth, height: imageHeight) + let titleX: CGFloat = bounds.width - (titleLabel?.bounds.width ?? 0) + let titleY: CGFloat = (bounds.height - (titleLabel?.bounds.height ?? 0)) / 2 + titleLabel?.frame = CGRect(x: titleX, y: titleY, width: titleLabel?.bounds.width ?? 0, height: titleLabel?.bounds.height ?? 0) + } + + override func setTitle(_ title: String?, for state: UIControl.State) { + super.setTitle(title, for: state) + sizeToFit() + } + + override func setImage(_ image: UIImage?, for state: UIControl.State) { + super.setImage(image, for: state) + sizeToFit() + } +} + +enum UpdateInfoViewType { + case noInput + case hasInput +} + +class ProfileUpdateInfoView: UIView { + + var submitClosure: (String?) -> Void = { _ in } + var viewType: UpdateInfoViewType? + var oldInfo: String? + + lazy var containerView: UIView = { + let view = UIView(frame: .zero) + view.backgroundColor = ThemeStore.shared.colorTokens.bgColorOperate + return view + }() + + lazy var titleLabel: UILabel = { + let label = UILabel() + label.text = MineLocalize("Demo.TRTC.Portal.Mine.profileName") + label.font = ThemeStore.shared.typographyTokens.Regular16 + label.textColor = ThemeStore.shared.colorTokens.textColorPrimary + return label + }() + + lazy var intervalView: UIView = { + let view = UIView(frame: .zero) + view.backgroundColor = ThemeStore.shared.colorTokens.strokeColorPrimary + return view + }() + + lazy var inputBackView: UIView = { + let view = UIView(frame: .zero) + view.backgroundColor = ThemeStore.shared.colorTokens.bgColorDefault + view.layer.cornerRadius = ThemeStore.shared.borderRadius.radius8 + view.layer.masksToBounds = true + return view + }() + + lazy var inputTextView: UITextField = { + let view = UITextField() + view.delegate = self + view.backgroundColor = .clear + view.textColor = ThemeStore.shared.colorTokens.textColorPrimary + view.font = ThemeStore.shared.typographyTokens.Regular16 + view.layer.masksToBounds = true + return view + }() + + lazy var inputLabel: UILabel = { + let label = UILabel() + label.font = ThemeStore.shared.typographyTokens.Regular16 + label.textColor = ThemeStore.shared.colorTokens.textColorSecondary + return label + }() + + lazy var tipsLabel: UILabel = { + let label = UILabel() + label.font = ThemeStore.shared.typographyTokens.Regular12 + label.text = MineLocalize("Demo.TRTC.Portal.Mine.profileEditAliasDesc") + label.textColor = ThemeStore.shared.colorTokens.textColorTertiary + return label + }() + + let submitButton: UIButton = { + let button = UIButton(type: .custom) + button.setBackgroundImage(ThemeStore.shared.colorTokens.buttonColorPrimaryDefault.trans2Image(), for: .normal) + button.layer.shadowColor = ThemeStore.shared.colorTokens.buttonColorPrimaryDefault.cgColor + button.layer.cornerRadius = ThemeStore.shared.borderRadius.radius8 + button.layer.masksToBounds = true + button.setTitle(MineLocalize("Demo.TRTC.Portal.Mine.profileOK"), for: .normal) + return button + }() + + let closeButton: UIButton = { + let button = UIButton(type: .custom) + button.setImage(UIImage(named: "mine_profilepop_close"), for: .normal) + return button + }() + + let backButton: UIButton = { + let button = UIButton(type: .custom) + return button + }() + + private let randomButton: CustomRefreshButton = { + let button = CustomRefreshButton(type: .system) + button.setTitle(MineLocalize("Demo.TRTC.Portal.Mine.profileRandom"), for: .normal) + button.titleLabel?.font = ThemeStore.shared.typographyTokens.Regular14 + button.setTitleColor(ThemeStore.shared.colorTokens.buttonColorPrimaryDefault, for: .normal) + button.setImage(UIImage(named: "mine_profile_refresh"), for: .normal) + button.sizeToFit() + button.isEnabled = true + return button + }() + + var isViewReady = false + + override func didMoveToWindow() { + super.didMoveToWindow() + guard !isViewReady else { return } + isViewReady = true + self.backgroundColor = UIColor(red: 0, green: 0, blue: 0, alpha: 0.4) + constructViewHierarchy() + activateConstraints() + bindInteraction() + observeKeyboardNotifications() + } + + convenience init(viewType: UpdateInfoViewType, oldInfo: String? = nil) { + self.init() + self.viewType = viewType + self.oldInfo = oldInfo + let hasInputTextField = (viewType == .hasInput) + if hasInputTextField { + self.inputTextView.text = oldInfo + } else { + self.inputLabel.text = oldInfo + } + self.tipsLabel.isHidden = !hasInputTextField + self.randomButton.isHidden = hasInputTextField + self.inputLabel.isHidden = hasInputTextField + self.inputTextView.isHidden = !hasInputTextField + self.submitButton.isEnabled = !hasInputTextField + } + + override func draw(_ rect: CGRect) { + super.draw(rect) + containerView.roundedRect(rect: self.bounds, byRoundingCorners: [.topLeft, .topRight], cornerRadii: CGSize(width: 12, height: 12)) + } + + func constructViewHierarchy() { + addSubview(backButton) + addSubview(containerView) + containerView.addSubview(titleLabel) + containerView.addSubview(intervalView) + containerView.addSubview(closeButton) + containerView.addSubview(inputBackView) + containerView.addSubview(tipsLabel) + inputBackView.addSubview(inputLabel) + inputBackView.addSubview(inputTextView) + inputBackView.addSubview(randomButton) + containerView.addSubview(submitButton) + } + + func activateConstraints() { + containerView.snp.makeConstraints { make in + make.height.equalTo(convertPixel(h: 237)) + make.bottom.left.right.equalToSuperview() + } + backButton.snp.makeConstraints { make in + make.top.left.right.equalToSuperview() + make.bottom.equalTo(containerView.snp.top) + } + titleLabel.snp.makeConstraints { make in + make.centerX.equalToSuperview() + make.top.equalTo(convertPixel(h: 20)) + } + closeButton.snp.makeConstraints { make in + make.top.equalTo(titleLabel) + make.right.equalToSuperview().offset(convertPixel(w: -16)) + make.size.equalTo(CGSize(width: convertPixel(w: 20), height: convertPixel(h: 20))) + } + intervalView.snp.makeConstraints { make in + make.top.equalToSuperview().offset(convertPixel(h: 60)) + make.width.equalToSuperview() + make.height.equalTo(convertPixel(h: 1)) + } + inputBackView.snp.makeConstraints { make in + make.top.equalToSuperview().offset(convertPixel(h: 78)) + make.centerX.equalToSuperview() + make.left.equalToSuperview().offset(convertPixel(w: 16)) + make.height.equalTo(convertPixel(h: 40)) + } + inputTextView.snp.makeConstraints { make in + make.leading.trailing.equalToSuperview().inset(convertPixel(w: 8)) + make.top.bottom.equalToSuperview() + } + inputLabel.snp.makeConstraints { make in + make.centerY.equalToSuperview() + make.left.equalToSuperview().offset(convertPixel(w: 12)) + } + tipsLabel.snp.makeConstraints { make in + make.leading.equalTo(inputBackView) + make.top.equalTo(inputBackView.snp.bottom).offset(8) + } + randomButton.snp.makeConstraints { make in + make.right.equalToSuperview().offset(convertPixel(w: -12)) + make.centerY.equalToSuperview() + } + submitButton.snp.makeConstraints { make in + make.leading.trailing.equalTo(inputBackView) + make.top.equalTo(inputBackView.snp.bottom).offset(convertPixel(h: 27)) + make.height.equalTo(convertPixel(h: 44)) + } + } + + func bindInteraction() { + backButton.addTarget(self, action: #selector(closeButtonClicked), for: .touchUpInside) + closeButton.addTarget(self, action: #selector(closeButtonClicked), for: .touchUpInside) + randomButton.addTarget(self, action: #selector(randomClicked), for: .touchUpInside) + submitButton.addTarget(self, action: #selector(submitClicked), for: .touchUpInside) + inputTextView.addTarget(self, action: #selector(textFieldDidChange), for: .editingChanged) + } +} + +// MARK: - Actions + +extension ProfileUpdateInfoView { + @objc func closeButtonClicked() { + self.removeFromSuperview() + } + + @objc func randomClicked() { + self.inputLabel.text = getRandomName() + } + + @objc func submitClicked() { + var newInfo: String? + if viewType == .hasInput { + newInfo = inputTextView.text + } else { + newInfo = inputLabel.text + } + if oldInfo != newInfo { + self.submitClosure(newInfo) + } + self.removeFromSuperview() + } + + @objc func show(in viewController: UIViewController) { + self.frame = CGRect(x: 0, y: 0, width: ScreenWidth, height: ScreenHeight) + self.backgroundColor = UIColor(red: 0, green: 0, blue: 0, alpha: 0.5) + viewController.view.window?.addSubview(self) + viewController.view.window?.bringSubviewToFront(self) + } + + @objc func textFieldDidChange() { + checkSubmitButtonState() + } +} + +// MARK: - Random Name + +extension ProfileUpdateInfoView { + func getRandomName() -> String { + let randomNumber = Int.random(in: 1...33) + return BundleLoader.moduleLocalized(key: "Demo.TRTC.login_custom_name_\(randomNumber)", in: Bundle.main, tableName: "LoginLocalized") + } +} + +// MARK: - Keyboard + +extension ProfileUpdateInfoView { + private func observeKeyboardNotifications() { + NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillShow(notification:)), + name: UIResponder.keyboardWillShowNotification, object: nil) + NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillHide(notification:)), + name: UIResponder.keyboardWillHideNotification, object: nil) + } + + @objc private func keyboardWillShow(notification: Notification) { + guard let userInfo = notification.userInfo, + let keyboardFrame = userInfo[UIResponder.keyboardFrameEndUserInfoKey] as? CGRect, + let duration = userInfo[UIResponder.keyboardAnimationDurationUserInfoKey] as? TimeInterval else { + return + } + containerView.snp.updateConstraints { make in + make.bottom.equalToSuperview().offset(-keyboardFrame.height) + } + UIView.animate(withDuration: duration) { + self.layoutIfNeeded() + } + } + + @objc private func keyboardWillHide(notification: Notification) { + guard let userInfo = notification.userInfo, + let duration = userInfo[UIResponder.keyboardAnimationDurationUserInfoKey] as? TimeInterval else { + return + } + containerView.snp.updateConstraints { make in + make.bottom.equalToSuperview() + } + UIView.animate(withDuration: duration) { + self.layoutIfNeeded() + } + } +} + +// MARK: - UITextFieldDelegate + +extension ProfileUpdateInfoView: UITextFieldDelegate { + func checkSubmitButtonState() { + submitButton.isEnabled = !(inputTextView.text?.isEmpty ?? true) + } + + func textFieldDidBeginEditing(_ textField: UITextField) { + checkSubmitButtonState() + } + + func textFieldShouldEndEditing(_ textField: UITextField) -> Bool { + checkSubmitButtonState() + return true + } +} diff --git a/application/mine/Views/RTCExperienceRoomButtonView.swift b/application/mine/Views/RTCExperienceRoomButtonView.swift new file mode 100644 index 00000000..cf02cddc --- /dev/null +++ b/application/mine/Views/RTCExperienceRoomButtonView.swift @@ -0,0 +1,81 @@ +// +// RTCExperienceRoomButtonView.swift +// mine +// + +import UIKit +import AtomicX +import SnapKit + +class RTCExperienceRoomButtonView: UIButton { + + var onClicked: (() -> Void)? + + private let leftImageView: UIImageView = { + let imageView = UIImageView() + imageView.contentMode = .center + return imageView + }() + + private let rightImageView: UIImageView = { + let imageView = UIImageView() + imageView.contentMode = .center + return imageView + }() + + private let label: UILabel = { + let label = UILabel() + label.font = ThemeStore.shared.typographyTokens.Medium14 + return label + }() + + override init(frame: CGRect) { + super.init(frame: frame) + constructViewHierarchy() + activateConstraints() + bindInteraction() + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + private func constructViewHierarchy() { + addSubview(leftImageView) + addSubview(label) + addSubview(rightImageView) + } + + private func activateConstraints() { + leftImageView.snp.makeConstraints { make in + make.top.equalToSuperview().offset(18) + make.left.equalToSuperview().offset(26) + make.width.height.equalTo(18) + } + + label.snp.makeConstraints { make in + make.top.equalToSuperview().offset(18) + make.left.equalToSuperview().offset(62) + } + + rightImageView.snp.makeConstraints { make in + make.top.equalToSuperview().offset(20) + make.right.equalToSuperview().offset(-20) + make.width.height.equalTo(18) + } + } + + private func bindInteraction() { + addTarget(self, action: #selector(buttonClicked), for: .touchUpInside) + } + + func configure(with title: String, leftImageName: String, rightImageName: String) { + label.text = title + leftImageView.image = UIImage(named: leftImageName) + rightImageView.image = UIImage(named: rightImageName) + } + + @objc private func buttonClicked() { + onClicked?() + } +} diff --git a/application/privacy/Extension/PrivacyLocalized.swift b/application/privacy/Extension/PrivacyLocalized.swift new file mode 100644 index 00000000..a76649f7 --- /dev/null +++ b/application/privacy/Extension/PrivacyLocalized.swift @@ -0,0 +1,18 @@ +// +// PrivacyLocalized.swift +// privacy +// + +import Foundation +import AtomicX + +private let PrivacyLocalizeTableName = "PrivacyLocalized" + +func PrivacyLocalize(_ key: String, _ args: CVarArg...) -> String { + return BundleLoader.moduleLocalized( + key: key, + in: Bundle.main, + tableName: PrivacyLocalizeTableName, + arguments: args + ) +} diff --git a/application/privacy/PrivacyConfig.swift b/application/privacy/PrivacyConfig.swift new file mode 100644 index 00000000..bc7586c6 --- /dev/null +++ b/application/privacy/PrivacyConfig.swift @@ -0,0 +1,101 @@ +// +// PrivacyConfig.swift +// privacy +// + +import UIKit +import TUICore + +// MARK: - PrivacyConfig + +final class PrivacyConfig { + + // MARK: - Plist Keys + + static let privacySummaryURLKey = "privacySummaryURL" + static let privacyURLKey = "privacyURL" + static let serviceURLKey = "serviceURL" + static let userProtocolURLKey = "userProtocolURL" + static let dataCollectionURLKey = "dataCollectionURL" + static let thirdShareURLKey = "thirdShareURL" + static let versionKey = "version" + static let personalAuthKey = "personalAuth" + static let dataCollectionKey = "dataCollection" + static let thirdShareKey = "thirdShare" + + // MARK: - User Info + + var userName: String = "" + var userID: String = "" + var userAvatar: String = "" + var phone: String = "" + var email: String = "" + + // MARK: - Plist Data + + private(set) lazy var plistInfo: [String: Any] = { + guard let path = Bundle.main.path(forResource: "Privacy", ofType: "plist"), + let dict = NSDictionary(contentsOfFile: path) as? [String: Any] else { + return [:] + } + return dict + }() + + // MARK: - URL Accessors + + var privacySummaryURL: String { + return (plistInfo[Self.privacySummaryURLKey] as? String) ?? "" + } + + var privacyURL: String { + return (plistInfo[Self.privacyURLKey] as? String) ?? "" + } + + var serviceURL: String { + return (plistInfo[Self.serviceURLKey] as? String) ?? "" + } + + var agreementURL: String { + return (plistInfo[Self.userProtocolURLKey] as? String) ?? "" + } + + var dataCollectionURL: String { + return (plistInfo[Self.dataCollectionURLKey] as? String) ?? "" + } + + var thirdShareURL: String { + return (plistInfo[Self.thirdShareURLKey] as? String) ?? "" + } + + // MARK: - Structured Data + + var personalAuth: [String: Any]? { + return plistInfo[Self.personalAuthKey] as? [String: Any] + } + + var dataCollectionList: [[String: Any]] { + return (plistInfo[Self.dataCollectionKey] as? [[String: Any]]) ?? [] + } + + var thirdShareList: [[String: Any]] { + return (plistInfo[Self.thirdShareKey] as? [[String: Any]]) ?? [] + } + + var authList: [String] { + return (personalAuth?["auth"] as? [String]) ?? [] + } + + var infoList: [String] { + return (personalAuth?["info"] as? [String]) ?? [] + } + + // MARK: - Convenience Init with Current User + + static func makeWithCurrentUser() -> PrivacyConfig { + let config = PrivacyConfig() + config.userName = TUILogin.getNickName() ?? "" + config.userID = TUILogin.getUserID() ?? "" + config.userAvatar = TUILogin.getFaceUrl() ?? "" + return config + } +} diff --git a/application/privacy/PrivacyEntry.swift b/application/privacy/PrivacyEntry.swift new file mode 100644 index 00000000..86fbab1d --- /dev/null +++ b/application/privacy/PrivacyEntry.swift @@ -0,0 +1,94 @@ +// +// PrivacyEntry.swift +// privacy +// + +import AppAssembly +import UIKit + +var isTencentRTCApp: Bool { + return Bundle.main.bundleIdentifier == "com.tencent.rtc.app" +} + +var isRTCubeLab: Bool { + #if RTCUBE_LAB + return true + #else + return false + #endif +} + +public final class PrivacyEntry { + private init() {} + + private static var _enableIdCardVerification = true + public static var enableIdCardVerification: Bool { + get { _enableIdCardVerification } + set { _enableIdCardVerification = newValue } + } + + private static let privacyInfo: NSDictionary = { + guard let path = Bundle.main.path(forResource: "Privacy", ofType: "plist"), + let info = NSDictionary(contentsOfFile: path) + else { + return NSDictionary() + } + return info + }() + + public static var agreementURL: String { + return (privacyInfo["userProtocolURL"] as? String) ?? "" + } + + public static var privacySummaryURL: String { + return (privacyInfo["privacySummaryURL"] as? String) ?? "" + } + + public static var privacyURL: String { + return (privacyInfo["privacyURL"] as? String) ?? "" + } + + public static func makeWebViewController(url: URL, title: String) -> UIViewController { + return PrivacyWebViewController(url: url, title: title) + } + + public static func pushPrivacyPage(_ type: PrivacyPageType, from viewController: UIViewController?) { + let vc: UIViewController + + if type == .privacyCenter { + let config = PrivacyConfig.makeWithCurrentUser() + vc = PrivacyCenterViewController(config: config) + } else { + let (urlString, title) = urlAndTitle(for: type) + guard let url = URL(string: urlString), !urlString.isEmpty else { return } + vc = makeWebViewController(url: url, title: title) + } + + vc.hidesBottomBarWhenPushed = true + if let navigationController = viewController?.navigationController { + navigationController.pushViewController(vc, animated: true) + } else { + let nav = UINavigationController(rootViewController: vc) + nav.modalPresentationStyle = .fullScreen + viewController?.present(nav, animated: true) + } + } + + private static func urlAndTitle(for type: PrivacyPageType) -> (String, String) { + switch type { + case .privacy, .privacyCenter: + return (privacyURL, PrivacyLocalize("Demo.TRTC.Portal.private")) + case .privacySummary: + return (privacySummaryURL, PrivacyLocalize("Demo.TRTC.Portal.privacysummary")) + case .agreement: + return (agreementURL, PrivacyLocalize("Demo.TRTC.Portal.agreement")) + } + } +} + +public enum PrivacyPageType { + case privacy + case privacySummary + case agreement + case privacyCenter +} diff --git a/application/privacy/Resource/Assets/PrivacyAssets.xcassets/Contents.json b/application/privacy/Resource/Assets/PrivacyAssets.xcassets/Contents.json new file mode 100644 index 00000000..73c00596 --- /dev/null +++ b/application/privacy/Resource/Assets/PrivacyAssets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/privacy/Resource/Assets/PrivacyAssets.xcassets/privacy_back.imageset/Contents.json b/application/privacy/Resource/Assets/PrivacyAssets.xcassets/privacy_back.imageset/Contents.json new file mode 100644 index 00000000..ac3d45c4 --- /dev/null +++ b/application/privacy/Resource/Assets/PrivacyAssets.xcassets/privacy_back.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "main_mine_about_back.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "main_mine_about_back@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "main_mine_about_back@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/application/privacy/Resource/Assets/PrivacyAssets.xcassets/privacy_back.imageset/main_mine_about_back.png b/application/privacy/Resource/Assets/PrivacyAssets.xcassets/privacy_back.imageset/main_mine_about_back.png new file mode 100644 index 00000000..c1b18270 Binary files /dev/null and b/application/privacy/Resource/Assets/PrivacyAssets.xcassets/privacy_back.imageset/main_mine_about_back.png differ diff --git a/application/privacy/Resource/Assets/PrivacyAssets.xcassets/privacy_back.imageset/main_mine_about_back@2x.png b/application/privacy/Resource/Assets/PrivacyAssets.xcassets/privacy_back.imageset/main_mine_about_back@2x.png new file mode 100644 index 00000000..e0d845d1 Binary files /dev/null and b/application/privacy/Resource/Assets/PrivacyAssets.xcassets/privacy_back.imageset/main_mine_about_back@2x.png differ diff --git a/application/privacy/Resource/Assets/PrivacyAssets.xcassets/privacy_back.imageset/main_mine_about_back@3x.png b/application/privacy/Resource/Assets/PrivacyAssets.xcassets/privacy_back.imageset/main_mine_about_back@3x.png new file mode 100644 index 00000000..ed992662 Binary files /dev/null and b/application/privacy/Resource/Assets/PrivacyAssets.xcassets/privacy_back.imageset/main_mine_about_back@3x.png differ diff --git a/application/privacy/Resource/Localized/en.lproj/PrivacyLocalized.strings b/application/privacy/Resource/Localized/en.lproj/PrivacyLocalized.strings new file mode 100644 index 00000000..b2367f42 --- /dev/null +++ b/application/privacy/Resource/Localized/en.lproj/PrivacyLocalized.strings @@ -0,0 +1,122 @@ +/* + PrivacyLocalized.strings + privacy + + Privacy module — English localization +*/ + +// MARK: - Login page (existing) +"Demo.TRTC.Portal.privateandagreement" = "I have read and agree to the xxxyyy and zzz"; +"Demo.TRTC.Portal.agreeprivatefirst" = "You must agree to the Privacy Policy and Terms of Use first."; +"Demo.TRTC.Portal." = "《Privacy Policy Summary》"; +"Demo.TRTC.Portal." = "《Privacy Policy》"; +"Demo.TRTC.Portal." = "《Terms of Use》"; +"Demo.TRTC.Portal.privacysummary" = "Privacy Policy Summary"; +"Demo.TRTC.Portal.private" = "Privacy Policy"; +"Demo.TRTC.Portal.agreement" = "Terms of Use"; +"Demo.TRTC.Portal.readAndAgreeConditions" = "Acceptance of Terms and Conditions"; +"Demo.TRTC.Portal.agreeAndContinue" = "Agree & Continue"; +"Demo.TRTC.Portal.privatealertdescription" = "Welcome to TRTC. The Privacy Policy and Terms of Use agreements detail how we collect, use, and store your information, as well as the rights your are entitled to and how to exercise them. By tapping the button below, you agree to the content of the agreements."; +"Demo.TRTC.Portal.privacy" = "Privacy"; + +// MARK: - Privacy Center +"Privacy.Center.title" = "Privacy"; +"Privacy.Center.personalAuth" = "My Information & Authorizations"; +"Privacy.Center.dataCollection" = "Personal Information"; +"Privacy.Center.dataCollectionList" = "Personal Information Collected"; +"Privacy.Center.thirdShare" = "Information Shared with Third Parties"; +"Privacy.Center.privacySummary" = "Privacy Policy Summary"; +"Privacy.Center.privacyAgreement" = "Privacy Policy"; +"Privacy.Center.termsOfService" = "Terms of Service"; +"Privacy.Center.userAgreement" = "Terms of Use"; + +// MARK: - Personal Auth +"Privacy.PersonalAuth.systemAuth" = "System Permissions"; +"Privacy.PersonalAuth.info" = "My Information"; + +// MARK: - System Auth +"Privacy.SystemAuth.camera" = "Camera"; +"Privacy.SystemAuth.microphone" = "Microphone"; +"Privacy.SystemAuth.photos" = "Photos"; +"Privacy.SystemAuth.apns" = "Notification"; +"Privacy.SystemAuth.beauty" = "Beauty"; +"Privacy.SystemAuth.allow" = "Allow"; +"Privacy.SystemAuth.deny" = "Deny"; +"Privacy.SystemAuth.unauthorized" = "Unauthorized"; +"Privacy.SystemAuth.goToSettings" = "Go to System Settings"; + +// MARK: - Auth Detail +"Privacy.AuthDetail.manage" = "Manage %@ access"; +"Privacy.AuthDetail.beautyDesc" = "When you use the tencent effect beautification function, we will perform real-time intelligent recognition of the facial pixel information captured by your camera or pictures you selected from media store. During this process, we will collect your facial pixel information in real-time to provide you with better beautification effects. We will not store or associate your facial pixel information in any form. This information is sensitive personal information, so please provide it with caution. If you do not authorize it, you will not be able to use this function. After authorization, you can disable this function in privacy settings at any time."; + +// MARK: - Personal Info +"Privacy.SystemAuth.avatar" = "Profile Photo"; +"Privacy.SystemAuth.name" = "Name"; +"Privacy.SystemAuth.id" = "ID"; +"Privacy.SystemAuth.phone" = "Phone"; +"Privacy.SystemAuth.email" = "Email"; + +// MARK: - Data Collection +"Privacy.DataCollection.desc" = "You can check %@'s collection of your personal information."; +"Privacy.DataCollection.none" = "None"; + +// MARK: - Copy +"Privacy.MyInfo.copySuccess" = "Copied"; + +// MARK: - Anti-fraud Tips +"Privacy.Antifraud.scamTips" = "Please be vigilant against various types of scams, such as impersonating public security, procuratorial, and judicial authorities, campus loans, and customer service."; +"Privacy.Antifraud.warmPromptTitle" = "Note"; +"Privacy.Antifraud.warmPromptMessage" = "In order to comply with the regulatory requirements of relevant departments, pornography, abuse, violence, terrorism, politics and other illegal content are strictly prohibited.\nThis product is only for functional experience, please do not use it for commercial use. A single use of no more than 10 minutes."; +"Privacy.Antifraud.confirm" = "OK"; + +// MARK: - Screen Share Anti-fraud +"Privacy.ScreenShare.antifraudTitle" = "Safety reminder"; +"Privacy.ScreenShare.antifraudMessage" = "When sharing your screen, private information such as SMS verification codes and passwords may be leaked, causing property damage. Please be wary of various scams."; +"Privacy.ScreenShare.continue" = "Continue to share"; +"Privacy.ScreenShare.cancel" = "Cancel"; + +// MARK: - Live 10-minute Reminder +"Privacy.Live.alertContent" = "For functional experience only, not for commercial use. Each session lasts no more than 10 minutes. Please exit and re-enter to continue the experience."; +"Privacy.Live.remainingTips" = "Experience duration remaining 1 min"; +"Privacy.Live.roomEndTips" = "Experience duration exhausted, room automatically ends."; +"Privacy.Live.timeOutAlert" = "The room has been automatically dismissed."; + +// MARK: - Room High-Risk IP Alert +"Privacy.RoomRiskIP.message" = "Users from high-risk IP regions are present. Exercise caution to avoid scams. If you encounter suspicious situations, please preserve evidence immediately and report to the police."; + +// MARK: - Real Name Authentication +"Privacy.RealAuth.title" = "Real-name Authentication"; +"Privacy.RealAuth.tip" = "When you use the 'Interactive Live Streaming' feature and start a live stream, Tencent Cloud Audio and Video needs to collect your real-name identity information (including your name and ID card number), which will be used solely for real-name authentication. The above information is considered sensitive personal information. If you do not provide your real-name identity information, we will not be able to provide live streaming services to you. For more details, please refer to the privacy policy below regarding how Tencent Cloud Audio and Video processes related personal information."; +"Privacy.RealAuth.faceTokenTip" = "Your account has been restricted due to security risks. Tencent Cloud RTC requires collection of your real-name verification information—including name, ID number, and facial images—solely for identity authentication purposes. Service will be unavailable if you decline to provide this information. For details, refer to Tencent Cloud RTC's Privacy Policy."; +"Privacy.RealAuth.enterName" = "Please enter your real name"; +"Privacy.RealAuth.enterIDCard" = "Please enter your ID card number"; +"Privacy.RealAuth.authenticate" = "Authenticate"; +"Privacy.RealAuth.agree" = "Agree"; +"Privacy.RealAuth.disagree" = "Disagree"; +"Privacy.RealAuth.privacyToast" = "Please read and agree to the Privacy Policy and User Agreement first."; +"Privacy.RealAuth.emptyMessage" = "Name or ID card number is empty"; +"Privacy.RealAuth.cancelledToast" = "Real-name verification cancelled"; +"Privacy.RealAuth.faceAuthFailed" = "Verification failed. Please try again."; +"Privacy.RealAuth.privacyAgreement" = "I have read and agree to the , and "; +"Privacy.RealAuth." = ""; +"Privacy.RealAuth." = ""; +"Privacy.RealAuth." = ""; +"Privacy.RealAuth.privatePage" = "Privacy Policy"; +"Privacy.RealAuth.agreementPage" = "Terms of Use"; +"Privacy.RealAuth.privacySummaryPage" = "Privacy Policy Summary"; + +// MARK: - Report +"Privacy.Report.title" = "Report"; +"Privacy.Report.submit" = "Submit"; +"Privacy.Report.submitSuccess" = "Submitted successfully"; +"Privacy.Report.type.title" = "Report Type"; +"Privacy.Report.type.politics" = "Sensitive"; +"Privacy.Report.type.porn" = "Pornography"; +"Privacy.Report.type.personalAttacks" = "Abuse"; +"Privacy.Report.type.violence" = "Bloody"; +"Privacy.Report.type.ad" = "Advertise"; +"Privacy.Report.type.scam" = "Scam"; +"Privacy.Report.type.illegal" = "Illegal"; +"Privacy.Report.type.other" = "Other"; +"Privacy.Report.description" = "Report Description"; +"Privacy.Report.description.placeholder" = "Please describe your report"; diff --git a/application/privacy/Resource/Localized/zh-Hans.lproj/PrivacyLocalized.strings b/application/privacy/Resource/Localized/zh-Hans.lproj/PrivacyLocalized.strings new file mode 100644 index 00000000..1fba21ee --- /dev/null +++ b/application/privacy/Resource/Localized/zh-Hans.lproj/PrivacyLocalized.strings @@ -0,0 +1,122 @@ +/* + PrivacyLocalized.strings + privacy + + 隐私模块 — 中文本地化 +*/ + +// MARK: - 登录页面已有 +"Demo.TRTC.Portal.privateandagreement" = "我已阅读并同意xxxyyy和zzz"; +"Demo.TRTC.Portal.agreeprivatefirst" = "请先同意隐私条款条款和用户协议。"; +"Demo.TRTC.Portal." = "《隐私政策摘要》"; +"Demo.TRTC.Portal." = "《隐私保护指引》"; +"Demo.TRTC.Portal." = "《用户协议》"; +"Demo.TRTC.Portal.privacysummary" = "隐私政策摘要"; +"Demo.TRTC.Portal.private" = "隐私保护指引"; +"Demo.TRTC.Portal.agreement" = "用户协议"; +"Demo.TRTC.Portal.readAndAgreeConditions" = "请阅读并同意以下条款"; +"Demo.TRTC.Portal.agreeAndContinue" = "同意并继续"; +"Demo.TRTC.Portal.privatealertdescription" = "欢迎您使用腾讯云音视频(TRTC),我们将通过xxx和yyy帮助您了解我们收集、使用、存储个人信息的情况,此外您还可以了解到您所享有的相关权利和实现途径,如您同意请点击下方按钮开始接受我们的服务;"; +"Demo.TRTC.Portal.privacy" = "隐私"; + +// MARK: - 隐私管理中心 +"Privacy.Center.title" = "隐私"; +"Privacy.Center.personalAuth" = "个人信息与权限"; +"Privacy.Center.dataCollection" = "个人信息查看"; +"Privacy.Center.dataCollectionList" = "个人信息收集清单"; +"Privacy.Center.thirdShare" = "第三方信息共享清单"; +"Privacy.Center.privacySummary" = "隐私政策摘要"; +"Privacy.Center.privacyAgreement" = "隐私保护指引"; +"Privacy.Center.termsOfService" = "服务条款"; +"Privacy.Center.userAgreement" = "用户协议"; + +// MARK: - 个人信息与权限 +"Privacy.PersonalAuth.systemAuth" = "系统权限"; +"Privacy.PersonalAuth.info" = "个人信息"; + +// MARK: - 系统权限 +"Privacy.SystemAuth.camera" = "相机"; +"Privacy.SystemAuth.microphone" = "麦克风"; +"Privacy.SystemAuth.photos" = "相册"; +"Privacy.SystemAuth.apns" = "通知"; +"Privacy.SystemAuth.beauty" = "美颜"; +"Privacy.SystemAuth.allow" = "允许"; +"Privacy.SystemAuth.deny" = "拒绝"; +"Privacy.SystemAuth.unauthorized" = "未授权"; +"Privacy.SystemAuth.goToSettings" = "前往系统设置"; + +// MARK: - 权限详情 +"Privacy.AuthDetail.manage" = "管理%@权限"; +"Privacy.AuthDetail.beautyDesc" = "在您使用特效美颜相关功能时,我们会对您实时拍摄或主动上传的面部像素信息进行实时智能识别,这个过程中会实时收集您的面部像素信息,以为您提供更好的美化效果,我们不会以任何形式存储或关联您的面部像素信息。该信息为敏感个人信息,请谨慎提供。如您不授权,将无法使用此功能;您也可以随时在隐私中禁用此功能。"; + +// MARK: - 个人信息 +"Privacy.SystemAuth.avatar" = "头像"; +"Privacy.SystemAuth.name" = "昵称"; +"Privacy.SystemAuth.id" = "ID"; +"Privacy.SystemAuth.phone" = "手机号"; +"Privacy.SystemAuth.email" = "邮箱"; + +// MARK: - 个人信息收集 +"Privacy.DataCollection.desc" = "你可以查阅%@对你的个人信息的收集情况。"; +"Privacy.DataCollection.none" = "未设置"; + +// MARK: - 复制 +"Privacy.MyInfo.copySuccess" = "复制成功"; + +// MARK: - 反诈提示 +"Privacy.Antifraud.scamTips" = "请警惕冒充公检法、校园贷款和客服等各类诈骗,避免泄漏个人信息。"; +"Privacy.Antifraud.warmPromptTitle" = "温馨提示"; +"Privacy.Antifraud.warmPromptMessage" = "为配合相关部门监管要求,严禁色情、辱骂、暴恐、涉政等违规内容。\n本产品仅用于功能体验,请勿商用。单次使用时长不超过10分钟。"; +"Privacy.Antifraud.confirm" = "确认"; + +// MARK: - 屏幕共享反诈提醒 +"Privacy.ScreenShare.antifraudTitle" = "安全提醒"; +"Privacy.ScreenShare.antifraudMessage" = "共享屏幕时可能会泄露短信验证码、密码等隐私信息,造成财产损失,请警惕各种诈骗行为。"; +"Privacy.ScreenShare.continue" = "继续共享"; +"Privacy.ScreenShare.cancel" = "取消"; + +// MARK: - 开播10分钟提示 +"Privacy.Live.alertContent" = "仅供功能体验,不用于商业用途。每次不超过10分钟。请退出并重新进入以继续体验。"; +"Privacy.Live.remainingTips" = "体验时长剩余一分钟"; +"Privacy.Live.roomEndTips" = "体验时间耗尽,房间自动结束。"; +"Privacy.Live.timeOutAlert" = "已自动解散房间"; + +// MARK: - 房间内高风险 IP 提示 +"Privacy.RoomRiskIP.message" = "房间内有来自高危IP地区用户,谨防被骗。如不慎被骗或遇到可疑情形,请注意保存证据,立即拨打110报警。"; + +// MARK: - 实名认证 +"Privacy.RealAuth.title" = "实名认证"; +"Privacy.RealAuth.tip" = "在您使用“互动直播”功能并开通直播时,腾讯云音视频需要收集您的实名身份信息(包括姓名、身份证号),仅用于实名认证。上述信息为敏感个人信息,如您不提供实名身份信息,则我们将无法为您提供直播服务。具体可以参考下方腾讯云音视频处理相关个人信息的隐私政策。"; +"Privacy.RealAuth.faceTokenTip" = "您的账户存在风险,已被限制使用。腾讯云音视频需要收集您的实名身份信息(包括姓名、身份证号及人脸图像​),仅用于实名认证。如您不提供实名身份信息,则我们将无法为您提供服务。具体可以参考下方腾讯云音视频处理相关个人信息的隐私政策。"; +"Privacy.RealAuth.enterName" = "请输入您的真实姓名"; +"Privacy.RealAuth.enterIDCard" = "请输入您的身份证号"; +"Privacy.RealAuth.authenticate" = "认证"; +"Privacy.RealAuth.agree" = "同意"; +"Privacy.RealAuth.disagree" = "不同意"; +"Privacy.RealAuth.privacyToast" = "请先阅读并同意隐私条款和用户协议。"; +"Privacy.RealAuth.emptyMessage" = "姓名或身份证号为空"; +"Privacy.RealAuth.cancelledToast" = "实名认证取消"; +"Privacy.RealAuth.faceAuthFailed" = "核验失败,请重试"; +"Privacy.RealAuth.privacyAgreement" = "我已阅读并同意《隐私政策摘要》、《隐私保护指引》和《用户协议》"; +"Privacy.RealAuth." = "《隐私政策摘要》"; +"Privacy.RealAuth." = "《隐私保护指引》"; +"Privacy.RealAuth." = "《用户协议》"; +"Privacy.RealAuth.privatePage" = "隐私保护指引"; +"Privacy.RealAuth.agreementPage" = "用户协议"; +"Privacy.RealAuth.privacySummaryPage" = "隐私政策摘要"; + +// MARK: - 举报 +"Privacy.Report.title" = "举报"; +"Privacy.Report.submit" = "提交"; +"Privacy.Report.submitSuccess" = "提交成功"; +"Privacy.Report.type.title" = "举报类型"; +"Privacy.Report.type.politics" = "政治敏感"; +"Privacy.Report.type.porn" = "低俗色情"; +"Privacy.Report.type.personalAttacks" = "攻击辱骂"; +"Privacy.Report.type.violence" = "血腥暴力"; +"Privacy.Report.type.ad" = "不良广告"; +"Privacy.Report.type.scam" = "涉嫌诈骗"; +"Privacy.Report.type.illegal" = "违法信息"; +"Privacy.Report.type.other" = "其他违规"; +"Privacy.Report.description" = "情况描述"; +"Privacy.Report.description.placeholder" = "请描述您的举报内容"; diff --git a/application/privacy/Views/PrivacyAuthDetailViewController.swift b/application/privacy/Views/PrivacyAuthDetailViewController.swift new file mode 100644 index 00000000..f8721c17 --- /dev/null +++ b/application/privacy/Views/PrivacyAuthDetailViewController.swift @@ -0,0 +1,196 @@ +// +// PrivacyAuthDetailViewController.swift +// privacy +// + +import UIKit +import AtomicX + +private let kBeautyAuthStatusKey = "beautyAuthStatus" + +// MARK: - PrivacyAuthDetailViewController + +final class PrivacyAuthDetailViewController: UITableViewController { + + private let authType: PrivacyAuthType + private let config: PrivacyConfig + + // MARK: - Header View + + private lazy var headerView: UIView = { + let width = UIScreen.main.bounds.width + let container = UIView(frame: CGRect(x: 0, y: 0, width: width, height: 220)) + container.backgroundColor = ThemeStore.shared.colorTokens.bgColorDefault + + let titleLabel = UILabel() + titleLabel.font = ThemeStore.shared.typographyTokens.Bold20 + titleLabel.textColor = ThemeStore.shared.colorTokens.textColorPrimary + titleLabel.text = localizedTitle + titleLabel.translatesAutoresizingMaskIntoConstraints = false + container.addSubview(titleLabel) + + let descLabel = UILabel() + descLabel.font = ThemeStore.shared.typographyTokens.Regular14 + descLabel.textColor = ThemeStore.shared.colorTokens.textColorSecondary + descLabel.numberOfLines = 0 + descLabel.text = localizedDescription + descLabel.translatesAutoresizingMaskIntoConstraints = false + container.addSubview(descLabel) + + NSLayoutConstraint.activate([ + titleLabel.topAnchor.constraint(equalTo: container.topAnchor, constant: 20), + titleLabel.leadingAnchor.constraint(equalTo: container.leadingAnchor, constant: 16), + titleLabel.trailingAnchor.constraint(equalTo: container.trailingAnchor, constant: -16), + + descLabel.topAnchor.constraint(equalTo: titleLabel.bottomAnchor, constant: 12), + descLabel.leadingAnchor.constraint(equalTo: container.leadingAnchor, constant: 16), + descLabel.trailingAnchor.constraint(equalTo: container.trailingAnchor, constant: -16), + ]) + + return container + }() + + // MARK: - Init + + init(authType: PrivacyAuthType, config: PrivacyConfig) { + self.authType = authType + self.config = config + super.init(style: .grouped) + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + // MARK: - Lifecycle + + override func viewDidLoad() { + super.viewDidLoad() + view.backgroundColor = ThemeStore.shared.colorTokens.bgColorDefault + tableView.backgroundColor = ThemeStore.shared.colorTokens.bgColorDefault + tableView.separatorStyle = .singleLine + tableView.tableHeaderView = headerView + configureNavigation() + } + + // MARK: - Navigation + + private func configureNavigation() { + title = localizedTitle + navigationController?.navigationBar.titleTextAttributes = [ + .font: ThemeStore.shared.typographyTokens.Medium18, + .foregroundColor: UIColor.black + ] + + let backBtn = UIButton(type: .custom) + backBtn.setImage(UIImage(named: "privacy_back"), for: .normal) + backBtn.addTarget(self, action: #selector(backAction), for: .touchUpInside) + backBtn.sizeToFit() + let backItem = UIBarButtonItem(customView: backBtn) + backItem.tintColor = .black + navigationItem.leftBarButtonItem = backItem + } + + @objc private func backAction() { + navigationController?.popViewController(animated: true) + } + + // MARK: - Localized Helpers + + private var localizedTitle: String { + return PrivacyLocalize("Privacy.SystemAuth.\(authType.rawValue)") + } + + private var localizedDescription: String { + if authType == .beauty { + return PrivacyLocalize("Privacy.AuthDetail.beautyDesc") + } + let keyMap: [PrivacyAuthType: String] = [ + .camera: "NSCameraUsageDescription", + .microphone: "NSMicrophoneUsageDescription", + .photos: "NSPhotoLibraryUsageDescription", + ] + guard let plistKey = keyMap[authType] else { return "" } + let desc = Bundle.main.localizedString(forKey: plistKey, value: "", table: "InfoPlist") + if !desc.isEmpty && desc != plistKey { + return desc + } + return (Bundle.main.infoDictionary?[plistKey] as? String) ?? "" + } + + // MARK: - UITableViewDataSource + + override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + return 1 + } + + override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + if authType == .beauty { + return makeBeautySwitchCell() + } else { + return makeSystemSettingCell() + } + } + + private func makeSystemSettingCell() -> UITableViewCell { + let cellID = "SettingCell" + let cell = tableView.dequeueReusableCell(withIdentifier: cellID) + ?? UITableViewCell(style: .default, reuseIdentifier: cellID) + cell.selectionStyle = .none + cell.accessoryType = .disclosureIndicator + cell.backgroundColor = ThemeStore.shared.colorTokens.bgColorDefault + cell.textLabel?.textColor = ThemeStore.shared.colorTokens.textColorPrimary + cell.textLabel?.font = ThemeStore.shared.typographyTokens.Regular16 + let format = PrivacyLocalize("Privacy.AuthDetail.manage") + cell.textLabel?.text = String(format: format, localizedTitle) + return cell + } + + private func makeBeautySwitchCell() -> UITableViewCell { + let cellID = "SwitchCell" + let cell = tableView.dequeueReusableCell(withIdentifier: cellID) + ?? UITableViewCell(style: .default, reuseIdentifier: cellID) + cell.selectionStyle = .none + cell.backgroundColor = ThemeStore.shared.colorTokens.bgColorDefault + cell.textLabel?.textColor = ThemeStore.shared.colorTokens.textColorPrimary + cell.textLabel?.font = ThemeStore.shared.typographyTokens.Regular16 + let format = PrivacyLocalize("Privacy.AuthDetail.manage") + cell.textLabel?.text = String(format: format, localizedTitle) + + cell.accessoryView = nil + + let authSwitch = UISwitch() + let rawValue = UserDefaults.standard.integer(forKey: kBeautyAuthStatusKey) + authSwitch.isOn = (rawValue == BeautyAuthStatus.allow.rawValue) + authSwitch.addTarget(self, action: #selector(beautySwitchChanged(_:)), for: .valueChanged) + cell.accessoryView = authSwitch + + return cell + } + + @objc private func beautySwitchChanged(_ sender: UISwitch) { + let status: BeautyAuthStatus = sender.isOn ? .allow : .deny + UserDefaults.standard.set(status.rawValue, forKey: kBeautyAuthStatusKey) + UserDefaults.standard.synchronize() + } + + // MARK: - UITableViewDelegate + + override func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { + return 49.0 + } + + override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { + if authType != .beauty { + openSystemSettings() + } + } + + // MARK: - System Settings + + private func openSystemSettings() { + guard let url = URL(string: UIApplication.openSettingsURLString), + UIApplication.shared.canOpenURL(url) else { return } + UIApplication.shared.open(url, options: [:], completionHandler: nil) + } +} diff --git a/application/privacy/Views/PrivacyCenterViewController.swift b/application/privacy/Views/PrivacyCenterViewController.swift new file mode 100644 index 00000000..d8b48465 --- /dev/null +++ b/application/privacy/Views/PrivacyCenterViewController.swift @@ -0,0 +1,228 @@ +// +// PrivacyCenterViewController.swift +// privacy +// + +import UIKit +import AtomicX +import SafariServices + +// MARK: - Menu Item + +private enum PrivacyMenuItem { + case personalAuth + case systemPermissions + case dataCollection + case dataCollectionList(url: String) + case thirdShare(url: String) + case privacySummary(url: String) + case privacyAgreement(url: String) + case termsOfService(url: String) + case userAgreement(url: String) +} + +// MARK: - PrivacyCenterViewController + +final class PrivacyCenterViewController: UITableViewController { + + private let config: PrivacyConfig + private var menuItems: [(title: String, item: PrivacyMenuItem)] = [] + + // MARK: - Init + + init(config: PrivacyConfig) { + self.config = config + super.init(style: .plain) + buildMenuItems() + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + // MARK: - Build Data Source + + private func buildMenuItems() { + if isTencentRTCApp { + buildOverseasMenuItems() + } else { + buildDomesticMenuItems() + } + } + + private func buildOverseasMenuItems() { + if config.personalAuth != nil, !config.authList.isEmpty { + let title = PrivacyLocalize("Privacy.PersonalAuth.systemAuth") + menuItems.append((title, .systemPermissions)) + } + + if !config.dataCollectionList.isEmpty { + let title = PrivacyLocalize("Privacy.Center.dataCollection") + menuItems.append((title, .dataCollection)) + } + + // 3. Privacy Policy(URL) + let privacyURL = config.privacyURL + if !privacyURL.isEmpty { + let title = PrivacyLocalize("Privacy.Center.privacyAgreement") + menuItems.append((title, .privacyAgreement(url: privacyURL))) + } + } + + private func buildDomesticMenuItems() { + if config.personalAuth != nil { + let title = PrivacyLocalize("Privacy.Center.personalAuth") + menuItems.append((title, .personalAuth)) + } + + if !config.dataCollectionList.isEmpty { + let title = PrivacyLocalize("Privacy.Center.dataCollection") + menuItems.append((title, .dataCollection)) + } + + let dataCollectionURL = config.dataCollectionURL + if !dataCollectionURL.isEmpty { + let title = PrivacyLocalize("Privacy.Center.dataCollectionList") + menuItems.append((title, .dataCollectionList(url: dataCollectionURL))) + } + + let thirdShareURL = config.thirdShareURL + if !thirdShareURL.isEmpty { + let title = PrivacyLocalize("Privacy.Center.thirdShare") + menuItems.append((title, .thirdShare(url: thirdShareURL))) + } + + let privacySummaryURL = config.privacySummaryURL + if !privacySummaryURL.isEmpty { + let title = PrivacyLocalize("Privacy.Center.privacySummary") + menuItems.append((title, .privacySummary(url: privacySummaryURL))) + } + + let privacyURL = config.privacyURL + if !privacyURL.isEmpty { + let title = PrivacyLocalize("Privacy.Center.privacyAgreement") + menuItems.append((title, .privacyAgreement(url: privacyURL))) + } + + let serviceURL = config.serviceURL + if !serviceURL.isEmpty { + let title = PrivacyLocalize("Privacy.Center.termsOfService") + menuItems.append((title, .termsOfService(url: serviceURL))) + } + + let agreementURL = config.agreementURL + if !agreementURL.isEmpty { + let title = PrivacyLocalize("Privacy.Center.userAgreement") + menuItems.append((title, .userAgreement(url: agreementURL))) + } + } + + // MARK: - Lifecycle + + override func viewDidLoad() { + super.viewDidLoad() + view.backgroundColor = ThemeStore.shared.colorTokens.bgColorDefault + tableView.backgroundColor = ThemeStore.shared.colorTokens.bgColorDefault + tableView.separatorStyle = .none + tableView.contentInset = UIEdgeInsets(top: 0, left: 0, bottom: 20, right: 0) + tableView.tableFooterView = UIView() + configureNavigation() + } + + override func viewWillAppear(_ animated: Bool) { + super.viewWillAppear(animated) + navigationController?.setNavigationBarHidden(false, animated: false) + } + + // MARK: - Navigation + + private func configureNavigation() { + title = PrivacyLocalize("Privacy.Center.title") + navigationController?.navigationBar.titleTextAttributes = [ + .font: ThemeStore.shared.typographyTokens.Medium18, + .foregroundColor: UIColor.black + ] + + let backBtn = UIButton(type: .custom) + backBtn.setImage(UIImage(named: "privacy_back"), for: .normal) + backBtn.addTarget(self, action: #selector(backAction), for: .touchUpInside) + backBtn.sizeToFit() + let backItem = UIBarButtonItem(customView: backBtn) + backItem.tintColor = .black + navigationItem.leftBarButtonItem = backItem + } + + @objc private func backAction() { + navigationController?.popViewController(animated: true) + } + + // MARK: - UITableViewDataSource + + override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + return menuItems.count + } + + override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + let cellID = "PrivacyCenterCell" + let cell = tableView.dequeueReusableCell(withIdentifier: cellID) + ?? UITableViewCell(style: .default, reuseIdentifier: cellID) + cell.selectionStyle = .none + cell.accessoryType = .disclosureIndicator + cell.backgroundColor = ThemeStore.shared.colorTokens.bgColorDefault + cell.textLabel?.textColor = ThemeStore.shared.colorTokens.textColorPrimary + cell.textLabel?.font = ThemeStore.shared.typographyTokens.Regular16 + cell.textLabel?.text = menuItems[indexPath.row].title + return cell + } + + // MARK: - UITableViewDelegate + + override func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { + return 49.0 + } + + override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { + let item = menuItems[indexPath.row].item + switch item { + case .personalAuth: + let vc = PrivacyPersonalAuthViewController(config: config) + navigationController?.pushViewController(vc, animated: true) + + case .systemPermissions: + let vc = PrivacySystemAuthViewController(config: config) + navigationController?.pushViewController(vc, animated: true) + + case .dataCollection: + let vc = PrivacyDataCollectionViewController(config: config) + navigationController?.pushViewController(vc, animated: true) + + case .dataCollectionList(let url), + .thirdShare(let url), + .privacySummary(let url), + .privacyAgreement(let url), + .termsOfService(let url), + .userAgreement(let url): + openURL(url, title: menuItems[indexPath.row].title) + } + } + + // MARK: - Open URL + + private func openURL(_ urlString: String, title: String) { + guard let url = URL(string: urlString) else { return } + let safari = SFSafariViewController(url: url) + safari.title = title + present(safari, animated: true) + } + + // MARK: - Status Bar + + override var prefersStatusBarHidden: Bool { false } + + override var preferredStatusBarStyle: UIStatusBarStyle { + if #available(iOS 13.0, *) { + return .darkContent + } + return .default + } +} diff --git a/application/privacy/Views/PrivacyDataCollectionViewController.swift b/application/privacy/Views/PrivacyDataCollectionViewController.swift new file mode 100644 index 00000000..182a13a1 --- /dev/null +++ b/application/privacy/Views/PrivacyDataCollectionViewController.swift @@ -0,0 +1,246 @@ +// +// PrivacyDataCollectionViewController.swift +// privacy +// + +import UIKit +import AtomicX +import Kingfisher +import TUICore + +// MARK: - PrivacyDataCollectionViewController + +final class PrivacyDataCollectionViewController: UITableViewController { + + private let config: PrivacyConfig + private var dataSource: [[String: Any]] = [] + + // MARK: - Header View + + private lazy var headerView: UIView = { + let width = UIScreen.main.bounds.width + let container = UIView(frame: CGRect(x: 0, y: 0, width: width, height: 160)) + container.backgroundColor = ThemeStore.shared.colorTokens.bgColorDefault + + let titleLabel = UILabel() + titleLabel.font = ThemeStore.shared.typographyTokens.Bold20 + titleLabel.textColor = ThemeStore.shared.colorTokens.textColorPrimary + titleLabel.text = PrivacyLocalize("Privacy.Center.dataCollection") + titleLabel.translatesAutoresizingMaskIntoConstraints = false + container.addSubview(titleLabel) + + let descLabel = UILabel() + descLabel.font = ThemeStore.shared.typographyTokens.Regular14 + descLabel.textColor = ThemeStore.shared.colorTokens.textColorSecondary + descLabel.numberOfLines = 0 + let format = PrivacyLocalize("Privacy.DataCollection.desc") + descLabel.text = String(format: format, appName) + descLabel.translatesAutoresizingMaskIntoConstraints = false + container.addSubview(descLabel) + + NSLayoutConstraint.activate([ + titleLabel.topAnchor.constraint(equalTo: container.topAnchor, constant: 20), + titleLabel.leadingAnchor.constraint(equalTo: container.leadingAnchor, constant: 16), + titleLabel.trailingAnchor.constraint(equalTo: container.trailingAnchor, constant: -16), + + descLabel.topAnchor.constraint(equalTo: titleLabel.bottomAnchor, constant: 12), + descLabel.leadingAnchor.constraint(equalTo: container.leadingAnchor, constant: 16), + descLabel.trailingAnchor.constraint(equalTo: container.trailingAnchor, constant: -16), + ]) + + return container + }() + + // MARK: - Init + + init(config: PrivacyConfig) { + self.config = config + super.init(style: .plain) + self.dataSource = config.dataCollectionList + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + // MARK: - Lifecycle + + override func viewDidLoad() { + super.viewDidLoad() + view.backgroundColor = ThemeStore.shared.colorTokens.bgColorDefault + tableView.backgroundColor = ThemeStore.shared.colorTokens.bgColorDefault + tableView.rowHeight = UITableView.automaticDimension + tableView.estimatedRowHeight = 120 + tableView.separatorStyle = .none + tableView.tableHeaderView = headerView + tableView.register(PrivacyDataCollectionCell.self, forCellReuseIdentifier: PrivacyDataCollectionCell.reuseID) + configureNavigation() + } + + // MARK: - Navigation + + private func configureNavigation() { + title = PrivacyLocalize("Privacy.Center.dataCollection") + navigationController?.navigationBar.titleTextAttributes = [ + .font: ThemeStore.shared.typographyTokens.Medium18, + .foregroundColor: UIColor.black + ] + + let backBtn = UIButton(type: .custom) + backBtn.setImage(UIImage(named: "privacy_back"), for: .normal) + backBtn.addTarget(self, action: #selector(backAction), for: .touchUpInside) + backBtn.sizeToFit() + let backItem = UIBarButtonItem(customView: backBtn) + backItem.tintColor = .black + navigationItem.leftBarButtonItem = backItem + } + + @objc private func backAction() { + navigationController?.popViewController(animated: true) + } + + // MARK: - Helpers + + private var appName: String { + let name = Bundle.main.localizedString(forKey: "CFBundleDisplayName", value: nil, table: "InfoPlist") + if !name.isEmpty && name != "CFBundleDisplayName" { + return name + } + return Bundle.main.infoDictionary?["CFBundleDisplayName"] as? String ?? "" + } + + private func isEnglish() -> Bool { + return TUIGlobalization.getPreferredLanguage()?.hasPrefix("en") ?? false + } + + // MARK: - UITableViewDataSource + + override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + return dataSource.count + } + + override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + guard let cell = tableView.dequeueReusableCell( + withIdentifier: PrivacyDataCollectionCell.reuseID, + for: indexPath + ) as? PrivacyDataCollectionCell else { + return UITableViewCell() + } + + let info = dataSource[indexPath.row] + let type = info["type"] as? String ?? "" + var desc = info["desc"] as? String ?? "" + if isEnglish(), let descEn = info["desc_en"] as? String { + desc = descEn + } + + let title = PrivacyLocalize("Privacy.SystemAuth.\(type)") + let noneText = PrivacyLocalize("Privacy.DataCollection.none") + + if type == "avatar" { + cell.configure( + title: title, + valueText: nil, + purposeText: desc, + avatarURL: config.userAvatar + ) + } else { + var text: String = "" + switch type { + case "name": text = config.userName + case "id": text = config.userID + case "phone": text = config.phone + case "email": text = config.email + default: break + } + if text.isEmpty { text = noneText } + cell.configure( + title: title, + valueText: text, + purposeText: desc, + avatarURL: nil + ) + } + return cell + } +} + +// MARK: - PrivacyDataCollectionCell + +private final class PrivacyDataCollectionCell: UITableViewCell { + + static let reuseID = "PrivacyDataCollectionCell" + + let titleLabel: UILabel = { + let label = UILabel() + label.font = ThemeStore.shared.typographyTokens.Medium16 + label.textColor = ThemeStore.shared.colorTokens.textColorPrimary + return label + }() + + let valueLabel: UILabel = { + let label = UILabel() + label.font = ThemeStore.shared.typographyTokens.Regular14 + label.textColor = .gray + return label + }() + + let avatarImageView: UIImageView = { + let iv = UIImageView() + iv.contentMode = .scaleAspectFill + iv.layer.cornerRadius = ThemeStore.shared.borderRadius.radius20 + iv.clipsToBounds = true + iv.isHidden = true + return iv + }() + + let purposeTextLabel: UILabel = { + let label = UILabel() + label.font = ThemeStore.shared.typographyTokens.Regular14 + label.textColor = ThemeStore.shared.colorTokens.textColorTertiary + label.numberOfLines = 0 + return label + }() + + override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { + super.init(style: style, reuseIdentifier: reuseIdentifier) + selectionStyle = .none + backgroundColor = ThemeStore.shared.colorTokens.bgColorDefault + + let stack = UIStackView(arrangedSubviews: [titleLabel, valueLabel, avatarImageView, purposeTextLabel]) + stack.axis = .vertical + stack.spacing = 6 + stack.alignment = .leading + stack.translatesAutoresizingMaskIntoConstraints = false + contentView.addSubview(stack) + + NSLayoutConstraint.activate([ + stack.topAnchor.constraint(equalTo: contentView.topAnchor, constant: 12), + stack.leadingAnchor.constraint(equalTo: contentView.leadingAnchor, constant: 16), + stack.trailingAnchor.constraint(equalTo: contentView.trailingAnchor, constant: -16), + stack.bottomAnchor.constraint(equalTo: contentView.bottomAnchor, constant: -12), + avatarImageView.widthAnchor.constraint(equalToConstant: 40), + avatarImageView.heightAnchor.constraint(equalToConstant: 40), + ]) + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + func configure(title: String, valueText: String?, purposeText: String, avatarURL: String?) { + titleLabel.text = title + + if let avatarURL = avatarURL, let url = URL(string: avatarURL) { + avatarImageView.isHidden = false + avatarImageView.kf.setImage(with: url) + valueLabel.isHidden = true + } else { + avatarImageView.isHidden = true + valueLabel.isHidden = false + valueLabel.text = valueText + } + + purposeTextLabel.text = purposeText + } +} diff --git a/application/privacy/Views/PrivacyMyInfoViewController.swift b/application/privacy/Views/PrivacyMyInfoViewController.swift new file mode 100644 index 00000000..76605146 --- /dev/null +++ b/application/privacy/Views/PrivacyMyInfoViewController.swift @@ -0,0 +1,239 @@ +// +// PrivacyMyInfoViewController.swift +// privacy +// + +import UIKit +import AtomicX +import Kingfisher +import SnapKit + +// MARK: - PrivacyMyInfoViewController + +final class PrivacyMyInfoViewController: UITableViewController { + + private let config: PrivacyConfig + private var infoItems: [String] = [] + + // MARK: - Copy Tip + + private lazy var tipLabel: UILabel = { + let label = UILabel() + label.backgroundColor = .black + label.layer.cornerRadius = ThemeStore.shared.borderRadius.radius4 + label.layer.masksToBounds = true + label.text = PrivacyLocalize("Privacy.MyInfo.copySuccess") + label.textColor = .white + label.textAlignment = .center + label.font = ThemeStore.shared.typographyTokens.Regular14 + label.alpha = 0 + return label + }() + + // MARK: - Init + + init(config: PrivacyConfig) { + self.config = config + super.init(style: .plain) + self.infoItems = config.infoList + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + // MARK: - Lifecycle + + override func viewDidLoad() { + super.viewDidLoad() + view.backgroundColor = ThemeStore.shared.colorTokens.bgColorDefault + tableView.backgroundColor = ThemeStore.shared.colorTokens.bgColorDefault + tableView.separatorStyle = .singleLine + tableView.register(PrivacyMyInfoCell.self, forCellReuseIdentifier: PrivacyMyInfoCell.reuseID) + configureNavigation() + + view.addSubview(tipLabel) + tipLabel.snp.makeConstraints { make in + make.center.equalToSuperview() + make.width.equalTo(150) + make.height.equalTo(30) + } + } + + // MARK: - Navigation + + private func configureNavigation() { + title = PrivacyLocalize("Privacy.PersonalAuth.info") + navigationController?.navigationBar.titleTextAttributes = [ + .font: ThemeStore.shared.typographyTokens.Medium18, + .foregroundColor: UIColor.black + ] + + let backBtn = UIButton(type: .custom) + backBtn.setImage(UIImage(named: "privacy_back"), for: .normal) + backBtn.addTarget(self, action: #selector(backAction), for: .touchUpInside) + backBtn.sizeToFit() + let backItem = UIBarButtonItem(customView: backBtn) + backItem.tintColor = .black + navigationItem.leftBarButtonItem = backItem + } + + @objc private func backAction() { + navigationController?.popViewController(animated: true) + } + + // MARK: - UITableViewDataSource + + override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + return infoItems.count + } + + override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + guard let cell = tableView.dequeueReusableCell( + withIdentifier: PrivacyMyInfoCell.reuseID, + for: indexPath + ) as? PrivacyMyInfoCell else { + return UITableViewCell() + } + + let key = infoItems[indexPath.row] + let title = PrivacyLocalize("Privacy.SystemAuth.\(key)") + let noneText = PrivacyLocalize("Privacy.DataCollection.none") + + if key == "avatar" { + cell.configure(title: title, value: nil, avatarURL: config.userAvatar) + } else { + var text = "" + switch key { + case "name": text = config.userName + case "id": text = config.userID + case "phone": text = config.phone + case "email": text = config.email + default: break + } + if text.isEmpty { text = noneText } + cell.configure(title: title, value: text, avatarURL: nil) + } + return cell + } + + // MARK: - UITableViewDelegate + + override func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { + let key = infoItems[indexPath.row] + return key == "avatar" ? 74.0 : 49.0 + } + + override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { + let key = infoItems[indexPath.row] + guard key != "avatar" else { return } + + var text = "" + switch key { + case "name": text = config.userName + case "id": text = config.userID + case "phone": text = config.phone + case "email": text = config.email + default: break + } + copyText(text) + } + + // MARK: - Copy + + private func copyText(_ text: String) { + guard !text.isEmpty else { return } + UIPasteboard.general.string = text + showCopyTip() + } + + private func showCopyTip() { + tipLabel.layer.removeAllAnimations() + UIView.animateKeyframes(withDuration: 2.0, delay: 0, options: .layoutSubviews) { [weak self] in + UIView.addKeyframe(withRelativeStartTime: 0, relativeDuration: 0.25) { + self?.tipLabel.alpha = 1.0 + } + UIView.addKeyframe(withRelativeStartTime: 0.75, relativeDuration: 0.25) { + self?.tipLabel.alpha = 0.0 + } + } completion: { [weak self] _ in + self?.tipLabel.alpha = 0.0 + } + } +} + +// MARK: - PrivacyMyInfoCell + +private final class PrivacyMyInfoCell: UITableViewCell { + + static let reuseID = "PrivacyMyInfoCell" + + let titleLabel: UILabel = { + let label = UILabel() + label.font = ThemeStore.shared.typographyTokens.Regular16 + label.textColor = ThemeStore.shared.colorTokens.textColorPrimary + return label + }() + + let valueLabel: UILabel = { + let label = UILabel() + label.font = ThemeStore.shared.typographyTokens.Regular14 + label.textColor = .gray + return label + }() + + let avatarImageView: UIImageView = { + let iv = UIImageView() + iv.contentMode = .scaleAspectFill + iv.layer.cornerRadius = 22 + iv.clipsToBounds = true + iv.isHidden = true + return iv + }() + + override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { + super.init(style: style, reuseIdentifier: reuseIdentifier) + selectionStyle = .none + backgroundColor = ThemeStore.shared.colorTokens.bgColorDefault + + contentView.addSubview(titleLabel) + contentView.addSubview(valueLabel) + contentView.addSubview(avatarImageView) + + titleLabel.snp.makeConstraints { make in + make.leading.equalToSuperview().offset(16) + make.centerY.equalToSuperview() + make.width.lessThanOrEqualTo(120) + } + + valueLabel.snp.makeConstraints { make in + make.trailing.equalToSuperview().offset(-16) + make.centerY.equalToSuperview() + make.leading.greaterThanOrEqualTo(titleLabel.snp.trailing).offset(8) + } + + avatarImageView.snp.makeConstraints { make in + make.trailing.equalToSuperview().offset(-16) + make.centerY.equalToSuperview() + make.width.height.equalTo(44) + } + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + func configure(title: String, value: String?, avatarURL: String?) { + titleLabel.text = title + + if let avatarURL = avatarURL, let url = URL(string: avatarURL) { + avatarImageView.isHidden = false + avatarImageView.kf.setImage(with: url) + valueLabel.isHidden = true + } else { + avatarImageView.isHidden = true + valueLabel.isHidden = false + valueLabel.text = value + } + } +} diff --git a/application/privacy/Views/PrivacyPersonalAuthViewController.swift b/application/privacy/Views/PrivacyPersonalAuthViewController.swift new file mode 100644 index 00000000..12c33c78 --- /dev/null +++ b/application/privacy/Views/PrivacyPersonalAuthViewController.swift @@ -0,0 +1,112 @@ +// +// PrivacyPersonalAuthViewController.swift +// privacy +// + +import UIKit +import AtomicX + +final class PrivacyPersonalAuthViewController: UITableViewController { + + private let config: PrivacyConfig + + private var dataSource: [(title: String, data: [String])] = [] + + // MARK: - Init + + init(config: PrivacyConfig) { + self.config = config + super.init(style: .plain) + buildDataSource() + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + // MARK: - Build Data + + private func buildDataSource() { + let authList = config.authList + if !authList.isEmpty { + let title = PrivacyLocalize("Privacy.PersonalAuth.systemAuth") + dataSource.append((title, authList)) + } + let infoList = config.infoList + if !infoList.isEmpty { + let title = PrivacyLocalize("Privacy.PersonalAuth.info") + dataSource.append((title, infoList)) + } + } + + // MARK: - Lifecycle + + override func viewDidLoad() { + super.viewDidLoad() + view.backgroundColor = ThemeStore.shared.colorTokens.bgColorDefault + tableView.backgroundColor = ThemeStore.shared.colorTokens.bgColorDefault + tableView.separatorStyle = .none + configureNavigation() + } + + // MARK: - Navigation + + private func configureNavigation() { + title = PrivacyLocalize("Privacy.Center.personalAuth") + navigationController?.navigationBar.titleTextAttributes = [ + .font: ThemeStore.shared.typographyTokens.Medium18, + .foregroundColor: UIColor.black + ] + + let backBtn = UIButton(type: .custom) + backBtn.setImage(UIImage(named: "privacy_back"), for: .normal) + backBtn.addTarget(self, action: #selector(backAction), for: .touchUpInside) + backBtn.sizeToFit() + let backItem = UIBarButtonItem(customView: backBtn) + backItem.tintColor = .black + navigationItem.leftBarButtonItem = backItem + } + + @objc private func backAction() { + navigationController?.popViewController(animated: true) + } + + // MARK: - UITableViewDataSource + + override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + return dataSource.count + } + + override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + let cellID = "PersonalAuthCell" + let cell = tableView.dequeueReusableCell(withIdentifier: cellID) + ?? UITableViewCell(style: .default, reuseIdentifier: cellID) + cell.selectionStyle = .none + cell.accessoryType = .disclosureIndicator + cell.backgroundColor = ThemeStore.shared.colorTokens.bgColorDefault + cell.textLabel?.textColor = ThemeStore.shared.colorTokens.textColorPrimary + cell.textLabel?.font = ThemeStore.shared.typographyTokens.Regular16 + cell.textLabel?.text = dataSource[indexPath.row].title + return cell + } + + // MARK: - UITableViewDelegate + + override func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { + return 49.0 + } + + override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { + let item = dataSource[indexPath.row] + let systemAuthTitle = PrivacyLocalize("Privacy.PersonalAuth.systemAuth") + let infoTitle = PrivacyLocalize("Privacy.PersonalAuth.info") + + if item.title == systemAuthTitle { + let vc = PrivacySystemAuthViewController(config: config) + navigationController?.pushViewController(vc, animated: true) + } else if item.title == infoTitle { + let vc = PrivacyMyInfoViewController(config: config) + navigationController?.pushViewController(vc, animated: true) + } + } +} diff --git a/application/privacy/Views/PrivacySystemAuthViewController.swift b/application/privacy/Views/PrivacySystemAuthViewController.swift new file mode 100644 index 00000000..d3ad3d0a --- /dev/null +++ b/application/privacy/Views/PrivacySystemAuthViewController.swift @@ -0,0 +1,244 @@ +// +// PrivacySystemAuthViewController.swift +// privacy +// + +import UIKit +import AtomicX +import AVFoundation +import Photos +import UserNotifications + +// MARK: - Auth Type + +enum PrivacyAuthType: String { + case camera + case microphone + case photos + case apns + case beauty +} + +// MARK: - Beauty Auth Status + +enum BeautyAuthStatus: Int { + case notDetermined = 0 + case allow = 1 + case deny = 2 +} + +private let kBeautyAuthStatusKey = "beautyAuthStatus" + +// MARK: - PrivacySystemAuthViewController + +final class PrivacySystemAuthViewController: UITableViewController { + + private let config: PrivacyConfig + private var authItems: [String] = [] + private var notificationStatusText: String = "" + + // MARK: - Init + + init(config: PrivacyConfig) { + self.config = config + super.init(style: .plain) + self.authItems = config.authList + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + // MARK: - Lifecycle + + override func viewDidLoad() { + super.viewDidLoad() + view.backgroundColor = ThemeStore.shared.colorTokens.bgColorDefault + tableView.backgroundColor = ThemeStore.shared.colorTokens.bgColorDefault + tableView.separatorStyle = .none + configureNavigation() + configureFooter() + + NotificationCenter.default.addObserver( + self, + selector: #selector(appDidBecomeActive), + name: UIApplication.didBecomeActiveNotification, + object: nil + ) + } + + override func viewWillAppear(_ animated: Bool) { + super.viewWillAppear(animated) + refreshAuthStatus() + } + + deinit { + NotificationCenter.default.removeObserver(self) + } + + // MARK: - Navigation + + private func configureNavigation() { + title = PrivacyLocalize("Privacy.PersonalAuth.systemAuth") + navigationController?.navigationBar.titleTextAttributes = [ + .font: ThemeStore.shared.typographyTokens.Medium18, + .foregroundColor: UIColor.black + ] + + let backBtn = UIButton(type: .custom) + backBtn.setImage(UIImage(named: "privacy_back"), for: .normal) + backBtn.addTarget(self, action: #selector(backAction), for: .touchUpInside) + backBtn.sizeToFit() + let backItem = UIBarButtonItem(customView: backBtn) + backItem.tintColor = .black + navigationItem.leftBarButtonItem = backItem + } + + @objc private func backAction() { + navigationController?.popViewController(animated: true) + } + + private func configureFooter() { + let screenWidth = UIScreen.main.bounds.width + let footerView = UIView(frame: CGRect(x: 0, y: 0, width: screenWidth, height: 40)) + footerView.backgroundColor = .clear + + let settingBtn = UIButton(type: .system) + settingBtn.frame = CGRect(x: screenWidth / 2 - 100, y: 0, width: 200, height: 40) + settingBtn.setTitle(PrivacyLocalize("Privacy.SystemAuth.goToSettings"), for: .normal) + settingBtn.addTarget(self, action: #selector(openSystemSettings), for: .touchUpInside) + footerView.addSubview(settingBtn) + + tableView.tableFooterView = footerView + } + + // MARK: - Actions + + @objc private func openSystemSettings() { + guard let url = URL(string: UIApplication.openSettingsURLString), + UIApplication.shared.canOpenURL(url) else { return } + UIApplication.shared.open(url, options: [:], completionHandler: nil) + } + + @objc private func appDidBecomeActive() { + refreshAuthStatus() + } + + // MARK: - Refresh + + private func refreshAuthStatus() { + tableView.reloadData() + checkNotificationStatus() + } + + private func checkNotificationStatus() { + let center = UNUserNotificationCenter.current() + center.getNotificationSettings { [weak self] settings in + guard let self = self else { return } + switch settings.authorizationStatus { + case .authorized: + self.notificationStatusText = PrivacyLocalize("Privacy.SystemAuth.allow") + case .denied: + self.notificationStatusText = PrivacyLocalize("Privacy.SystemAuth.deny") + default: + self.notificationStatusText = PrivacyLocalize("Privacy.SystemAuth.unauthorized") + } + DispatchQueue.main.async { + self.tableView.reloadData() + } + } + } + + // MARK: - Auth Status Text + + private func authStatusText(for type: PrivacyAuthType) -> String { + switch type { + case .camera: + let status = AVCaptureDevice.authorizationStatus(for: .video) + switch status { + case .authorized: return PrivacyLocalize("Privacy.SystemAuth.allow") + case .notDetermined: return PrivacyLocalize("Privacy.SystemAuth.unauthorized") + default: return PrivacyLocalize("Privacy.SystemAuth.deny") + } + + case .microphone: + let status = AVCaptureDevice.authorizationStatus(for: .audio) + switch status { + case .authorized: return PrivacyLocalize("Privacy.SystemAuth.allow") + case .notDetermined: return PrivacyLocalize("Privacy.SystemAuth.unauthorized") + default: return PrivacyLocalize("Privacy.SystemAuth.deny") + } + + case .photos: + let status = PHPhotoLibrary.authorizationStatus() + switch status { + case .authorized: return PrivacyLocalize("Privacy.SystemAuth.allow") + case .notDetermined: return PrivacyLocalize("Privacy.SystemAuth.unauthorized") + default: return PrivacyLocalize("Privacy.SystemAuth.deny") + } + + case .apns: + return notificationStatusText.isEmpty + ? PrivacyLocalize("Privacy.SystemAuth.unauthorized") + : notificationStatusText + + case .beauty: + let rawValue = UserDefaults.standard.integer(forKey: kBeautyAuthStatusKey) + let status = BeautyAuthStatus(rawValue: rawValue) ?? .notDetermined + switch status { + case .allow: return PrivacyLocalize("Privacy.SystemAuth.allow") + case .notDetermined: return PrivacyLocalize("Privacy.SystemAuth.unauthorized") + case .deny: return PrivacyLocalize("Privacy.SystemAuth.deny") + } + } + } + + private func localizedTitle(for key: String) -> String { + return PrivacyLocalize("Privacy.SystemAuth.\(key)") + } + + // MARK: - UITableViewDataSource + + override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + return authItems.count + } + + override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + let cellID = "SystemAuthCell" + let cell = tableView.dequeueReusableCell(withIdentifier: cellID) + ?? UITableViewCell(style: .value1, reuseIdentifier: cellID) + cell.selectionStyle = .none + cell.accessoryType = .disclosureIndicator + cell.backgroundColor = ThemeStore.shared.colorTokens.bgColorDefault + cell.textLabel?.textColor = ThemeStore.shared.colorTokens.textColorPrimary + cell.textLabel?.font = ThemeStore.shared.typographyTokens.Regular16 + cell.detailTextLabel?.textColor = .gray + cell.detailTextLabel?.font = ThemeStore.shared.typographyTokens.Regular14 + + let key = authItems[indexPath.row] + cell.textLabel?.text = localizedTitle(for: key) + + if let authType = PrivacyAuthType(rawValue: key) { + cell.detailTextLabel?.text = authStatusText(for: authType) + } + return cell + } + + // MARK: - UITableViewDelegate + + override func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { + return 49.0 + } + + override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { + let key = authItems[indexPath.row] + guard let authType = PrivacyAuthType(rawValue: key) else { return } + + if authType == .apns { + openSystemSettings() + } else { + let vc = PrivacyAuthDetailViewController(authType: authType, config: config) + navigationController?.pushViewController(vc, animated: true) + } + } +} diff --git a/application/privacy/Views/PrivacyWebViewController.swift b/application/privacy/Views/PrivacyWebViewController.swift new file mode 100644 index 00000000..9bd728d0 --- /dev/null +++ b/application/privacy/Views/PrivacyWebViewController.swift @@ -0,0 +1,103 @@ +// +// PrivacyWebViewController.swift +// privacy +// + +import UIKit +import AtomicX +import WebKit + +class PrivacyWebViewController: UIViewController { + + lazy var webView: WKWebView = { + let webview = WKWebView(frame: .zero) + webview.isOpaque = false + webview.backgroundColor = .clear + webview.scrollView.backgroundColor = .clear + webview.navigationDelegate = self + if #available(iOS 11.0, *) { + webview.scrollView.contentInsetAdjustmentBehavior = .never + } + return webview + }() + + let url: URL + let titleString: String + + init(url: URL, title: String) { + self.url = url + self.titleString = title + super.init(nibName: nil, bundle: nil) + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + override func viewDidLoad() { + super.viewDidLoad() + + view.backgroundColor = ThemeStore.shared.colorTokens.bgColorDefault + configNav() + + view.addSubview(webView) + webView.snp.makeConstraints { (make) in + make.edges.equalToSuperview() + } + let req = URLRequest(url: url) + webView.load(req) + } + + func configNav() { + self.title = titleString; + navigationController?.navigationBar.titleTextAttributes = + [NSAttributedString.Key.foregroundColor : UIColor.black, + NSAttributedString.Key.font : ThemeStore.shared.typographyTokens.Bold18 + ] + navigationController?.navigationBar.barTintColor = .white + navigationController?.navigationBar.isTranslucent = false + + let backBtn = UIButton(type: .custom) + backBtn.setImage(UIImage(named: "privacy_back"), for: .normal) + backBtn.addTarget(self, action: #selector(backBtnClick), for: .touchUpInside) + backBtn.sizeToFit() + let item = UIBarButtonItem(customView: backBtn) + item.tintColor = .black + navigationItem.leftBarButtonItem = item + } + + @objc func backBtnClick() { + navigationController?.popViewController(animated: true) + } + + override func viewWillAppear(_ animated: Bool) { + super.viewWillAppear(animated) + navigationController?.setNavigationBarHidden(false, animated: true) + } + + override func viewWillDisappear(_ animated: Bool) { + super.viewWillDisappear(animated) + navigationController?.setNavigationBarHidden(true, animated: true) + } + + override var preferredStatusBarStyle: UIStatusBarStyle { + get { + if #available(iOS 13.0, *) { + return .darkContent + } else { + return .default + } + } + } + + override var prefersStatusBarHidden: Bool { + get { + return false + } + } +} + +extension PrivacyWebViewController: WKNavigationDelegate { + func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) { + } +} diff --git a/application/privacy/Views/Report/ReportDescView.swift b/application/privacy/Views/Report/ReportDescView.swift new file mode 100644 index 00000000..4ee77190 --- /dev/null +++ b/application/privacy/Views/Report/ReportDescView.swift @@ -0,0 +1,125 @@ +// +// ReportDescView.swift +// privacy +// + +import Foundation +import UIKit +import RTCCommon +import SnapKit + +class ReportDescView: UIView { + + private lazy var titleLabel: UILabel = { + let label = UILabel(frame: .zero) + label.text = PrivacyLocalize("Privacy.Report.description") + label.font = UIFont.systemFont(ofSize: 12) + label.textColor = UIColor(hex: "888888") ?? UIColor.lightText + return label + }() + + lazy var textView: UITextView = { + let view = UITextView(frame: .zero) + view.textColor = UIColor(hex: "BBBBBB") + view.font = UIFont.systemFont(ofSize: 12) + view.layer.borderWidth = 1.0 + view.layer.borderColor = (UIColor(hex: "EEEEEE") ?? UIColor.lightText).cgColor + view.text = PrivacyLocalize("Privacy.Report.description.placeholder") + return view + }() + + override init(frame: CGRect) { + super.init(frame: frame) + NotificationCenter.default.addObserver( + self, + selector: #selector(keyboardFrameChange(noti:)), + name: UIResponder.keyboardWillChangeFrameNotification, + object: nil + ) + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + deinit { + NotificationCenter.default.removeObserver(self) + } + + private var isViewReady = false + override func didMoveToWindow() { + super.didMoveToWindow() + guard !isViewReady else { return } + isViewReady = true + constructViewHierarchy() + activateConstraints() + bindInteraction() + } +} + +// MARK: - UI Layout + +extension ReportDescView { + + private func constructViewHierarchy() { + addSubview(titleLabel) + addSubview(textView) + } + + private func activateConstraints() { + titleLabel.snp.makeConstraints { make in + make.leading.equalTo(20) + make.top.equalTo(0) + } + textView.snp.makeConstraints { make in + make.top.equalTo(titleLabel.snp.bottom).offset(10) + make.leading.trailing.equalToSuperview().inset(20) + make.height.equalTo(122) + make.bottom.equalTo(-20) + } + } + + private func bindInteraction() { + textView.delegate = self + } +} + +// MARK: - UITextViewDelegate + +extension ReportDescView: UITextViewDelegate { + func textViewShouldBeginEditing(_ textView: UITextView) -> Bool { + if textView.text == PrivacyLocalize("Privacy.Report.description.placeholder") { + textView.text = "" + textView.textColor = .black + } + return true + } + + func textViewDidEndEditing(_ textView: UITextView) { + if textView.text == "" { + textView.text = PrivacyLocalize("Privacy.Report.description.placeholder") + textView.textColor = UIColor(hex: "BBBBBB") + } + } + + func textViewDidChange(_ textView: UITextView) { + textView.text = textView.text.subString(toByteLength: 150) + } +} + +// MARK: - Keyboard + +extension ReportDescView { + @objc + func keyboardFrameChange(noti: Notification) { + guard let info = noti.userInfo else { return } + guard let value = info[UIResponder.keyboardFrameEndUserInfoKey], value is CGRect else { return } + let rect = value as! CGRect + if rect.minY == UIScreen.main.bounds.height { + superview?.transform = .identity + } else { + let textRect = textView.convert(textView.frame, to: nil) + superview?.transform = CGAffineTransform(translationX: 0, y: -(textRect.maxY - rect.minY)) + } + } +} diff --git a/application/privacy/Views/Report/ReportNetworkService.swift b/application/privacy/Views/Report/ReportNetworkService.swift new file mode 100644 index 00000000..e46ad3b8 --- /dev/null +++ b/application/privacy/Views/Report/ReportNetworkService.swift @@ -0,0 +1,67 @@ +// +// ReportNetworkService.swift +// privacy +// + +import Foundation +import Alamofire +import Login + +private var reportBaseUrl: String { + return LoginEntry.shared.config.httpBaseUrl + "base/v1/reports/report_room" +} + +enum ReportNetworkService { + + static func reportRoom(targetRoomId: String, + ownerId: String, + reason: String, + description: String, + success: (() -> Void)?, + failed: ((_ errorCode: Int32, _ errorMessage: String) -> Void)?) { + + var params: [String: Any] = [ + "targetRoomId": targetRoomId, + "targetUserId": ownerId, + "reason": reason, + "description": description, + ] + + if let userId = LoginManager.shared.getCurrentUser()?.userId { + params["userId"] = userId + } + if let token = LoginManager.shared.getCurrentUser()?.token { + params["token"] = token + } + if let apaasAppId = LoginManager.shared.getCurrentUser()?.apaasAppId { + params["apaasAppId"] = apaasAppId + } + + AF.request(reportBaseUrl, + method: .post, + parameters: params, + encoding: JSONEncoding.default) + .responseData { response in + switch response.result { + case .success(let data): + guard let json = try? JSONSerialization.jsonObject(with: data) as? [String: Any] else { + DispatchQueue.main.async { failed?(-1, "Invalid JSON response") } + return + } + let errorCode = json["errorCode"] as? Int32 ?? -1 + let errorMessage = json["errorMessage"] as? String ?? "Unknown error" + DispatchQueue.main.async { + if errorCode == 0 { + success?() + } else { + failed?(errorCode, errorMessage) + } + } + case .failure(let error): + DispatchQueue.main.async { + failed?(-1, error.localizedDescription) + } + } + } + } +} diff --git a/application/privacy/Views/Report/ReportTypeView.swift b/application/privacy/Views/Report/ReportTypeView.swift new file mode 100644 index 00000000..74e2b1a8 --- /dev/null +++ b/application/privacy/Views/Report/ReportTypeView.swift @@ -0,0 +1,160 @@ +// +// ReportTypeView.swift +// privacy +// + +import Foundation +import UIKit +import RTCCommon +import SnapKit + +// MARK: - ReportTypeCollectionCell + +class ReportTypeCollectionCell: UICollectionViewCell { + + lazy var titleLabel: UILabel = { + let label = UILabel(frame: .zero) + label.textColor = UIColor.black + label.backgroundColor = UIColor(hex: "F4F5F9") + label.font = UIFont.systemFont(ofSize: 12) + label.textAlignment = .center + return label + }() + + private var isViewReady = false + override func didMoveToWindow() { + super.didMoveToWindow() + guard !isViewReady else { return } + isViewReady = true + constructViewHierarchy() + activateConstraints() + } + + private func constructViewHierarchy() { + contentView.addSubview(titleLabel) + } + + private func activateConstraints() { + titleLabel.snp.makeConstraints { make in + make.edges.equalToSuperview() + } + } + + func updateSelect(_ isSelect: Bool) { + titleLabel.textColor = isSelect ? UIColor.white : UIColor.black + titleLabel.backgroundColor = UIColor(hex: (isSelect ? "006EFF" : "F4F5F9")) + } +} + +// MARK: - ReportTypeView + +class ReportTypeView: UIView { + + var currentSelectType: ReportType = .none + var selectTypeBlock: ((_ type: ReportType) -> Void)? + + convenience init(types: [ReportType]) { + self.init(frame: .zero) + self.types = types + } + + private var types: [ReportType] = [] + + private lazy var titleLabel: UILabel = { + let label = UILabel(frame: .zero) + let content = NSMutableAttributedString( + string: PrivacyLocalize("Privacy.Report.type.title") + "*", + attributes: [ + .font: UIFont.systemFont(ofSize: 12), + .foregroundColor: UIColor(hex: "888888") ?? UIColor.lightText, + ] + ) + content.addAttributes( + [.foregroundColor: UIColor.red], + range: (content.string as NSString).range(of: "*") + ) + label.attributedText = content + label.font = UIFont.systemFont(ofSize: 12, weight: .medium) + label.textColor = .black + return label + }() + + private lazy var collectionLayout: UICollectionViewFlowLayout = { + let layout = UICollectionViewFlowLayout() + layout.scrollDirection = .vertical + layout.sectionInset = UIEdgeInsets(top: 0, left: 20, bottom: 0, right: 20) + layout.minimumInteritemSpacing = 16 + layout.minimumLineSpacing = 16 + let width = (UIScreen.main.bounds.width - layout.sectionInset.left - layout.sectionInset.right - layout.minimumInteritemSpacing * 2) / 3 + layout.itemSize = CGSize(width: width, height: 30) + return layout + }() + + private lazy var collectionView: UICollectionView = { + let view = UICollectionView(frame: .zero, collectionViewLayout: collectionLayout) + view.backgroundColor = .white + view.register(ReportTypeCollectionCell.self, forCellWithReuseIdentifier: "CellID") + view.delegate = self + view.dataSource = self + view.isScrollEnabled = false + return view + }() + + private var isViewReady = false + override func didMoveToWindow() { + super.didMoveToWindow() + guard !isViewReady else { return } + isViewReady = true + constructViewHierarchy() + activateConstraints() + } +} + +// MARK: - UI Layout + +extension ReportTypeView { + + private func constructViewHierarchy() { + addSubview(titleLabel) + addSubview(collectionView) + } + + private func activateConstraints() { + titleLabel.snp.makeConstraints { make in + make.leading.equalTo(20) + make.top.equalTo(0) + } + collectionView.snp.makeConstraints { make in + make.top.equalTo(titleLabel.snp.bottom).offset(10) + make.leading.trailing.equalToSuperview() + make.height.equalTo(122) + make.bottom.equalTo(0) + } + } +} + +// MARK: - UICollectionViewDataSource + +extension ReportTypeView: UICollectionViewDataSource { + func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { + return types.count + } + + func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { + let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "CellID", for: indexPath) as! ReportTypeCollectionCell + cell.titleLabel.text = types[indexPath.item].title + let isSelect = currentSelectType == types[indexPath.item] + cell.updateSelect(isSelect) + return cell + } +} + +// MARK: - UICollectionViewDelegateFlowLayout + +extension ReportTypeView: UICollectionViewDelegateFlowLayout { + func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { + currentSelectType = types[indexPath.item] + selectTypeBlock?(currentSelectType) + collectionView.reloadData() + } +} diff --git a/application/privacy/Views/Report/ReportViewController.swift b/application/privacy/Views/Report/ReportViewController.swift new file mode 100644 index 00000000..78579b2f --- /dev/null +++ b/application/privacy/Views/Report/ReportViewController.swift @@ -0,0 +1,284 @@ +// +// ReportViewController.swift +// privacy +// +// - TRTCReportLocalize → PrivacyLocalize +// - import RTCCommon(UIColor(hex:)、roundedRect、kDeviceSafeBottomHeight) +// + +import Foundation +import UIKit +import RTCCommon +import SnapKit + +enum ReportType: String { + case none, politics, porn, attacks, violence, ad, scam, illegal, other + + var title: String { + switch self { + case .politics: + return PrivacyLocalize("Privacy.Report.type.politics") + case .porn: + return PrivacyLocalize("Privacy.Report.type.porn") + case .attacks: + return PrivacyLocalize("Privacy.Report.type.personalAttacks") + case .violence: + return PrivacyLocalize("Privacy.Report.type.violence") + case .ad: + return PrivacyLocalize("Privacy.Report.type.ad") + case .scam: + return PrivacyLocalize("Privacy.Report.type.scam") + case .illegal: + return PrivacyLocalize("Privacy.Report.type.illegal") + case .other: + return PrivacyLocalize("Privacy.Report.type.other") + default: + return rawValue + } + } +} + +extension UIViewController { + @objc + dynamic func showReportAlert(roomId: String, ownerId: String = "") { + let alert = ReportViewController(roomId: roomId, ownerId: ownerId) + present(alert, animated: true) + } +} + +extension UIView { + @objc + dynamic func showReportAlert(roomId: String, ownerId: String = "") { + var currentController: UIViewController? + var nextResponder = next + while nextResponder != nil { + nextResponder = nextResponder?.next + if let vc = nextResponder as? UIViewController { + currentController = vc + break + } + } + let alert = ReportViewController(roomId: roomId, ownerId: ownerId) + currentController?.present(alert, animated: true) + } +} + +// MARK: - ReportViewController + +class ReportViewController: UIViewController { + + convenience init(roomId: String, ownerId: String) { + self.init() + self.targetRoomId = roomId + self.targetUserId = ownerId + } + + override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) { + super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil) + self.modalPresentationStyle = .custom + } + + required init?(coder: NSCoder) { + super.init(coder: coder) + } + + private var targetRoomId: String = "" + private var targetUserId: String = "" + + // MARK: - UI Components + + private lazy var contentView: UIView = { + let view = UIView(frame: .zero) + view.backgroundColor = .white + return view + }() + + private lazy var titleLabel: UILabel = { + let label = UILabel(frame: .zero) + label.text = PrivacyLocalize("Privacy.Report.title") + label.font = UIFont.systemFont(ofSize: 24, weight: .medium) + label.textColor = .black + return label + }() + + private lazy var submitBtn: UIButton = { + let btn = UIButton(frame: .zero) + btn.setTitle(PrivacyLocalize("Privacy.Report.submit"), for: .normal) + btn.setTitleColor(UIColor(hex: "006EFF"), for: .normal) + btn.setTitleColor(UIColor(hex: "AACFFF"), for: .disabled) + btn.titleLabel?.font = UIFont.systemFont(ofSize: 16) + btn.isEnabled = false + return btn + }() + + private lazy var reportTypeView: ReportTypeView = { + let view = ReportTypeView(types: reportTypes) + return view + }() + + private lazy var reportDescriptionView: ReportDescView = { + let view = ReportDescView(frame: .zero) + return view + }() + + private lazy var reportTypes: [ReportType] = { + return [.politics, .porn, .attacks, .violence, .ad, .scam, .illegal, .other] + }() + + private lazy var loadingIndicator: UIActivityIndicatorView = { + let indicator = UIActivityIndicatorView(style: .large) + indicator.hidesWhenStopped = true + return indicator + }() + + private var currentSelectType: ReportType { + return reportTypeView.currentSelectType + } + + private var currentDescription: String { + return reportDescriptionView.textView.text + } + + // MARK: - Lifecycle + + override func viewDidLoad() { + super.viewDidLoad() + view.backgroundColor = UIColor.black.withAlphaComponent(0.25) + constructViewHierarchy() + activateConstraints() + bindInteraction() + } + + override func viewDidLayoutSubviews() { + super.viewDidLayoutSubviews() + let roundingCorners: UIRectCorner = [.topLeft, .topRight] + let cornerRadii = CGSize(width: 20, height: 20) + contentView.roundedRect(rect: contentView.bounds, byRoundingCorners: roundingCorners, cornerRadii: cornerRadii) + } +} + +// MARK: - UI Layout & Event + +extension ReportViewController { + + private func constructViewHierarchy() { + view.addSubview(contentView) + contentView.addSubview(titleLabel) + contentView.addSubview(submitBtn) + contentView.addSubview(reportTypeView) + contentView.addSubview(reportDescriptionView) + contentView.addSubview(loadingIndicator) + } + + private func activateConstraints() { + contentView.snp.makeConstraints { make in + make.leading.trailing.equalToSuperview() + make.bottom.equalToSuperview() + } + titleLabel.snp.makeConstraints { make in + make.top.equalTo(32) + make.leading.equalTo(20) + make.height.equalTo(36) + } + submitBtn.snp.makeConstraints { make in + make.trailing.equalTo(-20) + make.centerY.equalTo(titleLabel) + make.height.equalTo(28) + } + reportTypeView.snp.makeConstraints { make in + make.leading.trailing.equalToSuperview() + make.top.equalTo(titleLabel.snp.bottom).offset(20) + } + reportDescriptionView.snp.makeConstraints { make in + make.leading.trailing.equalToSuperview() + make.top.equalTo(reportTypeView.snp.bottom).offset(20) + make.bottom.equalTo(-(24 + kDeviceSafeBottomHeight)) + } + loadingIndicator.snp.makeConstraints { make in + make.center.equalToSuperview() + } + } + + private func bindInteraction() { + let tap = UITapGestureRecognizer(target: self, action: #selector(tapDismiss)) + tap.delegate = self + view.isUserInteractionEnabled = true + view.addGestureRecognizer(tap) + submitBtn.addTarget(self, action: #selector(submitAction), for: .touchUpInside) + + reportTypeView.selectTypeBlock = { [weak self] _ in + guard let self else { return } + self.submitBtn.isEnabled = true + } + } + + @objc + private func tapDismiss() { + view.endEditing(true) + dismiss(animated: true) + } + + @objc + private func submitAction() { + loadingIndicator.startAnimating() + submitBtn.isEnabled = false + + ReportNetworkService.reportRoom( + targetRoomId: targetRoomId, + ownerId: targetUserId, + reason: currentSelectType.title, + description: currentDescription + ) { [weak self] in + guard let self else { return } + self.loadingIndicator.stopAnimating() + self.showToast(PrivacyLocalize("Privacy.Report.submitSuccess")) { [weak self] in + guard let self else { return } + self.tapDismiss() + } + } failed: { [weak self] _, errorMessage in + guard let self else { return } + self.loadingIndicator.stopAnimating() + self.submitBtn.isEnabled = true + self.showToast(errorMessage) + } + } + + // MARK: - Toast + + private func showToast(_ message: String, completion: (() -> Void)? = nil) { + let toastLabel = UILabel() + toastLabel.text = message + toastLabel.textColor = .white + toastLabel.backgroundColor = UIColor.black.withAlphaComponent(0.7) + toastLabel.font = UIFont.systemFont(ofSize: 14) + toastLabel.textAlignment = .center + toastLabel.numberOfLines = 0 + toastLabel.layer.cornerRadius = 8 + toastLabel.clipsToBounds = true + + let maxWidth = contentView.bounds.width - 80 + let size = toastLabel.sizeThatFits(CGSize(width: maxWidth, height: .greatestFiniteMagnitude)) + toastLabel.frame = CGRect(x: 0, y: 0, width: size.width + 32, height: size.height + 16) + toastLabel.center = contentView.center + contentView.addSubview(toastLabel) + + UIView.animate(withDuration: 0.3, delay: 1.0, options: .curveEaseOut) { + toastLabel.alpha = 0 + } completion: { _ in + toastLabel.removeFromSuperview() + completion?() + } + } +} + +// MARK: - UIGestureRecognizerDelegate + +extension ReportViewController: UIGestureRecognizerDelegate { + func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldReceive touch: UITouch) -> Bool { + guard touch.location(in: contentView).y >= 0 else { + return true + } + contentView.endEditing(true) + return false + } +} diff --git a/application/xcconfigs/RTCubeLab.debug.xcconfig b/application/xcconfigs/RTCubeLab.debug.xcconfig new file mode 100644 index 00000000..91d41813 --- /dev/null +++ b/application/xcconfigs/RTCubeLab.debug.xcconfig @@ -0,0 +1,5 @@ +// RTCubeLab (开发与测试) - Debug +// 此文件通过构建脚本的 #include 注入到 Pod 的 xcconfig 中,使 Pod 继承主工程的编译条件 + +OTHER_SWIFT_FLAGS = $(inherited) -D RTCUBE_LOCAL_BUILD -D RTCUBE_LAB -D DEV_MODE +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) RTCUBE_LOCAL_BUILD=1 RTCUBE_LAB=1 DEV_MODE=1 diff --git a/application/xcconfigs/RTCubeLab.release.xcconfig b/application/xcconfigs/RTCubeLab.release.xcconfig new file mode 100644 index 00000000..ae5d2275 --- /dev/null +++ b/application/xcconfigs/RTCubeLab.release.xcconfig @@ -0,0 +1,5 @@ +// RTCubeLab (开发与测试) - Release +// 此文件通过构建脚本的 #include 注入到 Pod 的 xcconfig 中,使 Pod 继承主工程的编译条件 + +OTHER_SWIFT_FLAGS = $(inherited) -D RTCUBE_LOCAL_BUILD -D RTCUBE_LAB -D DEV_MODE +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) RTCUBE_LOCAL_BUILD=1 RTCUBE_LAB=1 DEV_MODE=1