Initial commit
This commit is contained in:
parent
0478abf6cf
commit
feff121e15
|
|
@ -1,64 +0,0 @@
|
|||
Language: Cpp
|
||||
# BasedOnStyle: LLVM
|
||||
ColumnLimit: 120
|
||||
SortIncludes: CaseSensitive
|
||||
TabWidth: 4
|
||||
IndentWidth: 4
|
||||
UseTab: Never
|
||||
AccessModifierOffset: -4
|
||||
ContinuationIndentWidth: 4
|
||||
IndentCaseBlocks: false
|
||||
IndentCaseLabels: false
|
||||
IndentGotoLabels: true
|
||||
IndentWrappedFunctionNames: false
|
||||
SortUsingDeclarations: false
|
||||
NamespaceIndentation: None
|
||||
SpaceAfterCStyleCast: false
|
||||
SpaceAfterLogicalNot: false
|
||||
SpaceAfterTemplateKeyword: true
|
||||
SpaceBeforeAssignmentOperators: true
|
||||
SpaceBeforeCaseColon: false
|
||||
SpaceBeforeCpp11BracedList: false
|
||||
SpaceBeforeCtorInitializerColon: true
|
||||
SpaceBeforeInheritanceColon: true
|
||||
SpaceBeforeRangeBasedForLoopColon: true
|
||||
SpaceBeforeSquareBrackets: false
|
||||
SpaceInEmptyBlock: false
|
||||
SpaceInEmptyParentheses: false
|
||||
SpacesInAngles: false
|
||||
SpacesInCStyleCastParentheses: false
|
||||
SpacesInConditionalStatement: false
|
||||
SpacesInParentheses: false
|
||||
SpacesInSquareBrackets: false
|
||||
AlignTrailingComments: true
|
||||
AlignAfterOpenBracket: true
|
||||
AllowShortCaseLabelsOnASingleLine: false
|
||||
AllowShortEnumsOnASingleLine: true
|
||||
AllowShortFunctionsOnASingleLine: All
|
||||
AllowShortIfStatementsOnASingleLine: Never
|
||||
AllowShortLambdasOnASingleLine: All
|
||||
AllowShortLoopsOnASingleLine: false
|
||||
AlwaysBreakTemplateDeclarations: MultiLine
|
||||
BinPackArguments: true
|
||||
BinPackParameters: true
|
||||
BreakBeforeTernaryOperators: true
|
||||
BreakConstructorInitializers: BeforeColon
|
||||
BreakInheritanceList: BeforeColon
|
||||
BreakStringLiterals: true
|
||||
InsertBraces: false
|
||||
IndentExternBlock: NoIndent
|
||||
BreakBeforeBraces: Custom
|
||||
BraceWrapping:
|
||||
AfterCaseLabel: false
|
||||
AfterClass: false
|
||||
AfterControlStatement: Never
|
||||
AfterEnum: false
|
||||
AfterFunction: false
|
||||
AfterNamespace: false
|
||||
AfterStruct: false
|
||||
AfterUnion: false
|
||||
AfterExternBlock: false
|
||||
BeforeCatch: false
|
||||
BeforeElse: false
|
||||
ReflowComments: true
|
||||
MaxEmptyLinesToKeep: 2
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1 +0,0 @@
|
|||
{"compileSdkVersion":12,"hvigorVersion":"5.19.8","toolChainsVersion":"5.0.0.71"}
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1 +0,0 @@
|
|||
{"basePath":"E:\\jiaocai\\fenxingshu08\\.hvigor\\dependencyMap\\dependencyMap.json5","rootDependency":"./oh-package.json5","dependencyMap":{"entry":"./entry/oh-package.json5"},"modules":[{"name":"entry","srcPath":"..\\..\\..\\entry"}]}
|
||||
|
|
@ -1 +0,0 @@
|
|||
{"license":"","devDependencies":{},"author":"","name":"entry","description":"Please describe the basic information.","main":"","version":"1.0.0","dependencies":{}}
|
||||
|
|
@ -1 +0,0 @@
|
|||
{"modelVersion":"5.1.1","license":"","devDependencies":{"@ohos/hypium":"1.0.11"},"author":"","name":"fenxingshu","description":"Please describe the basic information.","main":"","version":"1.0.0","dependencies":{}}
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,68 +0,0 @@
|
|||
{
|
||||
"HVIGOR_OHOS_PLUGIN": {
|
||||
"MODULES": [
|
||||
{
|
||||
"MODULE_NAME": "1043bfc77febe75fafec0c4309faccf1",
|
||||
"API_TYPE": "stageMode",
|
||||
"INCREMENTAL_TASKS": {
|
||||
"COMPILE_ARKTS": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"NATIVE_COMPILER": "Default",
|
||||
"BUILD_MODE": "debug"
|
||||
},
|
||||
"HVIGOR": {
|
||||
"IS_INCREMENTAL": true,
|
||||
"IS_DAEMON": true,
|
||||
"IS_PARALLEL": true,
|
||||
"IS_HVIGORFILE_TYPE_CHECK": false,
|
||||
"TASK_TIME": {
|
||||
"1043bfc77febe75fafec0c4309faccf1": {
|
||||
"CreateModuleInfo": 474900,
|
||||
"ConfigureCmake": 323900,
|
||||
"PreCheckSyscap": 396900,
|
||||
"GeneratePkgContextInfo": 4343200,
|
||||
"ProcessIntegratedHsp": 871300,
|
||||
"BuildNativeWithCmake": 510700,
|
||||
"ProcessStartupConfig": 1214600,
|
||||
"BuildNativeWithNinja": 450500,
|
||||
"GenerateLoaderJson": 8540100,
|
||||
"BuildJS": 1649700,
|
||||
"CompileArkTS": 4660388800,
|
||||
"PackageHap": 43308000,
|
||||
"SignHap": 167708900,
|
||||
"CollectDebugSymbol": 981600,
|
||||
"assembleHap": 212400
|
||||
}
|
||||
},
|
||||
"APIS": [
|
||||
"getHvigorConfig",
|
||||
"getRootNodeDescriptor",
|
||||
"getChildNode",
|
||||
"getNodeByName",
|
||||
"getAllNodes",
|
||||
"getRootNode",
|
||||
"getNodeName",
|
||||
"getNodePath",
|
||||
"subNodes",
|
||||
"getExtraOption",
|
||||
"getExtParam",
|
||||
"getExtParams",
|
||||
"getProperty",
|
||||
"getProperties",
|
||||
"getProductName",
|
||||
"nodesEvaluated",
|
||||
"getParameter",
|
||||
"getCommandEntryTask",
|
||||
"getStartParams"
|
||||
],
|
||||
"CONFIG_PROPERTIES": {
|
||||
"enableSignTask": true,
|
||||
"skipNativeIncremental": false,
|
||||
"hvigor_keepDependency": true
|
||||
},
|
||||
"TOTAL_TIME": 5172215400,
|
||||
"BUILD_ID": "202601031208539900"
|
||||
}
|
||||
}
|
||||
|
|
@ -1 +0,0 @@
|
|||
{"CACHE_SYNC_FILE_HASH":{"E:\\jiaocai\\fenxingshu08\\hvigor\\hvigor-config.json5":"8f77c234a3222e791be60886a072e67d27814353b9d45d6ffb71ee585a97829c","E:\\jiaocai\\fenxingshu08\\build-profile.json5":"0200c8a82d67a8c7ad36ace1a9c47336c8b3fe276ddf0c666e4893a4d76abb6a","E:\\jiaocai\\fenxingshu08\\hvigorfile.ts":"a8a8401cf247331be7458fddfe71e962cb5eeb6fd74b815f2825cfc5c92cb045","E:\\jiaocai\\fenxingshu08\\oh-package.json5":"933ff4b50c4960648b4a4b609436babc08621a5d9498a4c247e7261d66d7333f","E:\\jiaocai\\fenxingshu08\\entry\\build-profile.json5":"a8338f28c84f3c0c7c24949c8a99c1a1411dc05eddfa5b7b6606649f0c12a79e","E:\\jiaocai\\fenxingshu08\\entry\\hvigorfile.ts":"a8a8401cf247331be7458fddfe71e962cb5eeb6fd74b815f2825cfc5c92cb045","E:\\jiaocai\\fenxingshu08\\entry\\oh-package.json5":"b27148b5c59846f055e1583ead65b794da1ebb67980b6e973403d6ed4c9ccd56","E:\\jiaocai\\fenxingshu08\\.hvigor\\outputs\\sync\\output.json":"330ff6a3da893e93fc949439a2952b193a12d261cef4c736458214c87985564d","SDK_LOCATION":"C:/Program Files/Huawei/DevEco Studio/sdk"},"OHPM_INSTALL_FILE_HASH":{"E:\\jiaocai\\fenxingshu08\\oh-package.json5":"933ff4b50c4960648b4a4b609436babc08621a5d9498a4c247e7261d66d7333f","E:\\jiaocai\\fenxingshu08\\oh_modules\\.ohpm\\lock.json5":"2cc59a21e70d92785a2399a4ca5893d49bbee3e5cf366d29e87d97e083992b5c","E:\\jiaocai\\fenxingshu08\\entry\\oh-package.json5":"b27148b5c59846f055e1583ead65b794da1ebb67980b6e973403d6ed4c9ccd56","E:\\jiaocai\\fenxingshu08\\oh_modules":true,"E:\\jiaocai\\fenxingshu08\\entry\\oh_modules":false}}
|
||||
|
|
@ -1,180 +0,0 @@
|
|||
{
|
||||
"ohos-module-entry": {
|
||||
"SELECT_TARGET": "default",
|
||||
"MODULE_BUILD_DIR": "E:\\jiaocai\\fenxingshu08\\entry\\build",
|
||||
"TARGETS": {
|
||||
"default": {
|
||||
"SOURCE_ROOT": "E:\\jiaocai\\fenxingshu08\\entry\\src\\main",
|
||||
"RESOURCES_PATH": [
|
||||
"E:\\jiaocai\\fenxingshu08\\entry\\src\\main\\resources"
|
||||
],
|
||||
"BUILD_PATH": {
|
||||
"OUTPUT_PATH": "E:\\jiaocai\\fenxingshu08\\entry\\build\\default\\outputs\\default",
|
||||
"INTERMEDIA_PATH": "E:\\jiaocai\\fenxingshu08\\entry\\build\\default\\intermediates",
|
||||
"JS_ASSETS_PATH": "E:\\jiaocai\\fenxingshu08\\entry\\build\\default\\intermediates\\loader_out\\default",
|
||||
"JS_LITE_ASSETS_PATH": "E:\\jiaocai\\fenxingshu08\\entry\\build\\default\\intermediates\\loader_out_lite\\default",
|
||||
"RES_PATH": "E:\\jiaocai\\fenxingshu08\\entry\\build\\default\\intermediates\\res\\default",
|
||||
"RES_PROFILE_PATH": "E:\\jiaocai\\fenxingshu08\\entry\\build\\default\\intermediates\\res\\default\\resources\\base\\profile",
|
||||
"ETS_SUPER_VISUAL_PATH": "E:\\jiaocai\\fenxingshu08\\entry\\build\\default\\cache\\default\\default@CompileArkTS\\esmodule",
|
||||
"JS_SUPER_VISUAL_PATH": "E:\\jiaocai\\fenxingshu08\\entry\\build\\default\\cache\\default\\default@CompileJS\\jsbundle",
|
||||
"WORKER_LOADER": "E:\\jiaocai\\fenxingshu08\\entry\\build\\default\\intermediates\\loader\\default\\loader.json",
|
||||
"MANIFEST_JSON": "E:\\jiaocai\\fenxingshu08\\entry\\build\\default\\intermediates\\manifest\\default",
|
||||
"OUTPUT_METADATA_JSON": "E:\\jiaocai\\fenxingshu08\\entry\\build\\default\\intermediates\\hap_metadata\\default\\output_metadata.json",
|
||||
"SOURCE_MAP_DIR": "E:\\jiaocai\\fenxingshu08\\entry\\build\\default\\intermediates\\source_map\\default"
|
||||
},
|
||||
"BUILD_OPTION": {
|
||||
"debuggable": true
|
||||
}
|
||||
},
|
||||
"ohosTest": {
|
||||
"SOURCE_ROOT": "E:\\jiaocai\\fenxingshu08\\entry\\src\\ohosTest",
|
||||
"RESOURCES_PATH": [
|
||||
"E:\\jiaocai\\fenxingshu08\\entry\\src\\ohosTest\\resources"
|
||||
],
|
||||
"BUILD_PATH": {
|
||||
"OUTPUT_PATH": "E:\\jiaocai\\fenxingshu08\\entry\\build\\default\\outputs\\ohosTest",
|
||||
"INTERMEDIA_PATH": "E:\\jiaocai\\fenxingshu08\\entry\\build\\default\\intermediates",
|
||||
"JS_ASSETS_PATH": "E:\\jiaocai\\fenxingshu08\\entry\\build\\default\\intermediates\\loader_out\\ohosTest",
|
||||
"JS_LITE_ASSETS_PATH": "E:\\jiaocai\\fenxingshu08\\entry\\build\\default\\intermediates\\loader_out_lite\\ohosTest",
|
||||
"RES_PATH": "E:\\jiaocai\\fenxingshu08\\entry\\build\\default\\intermediates\\res\\ohosTest",
|
||||
"RES_PROFILE_PATH": "E:\\jiaocai\\fenxingshu08\\entry\\build\\default\\intermediates\\res\\ohosTest\\resources\\base\\profile",
|
||||
"ETS_SUPER_VISUAL_PATH": "E:\\jiaocai\\fenxingshu08\\entry\\build\\default\\cache\\ohosTest\\ohosTest@OhosTestCompileArkTS\\esmodule",
|
||||
"JS_SUPER_VISUAL_PATH": "E:\\jiaocai\\fenxingshu08\\entry\\build\\default\\cache\\ohosTest\\ohosTest@OhosTestCompileJS\\jsbundle",
|
||||
"WORKER_LOADER": "E:\\jiaocai\\fenxingshu08\\entry\\build\\default\\intermediates\\loader\\ohosTest\\loader.json",
|
||||
"MANIFEST_JSON": "E:\\jiaocai\\fenxingshu08\\entry\\build\\default\\intermediates\\manifest\\ohosTest",
|
||||
"OUTPUT_METADATA_JSON": "E:\\jiaocai\\fenxingshu08\\entry\\build\\default\\intermediates\\hap_metadata\\ohosTest\\output_metadata.json",
|
||||
"SOURCE_MAP_DIR": "E:\\jiaocai\\fenxingshu08\\entry\\build\\default\\intermediates\\source_map\\ohosTest"
|
||||
},
|
||||
"BUILD_OPTION": {
|
||||
"debuggable": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"BUILD_OPTION": {
|
||||
"default-default": {
|
||||
"debuggable": true,
|
||||
"copyFrom": "default",
|
||||
"arkOptions": {},
|
||||
"name": "debug"
|
||||
}
|
||||
},
|
||||
"BUILD_PROFILE_OPT": {
|
||||
"apiType": "stageMode",
|
||||
"buildOption": {
|
||||
"arkOptions": {}
|
||||
},
|
||||
"buildOptionSet": [
|
||||
{
|
||||
"name": "release",
|
||||
"arkOptions": {
|
||||
"obfuscation": {
|
||||
"ruleOptions": {
|
||||
"enable": true,
|
||||
"files": [
|
||||
"./obfuscation-rules.txt"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "default"
|
||||
},
|
||||
{
|
||||
"name": "debug"
|
||||
}
|
||||
],
|
||||
"targets": [
|
||||
{
|
||||
"name": "default"
|
||||
},
|
||||
{
|
||||
"name": "ohosTest"
|
||||
}
|
||||
]
|
||||
},
|
||||
"BUILD_CACHE_DIR": ""
|
||||
},
|
||||
"ohos-project": {
|
||||
"SELECT_PRODUCT_NAME": "default",
|
||||
"MODULE_BUILD_DIR": "E:\\jiaocai\\fenxingshu08\\build",
|
||||
"BUNDLE_NAME": "com.example.fenxingshu",
|
||||
"BUILD_PATH": {
|
||||
"OUTPUT_PATH": "E:\\jiaocai\\fenxingshu08\\build\\outputs\\default"
|
||||
},
|
||||
"MODULES": [
|
||||
{
|
||||
"name": "entry",
|
||||
"srcPath": "E:\\jiaocai\\fenxingshu08\\entry",
|
||||
"targets": [
|
||||
{
|
||||
"name": "default",
|
||||
"applyToProducts": [
|
||||
"default"
|
||||
]
|
||||
}
|
||||
],
|
||||
"belongProjectPath": "E:\\jiaocai\\fenxingshu08"
|
||||
}
|
||||
],
|
||||
"PROFILE_OPT": {
|
||||
"app": {
|
||||
"signingConfigs": [
|
||||
{
|
||||
"name": "default",
|
||||
"material": {
|
||||
"certpath": "C:/Users/Lee/.ohos/config/openharmony/default_fenxingshu08_zfuMBFpXS5Ynv24VFk3Ysv_zUaAwpGh6LDD03y2CDEQ=.cer",
|
||||
"keyAlias": "debugKey",
|
||||
"keyPassword": "0000001BCD980819885B916C95194F3DBA1A2D525BDB0B7F197238590B17BE94AB50B2C44A7FEE2ABCDBAD",
|
||||
"profile": "C:/Users/Lee/.ohos/config/openharmony/default_fenxingshu08_zfuMBFpXS5Ynv24VFk3Ysv_zUaAwpGh6LDD03y2CDEQ=.p7b",
|
||||
"signAlg": "SHA256withECDSA",
|
||||
"storeFile": "C:/Users/Lee/.ohos/config/openharmony/default_fenxingshu08_zfuMBFpXS5Ynv24VFk3Ysv_zUaAwpGh6LDD03y2CDEQ=.p12",
|
||||
"storePassword": "0000001BF8D38E5983885971F79D3315B2A8B5021AA005F6B9CD0242CEDC88ED58D98DA807E75F68091468"
|
||||
}
|
||||
}
|
||||
],
|
||||
"products": [
|
||||
{
|
||||
"name": "default",
|
||||
"signingConfig": "default",
|
||||
"compileSdkVersion": 10,
|
||||
"compatibleSdkVersion": 10,
|
||||
"runtimeOS": "OpenHarmony"
|
||||
}
|
||||
],
|
||||
"buildModeSet": [
|
||||
{
|
||||
"name": "debug"
|
||||
},
|
||||
{
|
||||
"name": "release"
|
||||
}
|
||||
]
|
||||
},
|
||||
"modules": [
|
||||
{
|
||||
"name": "entry",
|
||||
"srcPath": "./entry",
|
||||
"targets": [
|
||||
{
|
||||
"name": "default",
|
||||
"applyToProducts": [
|
||||
"default"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"CONFIG_PROPERTIES": {
|
||||
"enableSignTask": true,
|
||||
"skipNativeIncremental": false,
|
||||
"hvigor.keepDependency": true
|
||||
},
|
||||
"OVERALL_PROJECT_PATHS": [
|
||||
"E:\\jiaocai\\fenxingshu08"
|
||||
],
|
||||
"BUILD_CACHE_DIR": ""
|
||||
},
|
||||
"version": 1
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,22 +0,0 @@
|
|||
{
|
||||
"CommonInfo":{
|
||||
"current.select.target":"default"
|
||||
},
|
||||
"BuildOptions":{
|
||||
"SELECT_BUILD_TARGET":"default",
|
||||
"BUILD_PATH":{
|
||||
"OUTPUT_METADATA_JSON":"E:\\jiaocai\\fenxingshu08\\entry\\build\\default\\intermediates\\hap_metadata\\default\\output_metadata.json",
|
||||
"OUTPUT_PATH":"E:\\jiaocai\\fenxingshu08\\entry\\build\\default\\outputs\\default",
|
||||
"RES_PATH":"E:\\jiaocai\\fenxingshu08\\entry\\build\\default\\intermediates\\res\\default",
|
||||
"ETS_SUPER_VISUAL_PATH":"E:\\jiaocai\\fenxingshu08\\entry\\build\\default\\cache\\default\\default@CompileArkTS\\esmodule",
|
||||
"JS_ASSETS_PATH":"E:\\jiaocai\\fenxingshu08\\entry\\build\\default\\intermediates\\loader_out\\default",
|
||||
"SOURCE_MAP_DIR":"E:\\jiaocai\\fenxingshu08\\entry\\build\\default\\intermediates\\source_map\\default",
|
||||
"INTERMEDIA_PATH":"E:\\jiaocai\\fenxingshu08\\entry\\build\\default\\intermediates",
|
||||
"RES_PROFILE_PATH":"E:\\jiaocai\\fenxingshu08\\entry\\build\\default\\intermediates\\res\\default\\resources\\base\\profile",
|
||||
"WORKER_LOADER":"E:\\jiaocai\\fenxingshu08\\entry\\build\\default\\intermediates\\loader\\default\\loader.json",
|
||||
"MANIFEST_JSON":"E:\\jiaocai\\fenxingshu08\\entry\\build\\default\\intermediates\\manifest\\default",
|
||||
"JS_LITE_ASSETS_PATH":"E:\\jiaocai\\fenxingshu08\\entry\\build\\default\\intermediates\\loader_out_lite\\default",
|
||||
"JS_SUPER_VISUAL_PATH":"E:\\jiaocai\\fenxingshu08\\entry\\build\\default\\cache\\default\\default@CompileJS\\jsbundle"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
{
|
||||
"CommonInfo":{
|
||||
"crossplatform.projectType":"",
|
||||
"project.ide.version":"5.1.1.850",
|
||||
"current.select.product":"default",
|
||||
"current.select.buildMode":""
|
||||
},
|
||||
"BuildOptions":{
|
||||
"BUNDLE_NAME":"com.example.fenxingshu",
|
||||
"SELECT_BUILD_MODE":"",
|
||||
"BUILD_PATH":{
|
||||
"OUTPUT_PATH":"E:\\jiaocai\\fenxingshu08\\build\\outputs\\default"
|
||||
},
|
||||
"SELECT_BUILD_PRODUCT":"default"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/entry/entry.iml" filepath="$PROJECT_DIR$/.idea/modules/entry/entry.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/fenxingshu08.iml" filepath="$PROJECT_DIR$/.idea/modules/fenxingshu08.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="EMPTY_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$/../../../entry" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="EMPTY_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$/../..">
|
||||
<excludeFolder url="file://$MODULE_DIR$/../../build" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/../../node_modules" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/../../oh_modules" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/../../.arkui-x/android/.gradle" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/../../.arkui-x/android/app/build" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/../../.arkui-x/android/library/build" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/../../.arkui-x/ios/build" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/../../.arkui-x/android/app/.cxx" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/../../.arkui-x/android/library/.cxx" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/../../entry/build" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/../../entry/node_modules" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/../../entry/.cxx" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/../../entry/.test" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/../../entry/.preview" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/../../entry/oh_modules" />
|
||||
</content>
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="module-library" exported="" scope="PROVIDED">
|
||||
<library name="ArkTS-API 10" type="ArkUI">
|
||||
<CLASSES />
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="file://D:/Huawei/Sdk/openharmony/10/ets/api" />
|
||||
<root url="file://D:/Huawei/Sdk/openharmony/10/ets/component" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</orderEntry>
|
||||
</component>
|
||||
</module>
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
{
|
||||
"setting": {
|
||||
"1.0.1": {
|
||||
"Language": {
|
||||
"args": {
|
||||
"Language": "zh_CN"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"frontend": {
|
||||
"1.0.0": {
|
||||
"Resolution": {
|
||||
"args": {
|
||||
"Resolution": "360*780"
|
||||
}
|
||||
},
|
||||
"DeviceType": {
|
||||
"args": {
|
||||
"DeviceType": "default"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
{
|
||||
"1.0.0": {
|
||||
"LastPreviewDevice": {}
|
||||
},
|
||||
"1.0.1": {
|
||||
"profileList": [
|
||||
{
|
||||
"id": "Default",
|
||||
"deviceType": "default",
|
||||
"width": 1080,
|
||||
"height": 2340,
|
||||
"shape": "rect",
|
||||
"dpi": 480,
|
||||
"orientation": "portrait",
|
||||
"language": "zh_CN",
|
||||
"colorMode": "light"
|
||||
},
|
||||
{
|
||||
"id": "Tablet",
|
||||
"deviceType": "tablet",
|
||||
"width": 2440,
|
||||
"height": 1440,
|
||||
"shape": "rect",
|
||||
"dpi": 400,
|
||||
"orientation": "landscape",
|
||||
"colorMode": "light",
|
||||
"language": "zh_CN"
|
||||
}
|
||||
],
|
||||
"runningProfileList": [
|
||||
"Tablet"
|
||||
],
|
||||
"availableProfileList": [
|
||||
"Default"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
{
|
||||
"setting": {
|
||||
"1.0.1": {
|
||||
"Language": {
|
||||
"args": {
|
||||
"Language": "zh_CN"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"frontend": {
|
||||
"1.0.0": {
|
||||
"Resolution": {
|
||||
"args": {
|
||||
"Resolution": "1024*640"
|
||||
}
|
||||
},
|
||||
"DeviceType": {
|
||||
"args": {
|
||||
"DeviceType": "tablet"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
"app": {
|
||||
"bundleName": "com.example.fenxingshu",
|
||||
"vendor": "example",
|
||||
"versionCode": 1000000,
|
||||
"versionName": "1.0.0",
|
||||
"icon": "$media:app_icon",
|
||||
"label": "$string:app_name"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
{
|
||||
"string": [
|
||||
{
|
||||
"name": "app_name",
|
||||
"value": "fenxingshu"
|
||||
}
|
||||
]
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.0 KiB |
|
|
@ -1 +0,0 @@
|
|||
fenxingshu code
|
||||
|
|
@ -1 +0,0 @@
|
|||
分形树代码仓库
|
||||
|
|
@ -1,49 +0,0 @@
|
|||
{
|
||||
"app": {
|
||||
"signingConfigs": [
|
||||
{
|
||||
"name": "default",
|
||||
"material": {
|
||||
"certpath": "C:/Users/Lee/.ohos/config/openharmony/default_fenxingshu08_zfuMBFpXS5Ynv24VFk3Ysv_zUaAwpGh6LDD03y2CDEQ=.cer",
|
||||
"keyAlias": "debugKey",
|
||||
"keyPassword": "0000001BCD980819885B916C95194F3DBA1A2D525BDB0B7F197238590B17BE94AB50B2C44A7FEE2ABCDBAD",
|
||||
"profile": "C:/Users/Lee/.ohos/config/openharmony/default_fenxingshu08_zfuMBFpXS5Ynv24VFk3Ysv_zUaAwpGh6LDD03y2CDEQ=.p7b",
|
||||
"signAlg": "SHA256withECDSA",
|
||||
"storeFile": "C:/Users/Lee/.ohos/config/openharmony/default_fenxingshu08_zfuMBFpXS5Ynv24VFk3Ysv_zUaAwpGh6LDD03y2CDEQ=.p12",
|
||||
"storePassword": "0000001BF8D38E5983885971F79D3315B2A8B5021AA005F6B9CD0242CEDC88ED58D98DA807E75F68091468"
|
||||
}
|
||||
}
|
||||
],
|
||||
"products": [
|
||||
{
|
||||
"name": "default",
|
||||
"signingConfig": "default",
|
||||
"compileSdkVersion": 12,
|
||||
"compatibleSdkVersion": 12,
|
||||
"runtimeOS": "OpenHarmony"
|
||||
}
|
||||
],
|
||||
"buildModeSet": [
|
||||
{
|
||||
"name": "debug",
|
||||
},
|
||||
{
|
||||
"name": "release"
|
||||
}
|
||||
]
|
||||
},
|
||||
"modules": [
|
||||
{
|
||||
"name": "entry",
|
||||
"srcPath": "./entry",
|
||||
"targets": [
|
||||
{
|
||||
"name": "default",
|
||||
"applyToProducts": [
|
||||
"default"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1 +0,0 @@
|
|||
{"APP_RESOURCES":"F:\\jiaocai\\fenxingshu\\AppScope\\resources","MODULE_RESOURCES":"{\"F:\\\\jiaocai\\\\fenxingshu\\\\entry\\\\src\\\\main\\\\resources\":\"module_compiled\"}","HAR_RESOURCES":"{}","PREVIEW_GENERATE_SOURCE_DIR":"F:\\jiaocai\\fenxingshu\\entry\\.preview\\default\\generated\\r\\default","PREVIEW_COMPILE_MODULE_NAMES":"entry"}
|
||||
Binary file not shown.
|
|
@ -1 +0,0 @@
|
|||
[{"time":"2024-07-31T08:13:49.760Z","category":"etsChecker","level":"warn","msg":"\u001b[33mArkTS:WARN: Has 6 ArkTS Linter Error. You can get the output in F:/jiaocai/fenxingshu/entry/.preview/cache/.default/ArkTS/ArkTSLinter_output.json","type":"plugin_log"}]
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
[
|
||||
{
|
||||
"categoryInfo": "Error",
|
||||
"fileName": "F:/jiaocai/fenxingshu/entry/src/main/ets/conponents/SetFractalY.ets",
|
||||
"line": 89,
|
||||
"character": 58,
|
||||
"messageText": "RegExp literals are not supported (arkts-no-regexp-literals)"
|
||||
},
|
||||
{
|
||||
"categoryInfo": "Error",
|
||||
"fileName": "F:/jiaocai/fenxingshu/entry/src/main/ets/conponents/SetFractalTriangle.ets",
|
||||
"line": 57,
|
||||
"character": 65,
|
||||
"messageText": "RegExp literals are not supported (arkts-no-regexp-literals)"
|
||||
},
|
||||
{
|
||||
"categoryInfo": "Error",
|
||||
"fileName": "F:/jiaocai/fenxingshu/entry/src/main/ets/conponents/SetFractalRectangle.ets",
|
||||
"line": 41,
|
||||
"character": 66,
|
||||
"messageText": "RegExp literals are not supported (arkts-no-regexp-literals)"
|
||||
},
|
||||
{
|
||||
"categoryInfo": "Error",
|
||||
"fileName": "F:/jiaocai/fenxingshu/entry/src/main/ets/conponents/SetFractalRectangle.ets",
|
||||
"line": 55,
|
||||
"character": 68,
|
||||
"messageText": "RegExp literals are not supported (arkts-no-regexp-literals)"
|
||||
},
|
||||
{
|
||||
"categoryInfo": "Error",
|
||||
"fileName": "F:/jiaocai/fenxingshu/entry/src/main/ets/pages/Index.ets",
|
||||
"line": 23,
|
||||
"character": 17,
|
||||
"messageText": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)"
|
||||
},
|
||||
{
|
||||
"categoryInfo": "Error",
|
||||
"fileName": "F:/jiaocai/fenxingshu/entry/src/main/ets/pages/Index.ets",
|
||||
"line": 474,
|
||||
"character": 32,
|
||||
"messageText": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)"
|
||||
}
|
||||
]
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
string EntryAbility_desc 0x01000005
|
||||
string EntryAbility_label 0x01000006
|
||||
string app_name 0x01000000
|
||||
string module_desc 0x01000007
|
||||
color start_window_background 0x01000002
|
||||
media app_icon 0x01000001
|
||||
media icon 0x01000003
|
||||
media startIcon 0x01000008
|
||||
profile main_pages 0x01000004
|
||||
Binary file not shown.
Binary file not shown.
|
|
@ -1,15 +0,0 @@
|
|||
// 三角形分形图类
|
||||
export default class FractalTriangle {
|
||||
depth: number; // 分形层数
|
||||
percent: number; // 缩放比例
|
||||
initPoint: number[]; // 初始点
|
||||
initAngle: number; // 初始角
|
||||
initLength: number; // 初始长度
|
||||
constructor(d: number, p: number, ip: number[], ia: number, il: number) {
|
||||
this.depth = d;
|
||||
this.percent = p;
|
||||
this.initPoint = ip;
|
||||
this.initAngle = ia;
|
||||
this.initLength = il;
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
|
@ -1,46 +0,0 @@
|
|||
export default class fractal {
|
||||
type: number;
|
||||
// 分形图类型,1为y形,2为三角形,3为正方形
|
||||
depth: number;
|
||||
// 递归深度
|
||||
initAngle: number;
|
||||
// 初始旋转角
|
||||
percent: number;
|
||||
leftAngle: number;
|
||||
rightAngle: number;
|
||||
initPoint: number[];
|
||||
initLength: number;
|
||||
leftPoint: number[];
|
||||
rightPoint: number[];
|
||||
constructor(t: number, d: number, ia: number, p?: number, la?: number, ra?: number, ip?: number[], il?: number, lp?: number[], rp?: number[]) {
|
||||
this.type = t;
|
||||
if (this.type == 1) {
|
||||
this.depth = d;
|
||||
this.percent = p;
|
||||
this.leftAngle = la;
|
||||
this.rightAngle = ra;
|
||||
this.initPoint = ip;
|
||||
this.initAngle = ia;
|
||||
this.initLength = il;
|
||||
this.leftPoint;
|
||||
this.rightPoint;
|
||||
}
|
||||
else if (this.type == 2) {
|
||||
this.depth = d;
|
||||
this.percent = p;
|
||||
this.initPoint = ip;
|
||||
this.initAngle = ia;
|
||||
this.initLength = il;
|
||||
this.leftAngle;
|
||||
this.rightAngle;
|
||||
this.leftPoint;
|
||||
this.rightPoint;
|
||||
}
|
||||
else {
|
||||
this.depth = d;
|
||||
this.initAngle = ia;
|
||||
this.leftPoint = lp;
|
||||
this.rightPoint = rp;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
// 矩形分形图类
|
||||
export default class FractalRectangle {
|
||||
depth: number; // 分形层数
|
||||
leftPoint: number[]; // 左起始点
|
||||
rightPoint: number[]; // 右起始点
|
||||
initAngle: number; // 初始角
|
||||
constructor(d: number, lp: number[], rp: number[], ia: number) {
|
||||
this.depth = d;
|
||||
this.leftPoint = lp;
|
||||
this.rightPoint = rp;
|
||||
this.initAngle = ia;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
// Y形分形图类
|
||||
export default class FractalY {
|
||||
depth: number; // 分形层数
|
||||
percent: number; // 缩放比例
|
||||
leftAngle: number; // 左枝倾角
|
||||
rightAngle: number; // 右枝倾角
|
||||
initPoint: number[]; // 初始点
|
||||
initAngle: number; // 初始角
|
||||
initLength: number; // 初始长度
|
||||
constructor(d: number, p: number, la: number, ra: number, ip: number[], ia: number, il: number) {
|
||||
this.depth = d;
|
||||
this.percent = p;
|
||||
this.leftAngle = la;
|
||||
this.rightAngle = ra;
|
||||
this.initPoint = ip;
|
||||
this.initAngle = ia;
|
||||
this.initLength = il;
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
|
@ -1,159 +0,0 @@
|
|||
interface DrawFractalRectangle_Params {
|
||||
rectangle?: FractalRectangle // 初始矩形
|
||||
;
|
||||
point3?: number[];
|
||||
point4?: number[];
|
||||
point1?: number[];
|
||||
point2?: number[];
|
||||
}
|
||||
import FractalRectangle from "@bundle:com.example.fenxingshu/entry/ets/class/FractalRectangle";
|
||||
function rotate(p1: number[], p2: number[], angle: number): number[] {
|
||||
let x1 = p1[0], y1 = p1[1], x2 = p2[0], y2 = p2[1];
|
||||
let x = x1 + (x2 - x1) * Math.cos(angle / 180 * Math.PI) + (y2 - y1) * Math.sin(angle / 180 * Math.PI);
|
||||
let y = y1 + (y2 - y1) * Math.cos(angle / 180 * Math.PI) - (x2 - x1) * Math.sin(angle / 180 * Math.PI);
|
||||
return [x, y];
|
||||
}
|
||||
function zoom(p1: number[], p2: number[], ratio: number): number[] {
|
||||
let x1 = p1[0], y1 = p1[1], x2 = p2[0], y2 = p2[1];
|
||||
let x = x1 + (x2 - x1) * ratio;
|
||||
let y = y1 + (y2 - y1) * ratio;
|
||||
return [x, y];
|
||||
}
|
||||
export default class DrawFractalRectangle extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined) {
|
||||
super(parent, __localStorage, elmtId);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.__rectangle = new SynchedPropertyObjectOneWayPU(params.rectangle, this, "rectangle");
|
||||
this.point3 = rotate(this.rectangle.leftPoint, this.rectangle.rightPoint, 90);
|
||||
this.point4 = rotate(this.rectangle.rightPoint, this.rectangle.leftPoint, 270);
|
||||
this.point1 = rotate(this.point3, this.point4, this.rectangle.initAngle);
|
||||
this.point2 = zoom(this.point3, this.point1, Math.cos(this.rectangle.initAngle / 180 * Math.PI));
|
||||
this.setInitiallyProvidedValue(params);
|
||||
}
|
||||
setInitiallyProvidedValue(params: DrawFractalRectangle_Params) {
|
||||
if (params.point3 !== undefined) {
|
||||
this.point3 = params.point3;
|
||||
}
|
||||
if (params.point4 !== undefined) {
|
||||
this.point4 = params.point4;
|
||||
}
|
||||
if (params.point1 !== undefined) {
|
||||
this.point1 = params.point1;
|
||||
}
|
||||
if (params.point2 !== undefined) {
|
||||
this.point2 = params.point2;
|
||||
}
|
||||
}
|
||||
updateStateVars(params: DrawFractalRectangle_Params) {
|
||||
this.__rectangle.reset(params.rectangle);
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
this.__rectangle.purgeDependencyOnElmtId(rmElmtId);
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__rectangle.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
private __rectangle: SynchedPropertySimpleOneWayPU<FractalRectangle>; // 初始矩形
|
||||
get rectangle() {
|
||||
return this.__rectangle.get();
|
||||
}
|
||||
set rectangle(newValue: FractalRectangle // 初始矩形
|
||||
) {
|
||||
this.__rectangle.set(newValue);
|
||||
}
|
||||
private point3: number[];
|
||||
private point4: number[];
|
||||
private point1: number[];
|
||||
private point2: number[];
|
||||
initialRender() {
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Stack.create();
|
||||
Stack.debugLine("conponents/DrawFractalRectangle.ets(28:5)");
|
||||
if (!isInitialRender) {
|
||||
Stack.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
If.create();
|
||||
if (this.rectangle.depth != 0) {
|
||||
this.ifElseBranchUpdateFunction(0, () => {
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Polygon.create({ width: '100%', height: '100%' });
|
||||
Polygon.debugLine("conponents/DrawFractalRectangle.ets(30:9)");
|
||||
Polygon.points([this.rectangle.leftPoint, this.rectangle.rightPoint, this.point4, this.point3]);
|
||||
Polygon.fillOpacity(0);
|
||||
Polygon.stroke(Color.Black);
|
||||
Polygon.strokeWidth(1);
|
||||
if (!isInitialRender) {
|
||||
Polygon.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
{
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
if (isInitialRender) {
|
||||
let paramsLambda = () => {
|
||||
return {
|
||||
rectangle: new FractalRectangle(this.rectangle.depth - 1, this.point2, this.point4, this.rectangle.initAngle)
|
||||
};
|
||||
};
|
||||
ViewPU.create(new DrawFractalRectangle(this, {
|
||||
rectangle: new FractalRectangle(this.rectangle.depth - 1, this.point2, this.point4, this.rectangle.initAngle)
|
||||
}, undefined, elmtId, paramsLambda));
|
||||
}
|
||||
else {
|
||||
this.updateStateVarsOfChildByElmtId(elmtId, {
|
||||
rectangle: new FractalRectangle(this.rectangle.depth - 1, this.point2, this.point4, this.rectangle.initAngle)
|
||||
});
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
}
|
||||
{
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
if (isInitialRender) {
|
||||
let paramsLambda = () => {
|
||||
return {
|
||||
rectangle: new FractalRectangle(this.rectangle.depth - 1, this.point3, this.point2, this.rectangle.initAngle)
|
||||
};
|
||||
};
|
||||
ViewPU.create(new DrawFractalRectangle(this, {
|
||||
rectangle: new FractalRectangle(this.rectangle.depth - 1, this.point3, this.point2, this.rectangle.initAngle)
|
||||
}, undefined, elmtId, paramsLambda));
|
||||
}
|
||||
else {
|
||||
this.updateStateVarsOfChildByElmtId(elmtId, {
|
||||
rectangle: new FractalRectangle(this.rectangle.depth - 1, this.point3, this.point2, this.rectangle.initAngle)
|
||||
});
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
this.ifElseBranchUpdateFunction(1, () => {
|
||||
});
|
||||
}
|
||||
if (!isInitialRender) {
|
||||
If.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
If.pop();
|
||||
Stack.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
|
@ -1,138 +0,0 @@
|
|||
interface DrawFractalRectangle_Params {
|
||||
rectangle?: fractalRectangle;
|
||||
point3?: number[];
|
||||
point4?: number[];
|
||||
point1?: number[];
|
||||
point2?: number[];
|
||||
}
|
||||
import fractalRectangle from "@bundle:com.example.fenxingshu/entry/ets/class/fractalRectangle";
|
||||
function rotate(p1: number[], p2: number[], angle: number): number[] {
|
||||
let x1 = p1[0], y1 = p1[1], x2 = p2[0], y2 = p2[1];
|
||||
let x = x1 + (x2 - x1) * Math.cos(angle / 180 * Math.PI) + (y2 - y1) * Math.sin(angle / 180 * Math.PI);
|
||||
let y = y1 + (y2 - y1) * Math.cos(angle / 180 * Math.PI) - (x2 - x1) * Math.sin(angle / 180 * Math.PI);
|
||||
return [x, y];
|
||||
}
|
||||
function zoom(p1: number[], p2: number[], ratio: number): number[] {
|
||||
let x1 = p1[0], y1 = p1[1], x2 = p2[0], y2 = p2[1];
|
||||
let x = x1 + (x2 - x1) * ratio;
|
||||
let y = y1 + (y2 - y1) * ratio;
|
||||
return [x, y];
|
||||
}
|
||||
export default class DrawFractalRectangle extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined) {
|
||||
super(parent, __localStorage, elmtId);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.__rectangle = new SynchedPropertyObjectOneWayPU(params.rectangle, this, "rectangle");
|
||||
this.point3 = rotate(this.rectangle.leftPoint, this.rectangle.rightPoint, 90);
|
||||
this.point4 = rotate(this.rectangle.rightPoint, this.rectangle.leftPoint, 270);
|
||||
this.point1 = rotate(this.point3, this.point4, this.rectangle.initAngle);
|
||||
this.point2 = zoom(this.point3, this.point1, Math.cos(this.rectangle.initAngle / 180 * Math.PI));
|
||||
this.setInitiallyProvidedValue(params);
|
||||
}
|
||||
setInitiallyProvidedValue(params: DrawFractalRectangle_Params) {
|
||||
if (params.point3 !== undefined) {
|
||||
this.point3 = params.point3;
|
||||
}
|
||||
if (params.point4 !== undefined) {
|
||||
this.point4 = params.point4;
|
||||
}
|
||||
if (params.point1 !== undefined) {
|
||||
this.point1 = params.point1;
|
||||
}
|
||||
if (params.point2 !== undefined) {
|
||||
this.point2 = params.point2;
|
||||
}
|
||||
}
|
||||
updateStateVars(params: DrawFractalRectangle_Params) {
|
||||
this.__rectangle.reset(params.rectangle);
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
this.__rectangle.purgeDependencyOnElmtId(rmElmtId);
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__rectangle.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
private __rectangle: SynchedPropertySimpleOneWayPU<fractalRectangle>;
|
||||
get rectangle() {
|
||||
return this.__rectangle.get();
|
||||
}
|
||||
set rectangle(newValue: fractalRectangle) {
|
||||
this.__rectangle.set(newValue);
|
||||
}
|
||||
private point3: number[];
|
||||
private point4: number[];
|
||||
private point1: number[];
|
||||
private point2: number[];
|
||||
initialRender() {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Stack.create();
|
||||
Stack.debugLine("conponents/DrawFractalRectangle1.ets(26:5)");
|
||||
}, Stack);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
If.create();
|
||||
if (this.rectangle.depth != 0) {
|
||||
this.ifElseBranchUpdateFunction(0, () => {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Polygon.create({ width: '100%', height: '100%' });
|
||||
Polygon.debugLine("conponents/DrawFractalRectangle1.ets(28:9)");
|
||||
Polygon.points([this.rectangle.leftPoint, this.rectangle.rightPoint, this.point4, this.point3]);
|
||||
Polygon.fillOpacity(0);
|
||||
Polygon.stroke(Color.Black);
|
||||
Polygon.strokeWidth(1);
|
||||
}, Polygon);
|
||||
{
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
if (isInitialRender) {
|
||||
let paramsLambda = () => {
|
||||
return {
|
||||
rectangle: new fractalRectangle(this.rectangle.depth - 1, this.point2, this.point4, this.rectangle.initAngle)
|
||||
};
|
||||
};
|
||||
ViewPU.create(new DrawFractalRectangle(this, {
|
||||
rectangle: new fractalRectangle(this.rectangle.depth - 1, this.point2, this.point4, this.rectangle.initAngle)
|
||||
}, undefined, elmtId, paramsLambda));
|
||||
}
|
||||
else {
|
||||
this.updateStateVarsOfChildByElmtId(elmtId, {
|
||||
rectangle: new fractalRectangle(this.rectangle.depth - 1, this.point2, this.point4, this.rectangle.initAngle)
|
||||
});
|
||||
}
|
||||
}, null);
|
||||
}
|
||||
{
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
if (isInitialRender) {
|
||||
let paramsLambda = () => {
|
||||
return {
|
||||
rectangle: new fractalRectangle(this.rectangle.depth - 1, this.point3, this.point2, this.rectangle.initAngle)
|
||||
};
|
||||
};
|
||||
ViewPU.create(new DrawFractalRectangle(this, {
|
||||
rectangle: new fractalRectangle(this.rectangle.depth - 1, this.point3, this.point2, this.rectangle.initAngle)
|
||||
}, undefined, elmtId, paramsLambda));
|
||||
}
|
||||
else {
|
||||
this.updateStateVarsOfChildByElmtId(elmtId, {
|
||||
rectangle: new fractalRectangle(this.rectangle.depth - 1, this.point3, this.point2, this.rectangle.initAngle)
|
||||
});
|
||||
}
|
||||
}, null);
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
this.ifElseBranchUpdateFunction(1, () => {
|
||||
});
|
||||
}
|
||||
}, If);
|
||||
If.pop();
|
||||
Stack.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
|
@ -1,135 +0,0 @@
|
|||
interface DrawFractalTriangle_Params {
|
||||
triangle?: FractalTriangle // 初始三角形
|
||||
;
|
||||
endPoint1?: number[];
|
||||
endPoint2?: number[];
|
||||
}
|
||||
import FractalTriangle from "@bundle:com.example.fenxingshu/entry/ets/class/FractalTriangle";
|
||||
export default class DrawFractalTriangle extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined) {
|
||||
super(parent, __localStorage, elmtId);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.__triangle = new SynchedPropertyObjectOneWayPU(params.triangle, this, "triangle");
|
||||
this.endPoint1 = [this.triangle.initPoint[0] - this.triangle.initLength * Math.sin(this.triangle.initAngle / 180 * Math.PI), this.triangle.initPoint[1] - this.triangle.initLength * Math.cos(this.triangle.initAngle / 180 * Math.PI)];
|
||||
this.endPoint2 = [this.triangle.initPoint[0] + this.triangle.initLength * Math.sin(this.triangle.initAngle / 180 * Math.PI), this.triangle.initPoint[1] - this.triangle.initLength * Math.cos(this.triangle.initAngle / 180 * Math.PI)];
|
||||
this.setInitiallyProvidedValue(params);
|
||||
}
|
||||
setInitiallyProvidedValue(params: DrawFractalTriangle_Params) {
|
||||
if (params.endPoint1 !== undefined) {
|
||||
this.endPoint1 = params.endPoint1;
|
||||
}
|
||||
if (params.endPoint2 !== undefined) {
|
||||
this.endPoint2 = params.endPoint2;
|
||||
}
|
||||
}
|
||||
updateStateVars(params: DrawFractalTriangle_Params) {
|
||||
this.__triangle.reset(params.triangle);
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
this.__triangle.purgeDependencyOnElmtId(rmElmtId);
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__triangle.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
private __triangle: SynchedPropertySimpleOneWayPU<FractalTriangle>; // 初始三角形
|
||||
get triangle() {
|
||||
return this.__triangle.get();
|
||||
}
|
||||
set triangle(newValue: FractalTriangle // 初始三角形
|
||||
) {
|
||||
this.__triangle.set(newValue);
|
||||
}
|
||||
private endPoint1: number[];
|
||||
private endPoint2: number[];
|
||||
initialRender() {
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Stack.create();
|
||||
Stack.debugLine("conponents/DrawFractalTriangle.ets(12:5)");
|
||||
if (!isInitialRender) {
|
||||
Stack.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
If.create();
|
||||
if (this.triangle.depth != 0) {
|
||||
this.ifElseBranchUpdateFunction(0, () => {
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Polygon.create({ width: '100%', height: '100%' });
|
||||
Polygon.debugLine("conponents/DrawFractalTriangle.ets(14:9)");
|
||||
Polygon.points([this.triangle.initPoint, this.endPoint1, this.endPoint2]);
|
||||
Polygon.fillOpacity(0);
|
||||
Polygon.stroke(Color.Black);
|
||||
Polygon.strokeWidth(1);
|
||||
if (!isInitialRender) {
|
||||
Polygon.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
{
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
if (isInitialRender) {
|
||||
let paramsLambda = () => {
|
||||
return {
|
||||
triangle: new FractalTriangle(this.triangle.depth - 1, this.triangle.percent, this.endPoint1, this.triangle.initAngle, this.triangle.initLength * this.triangle.percent)
|
||||
};
|
||||
};
|
||||
ViewPU.create(new DrawFractalTriangle(this, {
|
||||
triangle: new FractalTriangle(this.triangle.depth - 1, this.triangle.percent, this.endPoint1, this.triangle.initAngle, this.triangle.initLength * this.triangle.percent)
|
||||
}, undefined, elmtId, paramsLambda));
|
||||
}
|
||||
else {
|
||||
this.updateStateVarsOfChildByElmtId(elmtId, {
|
||||
triangle: new FractalTriangle(this.triangle.depth - 1, this.triangle.percent, this.endPoint1, this.triangle.initAngle, this.triangle.initLength * this.triangle.percent)
|
||||
});
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
}
|
||||
{
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
if (isInitialRender) {
|
||||
let paramsLambda = () => {
|
||||
return {
|
||||
triangle: new FractalTriangle(this.triangle.depth - 1, this.triangle.percent, this.endPoint2, this.triangle.initAngle, this.triangle.initLength * this.triangle.percent)
|
||||
};
|
||||
};
|
||||
ViewPU.create(new DrawFractalTriangle(this, {
|
||||
triangle: new FractalTriangle(this.triangle.depth - 1, this.triangle.percent, this.endPoint2, this.triangle.initAngle, this.triangle.initLength * this.triangle.percent)
|
||||
}, undefined, elmtId, paramsLambda));
|
||||
}
|
||||
else {
|
||||
this.updateStateVarsOfChildByElmtId(elmtId, {
|
||||
triangle: new FractalTriangle(this.triangle.depth - 1, this.triangle.percent, this.endPoint2, this.triangle.initAngle, this.triangle.initLength * this.triangle.percent)
|
||||
});
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
this.ifElseBranchUpdateFunction(1, () => {
|
||||
});
|
||||
}
|
||||
if (!isInitialRender) {
|
||||
If.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
If.pop();
|
||||
Stack.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
|
@ -1,129 +0,0 @@
|
|||
interface DrawFractalY_Params {
|
||||
y?: FractalY // 初始Y形
|
||||
;
|
||||
endPoint?: number[];
|
||||
}
|
||||
import FractalY from "@bundle:com.example.fenxingshu/entry/ets/class/FractalY";
|
||||
export default class DrawFractalY extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined) {
|
||||
super(parent, __localStorage, elmtId);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.__y = new SynchedPropertyObjectOneWayPU(params.y, this, "y");
|
||||
this.endPoint = [this.y.initPoint[0] + this.y.initLength * Math.cos((this.y.initAngle / 180) * Math.PI), this.y.initPoint[1] - this.y.initLength * Math.sin((this.y.initAngle / 180) * Math.PI)];
|
||||
this.setInitiallyProvidedValue(params);
|
||||
}
|
||||
setInitiallyProvidedValue(params: DrawFractalY_Params) {
|
||||
if (params.endPoint !== undefined) {
|
||||
this.endPoint = params.endPoint;
|
||||
}
|
||||
}
|
||||
updateStateVars(params: DrawFractalY_Params) {
|
||||
this.__y.reset(params.y);
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
this.__y.purgeDependencyOnElmtId(rmElmtId);
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__y.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
private __y: SynchedPropertySimpleOneWayPU<FractalY>; // 初始Y形
|
||||
get y() {
|
||||
return this.__y.get();
|
||||
}
|
||||
set y(newValue: FractalY // 初始Y形
|
||||
) {
|
||||
this.__y.set(newValue);
|
||||
}
|
||||
private endPoint: number[];
|
||||
initialRender() {
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Stack.create();
|
||||
Stack.debugLine("conponents/DrawFractalY.ets(11:5)");
|
||||
if (!isInitialRender) {
|
||||
Stack.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
If.create();
|
||||
if (this.y.depth != 0) {
|
||||
this.ifElseBranchUpdateFunction(0, () => {
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Line.create({ width: '100%', height: '100%' });
|
||||
Line.debugLine("conponents/DrawFractalY.ets(13:9)");
|
||||
Line.startPoint([this.y.initPoint[0], this.y.initPoint[1]]);
|
||||
Line.endPoint([this.endPoint[0], this.endPoint[1]]);
|
||||
Line.stroke(Color.Black);
|
||||
Line.strokeWidth(1);
|
||||
if (!isInitialRender) {
|
||||
Line.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
{
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
if (isInitialRender) {
|
||||
let paramsLambda = () => {
|
||||
return {
|
||||
y: new FractalY(this.y.depth - 1, this.y.percent, this.y.leftAngle, this.y.rightAngle, this.endPoint, this.y.initAngle + this.y.rightAngle, this.y.initLength * this.y.percent)
|
||||
};
|
||||
};
|
||||
ViewPU.create(new DrawFractalY(this, {
|
||||
y: new FractalY(this.y.depth - 1, this.y.percent, this.y.leftAngle, this.y.rightAngle, this.endPoint, this.y.initAngle + this.y.rightAngle, this.y.initLength * this.y.percent)
|
||||
}, undefined, elmtId, paramsLambda));
|
||||
}
|
||||
else {
|
||||
this.updateStateVarsOfChildByElmtId(elmtId, {
|
||||
y: new FractalY(this.y.depth - 1, this.y.percent, this.y.leftAngle, this.y.rightAngle, this.endPoint, this.y.initAngle + this.y.rightAngle, this.y.initLength * this.y.percent)
|
||||
});
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
}
|
||||
{
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
if (isInitialRender) {
|
||||
let paramsLambda = () => {
|
||||
return {
|
||||
y: new FractalY(this.y.depth - 1, this.y.percent, this.y.leftAngle, this.y.rightAngle, this.endPoint, this.y.initAngle - this.y.leftAngle, this.y.initLength * this.y.percent)
|
||||
};
|
||||
};
|
||||
ViewPU.create(new DrawFractalY(this, {
|
||||
y: new FractalY(this.y.depth - 1, this.y.percent, this.y.leftAngle, this.y.rightAngle, this.endPoint, this.y.initAngle - this.y.leftAngle, this.y.initLength * this.y.percent)
|
||||
}, undefined, elmtId, paramsLambda));
|
||||
}
|
||||
else {
|
||||
this.updateStateVarsOfChildByElmtId(elmtId, {
|
||||
y: new FractalY(this.y.depth - 1, this.y.percent, this.y.leftAngle, this.y.rightAngle, this.endPoint, this.y.initAngle - this.y.leftAngle, this.y.initLength * this.y.percent)
|
||||
});
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
this.ifElseBranchUpdateFunction(1, () => {
|
||||
});
|
||||
}
|
||||
if (!isInitialRender) {
|
||||
If.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
If.pop();
|
||||
Stack.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
|
@ -1,82 +0,0 @@
|
|||
interface DrawLine_Params {
|
||||
sx?: number;
|
||||
sy?: number;
|
||||
ex?: number;
|
||||
ey?: number;
|
||||
}
|
||||
export default class DrawLine extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined) {
|
||||
super(parent, __localStorage, elmtId);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.__sx = new SynchedPropertySimpleOneWayPU(params.sx, this, "sx");
|
||||
this.__sy = new SynchedPropertySimpleOneWayPU(params.sy, this, "sy");
|
||||
this.__ex = new SynchedPropertySimpleOneWayPU(params.ex, this, "ex");
|
||||
this.__ey = new SynchedPropertySimpleOneWayPU(params.ey, this, "ey");
|
||||
this.setInitiallyProvidedValue(params);
|
||||
}
|
||||
setInitiallyProvidedValue(params: DrawLine_Params) {
|
||||
}
|
||||
updateStateVars(params: DrawLine_Params) {
|
||||
this.__sx.reset(params.sx);
|
||||
this.__sy.reset(params.sy);
|
||||
this.__ex.reset(params.ex);
|
||||
this.__ey.reset(params.ey);
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
this.__sx.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__sy.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__ex.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__ey.purgeDependencyOnElmtId(rmElmtId);
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__sx.aboutToBeDeleted();
|
||||
this.__sy.aboutToBeDeleted();
|
||||
this.__ex.aboutToBeDeleted();
|
||||
this.__ey.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
private __sx: SynchedPropertySimpleOneWayPU<number>;
|
||||
get sx() {
|
||||
return this.__sx.get();
|
||||
}
|
||||
set sx(newValue: number) {
|
||||
this.__sx.set(newValue);
|
||||
}
|
||||
private __sy: SynchedPropertySimpleOneWayPU<number>;
|
||||
get sy() {
|
||||
return this.__sy.get();
|
||||
}
|
||||
set sy(newValue: number) {
|
||||
this.__sy.set(newValue);
|
||||
}
|
||||
private __ex: SynchedPropertySimpleOneWayPU<number>;
|
||||
get ex() {
|
||||
return this.__ex.get();
|
||||
}
|
||||
set ex(newValue: number) {
|
||||
this.__ex.set(newValue);
|
||||
}
|
||||
private __ey: SynchedPropertySimpleOneWayPU<number>;
|
||||
get ey() {
|
||||
return this.__ey.get();
|
||||
}
|
||||
set ey(newValue: number) {
|
||||
this.__ey.set(newValue);
|
||||
}
|
||||
initialRender() {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Line.create({ width: '100%', height: '100%' });
|
||||
Line.debugLine("conponents/DrawLine.ets(9:5)");
|
||||
Line.startPoint([this.sx, this.sy]);
|
||||
Line.endPoint([this.ex, this.ey]);
|
||||
Line.stroke(Color.Black);
|
||||
Line.strokeWidth(1);
|
||||
}, Line);
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
|
@ -1,84 +0,0 @@
|
|||
interface DrawRectangle_Params {
|
||||
sx?: number // 起始点x坐标
|
||||
;
|
||||
sy?: number // 起始点Y坐标
|
||||
;
|
||||
length?: number // 边长
|
||||
;
|
||||
}
|
||||
export default class DrawRectangle extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined) {
|
||||
super(parent, __localStorage, elmtId);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.__sx = new SynchedPropertySimpleOneWayPU(params.sx, this, "sx");
|
||||
this.__sy = new SynchedPropertySimpleOneWayPU(params.sy, this, "sy");
|
||||
this.__length = new SynchedPropertySimpleOneWayPU(params.length, this, "length");
|
||||
this.setInitiallyProvidedValue(params);
|
||||
}
|
||||
setInitiallyProvidedValue(params: DrawRectangle_Params) {
|
||||
}
|
||||
updateStateVars(params: DrawRectangle_Params) {
|
||||
this.__sx.reset(params.sx);
|
||||
this.__sy.reset(params.sy);
|
||||
this.__length.reset(params.length);
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
this.__sx.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__sy.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__length.purgeDependencyOnElmtId(rmElmtId);
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__sx.aboutToBeDeleted();
|
||||
this.__sy.aboutToBeDeleted();
|
||||
this.__length.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
private __sx: SynchedPropertySimpleOneWayPU<number>; // 起始点x坐标
|
||||
get sx() {
|
||||
return this.__sx.get();
|
||||
}
|
||||
set sx(newValue: number // 起始点x坐标
|
||||
) {
|
||||
this.__sx.set(newValue);
|
||||
}
|
||||
private __sy: SynchedPropertySimpleOneWayPU<number>; // 起始点Y坐标
|
||||
get sy() {
|
||||
return this.__sy.get();
|
||||
}
|
||||
set sy(newValue: number // 起始点Y坐标
|
||||
) {
|
||||
this.__sy.set(newValue);
|
||||
}
|
||||
private __length: SynchedPropertySimpleOneWayPU<number>; // 边长
|
||||
get length() {
|
||||
return this.__length.get();
|
||||
}
|
||||
set length(newValue: number // 边长
|
||||
) {
|
||||
this.__length.set(newValue);
|
||||
}
|
||||
initialRender() {
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Rect.create({
|
||||
width: this.length,
|
||||
height: this.length
|
||||
});
|
||||
Rect.debugLine("conponents/DrawRectangle.ets(10:5)");
|
||||
Rect.position({ x: this.sx, y: this.sy });
|
||||
Rect.fillOpacity(0);
|
||||
Rect.stroke(Color.Black);
|
||||
Rect.strokeWidth(1);
|
||||
if (!isInitialRender) {
|
||||
Rect.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
|
@ -1,84 +0,0 @@
|
|||
interface DrawRhombus_Params {
|
||||
first?: number[];
|
||||
second?: number[];
|
||||
third?: number[];
|
||||
fourth?: number[];
|
||||
}
|
||||
export default class DrawRhombus extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined) {
|
||||
super(parent, __localStorage, elmtId);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.__first = new SynchedPropertyObjectOneWayPU(params.first, this, "first");
|
||||
this.__second = new SynchedPropertyObjectOneWayPU(params.second, this, "second");
|
||||
this.__third = new SynchedPropertyObjectOneWayPU(params.third, this, "third");
|
||||
this.__fourth = new SynchedPropertyObjectOneWayPU(params.fourth, this, "fourth");
|
||||
this.setInitiallyProvidedValue(params);
|
||||
}
|
||||
setInitiallyProvidedValue(params: DrawRhombus_Params) {
|
||||
}
|
||||
updateStateVars(params: DrawRhombus_Params) {
|
||||
this.__first.reset(params.first);
|
||||
this.__second.reset(params.second);
|
||||
this.__third.reset(params.third);
|
||||
this.__fourth.reset(params.fourth);
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
this.__first.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__second.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__third.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__fourth.purgeDependencyOnElmtId(rmElmtId);
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__first.aboutToBeDeleted();
|
||||
this.__second.aboutToBeDeleted();
|
||||
this.__third.aboutToBeDeleted();
|
||||
this.__fourth.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
private __first: SynchedPropertySimpleOneWayPU<number[]>;
|
||||
get first() {
|
||||
return this.__first.get();
|
||||
}
|
||||
set first(newValue: number[]) {
|
||||
this.__first.set(newValue);
|
||||
}
|
||||
private __second: SynchedPropertySimpleOneWayPU<number[]>;
|
||||
get second() {
|
||||
return this.__second.get();
|
||||
}
|
||||
set second(newValue: number[]) {
|
||||
this.__second.set(newValue);
|
||||
}
|
||||
private __third: SynchedPropertySimpleOneWayPU<number[]>;
|
||||
get third() {
|
||||
return this.__third.get();
|
||||
}
|
||||
set third(newValue: number[]) {
|
||||
this.__third.set(newValue);
|
||||
}
|
||||
private __fourth: SynchedPropertySimpleOneWayPU<number[]>;
|
||||
get fourth() {
|
||||
return this.__fourth.get();
|
||||
}
|
||||
set fourth(newValue: number[]) {
|
||||
this.__fourth.set(newValue);
|
||||
}
|
||||
initialRender() {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Polygon.create();
|
||||
Polygon.debugLine("conponents/DrawRhombus.ets(9:5)");
|
||||
Polygon.width('100%');
|
||||
Polygon.height('100%');
|
||||
Polygon.points([this.first, this.second, this.third, this.fourth]);
|
||||
Polygon.fillOpacity(0);
|
||||
Polygon.stroke(Color.Black);
|
||||
Polygon.strokeWidth(1);
|
||||
}, Polygon);
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
|
@ -1,83 +0,0 @@
|
|||
interface DrawTriangle_Params {
|
||||
first?: number[] // 第一个点
|
||||
;
|
||||
second?: number[] // 第二个点
|
||||
;
|
||||
third?: number[] // 第三个点
|
||||
;
|
||||
}
|
||||
export default class DrawTriangle extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined) {
|
||||
super(parent, __localStorage, elmtId);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.__first = new SynchedPropertyObjectOneWayPU(params.first, this, "first");
|
||||
this.__second = new SynchedPropertyObjectOneWayPU(params.second, this, "second");
|
||||
this.__third = new SynchedPropertyObjectOneWayPU(params.third, this, "third");
|
||||
this.setInitiallyProvidedValue(params);
|
||||
}
|
||||
setInitiallyProvidedValue(params: DrawTriangle_Params) {
|
||||
}
|
||||
updateStateVars(params: DrawTriangle_Params) {
|
||||
this.__first.reset(params.first);
|
||||
this.__second.reset(params.second);
|
||||
this.__third.reset(params.third);
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
this.__first.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__second.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__third.purgeDependencyOnElmtId(rmElmtId);
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__first.aboutToBeDeleted();
|
||||
this.__second.aboutToBeDeleted();
|
||||
this.__third.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
private __first: SynchedPropertySimpleOneWayPU<number[]>; // 第一个点
|
||||
get first() {
|
||||
return this.__first.get();
|
||||
}
|
||||
set first(newValue: number[] // 第一个点
|
||||
) {
|
||||
this.__first.set(newValue);
|
||||
}
|
||||
private __second: SynchedPropertySimpleOneWayPU<number[]>; // 第二个点
|
||||
get second() {
|
||||
return this.__second.get();
|
||||
}
|
||||
set second(newValue: number[] // 第二个点
|
||||
) {
|
||||
this.__second.set(newValue);
|
||||
}
|
||||
private __third: SynchedPropertySimpleOneWayPU<number[]>; // 第三个点
|
||||
get third() {
|
||||
return this.__third.get();
|
||||
}
|
||||
set third(newValue: number[] // 第三个点
|
||||
) {
|
||||
this.__third.set(newValue);
|
||||
}
|
||||
initialRender() {
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Polygon.create();
|
||||
Polygon.debugLine("conponents/DrawTriangle.ets(10:5)");
|
||||
Polygon.width('100%');
|
||||
Polygon.height('100%');
|
||||
Polygon.points([this.first, this.second, this.third]);
|
||||
Polygon.fillOpacity(0);
|
||||
Polygon.stroke(Color.Black);
|
||||
Polygon.strokeWidth(1);
|
||||
if (!isInitialRender) {
|
||||
Polygon.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
|
@ -1,117 +0,0 @@
|
|||
interface DrawY_Params {
|
||||
leftPoint?: number[] // 左翼
|
||||
;
|
||||
rightPoint?: number[] // 右翼
|
||||
;
|
||||
middlePoint?: number[] // 中线
|
||||
;
|
||||
}
|
||||
export default class DrawY extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined) {
|
||||
super(parent, __localStorage, elmtId);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.__leftPoint = new SynchedPropertyObjectOneWayPU(params.leftPoint, this, "leftPoint");
|
||||
this.__rightPoint = new SynchedPropertyObjectOneWayPU(params.rightPoint, this, "rightPoint");
|
||||
this.__middlePoint = new SynchedPropertyObjectOneWayPU(params.middlePoint, this, "middlePoint");
|
||||
this.setInitiallyProvidedValue(params);
|
||||
}
|
||||
setInitiallyProvidedValue(params: DrawY_Params) {
|
||||
}
|
||||
updateStateVars(params: DrawY_Params) {
|
||||
this.__leftPoint.reset(params.leftPoint);
|
||||
this.__rightPoint.reset(params.rightPoint);
|
||||
this.__middlePoint.reset(params.middlePoint);
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
this.__leftPoint.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__rightPoint.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__middlePoint.purgeDependencyOnElmtId(rmElmtId);
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__leftPoint.aboutToBeDeleted();
|
||||
this.__rightPoint.aboutToBeDeleted();
|
||||
this.__middlePoint.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
private __leftPoint: SynchedPropertySimpleOneWayPU<number[]>; // 左翼
|
||||
get leftPoint() {
|
||||
return this.__leftPoint.get();
|
||||
}
|
||||
set leftPoint(newValue: number[] // 左翼
|
||||
) {
|
||||
this.__leftPoint.set(newValue);
|
||||
}
|
||||
private __rightPoint: SynchedPropertySimpleOneWayPU<number[]>; // 右翼
|
||||
get rightPoint() {
|
||||
return this.__rightPoint.get();
|
||||
}
|
||||
set rightPoint(newValue: number[] // 右翼
|
||||
) {
|
||||
this.__rightPoint.set(newValue);
|
||||
}
|
||||
private __middlePoint: SynchedPropertySimpleOneWayPU<number[]>; // 中线
|
||||
get middlePoint() {
|
||||
return this.__middlePoint.get();
|
||||
}
|
||||
set middlePoint(newValue: number[] // 中线
|
||||
) {
|
||||
this.__middlePoint.set(newValue);
|
||||
}
|
||||
initialRender() {
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Stack.create();
|
||||
Stack.debugLine("conponents/DrawY.ets(10:5)");
|
||||
if (!isInitialRender) {
|
||||
Stack.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Line.create({ width: '100%', height: '100%' });
|
||||
Line.debugLine("conponents/DrawY.ets(11:7)");
|
||||
Line.startPoint([this.leftPoint[0], this.leftPoint[1]]);
|
||||
Line.endPoint([this.leftPoint[2], this.leftPoint[3]]);
|
||||
Line.stroke(Color.Black);
|
||||
Line.strokeWidth(1);
|
||||
if (!isInitialRender) {
|
||||
Line.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Line.create({ width: '100%', height: '100%' });
|
||||
Line.debugLine("conponents/DrawY.ets(17:7)");
|
||||
Line.startPoint([this.rightPoint[0], this.rightPoint[1]]);
|
||||
Line.endPoint([this.rightPoint[2], this.rightPoint[3]]);
|
||||
Line.stroke(Color.Black);
|
||||
Line.strokeWidth(1);
|
||||
if (!isInitialRender) {
|
||||
Line.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Line.create({ width: '100%', height: '100%' });
|
||||
Line.debugLine("conponents/DrawY.ets(23:7)");
|
||||
Line.startPoint([this.middlePoint[0], this.middlePoint[1]]);
|
||||
Line.endPoint([this.middlePoint[2], this.middlePoint[3]]);
|
||||
Line.stroke(Color.Black);
|
||||
Line.strokeWidth(1);
|
||||
if (!isInitialRender) {
|
||||
Line.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
Stack.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
|
@ -1,272 +0,0 @@
|
|||
interface SetRectangle_Params {
|
||||
depthRectangle?: number // 分形层数
|
||||
;
|
||||
leftPointRectangle?: number[] // 左起始点
|
||||
;
|
||||
rightPointRectangle?: number[] // 右起始点
|
||||
;
|
||||
initAngleRectangle?: number // 初始角
|
||||
;
|
||||
tempDepth?: number;
|
||||
tempLeftPoint?: string;
|
||||
tempRightPoint?: string;
|
||||
tempInitAngle?: number;
|
||||
controller?: CustomDialogController;
|
||||
}
|
||||
export default class SetRectangle extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined) {
|
||||
super(parent, __localStorage, elmtId);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.__depthRectangle = new SynchedPropertySimpleTwoWayPU(params.depthRectangle, this, "depthRectangle");
|
||||
this.__leftPointRectangle = new SynchedPropertyObjectTwoWayPU(params.leftPointRectangle, this, "leftPointRectangle");
|
||||
this.__rightPointRectangle = new SynchedPropertyObjectTwoWayPU(params.rightPointRectangle, this, "rightPointRectangle");
|
||||
this.__initAngleRectangle = new SynchedPropertySimpleTwoWayPU(params.initAngleRectangle, this, "initAngleRectangle");
|
||||
this.tempDepth = 8;
|
||||
this.tempLeftPoint = "[220,280]";
|
||||
this.tempRightPoint = "[280,280]";
|
||||
this.tempInitAngle = 45;
|
||||
this.controller = undefined;
|
||||
this.setInitiallyProvidedValue(params);
|
||||
}
|
||||
setInitiallyProvidedValue(params: SetRectangle_Params) {
|
||||
if (params.tempDepth !== undefined) {
|
||||
this.tempDepth = params.tempDepth;
|
||||
}
|
||||
if (params.tempLeftPoint !== undefined) {
|
||||
this.tempLeftPoint = params.tempLeftPoint;
|
||||
}
|
||||
if (params.tempRightPoint !== undefined) {
|
||||
this.tempRightPoint = params.tempRightPoint;
|
||||
}
|
||||
if (params.tempInitAngle !== undefined) {
|
||||
this.tempInitAngle = params.tempInitAngle;
|
||||
}
|
||||
if (params.controller !== undefined) {
|
||||
this.controller = params.controller;
|
||||
}
|
||||
}
|
||||
updateStateVars(params: SetRectangle_Params) {
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
this.__depthRectangle.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__leftPointRectangle.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__rightPointRectangle.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__initAngleRectangle.purgeDependencyOnElmtId(rmElmtId);
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__depthRectangle.aboutToBeDeleted();
|
||||
this.__leftPointRectangle.aboutToBeDeleted();
|
||||
this.__rightPointRectangle.aboutToBeDeleted();
|
||||
this.__initAngleRectangle.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
private __depthRectangle: SynchedPropertySimpleTwoWayPU<number>; // 分形层数
|
||||
get depthRectangle() {
|
||||
return this.__depthRectangle.get();
|
||||
}
|
||||
set depthRectangle(newValue: number // 分形层数
|
||||
) {
|
||||
this.__depthRectangle.set(newValue);
|
||||
}
|
||||
private __leftPointRectangle: SynchedPropertySimpleOneWayPU<number[]>; // 左起始点
|
||||
get leftPointRectangle() {
|
||||
return this.__leftPointRectangle.get();
|
||||
}
|
||||
set leftPointRectangle(newValue: number[] // 左起始点
|
||||
) {
|
||||
this.__leftPointRectangle.set(newValue);
|
||||
}
|
||||
private __rightPointRectangle: SynchedPropertySimpleOneWayPU<number[]>; // 右起始点
|
||||
get rightPointRectangle() {
|
||||
return this.__rightPointRectangle.get();
|
||||
}
|
||||
set rightPointRectangle(newValue: number[] // 右起始点
|
||||
) {
|
||||
this.__rightPointRectangle.set(newValue);
|
||||
}
|
||||
private __initAngleRectangle: SynchedPropertySimpleTwoWayPU<number>; // 初始角
|
||||
get initAngleRectangle() {
|
||||
return this.__initAngleRectangle.get();
|
||||
}
|
||||
set initAngleRectangle(newValue: number // 初始角
|
||||
) {
|
||||
this.__initAngleRectangle.set(newValue);
|
||||
}
|
||||
private tempDepth: number;
|
||||
private tempLeftPoint: string;
|
||||
private tempRightPoint: string;
|
||||
private tempInitAngle: number;
|
||||
private controller: CustomDialogController;
|
||||
setController(ctr: CustomDialogController) {
|
||||
this.controller = ctr;
|
||||
}
|
||||
initialRender() {
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Column.create();
|
||||
Column.debugLine("conponents/SetFractalRectangle.ets(16:5)");
|
||||
Column.width('100%');
|
||||
Column.height('100%');
|
||||
Column.justifyContent(FlexAlign.SpaceEvenly);
|
||||
if (!isInitialRender) {
|
||||
Column.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Row.create();
|
||||
Row.debugLine("conponents/SetFractalRectangle.ets(17:7)");
|
||||
if (!isInitialRender) {
|
||||
Row.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
TextInput.create({ placeholder: `分形层数:finishLevel=8` });
|
||||
TextInput.debugLine("conponents/SetFractalRectangle.ets(18:9)");
|
||||
TextInput.width('70%');
|
||||
TextInput.margin({ right: '10%' });
|
||||
TextInput.onChange((value) => {
|
||||
this.tempDepth = Number(value);
|
||||
});
|
||||
if (!isInitialRender) {
|
||||
TextInput.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Button.createWithLabel("确认");
|
||||
Button.debugLine("conponents/SetFractalRectangle.ets(25:9)");
|
||||
Button.onClick(() => {
|
||||
this.depthRectangle = this.tempDepth;
|
||||
});
|
||||
if (!isInitialRender) {
|
||||
Button.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
Button.pop();
|
||||
Row.pop();
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Row.create();
|
||||
Row.debugLine("conponents/SetFractalRectangle.ets(31:7)");
|
||||
if (!isInitialRender) {
|
||||
Row.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
TextInput.create({ placeholder: `左下点:leftPoint=(220,280)` });
|
||||
TextInput.debugLine("conponents/SetFractalRectangle.ets(32:9)");
|
||||
TextInput.width('70%');
|
||||
TextInput.margin({ right: '10%' });
|
||||
TextInput.onChange((value) => {
|
||||
this.tempLeftPoint = value;
|
||||
});
|
||||
if (!isInitialRender) {
|
||||
TextInput.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Button.createWithLabel("确认");
|
||||
Button.debugLine("conponents/SetFractalRectangle.ets(39:9)");
|
||||
Button.onClick(() => {
|
||||
this.leftPointRectangle = this.tempLeftPoint.replace(/[()]/g, '').split(',').map(Number);
|
||||
});
|
||||
if (!isInitialRender) {
|
||||
Button.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
Button.pop();
|
||||
Row.pop();
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Row.create();
|
||||
Row.debugLine("conponents/SetFractalRectangle.ets(45:7)");
|
||||
if (!isInitialRender) {
|
||||
Row.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
TextInput.create({ placeholder: `右下点:rightPoint=(280,280)` });
|
||||
TextInput.debugLine("conponents/SetFractalRectangle.ets(46:9)");
|
||||
TextInput.width('70%');
|
||||
TextInput.margin({ right: '10%' });
|
||||
TextInput.onChange((value) => {
|
||||
this.tempRightPoint = value;
|
||||
});
|
||||
if (!isInitialRender) {
|
||||
TextInput.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Button.createWithLabel("确认");
|
||||
Button.debugLine("conponents/SetFractalRectangle.ets(53:9)");
|
||||
Button.onClick(() => {
|
||||
this.rightPointRectangle = this.tempRightPoint.replace(/[()]/g, '').split(',').map(Number);
|
||||
});
|
||||
if (!isInitialRender) {
|
||||
Button.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
Button.pop();
|
||||
Row.pop();
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Row.create();
|
||||
Row.debugLine("conponents/SetFractalRectangle.ets(59:7)");
|
||||
if (!isInitialRender) {
|
||||
Row.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
TextInput.create({ placeholder: `初始角:initAngle=45` });
|
||||
TextInput.debugLine("conponents/SetFractalRectangle.ets(60:9)");
|
||||
TextInput.width('70%');
|
||||
TextInput.margin({ right: '10%' });
|
||||
TextInput.onChange((value) => {
|
||||
this.tempInitAngle = Number(value);
|
||||
});
|
||||
if (!isInitialRender) {
|
||||
TextInput.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Button.createWithLabel("确认");
|
||||
Button.debugLine("conponents/SetFractalRectangle.ets(67:9)");
|
||||
Button.onClick(() => {
|
||||
this.initAngleRectangle = this.tempInitAngle;
|
||||
});
|
||||
if (!isInitialRender) {
|
||||
Button.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
Button.pop();
|
||||
Row.pop();
|
||||
Column.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
|
@ -1,328 +0,0 @@
|
|||
interface SetTriangle_Params {
|
||||
depthTriangle?: number // 分形层数
|
||||
;
|
||||
percentTriangle?: number // 缩放比例
|
||||
;
|
||||
initPointTriangle?: number[] // 初始点
|
||||
;
|
||||
initAngleTriangle?: number // 初始角
|
||||
;
|
||||
initLengthTriangle?: number // 初始长度
|
||||
;
|
||||
tempDepth?: number;
|
||||
tempPercent?: number;
|
||||
tempInitPoint?: string;
|
||||
tempInitAngle?: number;
|
||||
tempInitLength?: number;
|
||||
controller?: CustomDialogController;
|
||||
}
|
||||
export default class SetTriangle extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined) {
|
||||
super(parent, __localStorage, elmtId);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.__depthTriangle = new SynchedPropertySimpleTwoWayPU(params.depthTriangle, this, "depthTriangle");
|
||||
this.__percentTriangle = new SynchedPropertySimpleTwoWayPU(params.percentTriangle, this, "percentTriangle");
|
||||
this.__initPointTriangle = new SynchedPropertyObjectTwoWayPU(params.initPointTriangle, this, "initPointTriangle");
|
||||
this.__initAngleTriangle = new SynchedPropertySimpleTwoWayPU(params.initAngleTriangle, this, "initAngleTriangle");
|
||||
this.__initLengthTriangle = new SynchedPropertySimpleTwoWayPU(params.initLengthTriangle, this, "initLengthTriangle");
|
||||
this.tempDepth = 6;
|
||||
this.tempPercent = 0.8;
|
||||
this.tempInitPoint = "[260,280]";
|
||||
this.tempInitAngle = 30;
|
||||
this.tempInitLength = 70;
|
||||
this.controller = undefined;
|
||||
this.setInitiallyProvidedValue(params);
|
||||
}
|
||||
setInitiallyProvidedValue(params: SetTriangle_Params) {
|
||||
if (params.tempDepth !== undefined) {
|
||||
this.tempDepth = params.tempDepth;
|
||||
}
|
||||
if (params.tempPercent !== undefined) {
|
||||
this.tempPercent = params.tempPercent;
|
||||
}
|
||||
if (params.tempInitPoint !== undefined) {
|
||||
this.tempInitPoint = params.tempInitPoint;
|
||||
}
|
||||
if (params.tempInitAngle !== undefined) {
|
||||
this.tempInitAngle = params.tempInitAngle;
|
||||
}
|
||||
if (params.tempInitLength !== undefined) {
|
||||
this.tempInitLength = params.tempInitLength;
|
||||
}
|
||||
if (params.controller !== undefined) {
|
||||
this.controller = params.controller;
|
||||
}
|
||||
}
|
||||
updateStateVars(params: SetTriangle_Params) {
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
this.__depthTriangle.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__percentTriangle.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__initPointTriangle.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__initAngleTriangle.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__initLengthTriangle.purgeDependencyOnElmtId(rmElmtId);
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__depthTriangle.aboutToBeDeleted();
|
||||
this.__percentTriangle.aboutToBeDeleted();
|
||||
this.__initPointTriangle.aboutToBeDeleted();
|
||||
this.__initAngleTriangle.aboutToBeDeleted();
|
||||
this.__initLengthTriangle.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
private __depthTriangle: SynchedPropertySimpleTwoWayPU<number>; // 分形层数
|
||||
get depthTriangle() {
|
||||
return this.__depthTriangle.get();
|
||||
}
|
||||
set depthTriangle(newValue: number // 分形层数
|
||||
) {
|
||||
this.__depthTriangle.set(newValue);
|
||||
}
|
||||
private __percentTriangle: SynchedPropertySimpleTwoWayPU<number>; // 缩放比例
|
||||
get percentTriangle() {
|
||||
return this.__percentTriangle.get();
|
||||
}
|
||||
set percentTriangle(newValue: number // 缩放比例
|
||||
) {
|
||||
this.__percentTriangle.set(newValue);
|
||||
}
|
||||
private __initPointTriangle: SynchedPropertySimpleOneWayPU<number[]>; // 初始点
|
||||
get initPointTriangle() {
|
||||
return this.__initPointTriangle.get();
|
||||
}
|
||||
set initPointTriangle(newValue: number[] // 初始点
|
||||
) {
|
||||
this.__initPointTriangle.set(newValue);
|
||||
}
|
||||
private __initAngleTriangle: SynchedPropertySimpleTwoWayPU<number>; // 初始角
|
||||
get initAngleTriangle() {
|
||||
return this.__initAngleTriangle.get();
|
||||
}
|
||||
set initAngleTriangle(newValue: number // 初始角
|
||||
) {
|
||||
this.__initAngleTriangle.set(newValue);
|
||||
}
|
||||
private __initLengthTriangle: SynchedPropertySimpleTwoWayPU<number>; // 初始长度
|
||||
get initLengthTriangle() {
|
||||
return this.__initLengthTriangle.get();
|
||||
}
|
||||
set initLengthTriangle(newValue: number // 初始长度
|
||||
) {
|
||||
this.__initLengthTriangle.set(newValue);
|
||||
}
|
||||
private tempDepth: number;
|
||||
private tempPercent: number;
|
||||
private tempInitPoint: string;
|
||||
private tempInitAngle: number;
|
||||
private tempInitLength: number;
|
||||
private controller: CustomDialogController;
|
||||
setController(ctr: CustomDialogController) {
|
||||
this.controller = ctr;
|
||||
}
|
||||
initialRender() {
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Column.create();
|
||||
Column.debugLine("conponents/SetFractalTriangle.ets(18:5)");
|
||||
Column.width('100%');
|
||||
Column.height('100%');
|
||||
Column.justifyContent(FlexAlign.SpaceEvenly);
|
||||
if (!isInitialRender) {
|
||||
Column.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Row.create();
|
||||
Row.debugLine("conponents/SetFractalTriangle.ets(19:7)");
|
||||
if (!isInitialRender) {
|
||||
Row.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
TextInput.create({ placeholder: `分形层数:finishLevel=6` });
|
||||
TextInput.debugLine("conponents/SetFractalTriangle.ets(20:9)");
|
||||
TextInput.width('70%');
|
||||
TextInput.margin({ right: '10%' });
|
||||
TextInput.onChange((value) => {
|
||||
this.tempDepth = Number(value);
|
||||
});
|
||||
if (!isInitialRender) {
|
||||
TextInput.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Button.createWithLabel("确认");
|
||||
Button.debugLine("conponents/SetFractalTriangle.ets(27:9)");
|
||||
Button.onClick(() => {
|
||||
this.depthTriangle = this.tempDepth;
|
||||
});
|
||||
if (!isInitialRender) {
|
||||
Button.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
Button.pop();
|
||||
Row.pop();
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Row.create();
|
||||
Row.debugLine("conponents/SetFractalTriangle.ets(33:7)");
|
||||
if (!isInitialRender) {
|
||||
Row.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
TextInput.create({ placeholder: `缩放比例:treePercent=0.8` });
|
||||
TextInput.debugLine("conponents/SetFractalTriangle.ets(34:9)");
|
||||
TextInput.width('70%');
|
||||
TextInput.margin({ right: '10%' });
|
||||
TextInput.onChange((value) => {
|
||||
this.tempPercent = Number(value);
|
||||
});
|
||||
if (!isInitialRender) {
|
||||
TextInput.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Button.createWithLabel("确认");
|
||||
Button.debugLine("conponents/SetFractalTriangle.ets(41:9)");
|
||||
Button.onClick(() => {
|
||||
this.percentTriangle = this.tempPercent;
|
||||
});
|
||||
if (!isInitialRender) {
|
||||
Button.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
Button.pop();
|
||||
Row.pop();
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Row.create();
|
||||
Row.debugLine("conponents/SetFractalTriangle.ets(47:7)");
|
||||
if (!isInitialRender) {
|
||||
Row.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
TextInput.create({ placeholder: `初始点:initPoint=(260,280)` });
|
||||
TextInput.debugLine("conponents/SetFractalTriangle.ets(48:9)");
|
||||
TextInput.width('70%');
|
||||
TextInput.margin({ right: '10%' });
|
||||
TextInput.onChange((value) => {
|
||||
this.tempInitPoint = value;
|
||||
});
|
||||
if (!isInitialRender) {
|
||||
TextInput.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Button.createWithLabel("确认");
|
||||
Button.debugLine("conponents/SetFractalTriangle.ets(55:9)");
|
||||
Button.onClick(() => {
|
||||
this.initPointTriangle = this.tempInitPoint.replace(/[()]/g, '').split(',').map(Number);
|
||||
});
|
||||
if (!isInitialRender) {
|
||||
Button.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
Button.pop();
|
||||
Row.pop();
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Row.create();
|
||||
Row.debugLine("conponents/SetFractalTriangle.ets(61:7)");
|
||||
if (!isInitialRender) {
|
||||
Row.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
TextInput.create({ placeholder: `初始角:initAngle=30` });
|
||||
TextInput.debugLine("conponents/SetFractalTriangle.ets(62:9)");
|
||||
TextInput.width('70%');
|
||||
TextInput.margin({ right: '10%' });
|
||||
TextInput.onChange((value) => {
|
||||
this.tempInitAngle = Number(value);
|
||||
});
|
||||
if (!isInitialRender) {
|
||||
TextInput.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Button.createWithLabel("确认");
|
||||
Button.debugLine("conponents/SetFractalTriangle.ets(69:9)");
|
||||
Button.onClick(() => {
|
||||
this.initAngleTriangle = this.tempInitAngle;
|
||||
});
|
||||
if (!isInitialRender) {
|
||||
Button.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
Button.pop();
|
||||
Row.pop();
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Row.create();
|
||||
Row.debugLine("conponents/SetFractalTriangle.ets(75:7)");
|
||||
if (!isInitialRender) {
|
||||
Row.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
TextInput.create({ placeholder: `初始长度:initLength=70` });
|
||||
TextInput.debugLine("conponents/SetFractalTriangle.ets(76:9)");
|
||||
TextInput.width('70%');
|
||||
TextInput.margin({ right: '10%' });
|
||||
TextInput.onChange((value) => {
|
||||
this.tempInitLength = Number(value);
|
||||
});
|
||||
if (!isInitialRender) {
|
||||
TextInput.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Button.createWithLabel("确认");
|
||||
Button.debugLine("conponents/SetFractalTriangle.ets(83:9)");
|
||||
Button.onClick(() => {
|
||||
this.initLengthTriangle = this.tempInitLength;
|
||||
});
|
||||
if (!isInitialRender) {
|
||||
Button.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
Button.pop();
|
||||
Row.pop();
|
||||
Column.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
|
@ -1,440 +0,0 @@
|
|||
interface SetY_Params {
|
||||
depthY?: number // 分形层数
|
||||
;
|
||||
percentY?: number // 缩放比例
|
||||
;
|
||||
leftAngleY?: number // 左枝倾角
|
||||
;
|
||||
rightAngleY?: number // 右枝倾角
|
||||
;
|
||||
initPointY?: number[] // 初始点
|
||||
;
|
||||
initAngleY?: number // 初始角
|
||||
;
|
||||
initLengthY?: number // 初始长度
|
||||
;
|
||||
tempDepth?: number;
|
||||
tempPercent?: number;
|
||||
tempLeftAngle?: number;
|
||||
tempRightAngle?: number;
|
||||
tempInitPoint?: string;
|
||||
tempInitAngle?: number;
|
||||
tempInitLength?: number;
|
||||
controller?: CustomDialogController;
|
||||
}
|
||||
export default class SetY extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined) {
|
||||
super(parent, __localStorage, elmtId);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.__depthY = new SynchedPropertySimpleTwoWayPU(params.depthY, this, "depthY");
|
||||
this.__percentY = new SynchedPropertySimpleTwoWayPU(params.percentY, this, "percentY");
|
||||
this.__leftAngleY = new SynchedPropertySimpleTwoWayPU(params.leftAngleY, this, "leftAngleY");
|
||||
this.__rightAngleY = new SynchedPropertySimpleTwoWayPU(params.rightAngleY, this, "rightAngleY");
|
||||
this.__initPointY = new SynchedPropertyObjectTwoWayPU(params.initPointY, this, "initPointY");
|
||||
this.__initAngleY = new SynchedPropertySimpleTwoWayPU(params.initAngleY, this, "initAngleY");
|
||||
this.__initLengthY = new SynchedPropertySimpleTwoWayPU(params.initLengthY, this, "initLengthY");
|
||||
this.tempDepth = 10;
|
||||
this.tempPercent = 0.65;
|
||||
this.tempLeftAngle = 60;
|
||||
this.tempRightAngle = 60;
|
||||
this.tempInitPoint = "[260, 280]";
|
||||
this.tempInitAngle = 90;
|
||||
this.tempInitLength = 90;
|
||||
this.controller = undefined;
|
||||
this.setInitiallyProvidedValue(params);
|
||||
}
|
||||
setInitiallyProvidedValue(params: SetY_Params) {
|
||||
if (params.tempDepth !== undefined) {
|
||||
this.tempDepth = params.tempDepth;
|
||||
}
|
||||
if (params.tempPercent !== undefined) {
|
||||
this.tempPercent = params.tempPercent;
|
||||
}
|
||||
if (params.tempLeftAngle !== undefined) {
|
||||
this.tempLeftAngle = params.tempLeftAngle;
|
||||
}
|
||||
if (params.tempRightAngle !== undefined) {
|
||||
this.tempRightAngle = params.tempRightAngle;
|
||||
}
|
||||
if (params.tempInitPoint !== undefined) {
|
||||
this.tempInitPoint = params.tempInitPoint;
|
||||
}
|
||||
if (params.tempInitAngle !== undefined) {
|
||||
this.tempInitAngle = params.tempInitAngle;
|
||||
}
|
||||
if (params.tempInitLength !== undefined) {
|
||||
this.tempInitLength = params.tempInitLength;
|
||||
}
|
||||
if (params.controller !== undefined) {
|
||||
this.controller = params.controller;
|
||||
}
|
||||
}
|
||||
updateStateVars(params: SetY_Params) {
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
this.__depthY.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__percentY.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__leftAngleY.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__rightAngleY.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__initPointY.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__initAngleY.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__initLengthY.purgeDependencyOnElmtId(rmElmtId);
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__depthY.aboutToBeDeleted();
|
||||
this.__percentY.aboutToBeDeleted();
|
||||
this.__leftAngleY.aboutToBeDeleted();
|
||||
this.__rightAngleY.aboutToBeDeleted();
|
||||
this.__initPointY.aboutToBeDeleted();
|
||||
this.__initAngleY.aboutToBeDeleted();
|
||||
this.__initLengthY.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
private __depthY: SynchedPropertySimpleTwoWayPU<number>; // 分形层数
|
||||
get depthY() {
|
||||
return this.__depthY.get();
|
||||
}
|
||||
set depthY(newValue: number // 分形层数
|
||||
) {
|
||||
this.__depthY.set(newValue);
|
||||
}
|
||||
private __percentY: SynchedPropertySimpleTwoWayPU<number>; // 缩放比例
|
||||
get percentY() {
|
||||
return this.__percentY.get();
|
||||
}
|
||||
set percentY(newValue: number // 缩放比例
|
||||
) {
|
||||
this.__percentY.set(newValue);
|
||||
}
|
||||
private __leftAngleY: SynchedPropertySimpleTwoWayPU<number>; // 左枝倾角
|
||||
get leftAngleY() {
|
||||
return this.__leftAngleY.get();
|
||||
}
|
||||
set leftAngleY(newValue: number // 左枝倾角
|
||||
) {
|
||||
this.__leftAngleY.set(newValue);
|
||||
}
|
||||
private __rightAngleY: SynchedPropertySimpleTwoWayPU<number>; // 右枝倾角
|
||||
get rightAngleY() {
|
||||
return this.__rightAngleY.get();
|
||||
}
|
||||
set rightAngleY(newValue: number // 右枝倾角
|
||||
) {
|
||||
this.__rightAngleY.set(newValue);
|
||||
}
|
||||
private __initPointY: SynchedPropertySimpleOneWayPU<number[]>; // 初始点
|
||||
get initPointY() {
|
||||
return this.__initPointY.get();
|
||||
}
|
||||
set initPointY(newValue: number[] // 初始点
|
||||
) {
|
||||
this.__initPointY.set(newValue);
|
||||
}
|
||||
private __initAngleY: SynchedPropertySimpleTwoWayPU<number>; // 初始角
|
||||
get initAngleY() {
|
||||
return this.__initAngleY.get();
|
||||
}
|
||||
set initAngleY(newValue: number // 初始角
|
||||
) {
|
||||
this.__initAngleY.set(newValue);
|
||||
}
|
||||
private __initLengthY: SynchedPropertySimpleTwoWayPU<number>; // 初始长度
|
||||
get initLengthY() {
|
||||
return this.__initLengthY.get();
|
||||
}
|
||||
set initLengthY(newValue: number // 初始长度
|
||||
) {
|
||||
this.__initLengthY.set(newValue);
|
||||
}
|
||||
private tempDepth: number;
|
||||
private tempPercent: number;
|
||||
private tempLeftAngle: number;
|
||||
private tempRightAngle: number;
|
||||
private tempInitPoint: string;
|
||||
private tempInitAngle: number;
|
||||
private tempInitLength: number;
|
||||
private controller: CustomDialogController;
|
||||
setController(ctr: CustomDialogController) {
|
||||
this.controller = ctr;
|
||||
}
|
||||
initialRender() {
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Column.create();
|
||||
Column.debugLine("conponents/SetFractalY.ets(22:5)");
|
||||
Column.width('100%');
|
||||
Column.height('100%');
|
||||
Column.justifyContent(FlexAlign.SpaceEvenly);
|
||||
if (!isInitialRender) {
|
||||
Column.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Row.create();
|
||||
Row.debugLine("conponents/SetFractalY.ets(23:7)");
|
||||
if (!isInitialRender) {
|
||||
Row.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
TextInput.create({ placeholder: `分形层数:finishLevel=10` });
|
||||
TextInput.debugLine("conponents/SetFractalY.ets(24:9)");
|
||||
TextInput.width('70%');
|
||||
TextInput.margin({ right: '10%' });
|
||||
TextInput.onChange((value) => {
|
||||
this.tempDepth = Number(value);
|
||||
});
|
||||
if (!isInitialRender) {
|
||||
TextInput.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Button.createWithLabel("确认");
|
||||
Button.debugLine("conponents/SetFractalY.ets(31:9)");
|
||||
Button.onClick(() => {
|
||||
this.depthY = this.tempDepth;
|
||||
});
|
||||
if (!isInitialRender) {
|
||||
Button.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
Button.pop();
|
||||
Row.pop();
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Row.create();
|
||||
Row.debugLine("conponents/SetFractalY.ets(37:7)");
|
||||
if (!isInitialRender) {
|
||||
Row.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
TextInput.create({ placeholder: `缩放比例:treePercent=0.65` });
|
||||
TextInput.debugLine("conponents/SetFractalY.ets(38:9)");
|
||||
TextInput.width('70%');
|
||||
TextInput.margin({ right: '10%' });
|
||||
TextInput.onChange((value) => {
|
||||
this.tempPercent = Number(value);
|
||||
});
|
||||
if (!isInitialRender) {
|
||||
TextInput.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Button.createWithLabel("确认");
|
||||
Button.debugLine("conponents/SetFractalY.ets(45:9)");
|
||||
Button.onClick(() => {
|
||||
this.percentY = this.tempPercent;
|
||||
});
|
||||
if (!isInitialRender) {
|
||||
Button.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
Button.pop();
|
||||
Row.pop();
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Row.create();
|
||||
Row.debugLine("conponents/SetFractalY.ets(51:7)");
|
||||
if (!isInitialRender) {
|
||||
Row.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
TextInput.create({ placeholder: `左枝倾角:leftAngle=60` });
|
||||
TextInput.debugLine("conponents/SetFractalY.ets(52:9)");
|
||||
TextInput.width('70%');
|
||||
TextInput.margin({ right: '10%' });
|
||||
TextInput.onChange((value) => {
|
||||
this.tempLeftAngle = Number(value);
|
||||
});
|
||||
if (!isInitialRender) {
|
||||
TextInput.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Button.createWithLabel("确认");
|
||||
Button.debugLine("conponents/SetFractalY.ets(59:9)");
|
||||
Button.onClick(() => {
|
||||
this.leftAngleY = this.tempLeftAngle;
|
||||
});
|
||||
if (!isInitialRender) {
|
||||
Button.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
Button.pop();
|
||||
Row.pop();
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Row.create();
|
||||
Row.debugLine("conponents/SetFractalY.ets(65:7)");
|
||||
if (!isInitialRender) {
|
||||
Row.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
TextInput.create({ placeholder: `右枝倾角:rightAngle=60` });
|
||||
TextInput.debugLine("conponents/SetFractalY.ets(66:9)");
|
||||
TextInput.width('70%');
|
||||
TextInput.margin({ right: '10%' });
|
||||
TextInput.onChange((value) => {
|
||||
this.tempRightAngle = Number(value);
|
||||
});
|
||||
if (!isInitialRender) {
|
||||
TextInput.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Button.createWithLabel("确认");
|
||||
Button.debugLine("conponents/SetFractalY.ets(73:9)");
|
||||
Button.onClick(() => {
|
||||
this.rightAngleY = this.tempRightAngle;
|
||||
});
|
||||
if (!isInitialRender) {
|
||||
Button.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
Button.pop();
|
||||
Row.pop();
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Row.create();
|
||||
Row.debugLine("conponents/SetFractalY.ets(79:7)");
|
||||
if (!isInitialRender) {
|
||||
Row.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
TextInput.create({ placeholder: `初始点:initPoint=(260,280)` });
|
||||
TextInput.debugLine("conponents/SetFractalY.ets(80:9)");
|
||||
TextInput.width('70%');
|
||||
TextInput.margin({ right: '10%' });
|
||||
TextInput.onChange((value) => {
|
||||
this.tempInitPoint = value;
|
||||
});
|
||||
if (!isInitialRender) {
|
||||
TextInput.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Button.createWithLabel("确认");
|
||||
Button.debugLine("conponents/SetFractalY.ets(87:9)");
|
||||
Button.onClick(() => {
|
||||
this.initPointY = this.tempInitPoint.replace(/[()]/g, '').split(',').map(Number);
|
||||
});
|
||||
if (!isInitialRender) {
|
||||
Button.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
Button.pop();
|
||||
Row.pop();
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Row.create();
|
||||
Row.debugLine("conponents/SetFractalY.ets(93:7)");
|
||||
if (!isInitialRender) {
|
||||
Row.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
TextInput.create({ placeholder: `初始角:initAngle=90` });
|
||||
TextInput.debugLine("conponents/SetFractalY.ets(94:9)");
|
||||
TextInput.width('70%');
|
||||
TextInput.margin({ right: '10%' });
|
||||
TextInput.onChange((value) => {
|
||||
this.tempInitAngle = Number(value);
|
||||
});
|
||||
if (!isInitialRender) {
|
||||
TextInput.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Button.createWithLabel("确认");
|
||||
Button.debugLine("conponents/SetFractalY.ets(101:9)");
|
||||
Button.onClick(() => {
|
||||
this.initAngleY = this.tempInitAngle;
|
||||
});
|
||||
if (!isInitialRender) {
|
||||
Button.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
Button.pop();
|
||||
Row.pop();
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Row.create();
|
||||
Row.debugLine("conponents/SetFractalY.ets(107:7)");
|
||||
if (!isInitialRender) {
|
||||
Row.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
TextInput.create({ placeholder: `初始长度:initLength=90` });
|
||||
TextInput.debugLine("conponents/SetFractalY.ets(108:9)");
|
||||
TextInput.width('70%');
|
||||
TextInput.margin({ right: '10%' });
|
||||
TextInput.onChange((value) => {
|
||||
this.tempInitLength = Number(value);
|
||||
});
|
||||
if (!isInitialRender) {
|
||||
TextInput.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Button.createWithLabel("确认");
|
||||
Button.debugLine("conponents/SetFractalY.ets(115:9)");
|
||||
Button.onClick(() => {
|
||||
this.initLengthY = this.tempInitLength;
|
||||
});
|
||||
if (!isInitialRender) {
|
||||
Button.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
Button.pop();
|
||||
Row.pop();
|
||||
Column.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
|
@ -1,278 +0,0 @@
|
|||
interface SetRectangle_Params {
|
||||
depthRectangle?: number // triangle的分形层数
|
||||
;
|
||||
leftPointRectangle?: number[] // triangle的左枝倾角
|
||||
;
|
||||
rightPointRectangle?: number[] // triangle的右枝倾角
|
||||
;
|
||||
initAngleRectangle?: number // triangle的初始点
|
||||
;
|
||||
tempDepth?: number;
|
||||
tempLeftPoint?: string;
|
||||
tempRightPoint?: string;
|
||||
tempInitAngle?: number;
|
||||
controller?: CustomDialogController;
|
||||
}
|
||||
export default class SetRectangle extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined) {
|
||||
super(parent, __localStorage, elmtId);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.__depthRectangle = new SynchedPropertySimpleTwoWayPU(params.depthRectangle, this, "depthRectangle");
|
||||
this.__leftPointRectangle = new SynchedPropertyObjectTwoWayPU(params.leftPointRectangle, this, "leftPointRectangle");
|
||||
this.__rightPointRectangle = new SynchedPropertyObjectTwoWayPU(params.rightPointRectangle, this, "rightPointRectangle");
|
||||
this.__initAngleRectangle = new SynchedPropertySimpleTwoWayPU(params.initAngleRectangle, this, "initAngleRectangle");
|
||||
this.tempDepth = undefined;
|
||||
this.tempLeftPoint = undefined;
|
||||
this.tempRightPoint = undefined;
|
||||
this.tempInitAngle = undefined;
|
||||
this.controller = undefined;
|
||||
this.setInitiallyProvidedValue(params);
|
||||
}
|
||||
setInitiallyProvidedValue(params: SetRectangle_Params) {
|
||||
if (params.tempDepth !== undefined) {
|
||||
this.tempDepth = params.tempDepth;
|
||||
}
|
||||
if (params.tempLeftPoint !== undefined) {
|
||||
this.tempLeftPoint = params.tempLeftPoint;
|
||||
}
|
||||
if (params.tempRightPoint !== undefined) {
|
||||
this.tempRightPoint = params.tempRightPoint;
|
||||
}
|
||||
if (params.tempInitAngle !== undefined) {
|
||||
this.tempInitAngle = params.tempInitAngle;
|
||||
}
|
||||
if (params.controller !== undefined) {
|
||||
this.controller = params.controller;
|
||||
}
|
||||
}
|
||||
updateStateVars(params: SetRectangle_Params) {
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
this.__depthRectangle.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__leftPointRectangle.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__rightPointRectangle.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__initAngleRectangle.purgeDependencyOnElmtId(rmElmtId);
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__depthRectangle.aboutToBeDeleted();
|
||||
this.__leftPointRectangle.aboutToBeDeleted();
|
||||
this.__rightPointRectangle.aboutToBeDeleted();
|
||||
this.__initAngleRectangle.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
private __depthRectangle: SynchedPropertySimpleTwoWayPU<number>; // triangle的分形层数
|
||||
get depthRectangle() {
|
||||
return this.__depthRectangle.get();
|
||||
}
|
||||
set depthRectangle(newValue: number // triangle的分形层数
|
||||
) {
|
||||
this.__depthRectangle.set(newValue);
|
||||
}
|
||||
private __leftPointRectangle: SynchedPropertySimpleOneWayPU<number[]>; // triangle的左枝倾角
|
||||
get leftPointRectangle() {
|
||||
return this.__leftPointRectangle.get();
|
||||
}
|
||||
set leftPointRectangle(newValue: number[] // triangle的左枝倾角
|
||||
) {
|
||||
this.__leftPointRectangle.set(newValue);
|
||||
}
|
||||
private __rightPointRectangle: SynchedPropertySimpleOneWayPU<number[]>; // triangle的右枝倾角
|
||||
get rightPointRectangle() {
|
||||
return this.__rightPointRectangle.get();
|
||||
}
|
||||
set rightPointRectangle(newValue: number[] // triangle的右枝倾角
|
||||
) {
|
||||
this.__rightPointRectangle.set(newValue);
|
||||
}
|
||||
private __initAngleRectangle: SynchedPropertySimpleTwoWayPU<number>; // triangle的初始点
|
||||
get initAngleRectangle() {
|
||||
return this.__initAngleRectangle.get();
|
||||
}
|
||||
set initAngleRectangle(newValue: number // triangle的初始点
|
||||
) {
|
||||
this.__initAngleRectangle.set(newValue);
|
||||
}
|
||||
private tempDepth: number;
|
||||
private tempLeftPoint: string;
|
||||
private tempRightPoint: string;
|
||||
private tempInitAngle: number;
|
||||
private controller: CustomDialogController;
|
||||
setController(ctr: CustomDialogController) {
|
||||
this.controller = ctr;
|
||||
}
|
||||
// @State depthRectangle: number = 8 // rectangle的分形层数
|
||||
// @State leftPointRectangle: number[] = [220, 280] // rectangle的左下点
|
||||
// @State rightPointRectangle: number[] = [280, 280] // rectangle的右下点
|
||||
// @State initAngleRectangle: number = 45 // rectangle的初始角
|
||||
initialRender() {
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Column.create();
|
||||
Column.debugLine("conponents/SetRectangle.ets(19:5)");
|
||||
Column.width('100%');
|
||||
Column.height('100%');
|
||||
Column.justifyContent(FlexAlign.SpaceEvenly);
|
||||
if (!isInitialRender) {
|
||||
Column.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Row.create();
|
||||
Row.debugLine("conponents/SetRectangle.ets(20:7)");
|
||||
if (!isInitialRender) {
|
||||
Row.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
TextInput.create({ placeholder: `分形层数:finishLevel=8` });
|
||||
TextInput.debugLine("conponents/SetRectangle.ets(21:9)");
|
||||
TextInput.width('70%');
|
||||
TextInput.margin({ right: '10%' });
|
||||
TextInput.onChange((value) => {
|
||||
this.tempDepth = Number(value);
|
||||
});
|
||||
if (!isInitialRender) {
|
||||
TextInput.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Button.createWithLabel("确认");
|
||||
Button.debugLine("conponents/SetRectangle.ets(28:9)");
|
||||
Button.onClick(() => {
|
||||
this.depthRectangle = this.tempDepth;
|
||||
});
|
||||
if (!isInitialRender) {
|
||||
Button.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
Button.pop();
|
||||
Row.pop();
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Row.create();
|
||||
Row.debugLine("conponents/SetRectangle.ets(34:7)");
|
||||
if (!isInitialRender) {
|
||||
Row.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
TextInput.create({ placeholder: `左下点:leftPoint=(220,280)` });
|
||||
TextInput.debugLine("conponents/SetRectangle.ets(35:9)");
|
||||
TextInput.width('70%');
|
||||
TextInput.margin({ right: '10%' });
|
||||
TextInput.onChange((value) => {
|
||||
this.tempLeftPoint = value;
|
||||
});
|
||||
if (!isInitialRender) {
|
||||
TextInput.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Button.createWithLabel("确认");
|
||||
Button.debugLine("conponents/SetRectangle.ets(42:9)");
|
||||
Button.onClick(() => {
|
||||
let tempArr = this.tempLeftPoint.split(',');
|
||||
this.leftPointRectangle = [Number(tempArr[1]), Number(tempArr[3])];
|
||||
});
|
||||
if (!isInitialRender) {
|
||||
Button.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
Button.pop();
|
||||
Row.pop();
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Row.create();
|
||||
Row.debugLine("conponents/SetRectangle.ets(49:7)");
|
||||
if (!isInitialRender) {
|
||||
Row.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
TextInput.create({ placeholder: `右下点:rightPoint=(280,280)` });
|
||||
TextInput.debugLine("conponents/SetRectangle.ets(50:9)");
|
||||
TextInput.width('70%');
|
||||
TextInput.margin({ right: '10%' });
|
||||
TextInput.onChange((value) => {
|
||||
this.tempRightPoint = value;
|
||||
});
|
||||
if (!isInitialRender) {
|
||||
TextInput.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Button.createWithLabel("确认");
|
||||
Button.debugLine("conponents/SetRectangle.ets(57:9)");
|
||||
Button.onClick(() => {
|
||||
let tempArr = this.tempRightPoint.split(',');
|
||||
this.rightPointRectangle = [Number(tempArr[1]), Number(tempArr[3])];
|
||||
});
|
||||
if (!isInitialRender) {
|
||||
Button.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
Button.pop();
|
||||
Row.pop();
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Row.create();
|
||||
Row.debugLine("conponents/SetRectangle.ets(64:7)");
|
||||
if (!isInitialRender) {
|
||||
Row.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
TextInput.create({ placeholder: `初始角:initAngle=45` });
|
||||
TextInput.debugLine("conponents/SetRectangle.ets(65:9)");
|
||||
TextInput.width('70%');
|
||||
TextInput.margin({ right: '10%' });
|
||||
TextInput.onChange((value) => {
|
||||
this.tempInitAngle = Number(value);
|
||||
});
|
||||
if (!isInitialRender) {
|
||||
TextInput.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Button.createWithLabel("确认");
|
||||
Button.debugLine("conponents/SetRectangle.ets(72:9)");
|
||||
Button.onClick(() => {
|
||||
this.initAngleRectangle = this.tempInitAngle;
|
||||
});
|
||||
if (!isInitialRender) {
|
||||
Button.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
Button.pop();
|
||||
Row.pop();
|
||||
Column.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
|
@ -1,334 +0,0 @@
|
|||
interface SetTriangle_Params {
|
||||
depthTriangle?: number // triangle的分形层数
|
||||
;
|
||||
percentTriangle?: number // triangle的缩放比例
|
||||
;
|
||||
initPointTriangle?: number[] // triangle的左枝倾角
|
||||
;
|
||||
initAngleTriangle?: number // triangle的右枝倾角
|
||||
;
|
||||
initLengthTriangle?: number // triangle的初始点
|
||||
;
|
||||
tempDepth?: number;
|
||||
tempPercent?: number;
|
||||
tempInitPoint?: string;
|
||||
tempInitAngle?: number;
|
||||
tempInitLength?: number;
|
||||
controller?: CustomDialogController;
|
||||
}
|
||||
export default class SetTriangle extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined) {
|
||||
super(parent, __localStorage, elmtId);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.__depthTriangle = new SynchedPropertySimpleTwoWayPU(params.depthTriangle, this, "depthTriangle");
|
||||
this.__percentTriangle = new SynchedPropertySimpleTwoWayPU(params.percentTriangle, this, "percentTriangle");
|
||||
this.__initPointTriangle = new SynchedPropertyObjectTwoWayPU(params.initPointTriangle, this, "initPointTriangle");
|
||||
this.__initAngleTriangle = new SynchedPropertySimpleTwoWayPU(params.initAngleTriangle, this, "initAngleTriangle");
|
||||
this.__initLengthTriangle = new SynchedPropertySimpleTwoWayPU(params.initLengthTriangle, this, "initLengthTriangle");
|
||||
this.tempDepth = undefined;
|
||||
this.tempPercent = undefined;
|
||||
this.tempInitPoint = undefined;
|
||||
this.tempInitAngle = undefined;
|
||||
this.tempInitLength = undefined;
|
||||
this.controller = undefined;
|
||||
this.setInitiallyProvidedValue(params);
|
||||
}
|
||||
setInitiallyProvidedValue(params: SetTriangle_Params) {
|
||||
if (params.tempDepth !== undefined) {
|
||||
this.tempDepth = params.tempDepth;
|
||||
}
|
||||
if (params.tempPercent !== undefined) {
|
||||
this.tempPercent = params.tempPercent;
|
||||
}
|
||||
if (params.tempInitPoint !== undefined) {
|
||||
this.tempInitPoint = params.tempInitPoint;
|
||||
}
|
||||
if (params.tempInitAngle !== undefined) {
|
||||
this.tempInitAngle = params.tempInitAngle;
|
||||
}
|
||||
if (params.tempInitLength !== undefined) {
|
||||
this.tempInitLength = params.tempInitLength;
|
||||
}
|
||||
if (params.controller !== undefined) {
|
||||
this.controller = params.controller;
|
||||
}
|
||||
}
|
||||
updateStateVars(params: SetTriangle_Params) {
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
this.__depthTriangle.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__percentTriangle.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__initPointTriangle.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__initAngleTriangle.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__initLengthTriangle.purgeDependencyOnElmtId(rmElmtId);
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__depthTriangle.aboutToBeDeleted();
|
||||
this.__percentTriangle.aboutToBeDeleted();
|
||||
this.__initPointTriangle.aboutToBeDeleted();
|
||||
this.__initAngleTriangle.aboutToBeDeleted();
|
||||
this.__initLengthTriangle.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
private __depthTriangle: SynchedPropertySimpleTwoWayPU<number>; // triangle的分形层数
|
||||
get depthTriangle() {
|
||||
return this.__depthTriangle.get();
|
||||
}
|
||||
set depthTriangle(newValue: number // triangle的分形层数
|
||||
) {
|
||||
this.__depthTriangle.set(newValue);
|
||||
}
|
||||
private __percentTriangle: SynchedPropertySimpleTwoWayPU<number>; // triangle的缩放比例
|
||||
get percentTriangle() {
|
||||
return this.__percentTriangle.get();
|
||||
}
|
||||
set percentTriangle(newValue: number // triangle的缩放比例
|
||||
) {
|
||||
this.__percentTriangle.set(newValue);
|
||||
}
|
||||
private __initPointTriangle: SynchedPropertySimpleOneWayPU<number[]>; // triangle的左枝倾角
|
||||
get initPointTriangle() {
|
||||
return this.__initPointTriangle.get();
|
||||
}
|
||||
set initPointTriangle(newValue: number[] // triangle的左枝倾角
|
||||
) {
|
||||
this.__initPointTriangle.set(newValue);
|
||||
}
|
||||
private __initAngleTriangle: SynchedPropertySimpleTwoWayPU<number>; // triangle的右枝倾角
|
||||
get initAngleTriangle() {
|
||||
return this.__initAngleTriangle.get();
|
||||
}
|
||||
set initAngleTriangle(newValue: number // triangle的右枝倾角
|
||||
) {
|
||||
this.__initAngleTriangle.set(newValue);
|
||||
}
|
||||
private __initLengthTriangle: SynchedPropertySimpleTwoWayPU<number>; // triangle的初始点
|
||||
get initLengthTriangle() {
|
||||
return this.__initLengthTriangle.get();
|
||||
}
|
||||
set initLengthTriangle(newValue: number // triangle的初始点
|
||||
) {
|
||||
this.__initLengthTriangle.set(newValue);
|
||||
}
|
||||
private tempDepth: number;
|
||||
private tempPercent: number;
|
||||
private tempInitPoint: string;
|
||||
private tempInitAngle: number;
|
||||
private tempInitLength: number;
|
||||
private controller: CustomDialogController;
|
||||
setController(ctr: CustomDialogController) {
|
||||
this.controller = ctr;
|
||||
}
|
||||
// @State depthTriangle: number = 6 // triangle的分形层数
|
||||
// @State percentTriangle: number = 0.8 // triangle的缩放比例
|
||||
// @State initPointTriangle: number[] = [260, 280] // triangle的初始点
|
||||
// @State initAngleTriangle: number = 30 // triangle的初始角
|
||||
// @State initLengthTriangle: number = 70 // triangle的初始长度
|
||||
initialRender() {
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Column.create();
|
||||
Column.debugLine("conponents/SetTriangle.ets(22:5)");
|
||||
Column.width('100%');
|
||||
Column.height('100%');
|
||||
Column.justifyContent(FlexAlign.SpaceEvenly);
|
||||
if (!isInitialRender) {
|
||||
Column.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Row.create();
|
||||
Row.debugLine("conponents/SetTriangle.ets(23:7)");
|
||||
if (!isInitialRender) {
|
||||
Row.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
TextInput.create({ placeholder: `分形层数:finishLevel=6` });
|
||||
TextInput.debugLine("conponents/SetTriangle.ets(24:9)");
|
||||
TextInput.width('70%');
|
||||
TextInput.margin({ right: '10%' });
|
||||
TextInput.onChange((value) => {
|
||||
this.tempDepth = Number(value);
|
||||
});
|
||||
if (!isInitialRender) {
|
||||
TextInput.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Button.createWithLabel("确认");
|
||||
Button.debugLine("conponents/SetTriangle.ets(31:9)");
|
||||
Button.onClick(() => {
|
||||
this.depthTriangle = this.tempDepth;
|
||||
});
|
||||
if (!isInitialRender) {
|
||||
Button.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
Button.pop();
|
||||
Row.pop();
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Row.create();
|
||||
Row.debugLine("conponents/SetTriangle.ets(37:7)");
|
||||
if (!isInitialRender) {
|
||||
Row.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
TextInput.create({ placeholder: `缩放比例:treePercent=0.8` });
|
||||
TextInput.debugLine("conponents/SetTriangle.ets(38:9)");
|
||||
TextInput.width('70%');
|
||||
TextInput.margin({ right: '10%' });
|
||||
TextInput.onChange((value) => {
|
||||
this.tempPercent = Number(value);
|
||||
});
|
||||
if (!isInitialRender) {
|
||||
TextInput.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Button.createWithLabel("确认");
|
||||
Button.debugLine("conponents/SetTriangle.ets(45:9)");
|
||||
Button.onClick(() => {
|
||||
this.percentTriangle = this.tempPercent;
|
||||
});
|
||||
if (!isInitialRender) {
|
||||
Button.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
Button.pop();
|
||||
Row.pop();
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Row.create();
|
||||
Row.debugLine("conponents/SetTriangle.ets(51:7)");
|
||||
if (!isInitialRender) {
|
||||
Row.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
TextInput.create({ placeholder: `初始点:initPoint=(260,280)` });
|
||||
TextInput.debugLine("conponents/SetTriangle.ets(52:9)");
|
||||
TextInput.width('70%');
|
||||
TextInput.margin({ right: '10%' });
|
||||
TextInput.onChange((value) => {
|
||||
this.tempInitPoint = value;
|
||||
});
|
||||
if (!isInitialRender) {
|
||||
TextInput.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Button.createWithLabel("确认");
|
||||
Button.debugLine("conponents/SetTriangle.ets(59:9)");
|
||||
Button.onClick(() => {
|
||||
let tempArr = this.tempInitPoint.split(',');
|
||||
this.initPointTriangle = [Number(tempArr[1]), Number(tempArr[3])];
|
||||
});
|
||||
if (!isInitialRender) {
|
||||
Button.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
Button.pop();
|
||||
Row.pop();
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Row.create();
|
||||
Row.debugLine("conponents/SetTriangle.ets(66:7)");
|
||||
if (!isInitialRender) {
|
||||
Row.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
TextInput.create({ placeholder: `初始角:initAngle=30` });
|
||||
TextInput.debugLine("conponents/SetTriangle.ets(67:9)");
|
||||
TextInput.width('70%');
|
||||
TextInput.margin({ right: '10%' });
|
||||
TextInput.onChange((value) => {
|
||||
this.tempInitAngle = Number(value);
|
||||
});
|
||||
if (!isInitialRender) {
|
||||
TextInput.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Button.createWithLabel("确认");
|
||||
Button.debugLine("conponents/SetTriangle.ets(74:9)");
|
||||
Button.onClick(() => {
|
||||
this.initAngleTriangle = this.tempInitAngle;
|
||||
});
|
||||
if (!isInitialRender) {
|
||||
Button.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
Button.pop();
|
||||
Row.pop();
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Row.create();
|
||||
Row.debugLine("conponents/SetTriangle.ets(80:7)");
|
||||
if (!isInitialRender) {
|
||||
Row.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
TextInput.create({ placeholder: `初始长度:initLength=70` });
|
||||
TextInput.debugLine("conponents/SetTriangle.ets(81:9)");
|
||||
TextInput.width('70%');
|
||||
TextInput.margin({ right: '10%' });
|
||||
TextInput.onChange((value) => {
|
||||
this.tempInitLength = Number(value);
|
||||
});
|
||||
if (!isInitialRender) {
|
||||
TextInput.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Button.createWithLabel("确认");
|
||||
Button.debugLine("conponents/SetTriangle.ets(88:9)");
|
||||
Button.onClick(() => {
|
||||
this.initLengthTriangle = this.tempInitLength;
|
||||
});
|
||||
if (!isInitialRender) {
|
||||
Button.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
Button.pop();
|
||||
Row.pop();
|
||||
Column.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
|
@ -1,448 +0,0 @@
|
|||
interface SetY_Params {
|
||||
depthY?: number // y的分形层数
|
||||
;
|
||||
percentY?: number // y的缩放比例
|
||||
;
|
||||
leftAngleY?: number // y的左枝倾角
|
||||
;
|
||||
rightAngleY?: number // y的右枝倾角
|
||||
;
|
||||
initPointY?: number[] // y的初始点
|
||||
;
|
||||
initAngleY?: number // y的初始角
|
||||
;
|
||||
initLengthY?: number // y的初始长度
|
||||
;
|
||||
tempDepth?: number;
|
||||
tempPercent?: number;
|
||||
tempLeftAngle?: number;
|
||||
tempRightAngle?: number;
|
||||
tempInitPoint?: string;
|
||||
tempInitAngle?: number;
|
||||
tempInitLength?: number;
|
||||
controller?: CustomDialogController;
|
||||
}
|
||||
export default class SetY extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined) {
|
||||
super(parent, __localStorage, elmtId);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.__depthY = new SynchedPropertySimpleTwoWayPU(params.depthY, this, "depthY");
|
||||
this.__percentY = new SynchedPropertySimpleTwoWayPU(params.percentY, this, "percentY");
|
||||
this.__leftAngleY = new SynchedPropertySimpleTwoWayPU(params.leftAngleY, this, "leftAngleY");
|
||||
this.__rightAngleY = new SynchedPropertySimpleTwoWayPU(params.rightAngleY, this, "rightAngleY");
|
||||
this.__initPointY = new SynchedPropertyObjectTwoWayPU(params.initPointY, this, "initPointY");
|
||||
this.__initAngleY = new SynchedPropertySimpleTwoWayPU(params.initAngleY, this, "initAngleY");
|
||||
this.__initLengthY = new SynchedPropertySimpleTwoWayPU(params.initLengthY, this, "initLengthY");
|
||||
this.tempDepth = undefined;
|
||||
this.tempPercent = undefined;
|
||||
this.tempLeftAngle = undefined;
|
||||
this.tempRightAngle = undefined;
|
||||
this.tempInitPoint = undefined;
|
||||
this.tempInitAngle = undefined;
|
||||
this.tempInitLength = undefined;
|
||||
this.controller = undefined;
|
||||
this.setInitiallyProvidedValue(params);
|
||||
}
|
||||
setInitiallyProvidedValue(params: SetY_Params) {
|
||||
if (params.tempDepth !== undefined) {
|
||||
this.tempDepth = params.tempDepth;
|
||||
}
|
||||
if (params.tempPercent !== undefined) {
|
||||
this.tempPercent = params.tempPercent;
|
||||
}
|
||||
if (params.tempLeftAngle !== undefined) {
|
||||
this.tempLeftAngle = params.tempLeftAngle;
|
||||
}
|
||||
if (params.tempRightAngle !== undefined) {
|
||||
this.tempRightAngle = params.tempRightAngle;
|
||||
}
|
||||
if (params.tempInitPoint !== undefined) {
|
||||
this.tempInitPoint = params.tempInitPoint;
|
||||
}
|
||||
if (params.tempInitAngle !== undefined) {
|
||||
this.tempInitAngle = params.tempInitAngle;
|
||||
}
|
||||
if (params.tempInitLength !== undefined) {
|
||||
this.tempInitLength = params.tempInitLength;
|
||||
}
|
||||
if (params.controller !== undefined) {
|
||||
this.controller = params.controller;
|
||||
}
|
||||
}
|
||||
updateStateVars(params: SetY_Params) {
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
this.__depthY.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__percentY.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__leftAngleY.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__rightAngleY.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__initPointY.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__initAngleY.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__initLengthY.purgeDependencyOnElmtId(rmElmtId);
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__depthY.aboutToBeDeleted();
|
||||
this.__percentY.aboutToBeDeleted();
|
||||
this.__leftAngleY.aboutToBeDeleted();
|
||||
this.__rightAngleY.aboutToBeDeleted();
|
||||
this.__initPointY.aboutToBeDeleted();
|
||||
this.__initAngleY.aboutToBeDeleted();
|
||||
this.__initLengthY.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
private __depthY: SynchedPropertySimpleTwoWayPU<number>; // y的分形层数
|
||||
get depthY() {
|
||||
return this.__depthY.get();
|
||||
}
|
||||
set depthY(newValue: number // y的分形层数
|
||||
) {
|
||||
this.__depthY.set(newValue);
|
||||
}
|
||||
private __percentY: SynchedPropertySimpleTwoWayPU<number>; // y的缩放比例
|
||||
get percentY() {
|
||||
return this.__percentY.get();
|
||||
}
|
||||
set percentY(newValue: number // y的缩放比例
|
||||
) {
|
||||
this.__percentY.set(newValue);
|
||||
}
|
||||
private __leftAngleY: SynchedPropertySimpleTwoWayPU<number>; // y的左枝倾角
|
||||
get leftAngleY() {
|
||||
return this.__leftAngleY.get();
|
||||
}
|
||||
set leftAngleY(newValue: number // y的左枝倾角
|
||||
) {
|
||||
this.__leftAngleY.set(newValue);
|
||||
}
|
||||
private __rightAngleY: SynchedPropertySimpleTwoWayPU<number>; // y的右枝倾角
|
||||
get rightAngleY() {
|
||||
return this.__rightAngleY.get();
|
||||
}
|
||||
set rightAngleY(newValue: number // y的右枝倾角
|
||||
) {
|
||||
this.__rightAngleY.set(newValue);
|
||||
}
|
||||
private __initPointY: SynchedPropertySimpleOneWayPU<number[]>; // y的初始点
|
||||
get initPointY() {
|
||||
return this.__initPointY.get();
|
||||
}
|
||||
set initPointY(newValue: number[] // y的初始点
|
||||
) {
|
||||
this.__initPointY.set(newValue);
|
||||
}
|
||||
private __initAngleY: SynchedPropertySimpleTwoWayPU<number>; // y的初始角
|
||||
get initAngleY() {
|
||||
return this.__initAngleY.get();
|
||||
}
|
||||
set initAngleY(newValue: number // y的初始角
|
||||
) {
|
||||
this.__initAngleY.set(newValue);
|
||||
}
|
||||
private __initLengthY: SynchedPropertySimpleTwoWayPU<number>; // y的初始长度
|
||||
get initLengthY() {
|
||||
return this.__initLengthY.get();
|
||||
}
|
||||
set initLengthY(newValue: number // y的初始长度
|
||||
) {
|
||||
this.__initLengthY.set(newValue);
|
||||
}
|
||||
private tempDepth: number;
|
||||
private tempPercent: number;
|
||||
private tempLeftAngle: number;
|
||||
private tempRightAngle: number;
|
||||
private tempInitPoint: string;
|
||||
private tempInitAngle: number;
|
||||
private tempInitLength: number;
|
||||
private controller: CustomDialogController;
|
||||
setController(ctr: CustomDialogController) {
|
||||
this.controller = ctr;
|
||||
}
|
||||
// @State depthY: number = 8 // y的分形层数
|
||||
// @State percentY: number = 0.65 // y的缩放比例
|
||||
// @State leftAngleY: number = 60 // y的左枝倾角
|
||||
// @State rightAngleY: number = 60 // y的右枝倾角
|
||||
// @State initPointY: number[] = [250, 250] // y的初始点
|
||||
// @State initAngleY: number = 90 // y的初始角
|
||||
// @State initLengthY: number = 60 // y的初始长度
|
||||
initialRender() {
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Column.create();
|
||||
Column.debugLine("conponents/SetY.ets(28:5)");
|
||||
Column.width('100%');
|
||||
Column.height('100%');
|
||||
Column.justifyContent(FlexAlign.SpaceEvenly);
|
||||
if (!isInitialRender) {
|
||||
Column.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Row.create();
|
||||
Row.debugLine("conponents/SetY.ets(29:7)");
|
||||
if (!isInitialRender) {
|
||||
Row.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
TextInput.create({ placeholder: `分形层数:finishLevel=8` });
|
||||
TextInput.debugLine("conponents/SetY.ets(30:9)");
|
||||
TextInput.width('70%');
|
||||
TextInput.margin({ right: '10%' });
|
||||
TextInput.onChange((value) => {
|
||||
this.tempDepth = Number(value);
|
||||
});
|
||||
if (!isInitialRender) {
|
||||
TextInput.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Button.createWithLabel("确认");
|
||||
Button.debugLine("conponents/SetY.ets(37:9)");
|
||||
Button.onClick(() => {
|
||||
this.depthY = this.tempDepth;
|
||||
});
|
||||
if (!isInitialRender) {
|
||||
Button.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
Button.pop();
|
||||
Row.pop();
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Row.create();
|
||||
Row.debugLine("conponents/SetY.ets(43:7)");
|
||||
if (!isInitialRender) {
|
||||
Row.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
TextInput.create({ placeholder: `缩放比例:treePercent=0.65` });
|
||||
TextInput.debugLine("conponents/SetY.ets(44:9)");
|
||||
TextInput.width('70%');
|
||||
TextInput.margin({ right: '10%' });
|
||||
TextInput.onChange((value) => {
|
||||
this.tempPercent = Number(value);
|
||||
});
|
||||
if (!isInitialRender) {
|
||||
TextInput.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Button.createWithLabel("确认");
|
||||
Button.debugLine("conponents/SetY.ets(51:9)");
|
||||
Button.onClick(() => {
|
||||
this.percentY = this.tempPercent;
|
||||
});
|
||||
if (!isInitialRender) {
|
||||
Button.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
Button.pop();
|
||||
Row.pop();
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Row.create();
|
||||
Row.debugLine("conponents/SetY.ets(57:7)");
|
||||
if (!isInitialRender) {
|
||||
Row.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
TextInput.create({ placeholder: `左枝倾角:leftAngle=60` });
|
||||
TextInput.debugLine("conponents/SetY.ets(58:9)");
|
||||
TextInput.width('70%');
|
||||
TextInput.margin({ right: '10%' });
|
||||
TextInput.onChange((value) => {
|
||||
this.tempLeftAngle = Number(value);
|
||||
});
|
||||
if (!isInitialRender) {
|
||||
TextInput.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Button.createWithLabel("确认");
|
||||
Button.debugLine("conponents/SetY.ets(65:9)");
|
||||
Button.onClick(() => {
|
||||
this.leftAngleY = this.tempLeftAngle;
|
||||
});
|
||||
if (!isInitialRender) {
|
||||
Button.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
Button.pop();
|
||||
Row.pop();
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Row.create();
|
||||
Row.debugLine("conponents/SetY.ets(71:7)");
|
||||
if (!isInitialRender) {
|
||||
Row.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
TextInput.create({ placeholder: `右枝倾角:rightAngle=60` });
|
||||
TextInput.debugLine("conponents/SetY.ets(72:9)");
|
||||
TextInput.width('70%');
|
||||
TextInput.margin({ right: '10%' });
|
||||
TextInput.onChange((value) => {
|
||||
this.tempRightAngle = Number(value);
|
||||
});
|
||||
if (!isInitialRender) {
|
||||
TextInput.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Button.createWithLabel("确认");
|
||||
Button.debugLine("conponents/SetY.ets(79:9)");
|
||||
Button.onClick(() => {
|
||||
this.rightAngleY = this.tempRightAngle;
|
||||
});
|
||||
if (!isInitialRender) {
|
||||
Button.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
Button.pop();
|
||||
Row.pop();
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Row.create();
|
||||
Row.debugLine("conponents/SetY.ets(85:7)");
|
||||
if (!isInitialRender) {
|
||||
Row.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
TextInput.create({ placeholder: `初始点:initPoint=(250,250)` });
|
||||
TextInput.debugLine("conponents/SetY.ets(86:9)");
|
||||
TextInput.width('70%');
|
||||
TextInput.margin({ right: '10%' });
|
||||
TextInput.onChange((value) => {
|
||||
this.tempInitPoint = value;
|
||||
});
|
||||
if (!isInitialRender) {
|
||||
TextInput.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Button.createWithLabel("确认");
|
||||
Button.debugLine("conponents/SetY.ets(93:9)");
|
||||
Button.onClick(() => {
|
||||
let tempArr = this.tempInitPoint.split(',');
|
||||
this.initPointY = [Number(tempArr[1]), Number(tempArr[3])];
|
||||
});
|
||||
if (!isInitialRender) {
|
||||
Button.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
Button.pop();
|
||||
Row.pop();
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Row.create();
|
||||
Row.debugLine("conponents/SetY.ets(100:7)");
|
||||
if (!isInitialRender) {
|
||||
Row.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
TextInput.create({ placeholder: `初始角:initAngle=90` });
|
||||
TextInput.debugLine("conponents/SetY.ets(101:9)");
|
||||
TextInput.width('70%');
|
||||
TextInput.margin({ right: '10%' });
|
||||
TextInput.onChange((value) => {
|
||||
this.tempInitAngle = Number(value);
|
||||
});
|
||||
if (!isInitialRender) {
|
||||
TextInput.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Button.createWithLabel("确认");
|
||||
Button.debugLine("conponents/SetY.ets(108:9)");
|
||||
Button.onClick(() => {
|
||||
this.initAngleY = this.tempInitAngle;
|
||||
});
|
||||
if (!isInitialRender) {
|
||||
Button.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
Button.pop();
|
||||
Row.pop();
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Row.create();
|
||||
Row.debugLine("conponents/SetY.ets(114:7)");
|
||||
if (!isInitialRender) {
|
||||
Row.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
TextInput.create({ placeholder: `初始长度:initLength=60` });
|
||||
TextInput.debugLine("conponents/SetY.ets(115:9)");
|
||||
TextInput.width('70%');
|
||||
TextInput.margin({ right: '10%' });
|
||||
TextInput.onChange((value) => {
|
||||
this.tempInitLength = Number(value);
|
||||
});
|
||||
if (!isInitialRender) {
|
||||
TextInput.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Button.createWithLabel("确认");
|
||||
Button.debugLine("conponents/SetY.ets(122:9)");
|
||||
Button.onClick(() => {
|
||||
this.initLengthY = this.tempInitLength;
|
||||
});
|
||||
if (!isInitialRender) {
|
||||
Button.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
Button.pop();
|
||||
Row.pop();
|
||||
Column.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
|
@ -1,128 +0,0 @@
|
|||
interface RectExample_Params {
|
||||
}
|
||||
class RectExample extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined) {
|
||||
super(parent, __localStorage, elmtId);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.setInitiallyProvidedValue(params);
|
||||
}
|
||||
setInitiallyProvidedValue(params: RectExample_Params) {
|
||||
}
|
||||
updateStateVars(params: RectExample_Params) {
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
initialRender() {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Column.create({ space: 10 });
|
||||
Column.debugLine("demo.ets(6:5)");
|
||||
Column.width('100%');
|
||||
Column.margin({ top: 5 });
|
||||
}, Column);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Text.create('normal');
|
||||
Text.debugLine("demo.ets(7:7)");
|
||||
Text.fontSize(11);
|
||||
Text.fontColor(0xCCCCCC);
|
||||
Text.width('90%');
|
||||
}, Text);
|
||||
Text.pop();
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
// 绘制90% * 50的矩形
|
||||
Column.create({ space: 5 });
|
||||
Column.debugLine("demo.ets(12:7)");
|
||||
// 绘制90% * 50的矩形
|
||||
Column.width('100%');
|
||||
// 绘制90% * 50的矩形
|
||||
Column.margin({ top: 10 });
|
||||
}, Column);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Text.create('normal');
|
||||
Text.debugLine("demo.ets(13:9)");
|
||||
Text.fontSize(9);
|
||||
Text.fontColor(0xCCCCCC);
|
||||
Text.width('90%');
|
||||
}, Text);
|
||||
Text.pop();
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
// 绘制90% * 50矩形
|
||||
Rect.create({ width: '90%', height: 50 });
|
||||
Rect.debugLine("demo.ets(18:9)");
|
||||
// 绘制90% * 50矩形
|
||||
Rect.fill(Color.Pink);
|
||||
// 绘制90% * 50矩形
|
||||
Rect.border({ width: 0.4, color: Color.Black });
|
||||
// 绘制90% * 50矩形
|
||||
Rect.fillOpacity(0);
|
||||
}, Rect);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
// 绘制90% * 50的矩形框
|
||||
Rect.create();
|
||||
Rect.debugLine("demo.ets(23:9)");
|
||||
// 绘制90% * 50的矩形框
|
||||
Rect.width('90%');
|
||||
// 绘制90% * 50的矩形框
|
||||
Rect.height(50);
|
||||
// 绘制90% * 50的矩形框
|
||||
Rect.fillOpacity(0);
|
||||
// 绘制90% * 50的矩形框
|
||||
Rect.stroke(Color.Red);
|
||||
// 绘制90% * 50的矩形框
|
||||
Rect.strokeWidth(3);
|
||||
}, Rect);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Text.create('with rounded corners');
|
||||
Text.debugLine("demo.ets(30:9)");
|
||||
Text.fontSize(11);
|
||||
Text.fontColor(0xCCCCCC);
|
||||
Text.width('90%');
|
||||
}, Text);
|
||||
Text.pop();
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
// 绘制90% * 80的矩形, 圆角宽高分别为40、20
|
||||
Rect.create({ width: '90%', height: 80 });
|
||||
Rect.debugLine("demo.ets(35:9)");
|
||||
// 绘制90% * 80的矩形, 圆角宽高分别为40、20
|
||||
Rect.radiusHeight(20);
|
||||
// 绘制90% * 80的矩形, 圆角宽高分别为40、20
|
||||
Rect.radiusWidth(40);
|
||||
// 绘制90% * 80的矩形, 圆角宽高分别为40、20
|
||||
Rect.fill(Color.Pink);
|
||||
}, Rect);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
// 绘制90% * 80的矩形, 圆角宽高为20
|
||||
Rect.create({ width: '90%', height: 80 });
|
||||
Rect.debugLine("demo.ets(40:9)");
|
||||
// 绘制90% * 80的矩形, 圆角宽高为20
|
||||
Rect.radius(20);
|
||||
// 绘制90% * 80的矩形, 圆角宽高为20
|
||||
Rect.fill(Color.Pink);
|
||||
// 绘制90% * 80的矩形, 圆角宽高为20
|
||||
Rect.stroke(Color.Transparent);
|
||||
}, Rect);
|
||||
// 绘制90% * 50的矩形
|
||||
Column.pop();
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
// 绘制90% * 50矩形, 左上圆角宽高40,右上圆角宽高20,右下圆角宽高40,左下圆角宽高20
|
||||
Rect.create({ width: '90%', height: 80 });
|
||||
Rect.debugLine("demo.ets(49:7)");
|
||||
// 绘制90% * 50矩形, 左上圆角宽高40,右上圆角宽高20,右下圆角宽高40,左下圆角宽高20
|
||||
Rect.radius([[40, 40], [20, 20], [40, 40], [20, 20]]);
|
||||
// 绘制90% * 50矩形, 左上圆角宽高40,右上圆角宽高20,右下圆角宽高40,左下圆角宽高20
|
||||
Rect.fill(Color.Pink);
|
||||
}, Rect);
|
||||
Column.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
}
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(ViewStackProcessor.AllocateNewElmetIdForNextComponent());
|
||||
loadDocument(new RectExample(undefined, {}));
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
Binary file not shown.
|
|
@ -1,36 +0,0 @@
|
|||
import type AbilityConstant from "@ohos:app.ability.AbilityConstant";
|
||||
import hilog from "@ohos:hilog";
|
||||
import UIAbility from "@ohos:app.ability.UIAbility";
|
||||
import type Want from "@ohos:app.ability.Want";
|
||||
import type window from "@ohos:window";
|
||||
export default class EntryAbility extends UIAbility {
|
||||
onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void {
|
||||
hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onCreate');
|
||||
}
|
||||
onDestroy(): void {
|
||||
hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onDestroy');
|
||||
}
|
||||
onWindowStageCreate(windowStage: window.WindowStage): void {
|
||||
// Main window is created, set main page for this ability
|
||||
hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageCreate');
|
||||
windowStage.loadContent('pages/first', (err, data) => {
|
||||
if (err.code) {
|
||||
hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? '');
|
||||
return;
|
||||
}
|
||||
hilog.info(0x0000, 'testTag', 'Succeeded in loading the content. Data: %{public}s', JSON.stringify(data) ?? '');
|
||||
});
|
||||
}
|
||||
onWindowStageDestroy(): void {
|
||||
// Main window is destroyed, release UI related resources
|
||||
hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageDestroy');
|
||||
}
|
||||
onForeground(): void {
|
||||
// Ability has brought to foreground
|
||||
hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onForeground');
|
||||
}
|
||||
onBackground(): void {
|
||||
// Ability has back to background
|
||||
hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onBackground');
|
||||
}
|
||||
}
|
||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
|
@ -1,384 +0,0 @@
|
|||
interface Index_Params {
|
||||
sx?: number;
|
||||
sy?: number;
|
||||
ex?: number;
|
||||
ey?: number;
|
||||
length?: number;
|
||||
first?: number[];
|
||||
second?: number[];
|
||||
third?: number[];
|
||||
fouth?: number[];
|
||||
firstt?: number[];
|
||||
secondd?: number[];
|
||||
thirdd?: number[];
|
||||
leftPoint?: number[];
|
||||
rightPoint?: number[];
|
||||
middlePoint?: number[];
|
||||
y?: FractalY;
|
||||
rectangle?: FractalRentangle;
|
||||
triangle?: FractalTriangle;
|
||||
}
|
||||
import fY from "@bundle:com.example.fenxingshu/entry/ets/conponents/DrawFractalY";
|
||||
import FractalY from "@bundle:com.example.fenxingshu/entry/ets/class/FractalY";
|
||||
import fTriangle from "@bundle:com.example.fenxingshu/entry/ets/conponents/DrawFractalTriangle";
|
||||
import FractalTriangle from "@bundle:com.example.fenxingshu/entry/ets/class/FractalTriangle";
|
||||
import fRectangle from "@bundle:com.example.fenxingshu/entry/ets/conponents/DrawFractalRectangle";
|
||||
import FractalRentangle from "@bundle:com.example.fenxingshu/entry/ets/class/FractalRectangle";
|
||||
class Index extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined) {
|
||||
super(parent, __localStorage, elmtId);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.__sx = new ObservedPropertySimplePU(100 // 起始点x坐标
|
||||
, this, "sx");
|
||||
this.__sy = new ObservedPropertySimplePU(100 // 起始点y坐标
|
||||
, this, "sy");
|
||||
this.__ex = new ObservedPropertySimplePU(200 // 终点x坐标
|
||||
, this, "ex");
|
||||
this.__ey = new ObservedPropertySimplePU(200 // 终点y坐标
|
||||
, this, "ey");
|
||||
this.__length = new ObservedPropertySimplePU(100 // 矩形长度
|
||||
, this, "length");
|
||||
this.__first = new ObservedPropertyObjectPU([100, 130] // 菱形第一个点
|
||||
, this, "first");
|
||||
this.__second = new ObservedPropertyObjectPU([140, 100] // 菱形第二个点
|
||||
, this, "second");
|
||||
this.__third = new ObservedPropertyObjectPU([180, 130] // 菱形第三个点
|
||||
, this, "third");
|
||||
this.__fouth = new ObservedPropertyObjectPU([140, 160] // 菱形第四个点
|
||||
, this, "fouth");
|
||||
this.__firstt = new ObservedPropertyObjectPU([220, 220] // 三角形第一个点
|
||||
, this, "firstt");
|
||||
this.__secondd = new ObservedPropertyObjectPU([300, 220] // 三角形第二个点
|
||||
, this, "secondd");
|
||||
this.__thirdd = new ObservedPropertyObjectPU([260, 260] // 三角形第三个点
|
||||
, this, "thirdd");
|
||||
this.__leftPoint = new ObservedPropertyObjectPU([100, 300, 180, 380] // Y形左翼
|
||||
, this, "leftPoint");
|
||||
this.__rightPoint = new ObservedPropertyObjectPU([260, 300, 180, 380] // Y形右翼
|
||||
, this, "rightPoint");
|
||||
this.__middlePoint = new ObservedPropertyObjectPU([180, 380, 180, 460] // Y形中线
|
||||
, this, "middlePoint");
|
||||
this.__y = new ObservedPropertyObjectPU(new FractalY(10, 0.6, 45, 45, [180, 500], 90, 100) // Y形分形图初始Y
|
||||
, this, "y");
|
||||
this.__rectangle = new ObservedPropertyObjectPU(new FractalRentangle(10, [157, 750], [207, 750], 45) // 三角形分形图初始三角形
|
||||
, this, "rectangle");
|
||||
this.__triangle = new ObservedPropertyObjectPU(new FractalTriangle(10, 0.7, [180, 250], 30, 80) // 矩形分形图初始矩形
|
||||
, this, "triangle");
|
||||
this.setInitiallyProvidedValue(params);
|
||||
}
|
||||
setInitiallyProvidedValue(params: Index_Params) {
|
||||
if (params.sx !== undefined) {
|
||||
this.sx = params.sx;
|
||||
}
|
||||
if (params.sy !== undefined) {
|
||||
this.sy = params.sy;
|
||||
}
|
||||
if (params.ex !== undefined) {
|
||||
this.ex = params.ex;
|
||||
}
|
||||
if (params.ey !== undefined) {
|
||||
this.ey = params.ey;
|
||||
}
|
||||
if (params.length !== undefined) {
|
||||
this.length = params.length;
|
||||
}
|
||||
if (params.first !== undefined) {
|
||||
this.first = params.first;
|
||||
}
|
||||
if (params.second !== undefined) {
|
||||
this.second = params.second;
|
||||
}
|
||||
if (params.third !== undefined) {
|
||||
this.third = params.third;
|
||||
}
|
||||
if (params.fouth !== undefined) {
|
||||
this.fouth = params.fouth;
|
||||
}
|
||||
if (params.firstt !== undefined) {
|
||||
this.firstt = params.firstt;
|
||||
}
|
||||
if (params.secondd !== undefined) {
|
||||
this.secondd = params.secondd;
|
||||
}
|
||||
if (params.thirdd !== undefined) {
|
||||
this.thirdd = params.thirdd;
|
||||
}
|
||||
if (params.leftPoint !== undefined) {
|
||||
this.leftPoint = params.leftPoint;
|
||||
}
|
||||
if (params.rightPoint !== undefined) {
|
||||
this.rightPoint = params.rightPoint;
|
||||
}
|
||||
if (params.middlePoint !== undefined) {
|
||||
this.middlePoint = params.middlePoint;
|
||||
}
|
||||
if (params.y !== undefined) {
|
||||
this.y = params.y;
|
||||
}
|
||||
if (params.rectangle !== undefined) {
|
||||
this.rectangle = params.rectangle;
|
||||
}
|
||||
if (params.triangle !== undefined) {
|
||||
this.triangle = params.triangle;
|
||||
}
|
||||
}
|
||||
updateStateVars(params: Index_Params) {
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
this.__sx.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__sy.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__ex.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__ey.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__length.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__first.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__second.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__third.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__fouth.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__firstt.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__secondd.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__thirdd.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__leftPoint.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__rightPoint.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__middlePoint.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__y.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__rectangle.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__triangle.purgeDependencyOnElmtId(rmElmtId);
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__sx.aboutToBeDeleted();
|
||||
this.__sy.aboutToBeDeleted();
|
||||
this.__ex.aboutToBeDeleted();
|
||||
this.__ey.aboutToBeDeleted();
|
||||
this.__length.aboutToBeDeleted();
|
||||
this.__first.aboutToBeDeleted();
|
||||
this.__second.aboutToBeDeleted();
|
||||
this.__third.aboutToBeDeleted();
|
||||
this.__fouth.aboutToBeDeleted();
|
||||
this.__firstt.aboutToBeDeleted();
|
||||
this.__secondd.aboutToBeDeleted();
|
||||
this.__thirdd.aboutToBeDeleted();
|
||||
this.__leftPoint.aboutToBeDeleted();
|
||||
this.__rightPoint.aboutToBeDeleted();
|
||||
this.__middlePoint.aboutToBeDeleted();
|
||||
this.__y.aboutToBeDeleted();
|
||||
this.__rectangle.aboutToBeDeleted();
|
||||
this.__triangle.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
private __sx: ObservedPropertySimplePU<number>; // 起始点x坐标
|
||||
get sx() {
|
||||
return this.__sx.get();
|
||||
}
|
||||
set sx(newValue: number) {
|
||||
this.__sx.set(newValue);
|
||||
}
|
||||
private __sy: ObservedPropertySimplePU<number>; // 起始点y坐标
|
||||
get sy() {
|
||||
return this.__sy.get();
|
||||
}
|
||||
set sy(newValue: number) {
|
||||
this.__sy.set(newValue);
|
||||
}
|
||||
private __ex: ObservedPropertySimplePU<number>; // 终点x坐标
|
||||
get ex() {
|
||||
return this.__ex.get();
|
||||
}
|
||||
set ex(newValue: number) {
|
||||
this.__ex.set(newValue);
|
||||
}
|
||||
private __ey: ObservedPropertySimplePU<number>; // 终点y坐标
|
||||
get ey() {
|
||||
return this.__ey.get();
|
||||
}
|
||||
set ey(newValue: number) {
|
||||
this.__ey.set(newValue);
|
||||
}
|
||||
private __length: ObservedPropertySimplePU<number>; // 矩形长度
|
||||
get length() {
|
||||
return this.__length.get();
|
||||
}
|
||||
set length(newValue: number) {
|
||||
this.__length.set(newValue);
|
||||
}
|
||||
private __first: ObservedPropertyObjectPU<number[]>; // 菱形第一个点
|
||||
get first() {
|
||||
return this.__first.get();
|
||||
}
|
||||
set first(newValue: number[]) {
|
||||
this.__first.set(newValue);
|
||||
}
|
||||
private __second: ObservedPropertyObjectPU<number[]>; // 菱形第二个点
|
||||
get second() {
|
||||
return this.__second.get();
|
||||
}
|
||||
set second(newValue: number[]) {
|
||||
this.__second.set(newValue);
|
||||
}
|
||||
private __third: ObservedPropertyObjectPU<number[]>; // 菱形第三个点
|
||||
get third() {
|
||||
return this.__third.get();
|
||||
}
|
||||
set third(newValue: number[]) {
|
||||
this.__third.set(newValue);
|
||||
}
|
||||
private __fouth: ObservedPropertyObjectPU<number[]>; // 菱形第四个点
|
||||
get fouth() {
|
||||
return this.__fouth.get();
|
||||
}
|
||||
set fouth(newValue: number[]) {
|
||||
this.__fouth.set(newValue);
|
||||
}
|
||||
private __firstt: ObservedPropertyObjectPU<number[]>; // 三角形第一个点
|
||||
get firstt() {
|
||||
return this.__firstt.get();
|
||||
}
|
||||
set firstt(newValue: number[]) {
|
||||
this.__firstt.set(newValue);
|
||||
}
|
||||
private __secondd: ObservedPropertyObjectPU<number[]>; // 三角形第二个点
|
||||
get secondd() {
|
||||
return this.__secondd.get();
|
||||
}
|
||||
set secondd(newValue: number[]) {
|
||||
this.__secondd.set(newValue);
|
||||
}
|
||||
private __thirdd: ObservedPropertyObjectPU<number[]>; // 三角形第三个点
|
||||
get thirdd() {
|
||||
return this.__thirdd.get();
|
||||
}
|
||||
set thirdd(newValue: number[]) {
|
||||
this.__thirdd.set(newValue);
|
||||
}
|
||||
private __leftPoint: ObservedPropertyObjectPU<number[]>; // Y形左翼
|
||||
get leftPoint() {
|
||||
return this.__leftPoint.get();
|
||||
}
|
||||
set leftPoint(newValue: number[]) {
|
||||
this.__leftPoint.set(newValue);
|
||||
}
|
||||
private __rightPoint: ObservedPropertyObjectPU<number[]>; // Y形右翼
|
||||
get rightPoint() {
|
||||
return this.__rightPoint.get();
|
||||
}
|
||||
set rightPoint(newValue: number[]) {
|
||||
this.__rightPoint.set(newValue);
|
||||
}
|
||||
private __middlePoint: ObservedPropertyObjectPU<number[]>; // Y形中线
|
||||
get middlePoint() {
|
||||
return this.__middlePoint.get();
|
||||
}
|
||||
set middlePoint(newValue: number[]) {
|
||||
this.__middlePoint.set(newValue);
|
||||
}
|
||||
private __y: ObservedPropertyObjectPU<FractalY>; // Y形分形图初始Y
|
||||
get y() {
|
||||
return this.__y.get();
|
||||
}
|
||||
set y(newValue: FractalY) {
|
||||
this.__y.set(newValue);
|
||||
}
|
||||
private __rectangle: ObservedPropertyObjectPU<FractalRentangle>; // 三角形分形图初始三角形
|
||||
get rectangle() {
|
||||
return this.__rectangle.get();
|
||||
}
|
||||
set rectangle(newValue: FractalRentangle) {
|
||||
this.__rectangle.set(newValue);
|
||||
}
|
||||
private __triangle: ObservedPropertyObjectPU<FractalTriangle>; // 矩形分形图初始矩形
|
||||
get triangle() {
|
||||
return this.__triangle.get();
|
||||
}
|
||||
set triangle(newValue: FractalTriangle) {
|
||||
this.__triangle.set(newValue);
|
||||
}
|
||||
initialRender() {
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Stack.create();
|
||||
Stack.debugLine("pages/first.ets(38:5)");
|
||||
Stack.width('100%');
|
||||
Stack.height('100%');
|
||||
if (!isInitialRender) {
|
||||
Stack.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
{
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
if (isInitialRender) {
|
||||
let paramsLambda = () => {
|
||||
return {
|
||||
y: this.y
|
||||
};
|
||||
};
|
||||
ViewPU.create(new
|
||||
// line({ sx: this.sx, sy: this.sy, ex: this.ex, ey: this.ey })
|
||||
//
|
||||
// rhom({ first: this.first, second: this.second, third: this.third, fourth: this.fouth })
|
||||
//
|
||||
// y({ leftPoint: this.leftPoint, rightPoint: this.rightPoint, middlePoint: this.middlePoint })
|
||||
//
|
||||
// tri({ first: this.firstt, second: this.secondd, third: this.thirdd })
|
||||
//
|
||||
// rect({ sx: this.sx, sy: this.sy, length: this.length })
|
||||
fY(this, { y: this.y }, undefined, elmtId, paramsLambda));
|
||||
}
|
||||
else {
|
||||
this.updateStateVarsOfChildByElmtId(elmtId, {
|
||||
y: this.y
|
||||
});
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
}
|
||||
{
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
if (isInitialRender) {
|
||||
let paramsLambda = () => {
|
||||
return {
|
||||
triangle: this.triangle
|
||||
};
|
||||
};
|
||||
ViewPU.create(new fTriangle(this, { triangle: this.triangle }, undefined, elmtId, paramsLambda));
|
||||
}
|
||||
else {
|
||||
this.updateStateVarsOfChildByElmtId(elmtId, {
|
||||
triangle: this.triangle
|
||||
});
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
}
|
||||
{
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
if (isInitialRender) {
|
||||
let paramsLambda = () => {
|
||||
return {
|
||||
rectangle: this.rectangle
|
||||
};
|
||||
};
|
||||
ViewPU.create(new fRectangle(this, { rectangle: this.rectangle }, undefined, elmtId, paramsLambda));
|
||||
}
|
||||
else {
|
||||
this.updateStateVarsOfChildByElmtId(elmtId, {
|
||||
rectangle: this.rectangle
|
||||
});
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
}
|
||||
Stack.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
}
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(ViewStackProcessor.AllocateNewElmetIdForNextComponent());
|
||||
loadDocument(new Index(undefined, {}));
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
Binary file not shown.
|
|
@ -1,392 +0,0 @@
|
|||
interface Second_Params {
|
||||
message?: string;
|
||||
}
|
||||
import router from "@ohos:router";
|
||||
class Second extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined) {
|
||||
super(parent, __localStorage, elmtId);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.__message = new ObservedPropertySimplePU('Hello World', this, "message");
|
||||
this.setInitiallyProvidedValue(params);
|
||||
}
|
||||
setInitiallyProvidedValue(params: Second_Params) {
|
||||
if (params.message !== undefined) {
|
||||
this.message = params.message;
|
||||
}
|
||||
}
|
||||
updateStateVars(params: Second_Params) {
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
this.__message.purgeDependencyOnElmtId(rmElmtId);
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__message.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
private __message: ObservedPropertySimplePU<string>;
|
||||
get message() {
|
||||
return this.__message.get();
|
||||
}
|
||||
set message(newValue: string) {
|
||||
this.__message.set(newValue);
|
||||
}
|
||||
initialRender() {
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Column.create();
|
||||
Column.debugLine("pages/second.ets(9:5)");
|
||||
Column.width('100%');
|
||||
Column.height('100%');
|
||||
if (!isInitialRender) {
|
||||
Column.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Row.create();
|
||||
Row.debugLine("pages/second.ets(10:7)");
|
||||
Row.width('100%');
|
||||
Row.height('15%');
|
||||
Row.justifyContent(FlexAlign.SpaceEvenly);
|
||||
if (!isInitialRender) {
|
||||
Row.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Row.create();
|
||||
Row.debugLine("pages/second.ets(11:9)");
|
||||
Row.width('40%');
|
||||
if (!isInitialRender) {
|
||||
Row.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Text.create('分形名称:');
|
||||
Text.debugLine("pages/second.ets(12:11)");
|
||||
Text.fontSize(16);
|
||||
if (!isInitialRender) {
|
||||
Text.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
Text.pop();
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
TextInput.create();
|
||||
TextInput.debugLine("pages/second.ets(15:11)");
|
||||
TextInput.width('60%');
|
||||
TextInput.borderWidth(1);
|
||||
TextInput.borderColor(Color.Black);
|
||||
TextInput.borderRadius(0);
|
||||
if (!isInitialRender) {
|
||||
TextInput.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
Row.pop();
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Row.create();
|
||||
Row.debugLine("pages/second.ets(23:9)");
|
||||
Row.width('40%');
|
||||
if (!isInitialRender) {
|
||||
Row.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Text.create('分形英文简写:');
|
||||
Text.debugLine("pages/second.ets(24:11)");
|
||||
Text.fontSize(16);
|
||||
if (!isInitialRender) {
|
||||
Text.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
Text.pop();
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
TextInput.create();
|
||||
TextInput.debugLine("pages/second.ets(27:11)");
|
||||
TextInput.width('60%');
|
||||
TextInput.borderWidth(1);
|
||||
TextInput.borderColor(Color.Black);
|
||||
TextInput.borderRadius(0);
|
||||
if (!isInitialRender) {
|
||||
TextInput.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
Row.pop();
|
||||
Row.pop();
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Row.create();
|
||||
Row.debugLine("pages/second.ets(39:7)");
|
||||
Row.width('100%');
|
||||
Row.height('70%');
|
||||
Row.justifyContent(FlexAlign.SpaceEvenly);
|
||||
if (!isInitialRender) {
|
||||
Row.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Column.create();
|
||||
Column.debugLine("pages/second.ets(40:9)");
|
||||
Column.width('45%');
|
||||
Column.height('100%');
|
||||
if (!isInitialRender) {
|
||||
Column.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Column.create();
|
||||
Column.debugLine("pages/second.ets(41:11)");
|
||||
Column.width('95%');
|
||||
Column.height('33%');
|
||||
if (!isInitialRender) {
|
||||
Column.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Text.create('请输入分形参数初始化的代码:');
|
||||
Text.debugLine("pages/second.ets(42:13)");
|
||||
Text.fontSize(16);
|
||||
if (!isInitialRender) {
|
||||
Text.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
Text.pop();
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
TextInput.create();
|
||||
TextInput.debugLine("pages/second.ets(45:13)");
|
||||
TextInput.width('95%');
|
||||
TextInput.height('80%');
|
||||
TextInput.borderWidth(1);
|
||||
TextInput.borderColor(Color.Black);
|
||||
TextInput.borderRadius(0);
|
||||
if (!isInitialRender) {
|
||||
TextInput.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
Column.pop();
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Column.create();
|
||||
Column.debugLine("pages/second.ets(55:11)");
|
||||
Column.width('95%');
|
||||
Column.height('33%');
|
||||
if (!isInitialRender) {
|
||||
Column.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Text.create('请输入分形参数字符串形式输出的代码:');
|
||||
Text.debugLine("pages/second.ets(56:13)");
|
||||
Text.fontSize(16);
|
||||
if (!isInitialRender) {
|
||||
Text.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
Text.pop();
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
TextInput.create();
|
||||
TextInput.debugLine("pages/second.ets(59:13)");
|
||||
TextInput.width('95%');
|
||||
TextInput.height('80%');
|
||||
TextInput.borderWidth(1);
|
||||
TextInput.borderColor(Color.Black);
|
||||
TextInput.borderRadius(0);
|
||||
if (!isInitialRender) {
|
||||
TextInput.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
Column.pop();
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Column.create();
|
||||
Column.debugLine("pages/second.ets(69:11)");
|
||||
Column.width('95%');
|
||||
Column.height('33%');
|
||||
if (!isInitialRender) {
|
||||
Column.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Text.create('请输入分形参数更新的代码:');
|
||||
Text.debugLine("pages/second.ets(70:13)");
|
||||
Text.fontSize(16);
|
||||
if (!isInitialRender) {
|
||||
Text.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
Text.pop();
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
TextInput.create();
|
||||
TextInput.debugLine("pages/second.ets(73:13)");
|
||||
TextInput.width('95%');
|
||||
TextInput.height('80%');
|
||||
TextInput.borderWidth(1);
|
||||
TextInput.borderColor(Color.Black);
|
||||
TextInput.borderRadius(0);
|
||||
if (!isInitialRender) {
|
||||
TextInput.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
Column.pop();
|
||||
Column.pop();
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Column.create();
|
||||
Column.debugLine("pages/second.ets(86:9)");
|
||||
Column.width('45%');
|
||||
Column.height('100%');
|
||||
if (!isInitialRender) {
|
||||
Column.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Column.create();
|
||||
Column.debugLine("pages/second.ets(87:11)");
|
||||
Column.width('95%');
|
||||
Column.height('48%');
|
||||
if (!isInitialRender) {
|
||||
Column.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Text.create('请输入分形参数更新的代码:');
|
||||
Text.debugLine("pages/second.ets(88:13)");
|
||||
Text.fontSize(16);
|
||||
if (!isInitialRender) {
|
||||
Text.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
Text.pop();
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
TextInput.create();
|
||||
TextInput.debugLine("pages/second.ets(91:13)");
|
||||
TextInput.width('95%');
|
||||
TextInput.height('80%');
|
||||
TextInput.borderWidth(1);
|
||||
TextInput.borderColor(Color.Black);
|
||||
TextInput.borderRadius(0);
|
||||
if (!isInitialRender) {
|
||||
TextInput.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
Column.pop();
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Column.create();
|
||||
Column.debugLine("pages/second.ets(101:11)");
|
||||
Column.width('95%');
|
||||
Column.height('48%');
|
||||
if (!isInitialRender) {
|
||||
Column.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Text.create('请输入分形参数更新的代码:');
|
||||
Text.debugLine("pages/second.ets(102:13)");
|
||||
Text.fontSize(16);
|
||||
if (!isInitialRender) {
|
||||
Text.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
Text.pop();
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
TextInput.create();
|
||||
TextInput.debugLine("pages/second.ets(105:13)");
|
||||
TextInput.width('95%');
|
||||
TextInput.height('80%');
|
||||
TextInput.borderWidth(1);
|
||||
TextInput.borderColor(Color.Black);
|
||||
TextInput.borderRadius(0);
|
||||
if (!isInitialRender) {
|
||||
TextInput.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
Column.pop();
|
||||
Column.pop();
|
||||
Row.pop();
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Row.create();
|
||||
Row.debugLine("pages/second.ets(122:7)");
|
||||
Row.width('100%');
|
||||
Row.height('10%');
|
||||
Row.justifyContent(FlexAlign.Center);
|
||||
Row.alignItems(VerticalAlign.Center);
|
||||
Row.onClick(() => {
|
||||
router.back();
|
||||
});
|
||||
if (!isInitialRender) {
|
||||
Row.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Button.createWithLabel('添加');
|
||||
Button.debugLine("pages/second.ets(123:9)");
|
||||
Button.type(ButtonType.Normal);
|
||||
Button.fontColor(Color.Black);
|
||||
Button.backgroundColor('#ffe5e5e5');
|
||||
Button.offset({ x: 0, y: '30%' });
|
||||
if (!isInitialRender) {
|
||||
Button.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
Button.pop();
|
||||
Row.pop();
|
||||
Column.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
}
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(ViewStackProcessor.AllocateNewElmetIdForNextComponent());
|
||||
loadDocument(new Second(undefined, {}));
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
Binary file not shown.
|
|
@ -1,128 +0,0 @@
|
|||
interface x1_demo_Params {
|
||||
sx?: number;
|
||||
sy?: number;
|
||||
length?: number;
|
||||
arr?: number[];
|
||||
}
|
||||
import rect from "@bundle:com.example.fenxingshu/entry/ets/conponents/DrawFractalRectangle";
|
||||
class x1_demo extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined) {
|
||||
super(parent, __localStorage, elmtId);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.__sx = new ObservedPropertySimplePU(240, this, "sx");
|
||||
this.__sy = new ObservedPropertySimplePU(240, this, "sy");
|
||||
this.__length = new ObservedPropertySimplePU(5, this, "length");
|
||||
this.arr = Array(50).fill(0);
|
||||
this.setInitiallyProvidedValue(params);
|
||||
}
|
||||
setInitiallyProvidedValue(params: x1_demo_Params) {
|
||||
if (params.sx !== undefined) {
|
||||
this.sx = params.sx;
|
||||
}
|
||||
if (params.sy !== undefined) {
|
||||
this.sy = params.sy;
|
||||
}
|
||||
if (params.length !== undefined) {
|
||||
this.length = params.length;
|
||||
}
|
||||
if (params.arr !== undefined) {
|
||||
this.arr = params.arr;
|
||||
}
|
||||
}
|
||||
updateStateVars(params: x1_demo_Params) {
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
this.__sx.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__sy.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__length.purgeDependencyOnElmtId(rmElmtId);
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__sx.aboutToBeDeleted();
|
||||
this.__sy.aboutToBeDeleted();
|
||||
this.__length.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
private __sx: ObservedPropertySimplePU<number>;
|
||||
get sx() {
|
||||
return this.__sx.get();
|
||||
}
|
||||
set sx(newValue: number) {
|
||||
this.__sx.set(newValue);
|
||||
}
|
||||
private __sy: ObservedPropertySimplePU<number>;
|
||||
get sy() {
|
||||
return this.__sy.get();
|
||||
}
|
||||
set sy(newValue: number) {
|
||||
this.__sy.set(newValue);
|
||||
}
|
||||
private __length: ObservedPropertySimplePU<number>;
|
||||
get length() {
|
||||
return this.__length.get();
|
||||
}
|
||||
set length(newValue: number) {
|
||||
this.__length.set(newValue);
|
||||
}
|
||||
private arr: number[];
|
||||
aboutToAppear() {
|
||||
this.arr.forEach((item, index) => {
|
||||
if (index >= 1) {
|
||||
this.arr[index] = this.arr[index - 1] + 3.8;
|
||||
}
|
||||
console.log(this.arr[index].toString() + " ");
|
||||
});
|
||||
}
|
||||
initialRender() {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Stack.create();
|
||||
Stack.debugLine("pages/x1_demo.ets(21:5)");
|
||||
Stack.width('100%');
|
||||
Stack.height('100%');
|
||||
}, Stack);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
ForEach.create();
|
||||
const forEachItemGenFunction = _item => {
|
||||
const item = _item;
|
||||
{
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
if (isInitialRender) {
|
||||
let paramsLambda = () => {
|
||||
return {
|
||||
sx: this.sx,
|
||||
sy: this.sy,
|
||||
length: this.length + item,
|
||||
angle: item
|
||||
};
|
||||
};
|
||||
ViewPU.create(new rect(this, {
|
||||
sx: this.sx,
|
||||
sy: this.sy,
|
||||
length: this.length + item,
|
||||
angle: item
|
||||
}, undefined, elmtId, paramsLambda));
|
||||
}
|
||||
else {
|
||||
this.updateStateVarsOfChildByElmtId(elmtId, {
|
||||
sx: this.sx,
|
||||
sy: this.sy,
|
||||
length: this.length + item
|
||||
});
|
||||
}
|
||||
}, null);
|
||||
}
|
||||
};
|
||||
this.forEachUpdateFunction(elmtId, this.arr, forEachItemGenFunction);
|
||||
}, ForEach);
|
||||
ForEach.pop();
|
||||
Stack.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
}
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(ViewStackProcessor.AllocateNewElmetIdForNextComponent());
|
||||
loadDocument(new x1_demo(undefined, {}));
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
F:/jiaocai/fenxingshu/entry/.preview/cache/.default/entry/src/main/ets/entryability/EntryAbility.ts;com.example.fenxingshu/entry/ets/entryability/EntryAbility;esm;entry/src/main/ets/entryability/EntryAbility.ets;entry
|
||||
F:/jiaocai/fenxingshu/entry/.preview/cache/.default/entry/src/main/ets/pages/first.ts;com.example.fenxingshu/entry/ets/pages/first;esm;entry/src/main/ets/pages/first.ets;entry
|
||||
F:/jiaocai/fenxingshu/entry/.preview/cache/.default/entry/src/main/ets/pages/Index.ts;com.example.fenxingshu/entry/ets/pages/Index;esm;entry/src/main/ets/pages/Index.ets;entry
|
||||
F:/jiaocai/fenxingshu/entry/.preview/cache/.default/entry/src/main/ets/pages/second.ts;com.example.fenxingshu/entry/ets/pages/second;esm;entry/src/main/ets/pages/second.ets;entry
|
||||
F:/jiaocai/fenxingshu/entry/.preview/cache/.default/entry/src/main/ets/conponents/DrawFractalY.ts;com.example.fenxingshu/entry/ets/conponents/DrawFractalY;esm;entry/src/main/ets/conponents/DrawFractalY.ets;entry
|
||||
F:/jiaocai/fenxingshu/entry/.preview/cache/.default/entry/src/main/ets/class/FractalY.ts;com.example.fenxingshu/entry/ets/class/FractalY;esm;entry/src/main/ets/class/FractalY.ets;entry
|
||||
F:/jiaocai/fenxingshu/entry/.preview/cache/.default/entry/src/main/ets/conponents/DrawFractalTriangle.ts;com.example.fenxingshu/entry/ets/conponents/DrawFractalTriangle;esm;entry/src/main/ets/conponents/DrawFractalTriangle.ets;entry
|
||||
F:/jiaocai/fenxingshu/entry/.preview/cache/.default/entry/src/main/ets/class/FractalTriangle.ts;com.example.fenxingshu/entry/ets/class/FractalTriangle;esm;entry/src/main/ets/class/FractalTriangle.ets;entry
|
||||
F:/jiaocai/fenxingshu/entry/.preview/cache/.default/entry/src/main/ets/conponents/DrawFractalRectangle.ts;com.example.fenxingshu/entry/ets/conponents/DrawFractalRectangle;esm;entry/src/main/ets/conponents/DrawFractalRectangle.ets;entry
|
||||
F:/jiaocai/fenxingshu/entry/.preview/cache/.default/entry/src/main/ets/class/FractalRectangle.ts;com.example.fenxingshu/entry/ets/class/FractalRectangle;esm;entry/src/main/ets/class/FractalRectangle.ets;entry
|
||||
F:/jiaocai/fenxingshu/entry/.preview/cache/.default/entry/src/main/ets/conponents/DrawY.ts;com.example.fenxingshu/entry/ets/conponents/DrawY;esm;entry/src/main/ets/conponents/DrawY.ets;entry
|
||||
F:/jiaocai/fenxingshu/entry/.preview/cache/.default/entry/src/main/ets/conponents/DrawTriangle.ts;com.example.fenxingshu/entry/ets/conponents/DrawTriangle;esm;entry/src/main/ets/conponents/DrawTriangle.ets;entry
|
||||
F:/jiaocai/fenxingshu/entry/.preview/cache/.default/entry/src/main/ets/conponents/DrawRectangle.ts;com.example.fenxingshu/entry/ets/conponents/DrawRectangle;esm;entry/src/main/ets/conponents/DrawRectangle.ets;entry
|
||||
F:/jiaocai/fenxingshu/entry/.preview/cache/.default/entry/src/main/ets/conponents/SetFractalY.ts;com.example.fenxingshu/entry/ets/conponents/SetFractalY;esm;entry/src/main/ets/conponents/SetFractalY.ets;entry
|
||||
F:/jiaocai/fenxingshu/entry/.preview/cache/.default/entry/src/main/ets/conponents/SetFractalTriangle.ts;com.example.fenxingshu/entry/ets/conponents/SetFractalTriangle;esm;entry/src/main/ets/conponents/SetFractalTriangle.ets;entry
|
||||
F:/jiaocai/fenxingshu/entry/.preview/cache/.default/entry/src/main/ets/conponents/SetFractalRectangle.ts;com.example.fenxingshu/entry/ets/conponents/SetFractalRectangle;esm;entry/src/main/ets/conponents/SetFractalRectangle.ets;entry
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
F:/jiaocai/fenxingshu/entry/.preview/cache/.default/entry/src/main/ets/entryability/EntryAbility.ts;F:/jiaocai/fenxingshu/entry/.preview/cache/.default/entry/src/main/ets/entryability/EntryAbility.protoBin
|
||||
F:/jiaocai/fenxingshu/entry/.preview/cache/.default/entry/src/main/ets/pages/first.ts;F:/jiaocai/fenxingshu/entry/.preview/cache/.default/entry/src/main/ets/pages/first.protoBin
|
||||
F:/jiaocai/fenxingshu/entry/.preview/cache/.default/entry/src/main/ets/pages/Index.ts;F:/jiaocai/fenxingshu/entry/.preview/cache/.default/entry/src/main/ets/pages/Index.protoBin
|
||||
F:/jiaocai/fenxingshu/entry/.preview/cache/.default/entry/src/main/ets/pages/second.ts;F:/jiaocai/fenxingshu/entry/.preview/cache/.default/entry/src/main/ets/pages/second.protoBin
|
||||
F:/jiaocai/fenxingshu/entry/.preview/cache/.default/entry/src/main/ets/conponents/DrawFractalY.ts;F:/jiaocai/fenxingshu/entry/.preview/cache/.default/entry/src/main/ets/conponents/DrawFractalY.protoBin
|
||||
F:/jiaocai/fenxingshu/entry/.preview/cache/.default/entry/src/main/ets/class/FractalY.ts;F:/jiaocai/fenxingshu/entry/.preview/cache/.default/entry/src/main/ets/class/FractalY.protoBin
|
||||
F:/jiaocai/fenxingshu/entry/.preview/cache/.default/entry/src/main/ets/conponents/DrawFractalTriangle.ts;F:/jiaocai/fenxingshu/entry/.preview/cache/.default/entry/src/main/ets/conponents/DrawFractalTriangle.protoBin
|
||||
F:/jiaocai/fenxingshu/entry/.preview/cache/.default/entry/src/main/ets/class/FractalTriangle.ts;F:/jiaocai/fenxingshu/entry/.preview/cache/.default/entry/src/main/ets/class/FractalTriangle.protoBin
|
||||
F:/jiaocai/fenxingshu/entry/.preview/cache/.default/entry/src/main/ets/conponents/DrawFractalRectangle.ts;F:/jiaocai/fenxingshu/entry/.preview/cache/.default/entry/src/main/ets/conponents/DrawFractalRectangle.protoBin
|
||||
F:/jiaocai/fenxingshu/entry/.preview/cache/.default/entry/src/main/ets/class/FractalRectangle.ts;F:/jiaocai/fenxingshu/entry/.preview/cache/.default/entry/src/main/ets/class/FractalRectangle.protoBin
|
||||
F:/jiaocai/fenxingshu/entry/.preview/cache/.default/entry/src/main/ets/conponents/DrawY.ts;F:/jiaocai/fenxingshu/entry/.preview/cache/.default/entry/src/main/ets/conponents/DrawY.protoBin
|
||||
F:/jiaocai/fenxingshu/entry/.preview/cache/.default/entry/src/main/ets/conponents/DrawTriangle.ts;F:/jiaocai/fenxingshu/entry/.preview/cache/.default/entry/src/main/ets/conponents/DrawTriangle.protoBin
|
||||
F:/jiaocai/fenxingshu/entry/.preview/cache/.default/entry/src/main/ets/conponents/DrawRectangle.ts;F:/jiaocai/fenxingshu/entry/.preview/cache/.default/entry/src/main/ets/conponents/DrawRectangle.protoBin
|
||||
F:/jiaocai/fenxingshu/entry/.preview/cache/.default/entry/src/main/ets/conponents/SetFractalY.ts;F:/jiaocai/fenxingshu/entry/.preview/cache/.default/entry/src/main/ets/conponents/SetFractalY.protoBin
|
||||
F:/jiaocai/fenxingshu/entry/.preview/cache/.default/entry/src/main/ets/conponents/SetFractalTriangle.ts;F:/jiaocai/fenxingshu/entry/.preview/cache/.default/entry/src/main/ets/conponents/SetFractalTriangle.protoBin
|
||||
F:/jiaocai/fenxingshu/entry/.preview/cache/.default/entry/src/main/ets/conponents/SetFractalRectangle.ts;F:/jiaocai/fenxingshu/entry/.preview/cache/.default/entry/src/main/ets/conponents/SetFractalRectangle.protoBin
|
||||
F:\jiaocai\fenxingshu\entry\.preview\cache\.default\npmEntries.txt;F:\jiaocai\fenxingshu\entry\.preview\cache\.default\npmEntries.protoBin
|
||||
Binary file not shown.
File diff suppressed because one or more lines are too long
|
|
@ -1 +0,0 @@
|
|||
{"deviceType":"default,tablet","checkEntry":"true","localPropertiesPath":"F:\\jiaocai\\fenxingshu\\local.properties","Path":"F:\\Huawei\\node\\","note":"false","aceProfilePath":"F:\\jiaocai\\fenxingshu\\entry\\.preview\\default\\intermediates\\res\\default\\resources\\base\\profile","isPreview":"true","hapMode":"false","buildMode":"debug","img2bin":"true","projectProfilePath":"F:\\jiaocai\\fenxingshu\\build-profile.json5","watchMode":"true","appResource":"F:\\jiaocai\\fenxingshu\\entry\\.preview\\default\\intermediates\\res\\default\\ResourceTable.txt","logLevel":"3","stageRouterConfig":{"contents":["{\"module\":{\"pages\":\"$profile:main_pages\",\"name\":\"entry\"}}","{\"src\":[\"pages/first\",\"pages/Index\",\"pages/second\"]}"],"paths":["F:\\jiaocai\\fenxingshu\\entry\\.preview\\default\\intermediates\\res\\default\\module.json","F:\\jiaocai\\fenxingshu\\entry\\.preview\\default\\intermediates\\res\\default\\resources\\base\\profile\\main_pages.json"]},"port":"29902","aceBuildJson":"F:\\jiaocai\\fenxingshu\\entry\\.preview\\default\\intermediates\\loader\\default\\loader.json","aceModuleRoot":"F:\\jiaocai\\fenxingshu\\entry\\src\\main\\ets","aceSoPath":"F:\\jiaocai\\fenxingshu\\entry\\.preview\\cache\\nativeDependencies.txt","cachePath":"F:\\jiaocai\\fenxingshu\\entry\\.preview\\cache\\.default","aceModuleBuild":"F:\\jiaocai\\fenxingshu\\entry\\.preview\\default\\intermediates\\assets\\default\\ets","aceSuperVisualPath":"F:\\jiaocai\\fenxingshu\\entry\\src\\main\\supervisual","aceModuleJsonPath":"F:\\jiaocai\\fenxingshu\\entry\\.preview\\default\\intermediates\\res\\default\\module.json"}
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2023 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef RESOURCE_TABLE_H
|
||||
#define RESOURCE_TABLE_H
|
||||
|
||||
#include<stdint.h>
|
||||
|
||||
namespace OHOS {
|
||||
const int32_t STRING_ENTRYABILITY_DESC = 0x01000005;
|
||||
const int32_t STRING_ENTRYABILITY_LABEL = 0x01000006;
|
||||
const int32_t STRING_APP_NAME = 0x01000000;
|
||||
const int32_t STRING_MODULE_DESC = 0x01000007;
|
||||
const int32_t COLOR_START_WINDOW_BACKGROUND = 0x01000002;
|
||||
const int32_t MEDIA_APP_ICON = 0x01000001;
|
||||
const int32_t MEDIA_ICON = 0x01000003;
|
||||
const int32_t MEDIA_STARTICON = 0x01000008;
|
||||
const int32_t PROFILE_MAIN_PAGES = 0x01000004;
|
||||
}
|
||||
#endif
|
||||
|
|
@ -1 +0,0 @@
|
|||
hello,this is eleven's gitee repository!
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue