{"owner":"cocos","repo":"cocos-engine","hasSkills":true,"totalSkillsCount":17,"totalTokensCount":32528,"categories":["plugin-manifest","anthropic-skill"],"hasMcp":false,"mcpConfig":null,"found":["native/tools/bindings-generator/README.md","editor/assets/tools/parsed-effect-info.json","native/tools/gfx-define-generator/package.json","native/tools/gfx-define-generator/package-lock.json","native/tools/gles-wrangler-generator/package.json","native/tools/gles-wrangler-generator/package-lock.json","native/tools/simulator/.cocos-project.json","native/tools/simulator/config.json","native/tools/tojs/gen_d_ts/package.json","native/tools/swig-config/tutorial/index.md","native/tools/tojs/gen_d_ts/package-lock.json","native/tools/swig-config/README.md","native/tools/tojs/gen_d_ts/tsconfig.json","native/tools/bindings-generator/targets/spidermonkey/conversions.yaml","native/tools/simulator/frameworks/runtime-src/proj.win32/build-cfg.json","native/tools/simulator/frameworks/runtime-src/proj.ios_mac/mac/build-cfg.json","native/tools/simulator/frameworks/runtime-src/SimulatorApp-Mac/Images.xcassets/AppIcon.appiconset/Contents.json"],"skills":{"native/tools/bindings-generator/README.md":"# What's new\n* Add a prebuilt libclang 12.0 in `libclang/`for linux, mac and windows.\n* If you want use the prebuilt libclang 12.0 work with Android NDK, then `only the NDK r21 can work corrently` with it.\n\n# Requirements\n\n* python 3.x (64-bit)\n* py-yaml version 5.4.1\n* cheetah3\n* libclang binary files\n\n# Usage\n\n    Usage: generator.py [options] {configfile}\n\n    Options:\n      -h, --help   show this help message and exit\n      -s SECTION   sets a specific section to be converted\n      -t TARGET    specifies the target vm. Will search for TARGET.yaml\n\nBasically, you specify a target vm (spidermonkey is the only current target vm) and the section from\nthe `.ini` file you want to generate code for.\n\n### Download libclang binary files\n\n* Download the pre-built binaries according to your platform from [here](https://github.com/llvm/llvm-project/releases/tag/llvmorg-12.0.0).\n* Unzip or install binaries. For example, unzip `clang+llvm-12.0.0-x86_64-apple-darwin.tar.xz` for macOS.\n* Find libclang.dll (windows) or libclang.dylib (macOS)\n* Copy the dynamic library to `bindings-generator/libclang` folder.\n\n## Run the simple test with prebuilt libclang 12.0\n\nIncluded in this repository is a simple test. Use this to confirm the generator is working and that your environment is set up correctly.\n\n#### NOTE\n\n* The test uses the prebuilt 12.0 libclang, so you should use `Android NDK r21` or higher version.\n* The test uses \\<string\\>; and \\<stdint.h\\>; so you need a C++ implementation that provides these\n* Currently, the test script is setup to use the Android NDK's llvm libc++\n\n### Mac OS X\n\n* The OSX 10.9 has a built-in python2.7 and if your os don't have python2.7 then use [Homebrew](http://brew.sh/) to install the python and use pip install the python dependencies.\n  ```bash\n  brew install python\n  ```\n\n* Install python dependices by pip.\n  ```bash\n  sudo easy_install pip3\n  sudo pip3 install PyYAML==5.4.1 Cheetah3\n  ```\n\n* Download NDK r21 from [google](https://developer.android.com/ndk/downloads/index.html)\n* If you are using python installed from other way, copy user.cfg.sample and rename it as `user.cfg` then set the absolute path to  python `PYTHON_BIN` in `user.cfg`\n* Run follow command, it will generate a `userconf.ini`, and check the values in it if it occorus any error.\n  ```bash\n  export NDK_ROOT=/path/to/android-ndk-r21\n  ./test.sh\n  ```\n### Windows 7 64bit\n* Download python3 (`64bit`) from (https://www.python.org).\n* Add the installed path of python (e.g. C:\\Python39) to PATH environment variable, if not already added in the installer.\n* Install python dependices by pip.\n  ```bash\n  python -m pip install PyYAML==5.4.1 Cheetah3\n  ```\n* Download NDK r21 or above from [google](https://developer.android.com/ndk/downloads/index.html)\n* Set the environment variables (`PYTHON_ROOT` and `NDK_ROOT`) or just them in `test.bat`.\n* Run \"test.bat\". The generated codes will be under \"simple_test_bindings\".\n\n### Expected output\n\nUpon running the test you might see some warnings but should not see any errors.\n\nThe test will create a directory named simple_test_bindings that contains 3 files\n\n* A .hpp header file for the bindings class\n* A .cpp file implementing the bindings class\n* A .js file that documents how to call (from JavaScript) the methods the C++ class exposes\n\n# The `.ini` file\n\nThe `.ini` file is a simple text file specifying the settings for the code generator. Here's the\ndefault one, used for cocos2d-x\n\n    [cocos2d-x]\n    prefix = cocos2dx\n    events  = CCNode#onEnter CCNode#onExit\n    extra_arguments = -I../../cocos2dx/include -I../../cocos2dx/platform -I../../cocos2dx/platform/ios -I../../cocos2dx -I../../cocos2dx/kazmath/include -arch i386 -DTARGET_OS_IPHONE -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk -x c++\n    headers = ../../cocos2dx/include/cocos2d.h\n    classes = CCSprite\n    functions = my_free_function\n\n## Required sections\n\n* prefix: the prefix for the project. Must be a valid identifier for the language of the target vm.\n  Most of the time, the name will be intermixed between the class name and the function name, since\n  all generated (probably) will be free functions, we do that in order to avoid name collition. The\n  script will generate ${prefix}.cpp and ${prefix}.hpp as a result.\n* events: a list of identifiers in the form of ClassName#functionName that are events to be called\n  from the native world to the target vm.\n* extra_arguments: extra arguments to pass to the clang interface. Basically you can think of this\n  as the arguments to pass to the \"compiler\", so add as many as you need here. If you're targetting\n  C++, make sure you add \"-x c++\" as the last argument to force C++ mode on a \".h\" file. Otherwise,\n  name your header files as \".hpp\".\n* headers: list of headers to parse. Usually you add a single header that in turn `#include`s the\n  rest of the files.\n* classes: the classes that will be parsed. Right not is just a string, but it will accept regular\n  expressions\n* functions: space-separated list of free functions to be binded. Same as with classes, it will\n  support regular expressions.\n* skip: a space-separated list of `Classes::functions` or just `functions` to not generate any code.\n\n# The templates\n\nThe generator is using [Cheetah templates](http://www.cheetahtemplate.org/) to create a more\nflexible generator. The way it was thought, is that for every target environment, you should provide\nwith a way to generate the same C/C++ functionality. Every template has access to the proper meta\ninformation for the code or generator (function, classes, etc.)\n\nRight now it's separated in the following set of templates:\n\n* prelude.c/.h: The header of the generated files.\n* ifunction.c/.h: The template for an instance function\n* ifunction_overloaded.c: The template for the implementation of an overloaded function. An\n  overloaded function is exactly the same as a function, but it has an array of functions sharing\n  the same name. The current implementation for spidermonkey only works if the overloading is with\n  different number of arguments.\n* sfunction.c/.h: The template for a static function\n* sfunction_overloaded.c: The template for an overloaded static function\n* register.c: Here you should add the constructor/finalizer, the registration function (if needed)\n  and the footer of the header file. This is the last chunk being generated\n\nTemplates are stored in the `templates/${target}` directory and follow the naming specified above.\n\nOne final part of the puzzle is the `${target}.yaml` file, that contains specific type conversion\nsnippets to be used by the templates. For instance, for spidermonkey, this is the place where we\nspecify the conversion routines for the native types (to and from int, float, string, etc.)\n\n# Limitations\n\nCurrently the generator is leveraging clang in order to get information about the C/C++ code, so we\ncan only get as much information as clang give us. Known list of things that won't work:\n\n* variable number of arguments. Solution: write a manual wrapper\n","editor/assets/tools/parsed-effect-info.json":"{\"list\":[{\"args\":[\"vec3 color\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\color\\\\aces.chunk\",\"line\":2,\"name\":\"ACESToneMap\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"vec4 shadowPos\",\"vec3 worldNormal\",\"float normalBias\",\"vec3 matViewDir0\",\"vec3 matViewDir1\",\"vec3 matViewDir2\",\"vec2 projScaleXY\"],\"column\":7,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":52,\"name\":\"ApplyShadowDepthBias_FaceNormal\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[\"vec4 shadowPos\",\"vec3 worldNormal\",\"float normalBias\",\"mat4 matLightView\",\"vec2 projScaleXY\"],\"column\":7,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":64,\"name\":\"ApplyShadowDepthBias_FaceNormal\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[\"vec4 shadowPos\",\"float viewspaceDepthBias\",\"float projScaleZ\",\"float projBiasZ\"],\"column\":7,\"comment\":\" (projScaleZ, projBiasZ) = cc_shadowProjDepthInfo.xy\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":110,\"name\":\"ApplyShadowDepthBias_Orthographic\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[\"vec4 shadowPos\",\"float viewspaceDepthBias\"],\"column\":7,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":85,\"name\":\"ApplyShadowDepthBias_Perspective\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[\"vec4 shadowPos\",\"float viewspaceDepthBias\",\"vec3 worldPos\"],\"column\":7,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":127,\"name\":\"ApplyShadowDepthBias_PerspectiveLinearDepth\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[\"float baseColor\",\"float detailedColor\"],\"column\":6,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\effect\\\\special-effects.chunk\",\"line\":21,\"name\":\"BlendDetailedColorMap\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec3 baseColor\",\"vec3 detailedColor\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\effect\\\\special-effects.chunk\",\"line\":36,\"name\":\"BlendDetailedColorMap\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"vec3 baseNormalFromMap\",\"vec3 detailedNormalFromMap\",\"float detailedIntensity\"],\"column\":5,\"comment\":\" NormalFromMap is: texture(normalmap) - 0.5\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\effect\\\\special-effects.chunk\",\"line\":15,\"name\":\"BlendDetailedNormalMap\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"out vec4 csmPos\",\"out vec4 csmPosWithBias\",\"vec3 worldPos\",\"vec3 N\",\"vec2 shadowBias\"],\"column\":10,\"comment\":\" output csmPos is non-biased position that can be used for sampling shadow map after homogeneous divid\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":347,\"name\":\"CCCSMFactorBase\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"out vec4 csmPos\",\"out vec4 csmPosWithBias\",\"vec3 worldPos\",\"vec3 N\",\"vec2 shadowBias\"],\"column\":10,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":416,\"name\":\"CCCSMFactorBase\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec3 worldPos\",\"vec3 N\",\"vec2 shadowBias\"],\"column\":8,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":428,\"name\":\"CCCSMFactorBase\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"out vec4 csmPos\",\"out vec4 shadowProjDepthInfo\",\"out vec4 shadowProjInfo\",\"out vec3 shadowViewDir0\",\"out vec3 shadowViewDir1\",\"out vec3 shadowViewDir2\",\"vec3 worldPos\",\"int level\"],\"column\":9,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":294,\"name\":\"CCGetCSMLevel\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[\"out bool isTransitionArea\",\"out highp float transitionRatio\",\"out vec4 csmPos\",\"out vec4 shadowProjDepthInfo\",\"out vec4 shadowProjInfo\",\"out vec3 shadowViewDir0\",\"out vec3 shadowViewDir1\",\"out vec3 shadowViewDir2\",\"vec3 worldPos\"],\"column\":8,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":313,\"name\":\"CCGetCSMLevel\",\"type\":\"int\",\"usage\":\"function\"},{\"args\":[\"out vec4 csmPos\",\"out vec4 shadowProjDepthInfo\",\"out vec4 shadowProjInfo\",\"out vec3 shadowViewDir0\",\"out vec3 shadowViewDir1\",\"out vec3 shadowViewDir2\",\"vec3 worldPos\"],\"column\":8,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":339,\"name\":\"CCGetCSMLevel\",\"type\":\"int\",\"usage\":\"function\"},{\"args\":[\"out vec4 csmPos\",\"out vec4 shadowProjDepthInfo\",\"out vec4 shadowProjInfo\",\"out vec3 shadowViewDir0\",\"out vec3 shadowViewDir1\",\"out vec3 shadowViewDir2\",\"vec3 worldPos\"],\"column\":8,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":412,\"name\":\"CCGetCSMLevel\",\"type\":\"int\",\"usage\":\"function\"},{\"args\":[\"out highp float ratio\",\"vec3 clipPos\"],\"column\":9,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":253,\"name\":\"CCGetCSMLevelWithTransition\",\"type\":\"bool\",\"usage\":\"function\"},{\"args\":[\"vec4 shadowPosWithDepthBias\"],\"column\":8,\"comment\":\"////////////////////////////////////////////////////////Directional Light Shadow\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":136,\"name\":\"CCGetDirLightShadowFactorHard\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec4 shadowPosWithDepthBias\"],\"column\":8,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":144,\"name\":\"CCGetDirLightShadowFactorSoft\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec4 shadowPosWithDepthBias\"],\"column\":8,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":152,\"name\":\"CCGetDirLightShadowFactorSoft3X\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec4 shadowPosWithDepthBias\"],\"column\":8,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":160,\"name\":\"CCGetDirLightShadowFactorSoft5X\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec3 worldPos\",\"float viewSpaceBias\"],\"column\":6,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":21,\"name\":\"CCGetLinearDepth\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec3 worldPos\"],\"column\":6,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":27,\"name\":\"CCGetLinearDepth\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec4 shadowPosWithDepthBias\",\"vec3 worldPos\"],\"column\":8,\"comment\":\"////////////////////////////////////////////////////////Spot Light Shadow\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":170,\"name\":\"CCGetSpotLightShadowFactorHard\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec4 shadowPosWithDepthBias\",\"vec3 worldPos\"],\"column\":8,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":178,\"name\":\"CCGetSpotLightShadowFactorSoft\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec4 shadowPosWithDepthBias\",\"vec3 worldPos\"],\"column\":8,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":186,\"name\":\"CCGetSpotLightShadowFactorSoft3X\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec4 shadowPosWithDepthBias\",\"vec3 worldPos\"],\"column\":8,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":194,\"name\":\"CCGetSpotLightShadowFactorSoft5X\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"out mat4 matWorld\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\world-transform.chunk\",\"line\":3,\"name\":\"CCGetWorldMatrix\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[\"out mat4 matWorld\",\"out mat4 matWorldIT\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\world-transform.chunk\",\"line\":17,\"name\":\"CCGetWorldMatrixFull\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[\"int level\",\"vec3 worldPos\"],\"column\":9,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":277,\"name\":\"CCHasCSMLevel\",\"type\":\"bool\",\"usage\":\"function\"},{\"args\":[\"out vec4 shadowPosWithDepthBias\",\"vec4 shadowPos\",\"vec3 N\",\"vec2 shadowBias\"],\"column\":8,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":229,\"name\":\"CCShadowFactorBase\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec4 shadowPos\",\"vec3 N\",\"vec2 shadowBias\"],\"column\":8,\"comment\":\" compatible version\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":423,\"name\":\"CCShadowFactorBase\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"out vec4 shadowPosWithDepthBias\",\"vec4 shadowPos\",\"vec3 worldPos\",\"vec2 shadowBias\"],\"column\":8,\"comment\":\"////////////////////////////////////////////////////////Main Functions\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":204,\"name\":\"CCSpotShadowFactorBase\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec4 shadowPos\",\"vec3 worldPos\",\"vec2 shadowBias\"],\"column\":8,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":433,\"name\":\"CCSpotShadowFactorBase\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"inout vec4 color\",\"float factor\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\fog.chunk\",\"line\":29,\"name\":\"CC_APPLY_FOG_BASE\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[\"uv\"],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":47,\"name\":\"CC_HANDLE_GET_CLIP_FLIP\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"uv\"],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":46,\"name\":\"CC_HANDLE_RT_SAMPLE_FLIP\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":98,\"name\":\"CC_SURFACES_ENABLE_DEBUG_VIEW\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":39,\"name\":\"CC_SURFACES_FLIP_UV\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":87,\"name\":\"CC_SURFACES_LIGHTING_2ND_LAYER_SPECULAR\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":48,\"name\":\"CC_SURFACES_LIGHTING_ANISOTROPIC\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":51,\"name\":\"CC_SURFACES_LIGHTING_ANISOTROPIC_ENVCONVOLUTION_COUNT\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":75,\"name\":\"CC_SURFACES_LIGHTING_CLEAR_COAT\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":72,\"name\":\"CC_SURFACES_LIGHTING_DUAL_LOBE_SPECULAR\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":81,\"name\":\"CC_SURFACES_LIGHTING_SSS\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":63,\"name\":\"CC_SURFACES_LIGHTING_TRANSMIT_DIFFUSE\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":60,\"name\":\"CC_SURFACES_LIGHTING_TRANSMIT_SPECULAR\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":69,\"name\":\"CC_SURFACES_LIGHTING_TRT\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":78,\"name\":\"CC_SURFACES_LIGHTING_TT\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":57,\"name\":\"CC_SURFACES_LIGHTING_USE_FRESNEL\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":66,\"name\":\"CC_SURFACES_LIGHTING_USE_SHADOWMAP_TRANSMIT\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":25,\"name\":\"CC_SURFACES_TRANSFER_CLIP_POS\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":22,\"name\":\"CC_SURFACES_TRANSFER_LOCAL_POS\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":54,\"name\":\"CC_SURFACES_USE_LEGACY_COMPATIBLE_LIGHTING\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":31,\"name\":\"CC_SURFACES_USE_LIGHT_MAP\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":45,\"name\":\"CC_SURFACES_USE_REFLECTION_DENOISE\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":13,\"name\":\"CC_SURFACES_USE_SECOND_UV\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":16,\"name\":\"CC_SURFACES_USE_TANGENT_SPACE\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":42,\"name\":\"CC_SURFACES_USE_TWO_SIDED\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":19,\"name\":\"CC_SURFACES_USE_VERTEX_COLOR\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\shading-entries\\\\data-structures\\\\vs-output.chunk\",\"line\":2,\"name\":\"CC_SURFACES_VARING_MODIFIER\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\shading-entries\\\\data-structures\\\\fs-input.chunk\",\"line\":2,\"name\":\"CC_SURFACES_VARING_MODIFIER\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"vec4 pos\",\"out float factor\"],\"column\":5,\"comment\":\" Fog helper functions\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\fog.chunk\",\"line\":14,\"name\":\"CC_TRANSFER_FOG_BASE\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[\"vec3 spotLightDir\",\"vec3 L\",\"float cosAngleOuter\"],\"column\":6,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\attenuation.chunk\",\"line\":42,\"name\":\"CalculateAngleAttenuation\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec3 normal\",\"vec3 tangent\",\"float mirrorNormal\"],\"column\":5,\"comment\":\" for right-hand coordinates, params must be normalized\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\math\\\\coordinates.chunk\",\"line\":60,\"name\":\"CalculateBinormal\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"vec3 R\",\"vec3 worldPos\",\"vec3 cubeCenterPos\",\"vec3 cubeBoxHalfSize\"],\"column\":5,\"comment\":\" fix cubemap direction with box projection\\r\\n return unnormalized vector and weight for exceeding\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\functions.chunk\",\"line\":72,\"name\":\"CalculateBoxProjectedDirection\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[\"float distToLightSqr\",\"float lightRadius\",\"float lightRange\"],\"column\":6,\"comment\":\" advanced\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\attenuation.chunk\",\"line\":31,\"name\":\"CalculateDistanceAttenuation\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"float ior\",\"float NoVSat\"],\"column\":6,\"comment\":\" saturated N dot V\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\bxdf.chunk\",\"line\":3,\"name\":\"CalculateFresnelCoefficient\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec3 tangent\",\"vec3 binormal\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\math\\\\coordinates.chunk\",\"line\":68,\"name\":\"CalculateNormal\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"vec3 normalFromTangentSpace\",\"float normalStrength\",\"vec3 normal\",\"vec3 tangent\",\"float mirrorNormal\"],\"column\":5,\"comment\":\" param1 is normal from normalmap\\r\\n return value is un-normalized\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\math\\\\coordinates.chunk\",\"line\":76,\"name\":\"CalculateNormalFromTangentSpace\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"vec3 N\",\"vec3 V\",\"vec3 worldPos\",\"vec4 plane\",\"vec3 cameraPos\",\"float probeReflectedDepth\"],\"column\":5,\"comment\":\" for bumped planar reflection\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\functions.chunk\",\"line\":44,\"name\":\"CalculatePlanarReflectPositionOnPlane\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"vec3 N\",\"vec3 V\",\"float NoV\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\functions.chunk\",\"line\":35,\"name\":\"CalculateReflectDirection\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"vec3 N\",\"vec3 V\",\"float NoV\",\"float ior\"],\"column\":5,\"comment\":\" return unnormalized vector, support oppo-side\\r\\n V from pixel to camera\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\functions.chunk\",\"line\":5,\"name\":\"CalculateRefractDirection\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"vec3 N\",\"vec3 V\",\"float NoV\",\"float ior\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\functions.chunk\",\"line\":23,\"name\":\"CalculateRefractDirectionFast\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"vec3 unscatteredColor\",\"float distance\",\"float outScatterExtinctCoef\",\"float inScatterExtinctCoef\",\"float inScatterCoef\",\"vec3 inScatterColor\",\"vec3 outScatterColor\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\bxdf.chunk\",\"line\":16,\"name\":\"CalculateScattering\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"vec3 normal\",\"vec3 binormal\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\math\\\\coordinates.chunk\",\"line\":64,\"name\":\"CalculateTangent\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"out vec2 deltaV\",\"float frameCount\",\"float animSpeed\",\"float elapseTime\"],\"column\":6,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\mesh\\\\vat-animation.chunk\",\"line\":29,\"name\":\"CalculateVATAnimationUV\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"float A\",\"float B\"],\"column\":6,\"comment\":\" Experimental\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\mesh\\\\vat-animation.chunk\",\"line\":168,\"name\":\"CalculateVATDecodeUV\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"inout vec3 L[5\",\", out int n\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\rect-area-light.chunk\",\"line\":12,\"name\":\"ClipQuadToHorizon\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[\"type\"],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\data\\\\packing.chunk\",\"line\":19,\"name\":\"DEFINE_PACK_HIGHP_FUNC\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"float roughness\",\"float NoH\"],\"column\":6,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\brdf.chunk\",\"line\":3,\"name\":\"D_GGX\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"float RoughnessX\",\"float RoughnessY\",\"float NoH\",\"vec3 H\",\"vec3 X\",\"vec3 Y\"],\"column\":6,\"comment\":\" How to get an anisotropic offset along T/B:\\r\\n 1. accurate: rotation TBN basis, let N intend to T/B, such as flow map as normalmap, output vec3(0, delta, 1) instead of vec3(0, 0, 1)\\r\\n 2. not accurate: H intend to V, and passed to this function\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\brdf.chunk\",\"line\":35,\"name\":\"D_GGXAniso\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"float roughness\",\"float NoH\"],\"column\":6,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\brdf.chunk\",\"line\":11,\"name\":\"D_GGXMobile\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec3 color\",\"float fraction\"],\"column\":5,\"comment\":\" fraction is saturation percentage, 0 means gray\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\graph-expression\\\\base.chunk\",\"line\":5,\"name\":\"Desaturation\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"vec4 clipPos\",\"vec2 screen_resolution\",\"float transparency\"],\"column\":5,\"comment\":\" dithered transparency (dithered alpha test), better looking with TAA\\r\\n arguments: FSInput_clipPos, cc_viewPort.zw, baseColor.a\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\effect\\\\special-effects.chunk\",\"line\":4,\"name\":\"DitheredAlphaClip\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":18,\"name\":\"EPSILON\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":19,\"name\":\"EPSILON_LOWP\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":21,\"name\":\"EXP_VALUE\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"samplerCube tex\",\"vec3 R\",\"float roughness\",\"float mipCount\"],\"column\":7,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\texture\\\\cubemap.chunk\",\"line\":33,\"name\":\"EnvReflection\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"vec3 R\",\"float roughness\",\"float mipCount\",\"float denoiseIntensity\"],\"column\":7,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\texture\\\\cubemap.chunk\",\"line\":3,\"name\":\"EnvReflectionWithMipFiltering\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"vec4 pos\",\"vec3 cameraPos\",\"float fogStart\",\"float fogDensity\",\"float fogAtten\"],\"column\":6,\"comment\":\"pos, cc_cameraPos.xyz, cc_fogBase.x, cc_fogBase.z, cc_fogAdd.z\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\effect\\\\fog.chunk\",\"line\":11,\"name\":\"ExpFog\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec4 pos\",\"vec3 cameraPos\",\"float fogStart\",\"float fogDensity\",\"float fogAtten\"],\"column\":6,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\effect\\\\fog.chunk\",\"line\":18,\"name\":\"ExpSquaredFog\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":22,\"name\":\"FP_MAX\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":23,\"name\":\"FP_SCALE\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":24,\"name\":\"FP_SCALE_INV\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\shading-entries\\\\data-structures\\\\fs-input.chunk\",\"line\":58,\"name\":\"FSInput_clipPos\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\shading-entries\\\\data-structures\\\\fs-input.chunk\",\"line\":15,\"name\":\"FSInput_faceSideSign\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\shading-entries\\\\data-structures\\\\fs-input.chunk\",\"line\":50,\"name\":\"FSInput_fogFactor\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\shading-entries\\\\data-structures\\\\fs-input.chunk\",\"line\":39,\"name\":\"FSInput_lightMapUV\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\shading-entries\\\\data-structures\\\\fs-input.chunk\",\"line\":54,\"name\":\"FSInput_localPos\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\shading-entries\\\\data-structures\\\\fs-input.chunk\",\"line\":26,\"name\":\"FSInput_mirrorNormal\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\shading-entries\\\\data-structures\\\\fs-input.chunk\",\"line\":46,\"name\":\"FSInput_reflectionProbeId\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\shading-entries\\\\data-structures\\\\fs-input.chunk\",\"line\":43,\"name\":\"FSInput_shadowBias\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\shading-entries\\\\data-structures\\\\fs-input.chunk\",\"line\":16,\"name\":\"FSInput_texcoord\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\shading-entries\\\\data-structures\\\\fs-input.chunk\",\"line\":33,\"name\":\"FSInput_texcoord1\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\shading-entries\\\\data-structures\\\\fs-input.chunk\",\"line\":19,\"name\":\"FSInput_vertexColor\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\shading-entries\\\\data-structures\\\\fs-input.chunk\",\"line\":14,\"name\":\"FSInput_worldNormal\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\shading-entries\\\\data-structures\\\\fs-input.chunk\",\"line\":13,\"name\":\"FSInput_worldPos\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\shading-entries\\\\data-structures\\\\fs-input.chunk\",\"line\":25,\"name\":\"FSInput_worldTangent\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":25,\"name\":\"GRAY_VECTOR\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"vec3 L\",\"vec3 litDir\",\"float litAngleScale\",\"float litAngleOffset\"],\"column\":6,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\attenuation.chunk\",\"line\":22,\"name\":\"GetAngleAtt\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"float roughness\",\"float anisotropyShape\",\"vec3 V\",\"vec3 N\",\"vec3 X\",\"vec3 Y\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\brdf.chunk\",\"line\":45,\"name\":\"GetAnisotropicReflect\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"float roughness\",\"float anisotropyShape\",\"out float roughnessX\",\"out float roughnessY\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\brdf.chunk\",\"line\":19,\"name\":\"GetAnisotropicRoughness\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[\"float depthHS\",\"mat4 matProj\"],\"column\":6,\"comment\":\" depthHS (Z) = ndc depth(-1 ~ +1)\\r\\n return camera depth (W), negative in RH\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\math\\\\coordinates.chunk\",\"line\":32,\"name\":\"GetCameraDepthRH\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"float depthHS\",\"float matProj32\",\"float matProj22\"],\"column\":6,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\math\\\\coordinates.chunk\",\"line\":36,\"name\":\"GetCameraDepthRH\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"out vec3 centerPos\",\"out vec3 boxHalfSize\",\"out float mipCount\",\"float probeId\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\probe.chunk\",\"line\":29,\"name\":\"GetCubeReflectionProbeData\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[\"float distSqr\",\"float invSqrAttRadius\"],\"column\":6,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\attenuation.chunk\",\"line\":16,\"name\":\"GetDistAtt\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"out vec3 lightmapColor\",\"out float dirShadow\",\"out float ao\",\"sampler2D lightingMap\",\"vec2 luv\",\"float lum\",\"vec3 worldNormal\"],\"column\":5,\"comment\":\" for surface shader\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\light-map.chunk\",\"line\":23,\"name\":\"GetLightMapColor\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[\"vec3 viewPos\",\"float near\",\"float far\"],\"column\":6,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\math\\\\coordinates.chunk\",\"line\":54,\"name\":\"GetLinearDepthFromViewSpace\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"out float metallic\",\"out vec3 albedo\",\"vec3 diffuse\",\"vec3 specular\",\"float channelFaultTolerant\",\"float f0\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\mesh\\\\material.chunk\",\"line\":1,\"name\":\"GetMetallicAlbedoFromDiffuseSpecularMathematic\",\"type\":\"bool\",\"usage\":\"function\"},{\"args\":[\"out float metallic\",\"out vec3 albedo\",\"vec3 diffuse\",\"vec3 specular\",\"float f0\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\mesh\\\\material.chunk\",\"line\":29,\"name\":\"GetMetallicAlbedoFromDiffuseSpecularWithoutColor\",\"type\":\"bool\",\"usage\":\"function\"},{\"args\":[\"vec3 worldPos\",\"mat4 matVirtualCameraViewProj\",\"float flipNDCSign\",\"vec3 viewDir\",\"vec3 reflectDir\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\math\\\\coordinates.chunk\",\"line\":21,\"name\":\"GetPlanarReflectScreenUV\",\"type\":\"vec2\",\"usage\":\"function\"},{\"args\":[\"out vec4 plane\",\"out float planarReflectionDepthScale\",\"out float mipCount\",\"float probeId\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\probe.chunk\",\"line\":11,\"name\":\"GetPlanarReflectionProbeData\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[\"vec4 clipPos\",\"float flipNDCSign\"],\"column\":5,\"comment\":\" return 0-1\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\math\\\\coordinates.chunk\",\"line\":7,\"name\":\"GetScreenUV\",\"type\":\"vec2\",\"usage\":\"function\"},{\"args\":[\"vec3 worldPos\",\"mat4 matViewProj\",\"float flipNDCSign\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\math\\\\coordinates.chunk\",\"line\":15,\"name\":\"GetScreenUV\",\"type\":\"vec2\",\"usage\":\"function\"},{\"args\":[\"out vec3 shadowNDCPos\",\"vec4 shadowPosWithDepthBias\"],\"column\":7,\"comment\":\"////////////////////////////////////////////////////////Helper Functions\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":40,\"name\":\"GetShadowNDCPos\",\"type\":\"bool\",\"usage\":\"function\"},{\"args\":[\"sampler2D dataMap\",\"float dataMapWidth\",\"float x\",\"float uv_y\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\probe.chunk\",\"line\":2,\"name\":\"GetTexData\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[\"vec3 posHS\",\"mat4 matProj\",\"mat4 matProjInv\"],\"column\":5,\"comment\":\" posHS = ndc pos (xyz: -1 ~ +1)\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\math\\\\coordinates.chunk\",\"line\":42,\"name\":\"GetViewPosFromNDCPosRH\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[\"float NDCDepth\",\"float projScaleZ\",\"float projBiasZ\"],\"column\":8,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":76,\"name\":\"GetViewSpaceDepthFromNDCDepth_Orthgraphic\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"float NDCDepth\",\"float homogenousDividW\",\"float invProjScaleZ\",\"float invProjBiasZ\"],\"column\":8,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":80,\"name\":\"GetViewSpaceDepthFromNDCDepth_Perspective\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec3 posHS\",\"mat4 matProj\",\"mat4 matViewProjInv\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\math\\\\coordinates.chunk\",\"line\":48,\"name\":\"GetWorldPosFromNDCPosRH\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":7,\"name\":\"HALF_PI\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"vec3 color\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\color\\\\tone-mapping.chunk\",\"line\":5,\"name\":\"HDRToLDR\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"value\",\"defined\"],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\data\\\\packing.chunk\",\"line\":53,\"name\":\"HIGHP_VALUE_FROM_STRUCT_DEFINED\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"value\",\"defined\"],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\data\\\\packing.chunk\",\"line\":70,\"name\":\"HIGHP_VALUE_FROM_STRUCT_DEFINED_SMALL_RANGE\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"type\",\"name\"],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\data\\\\packing.chunk\",\"line\":44,\"name\":\"HIGHP_VALUE_STRUCT_DEFINE\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"value\",\"defined\"],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\data\\\\packing.chunk\",\"line\":61,\"name\":\"HIGHP_VALUE_TO_STRUCT_DEFINED\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"value\",\"defined\"],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\data\\\\packing.chunk\",\"line\":78,\"name\":\"HIGHP_VALUE_TO_STRUCT_DEFINED_SMALL_RANGE\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":13,\"name\":\"INV_HALF_PI\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":14,\"name\":\"INV_PI\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":15,\"name\":\"INV_PI2\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":16,\"name\":\"INV_PI4\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":12,\"name\":\"INV_QUATER_PI\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"light_type\"],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":65,\"name\":\"IS_DIRECTIONAL_LIGHT\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"light_type\"],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":68,\"name\":\"IS_POINT_LIGHT\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"light_type\"],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":69,\"name\":\"IS_RANGED_DIRECTIONAL_LIGHT\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"light_type\"],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":66,\"name\":\"IS_SPHERE_LIGHT\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"light_type\"],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":67,\"name\":\"IS_SPOT_LIGHT\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"vec3 v1\",\"vec3 v2\"],\"column\":6,\"comment\":\" https://eheitzresearch.wordpress.com/415-2/\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\rect-area-light.chunk\",\"line\":107,\"name\":\"IntegrateEdge\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec3 specular\",\"float roughness\",\"float NoV\"],\"column\":5,\"comment\":\" EnvBRDFApprox\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\brdf.chunk\",\"line\":63,\"name\":\"IntegratedGFApprox\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":51,\"name\":\"LIGHT_MAP_TYPE_ALL_IN_ONE\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":50,\"name\":\"LIGHT_MAP_TYPE_DISABLED\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":52,\"name\":\"LIGHT_MAP_TYPE_INDIRECT_OCCLUSION\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":60,\"name\":\"LIGHT_TYPE_DIRECTIONAL\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":61,\"name\":\"LIGHT_TYPE_POINT\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":64,\"name\":\"LIGHT_TYPE_RANGED_DIRECTIONAL\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":63,\"name\":\"LIGHT_TYPE_SPHERE\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":62,\"name\":\"LIGHT_TYPE_SPOT\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":20,\"name\":\"LOG2\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"vec3 N\",\"vec3 V\",\"vec3 P\",\"mat3 Minv\",\"vec3 points[4]\"],\"column\":5,\"comment\":\" https://blog.magnum.graphics/guest-posts/area-lights-with-ltcs/\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\rect-area-light.chunk\",\"line\":114,\"name\":\"LTC_Evaluate\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"vec4 pos\",\"vec3 cameraPos\",\"float fogTop\",\"float fogRange\",\"float fogAtten\"],\"column\":6,\"comment\":\"pos, cc_cameraPos.xyz, cc_fogAdd.x, cc_fogAdd.y, cc_fogAdd.z\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\effect\\\\fog.chunk\",\"line\":26,\"name\":\"LayeredFog\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\lighting-models\\\\data-structures\\\\lighting-intermediate-data.chunk\",\"line\":3,\"name\":\"LightingIntermediateData\",\"type\":\"\",\"usage\":\"variable\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\lighting-models\\\\data-structures\\\\lighting-misc-data.chunk\",\"line\":3,\"name\":\"LightingMiscData\",\"type\":\"\",\"usage\":\"variable\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\lighting-models\\\\data-structures\\\\lighting-result.chunk\",\"line\":3,\"name\":\"LightingResult\",\"type\":\"\",\"usage\":\"variable\"},{\"args\":[\"vec4 pos\",\"vec3 cameraPos\",\"float fogStart\",\"float fogEnd\"],\"column\":6,\"comment\":\"pos, cc_cameraPos.xyz, cc_fogBase.x, cc_fogBase.y\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\effect\\\\fog.chunk\",\"line\":4,\"name\":\"LinearFog\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec3 linear\"],\"column\":5,\"comment\":\" #pragma define LinearToSRGB(linear) pow(linear, vec3(0.454545))\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\color\\\\gamma.chunk\",\"line\":19,\"name\":\"LinearToSRGB\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"v\"],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\data\\\\unpack.chunk\",\"line\":4,\"name\":\"MOD_FINT_128\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":8,\"name\":\"PI\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":9,\"name\":\"PI2\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":10,\"name\":\"PI4\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":6,\"name\":\"QUATER_PI\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":56,\"name\":\"REFLECTION_PROBE_TYPE_CUBE\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":55,\"name\":\"REFLECTION_PROBE_TYPE_NONE\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":57,\"name\":\"REFLECTION_PROBE_TYPE_PLANAR\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"inout vec3 binormal\",\"inout vec3 normal\",\"in vec3 tangent\",\"float rotationAngle\",\"float mirrorNormal\"],\"column\":5,\"comment\":\" fast rotation for anisotropic offset\\r\\n rotationAngle: -1 - +1\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\math\\\\coordinates.chunk\",\"line\":115,\"name\":\"RotateNormalAndBinormal\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[\"inout vec3 tangent\",\"inout vec3 binormal\",\"vec3 normal\",\"float rotationAngle\"],\"column\":5,\"comment\":\" rotationAngle: radians, 0-2Pi\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\math\\\\coordinates.chunk\",\"line\":99,\"name\":\"RotateTangentAndBinormal\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[\"vec3 v\",\"float cosTheta\",\"float sinTheta\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\math\\\\coordinates.chunk\",\"line\":84,\"name\":\"RotationVecFromAxisY\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"vec3 v\",\"float rotateAngleArc\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\math\\\\coordinates.chunk\",\"line\":93,\"name\":\"RotationVecFromAxisY\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"vec2 uv\",\"vec2 centerUV\",\"float time\",\"float speed\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\graph-expression\\\\base.chunk\",\"line\":11,\"name\":\"Rotator\",\"type\":\"vec2\",\"usage\":\"function\"},{\"args\":[\"vec3 normal\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\sh.chunk\",\"line\":4,\"name\":\"SHEvaluate\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"vec3 gamma\"],\"column\":5,\"comment\":\" #pragma define SRGBToLinear(gamma) pow(gamma, vec3(2.2))\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\color\\\\gamma.chunk\",\"line\":6,\"name\":\"SRGBToLinear\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"v\"],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\data\\\\unpack.chunk\",\"line\":3,\"name\":\"STEP_FINT_128\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":76,\"name\":\"SURFACES_MAX_TRANSMIT_DEPTH_VALUE\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"out vec3 lightmapColor\",\"out float dirShadow\",\"out float ao\",\"sampler2D lightingMap\",\"vec2 luv\",\"float lum\",\"vec3 worldNormal\"],\"column\":5,\"comment\":\" for legacy effects\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\light-map.chunk\",\"line\":2,\"name\":\"SampleAndDecodeLightMapColor\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[\"sampler2D exrRGBE\",\"vec2 uv\"],\"column\":5,\"comment\":\" for exr data texture and sub resources\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\texture\\\\texture-misc.chunk\",\"line\":3,\"name\":\"SampleTextureExr\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"sampler2D exrRGBE\",\"sampler2D exrSign\",\"vec2 uv\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\texture\\\\texture-misc.chunk\",\"line\":9,\"name\":\"SampleTextureExr\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"sampler2D exrRGBE\",\"sampler2D exrSign\",\"sampler2D exrAlpha\",\"vec2 uv\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\texture\\\\texture-misc.chunk\",\"line\":16,\"name\":\"SampleTextureExrWithAlpha\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[\"float distSqr\",\"float invSqrAttRadius\"],\"column\":6,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\attenuation.chunk\",\"line\":10,\"name\":\"SmoothDistAtt\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"float distSqr\",\"float invSqrAttRadius\"],\"column\":6,\"comment\":\" base\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\attenuation.chunk\",\"line\":2,\"name\":\"SmoothDistAtt2\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec2 center\",\"vec2 point\",\"float radius\",\"float hardness\"],\"column\":6,\"comment\":\" return 0.0 when out of range\\r\\n hardness: 0 - 1\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\graph-expression\\\\base.chunk\",\"line\":36,\"name\":\"SphereMask\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec3 center\",\"vec3 point\",\"float radius\",\"float hardness\"],\"column\":6,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\graph-expression\\\\base.chunk\",\"line\":42,\"name\":\"SphereMask\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\legacy\\\\shading-standard-base.chunk\",\"line\":3,\"name\":\"StandardSurface\",\"type\":\"\",\"usage\":\"variable\"},{\"args\":[],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_ALPHA_CLIP_ONLY\\r\\n for base shape without color usage, such as render-to-shadow\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":12,\"name\":\"SurfacesFragmentAlphaClipOnly\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[\"out float isRotation\"],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_ANISOTROPY_PARAMS\\r\\n isRotation=1.0: shape(0~1), rotation(0~2PI), 0.0, 0.0\\r\\n or\\r\\n isRotation=0.0: shape(0~1), anisoDir.xyz(-1~1)\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":57,\"name\":\"SurfacesFragmentModifyAnisotropyParams\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[\"out vec4 baseColorAndTransparency\",\"out vec3 shade1\",\"out vec3 shade2\",\"in vec3 baseColor\"],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_BASECOLOR_AND_TOONSHADE\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\toon-fs.chunk\",\"line\":5,\"name\":\"SurfacesFragmentModifyBaseColorAndToonShade\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_BASECOLOR_AND_TRANSPARENCY\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":3,\"name\":\"SurfacesFragmentModifyBaseColorAndTransparency\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[\"float roughness\"],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_DUAL_LOBE_SPECULAR_PARAMS\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":169,\"name\":\"SurfacesFragmentModifyDualLobeSpecularParams\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_EMISSIVE\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":66,\"name\":\"SurfacesFragmentModifyEmissive\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[],\"column\":6,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_IOR\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":46,\"name\":\"SurfacesFragmentModifyIOR\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_PBRPARAMS\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":74,\"name\":\"SurfacesFragmentModifyPBRParams\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_SSS_PARAMS\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":179,\"name\":\"SurfacesFragmentModifySSSParams\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[\"inout SurfacesMaterialData surfaceData\"],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_SHARED_DATA\\r\\n some material datas use shared raw data, avoid sample / calculate same raw data multiply times, use this function for better performance\\r\\n this function invokes at last\\r\\n should use corresponding shading-model header: #include <surfaces/data-structures/XXX> before function define\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":194,\"name\":\"SurfacesFragmentModifySharedData\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_TRT_COLOR\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":142,\"name\":\"SurfacesFragmentModifyTRTColor\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_TRT_PARAMS\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":131,\"name\":\"SurfacesFragmentModifyTRTParams\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[\"in vec3 baseColor\"],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_TT_COLOR\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":160,\"name\":\"SurfacesFragmentModifyTTColor\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_TT_PARAMS\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":150,\"name\":\"SurfacesFragmentModifyTTParams\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[],\"column\":6,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_TOON_SHADOW_COVER\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\toon-fs.chunk\",\"line\":22,\"name\":\"SurfacesFragmentModifyToonShadowCover\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_TOON_SPECULAR\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\toon-fs.chunk\",\"line\":30,\"name\":\"SurfacesFragmentModifyToonSpecular\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_TOON_STEP_AND_FEATHER\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\toon-fs.chunk\",\"line\":14,\"name\":\"SurfacesFragmentModifyToonStepAndFeather\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_TRANSMIT_DIFFUSE_PARAMS\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":115,\"name\":\"SurfacesFragmentModifyTransmitDiffuseParams\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_TRANSMIT_IN_SCATTERING_COLOR\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":98,\"name\":\"SurfacesFragmentModifyTransmitInScatteringColor\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_TRANSMIT_OUT_SCATTERING_COLOR\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":106,\"name\":\"SurfacesFragmentModifyTransmitOutScatteringColor\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_TRANSMIT_SCATTERING_PARAMS\\r\\n scattering related parameters and colors\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":84,\"name\":\"SurfacesFragmentModifyTransmitScatteringParams\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_WORLD_NORMAL\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":20,\"name\":\"SurfacesFragmentModifyWorldNormal\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"inout vec3 worldTangent\",\"inout vec3 worldBinormal\",\"vec3 worldNormal\"],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_WORLD_TANGENT_AND_BINORMAL\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":28,\"name\":\"SurfacesFragmentModifyWorldTangentAndBinormal\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[\"inout LightingResult result\",\"in LightingIntermediateData lightingData\",\"in SurfacesMaterialData surfaceData\",\"in LightingMiscData miscData\"],\"column\":7,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\lighting-models\\\\default-functions\\\\simple-skin.chunk\",\"line\":9,\"name\":\"SurfacesLightingModifyFinalResult\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\data-structures\\\\standard.chunk\",\"line\":3,\"name\":\"SurfacesMaterialData\",\"type\":\"\",\"usage\":\"variable\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\shading-entries\\\\data-structures\\\\vs-intermediate.chunk\",\"line\":3,\"name\":\"SurfacesStandardVertexIntermediate\",\"type\":\"\",\"usage\":\"variable\"},{\"args\":[\"in SurfacesStandardVertexIntermediate In\"","native/tools/gfx-define-generator/package.json":"{\n  \"name\": \"gfx-define-generator\",\n  \"version\": \"1.0.0\",\n  \"description\": \"GFX layer definition generator\",\n  \"main\": \"generate.js\",\n  \"scripts\": {\n    \"test\": \"echo \\\"Error: no test specified\\\" && exit 1\"\n  },\n  \"author\": \"YunHsiao\",\n  \"license\": \"MIT\",\n  \"dependencies\": {\n    \"js-yaml\": \"^4.0.0\"\n  }\n}\n","native/tools/gfx-define-generator/package-lock.json":"{\n  \"name\": \"gfx-define-generator\",\n  \"version\": \"1.0.0\",\n  \"lockfileVersion\": 3,\n  \"requires\": true,\n  \"packages\": {\n    \"\": {\n      \"name\": \"gfx-define-generator\",\n      \"version\": \"1.0.0\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"js-yaml\": \"^4.0.0\"\n      }\n    },\n    \"node_modules/argparse\": {\n      \"version\": \"2.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz\",\n      \"integrity\": \"sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==\"\n    },\n    \"node_modules/js-yaml\": {\n      \"version\": \"4.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/js-yaml/-/js-yaml-4.0.0.tgz\",\n      \"integrity\": \"sha512-pqon0s+4ScYUvX30wxQi3PogGFAlUyH0awepWvwkj4jD4v+ova3RiYw8bmA6x2rDrEaj8i/oWKoRxpVNW+Re8Q==\",\n      \"dependencies\": {\n        \"argparse\": \"^2.0.1\"\n      },\n      \"bin\": {\n        \"js-yaml\": \"bin/js-yaml.js\"\n      }\n    }\n  }\n}\n","native/tools/gles-wrangler-generator/package.json":"{\n  \"name\": \"gles-wrangler-generator\",\n  \"version\": \"1.0.0\",\n  \"description\": \"EGL/GLES loader code generator\",\n  \"main\": \"generate.js\",\n  \"scripts\": {\n    \"test\": \"echo \\\"Error: no test specified\\\" && exit 1\"\n  },\n  \"author\": \"YunHsiao\",\n  \"license\": \"MIT\",\n  \"dependencies\": {\n    \"axios\": \"^1.8.2\",\n    \"fast-xml-parser\": \"^3.17.6\"\n  }\n}\n","native/tools/gles-wrangler-generator/package-lock.json":"{\n  \"name\": \"gles-wrangler-generator\",\n  \"version\": \"1.0.0\",\n  \"lockfileVersion\": 3,\n  \"requires\": true,\n  \"packages\": {\n    \"\": {\n      \"version\": \"1.0.0\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"axios\": \"^1.8.2\",\n        \"fast-xml-parser\": \"^3.17.6\"\n      }\n    },\n    \"node_modules/asynckit\": {\n      \"version\": \"0.4.0\",\n      \"resolved\": \"https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz\",\n      \"integrity\": \"sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==\",\n      \"license\": \"MIT\"\n    },\n    \"node_modules/axios\": {\n      \"version\": \"1.8.2\",\n      \"resolved\": \"https://registry.npmjs.org/axios/-/axios-1.8.2.tgz\",\n      \"integrity\": \"sha512-ls4GYBm5aig9vWx8AWDSGLpnpDQRtWAfrjU+EuytuODrFBkqesN2RkOQCBzrA1RQNHw1SmRMSDDDSwzNAYQ6Rg==\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"follow-redirects\": \"^1.15.6\",\n        \"form-data\": \"^4.0.0\",\n        \"proxy-from-env\": \"^1.1.0\"\n      }\n    },\n    \"node_modules/call-bind-apply-helpers\": {\n      \"version\": \"1.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz\",\n      \"integrity\": \"sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"es-errors\": \"^1.3.0\",\n        \"function-bind\": \"^1.1.2\"\n      },\n      \"engines\": {\n        \"node\": \">= 0.4\"\n      }\n    },\n    \"node_modules/combined-stream\": {\n      \"version\": \"1.0.8\",\n      \"resolved\": \"https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz\",\n      \"integrity\": \"sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"delayed-stream\": \"~1.0.0\"\n      },\n      \"engines\": {\n        \"node\": \">= 0.8\"\n      }\n    },\n    \"node_modules/delayed-stream\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz\",\n      \"integrity\": \"sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==\",\n      \"license\": \"MIT\",\n      \"engines\": {\n        \"node\": \">=0.4.0\"\n      }\n    },\n    \"node_modules/dunder-proto\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz\",\n      \"integrity\": \"sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"call-bind-apply-helpers\": \"^1.0.1\",\n        \"es-errors\": \"^1.3.0\",\n        \"gopd\": \"^1.2.0\"\n      },\n      \"engines\": {\n        \"node\": \">= 0.4\"\n      }\n    },\n    \"node_modules/es-define-property\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz\",\n      \"integrity\": \"sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==\",\n      \"license\": \"MIT\",\n      \"engines\": {\n        \"node\": \">= 0.4\"\n      }\n    },\n    \"node_modules/es-errors\": {\n      \"version\": \"1.3.0\",\n      \"resolved\": \"https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz\",\n      \"integrity\": \"sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==\",\n      \"license\": \"MIT\",\n      \"engines\": {\n        \"node\": \">= 0.4\"\n      }\n    },\n    \"node_modules/es-object-atoms\": {\n      \"version\": \"1.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz\",\n      \"integrity\": \"sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"es-errors\": \"^1.3.0\"\n      },\n      \"engines\": {\n        \"node\": \">= 0.4\"\n      }\n    },\n    \"node_modules/es-set-tostringtag\": {\n      \"version\": \"2.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz\",\n      \"integrity\": \"sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"es-errors\": \"^1.3.0\",\n        \"get-intrinsic\": \"^1.2.6\",\n        \"has-tostringtag\": \"^1.0.2\",\n        \"hasown\": \"^2.0.2\"\n      },\n      \"engines\": {\n        \"node\": \">= 0.4\"\n      }\n    },\n    \"node_modules/fast-xml-parser\": {\n      \"version\": \"3.17.6\",\n      \"resolved\": \"https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-3.17.6.tgz\",\n      \"integrity\": \"sha512-40WHI/5d2MOzf1sD2bSaTXlPn1lueJLAX6j1xH5dSAr6tNeut8B9ktEL6sjAK9yVON4uNj9//axOdBJUuruCzw==\",\n      \"bin\": {\n        \"xml2js\": \"cli.js\"\n      },\n      \"funding\": {\n        \"type\": \"paypal\",\n        \"url\": \"https://paypal.me/naturalintelligence\"\n      }\n    },\n    \"node_modules/follow-redirects\": {\n      \"version\": \"1.15.9\",\n      \"resolved\": \"https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz\",\n      \"integrity\": \"sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==\",\n      \"funding\": [\n        {\n          \"type\": \"individual\",\n          \"url\": \"https://github.com/sponsors/RubenVerborgh\"\n        }\n      ],\n      \"license\": \"MIT\",\n      \"engines\": {\n        \"node\": \">=4.0\"\n      },\n      \"peerDependenciesMeta\": {\n        \"debug\": {\n          \"optional\": true\n        }\n      }\n    },\n    \"node_modules/form-data\": {\n      \"version\": \"4.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/form-data/-/form-data-4.0.2.tgz\",\n      \"integrity\": \"sha512-hGfm/slu0ZabnNt4oaRZ6uREyfCj6P4fT/n6A1rGV+Z0VdGXjfOhVUpkn6qVQONHGIFwmveGXyDs75+nr6FM8w==\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"asynckit\": \"^0.4.0\",\n        \"combined-stream\": \"^1.0.8\",\n        \"es-set-tostringtag\": \"^2.1.0\",\n        \"mime-types\": \"^2.1.12\"\n      },\n      \"engines\": {\n        \"node\": \">= 6\"\n      }\n    },\n    \"node_modules/function-bind\": {\n      \"version\": \"1.1.2\",\n      \"resolved\": \"https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz\",\n      \"integrity\": \"sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==\",\n      \"license\": \"MIT\",\n      \"funding\": {\n        \"url\": \"https://github.com/sponsors/ljharb\"\n      }\n    },\n    \"node_modules/get-intrinsic\": {\n      \"version\": \"1.3.0\",\n      \"resolved\": \"https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz\",\n      \"integrity\": \"sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"call-bind-apply-helpers\": \"^1.0.2\",\n        \"es-define-property\": \"^1.0.1\",\n        \"es-errors\": \"^1.3.0\",\n        \"es-object-atoms\": \"^1.1.1\",\n        \"function-bind\": \"^1.1.2\",\n        \"get-proto\": \"^1.0.1\",\n        \"gopd\": \"^1.2.0\",\n        \"has-symbols\": \"^1.1.0\",\n        \"hasown\": \"^2.0.2\",\n        \"math-intrinsics\": \"^1.1.0\"\n      },\n      \"engines\": {\n        \"node\": \">= 0.4\"\n      },\n      \"funding\": {\n        \"url\": \"https://github.com/sponsors/ljharb\"\n      }\n    },\n    \"node_modules/get-proto\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz\",\n      \"integrity\": \"sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"dunder-proto\": \"^1.0.1\",\n        \"es-object-atoms\": \"^1.0.0\"\n      },\n      \"engines\": {\n        \"node\": \">= 0.4\"\n      }\n    },\n    \"node_modules/gopd\": {\n      \"version\": \"1.2.0\",\n      \"resolved\": \"https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz\",\n      \"integrity\": \"sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==\",\n      \"license\": \"MIT\",\n      \"engines\": {\n        \"node\": \">= 0.4\"\n      },\n      \"funding\": {\n        \"url\": \"https://github.com/sponsors/ljharb\"\n      }\n    },\n    \"node_modules/has-symbols\": {\n      \"version\": \"1.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz\",\n      \"integrity\": \"sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==\",\n      \"license\": \"MIT\",\n      \"engines\": {\n        \"node\": \">= 0.4\"\n      },\n      \"funding\": {\n        \"url\": \"https://github.com/sponsors/ljharb\"\n      }\n    },\n    \"node_modules/has-tostringtag\": {\n      \"version\": \"1.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz\",\n      \"integrity\": \"sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"has-symbols\": \"^1.0.3\"\n      },\n      \"engines\": {\n        \"node\": \">= 0.4\"\n      },\n      \"funding\": {\n        \"url\": \"https://github.com/sponsors/ljharb\"\n      }\n    },\n    \"node_modules/hasown\": {\n      \"version\": \"2.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz\",\n      \"integrity\": \"sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"function-bind\": \"^1.1.2\"\n      },\n      \"engines\": {\n        \"node\": \">= 0.4\"\n      }\n    },\n    \"node_modules/math-intrinsics\": {\n      \"version\": \"1.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz\",\n      \"integrity\": \"sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==\",\n      \"license\": \"MIT\",\n      \"engines\": {\n        \"node\": \">= 0.4\"\n      }\n    },\n    \"node_modules/mime-db\": {\n      \"version\": \"1.52.0\",\n      \"resolved\": \"https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz\",\n      \"integrity\": \"sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==\",\n      \"license\": \"MIT\",\n      \"engines\": {\n        \"node\": \">= 0.6\"\n      }\n    },\n    \"node_modules/mime-types\": {\n      \"version\": \"2.1.35\",\n      \"resolved\": \"https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz\",\n      \"integrity\": \"sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"mime-db\": \"1.52.0\"\n      },\n      \"engines\": {\n        \"node\": \">= 0.6\"\n      }\n    },\n    \"node_modules/proxy-from-env\": {\n      \"version\": \"1.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz\",\n      \"integrity\": \"sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==\",\n      \"license\": \"MIT\"\n    }\n  }\n}\n","native/tools/simulator/.cocos-project.json":"{\n    \"has_native\": true,\n    \"project_type\": \"js\"\n}\n","native/tools/simulator/config.json":"{\n    \"init_cfg\":{\n        \"isLandscape\": true,\n        \"isWindowTop\": false,\n        \"waitForConnect\": false,\n        \"name\": \"Simulator\",\n        \"width\": 960,\n        \"height\": 640,\n        \"entry\": \"main.js\",\n        \"consolePort\": 6050,\n        \"uploadPort\": 6060,\n        \"debugPort\": 5086\n    },\n    \"simulator_screen_size\": [\n        {\n            \"title\": \"Apple iPhone 5 (640x1136)\",\n            \"width\": 640,\n            \"height\": 1136\n        },\n        {\n            \"title\": \"Apple iPhone 6 (750x1334)\",\n            \"width\": 750,\n            \"height\": 1334\n        },\n        {\n            \"title\": \"Apple iPhone 6Plus (1080x1920)\",\n            \"width\": 1080,\n            \"height\": 1920\n        },\n        {\n            \"title\": \"Apple iPhone 7 (750x1334)\",\n            \"width\": 750,\n            \"height\": 1334\n        },\n        {\n            \"title\": \"Apple iPhone 7Plus (1080x1920)\",\n            \"width\": 1080,\n            \"height\": 1920\n        },\n        {\n            \"title\": \"Apple iPhone X (1125x2436)\",\n            \"width\": 1125,\n            \"height\": 2436\n        },\n        {\n            \"title\": \"Apple iPad (2048x1536)\",\n            \"width\": 2048,\n            \"height\": 1536\n        },\n        {\n            \"title\": \"Apple iPad Air 2 (1536x2048)\",\n            \"width\": 1536,\n            \"height\": 2048\n        },\n        {\n            \"title\": \"Apple iPad Pro 10.5-inch (1668x2224)\",\n            \"width\": 1668,\n            \"height\": 2224\n        },\n        {\n            \"title\": \"Apple iPad Pro 12.9-inch (2048x2732)\",\n            \"width\": 2048,\n            \"height\": 2732\n        },\n        {\n          \"title\": \"Huawei P9 (1080x1920)\",\n          \"width\": 1080,\n          \"height\": 1920\n        },\n        {\n          \"title\": \"Huawei Mate9 Pro (1440x2560)\",\n          \"width\": 1440,\n          \"height\": 2560\n        },\n        {\n          \"title\": \"Goolge Nexus 5 (1080x2880)\",\n          \"width\": 1080,\n          \"height\": 2880\n        },\n        {\n          \"title\": \"Goolge Nexus 5X (1079x1919)\",\n          \"width\": 1079,\n          \"height\": 1919\n        },\n        {\n          \"title\": \"Goolge Nexus 6 (1442x2562)\",\n          \"width\": 1442,\n          \"height\": 2562\n        },\n        {\n          \"title\": \"Goolge Nexus 7 (1920x1200)\",\n          \"width\": 1920,\n          \"height\": 1200\n        }\n    ]\n}\n","native/tools/tojs/gen_d_ts/package.json":"{\n  \"name\": \"gen_d_ts\",\n  \"version\": \"1.0.0\",\n  \"description\": \"\",\n  \"main\": \"index.js\",\n  \"scripts\": {\n    \"test\": \"echo \\\"Error: no test specified\\\" && exit 1\"\n  },\n  \"author\": \"\",\n  \"license\": \"ISC\",\n  \"dependencies\": {\n    \"@types/node\": \"^16.10.3\"\n  }\n}\n","native/tools/swig-config/tutorial/index.md":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**\n\n- [The Tutorial of Swig Workflow in Cocos Creator](#the-tutorial-of-swig-workflow-in-cocos-creator)\n  * [How to Bind a New Module in Engine](#how-to-bind-a-new-module-in-engine)\n    + [Add a new module interface file](#add-a-new-module-interface-file)\n    + [Modify swig-config.js](#modify-swig-configjs)\n    + [Generate bindings](#generate-bindings)\n    + [Modify `engine/native/cocos/CMakeLists.txt`](#modify-enginenativecocoscmakeliststxt)\n    + [Register the new module to Script Engine](#register-the-new-module-to-script-engine)\n  * [How to Bind a New Module in Developer's Project](#how-to-bind-a-new-module-in-developers-project)\n    + [Bind a simple class](#bind-a-simple-class)\n      - [Create a simple class](#create-a-simple-class)\n      - [Write an interface file](#write-an-interface-file)\n      - [Write a swig config file](#write-a-swig-config-file)\n      - [Generate bindings for project](#generate-bindings-for-project)\n      - [Modify project's CMakeLists.txt](#modify-projects-cmakeliststxt)\n      - [Open project](#open-project)\n      - [Register the new module to Script Engine](#register-the-new-module-to-script-engine-1)\n      - [Test binding](#test-binding)\n      - [Section Conclusion](#section-conclusion)\n    + [Import depended header files](#import-depended-header-files)\n    + [Ignore classes, methods, properties](#ignore-classes-methods-properties)\n      - [Ignore classes](#ignore-classes)\n      - [Ignore methods and properties](#ignore-methods-and-properties)\n    + [Rename classes, methods, properties](#rename-classes-methods-properties)\n    + [Define an attribute](#define-an-attribute)\n      - [Usage](#usage)\n      - [Demo](#demo)\n      - [%attribute_writeonly directive](#%25attribute_writeonly--directive)\n      - [Reference type](#reference-type)\n      - [%arg() directive](#%25arg-directive)\n      - [Don't add `const`](#dont-add-const)\n    + [Configure C++ modules in .i file](#configure-c-modules-in-i-file)\n    + [Multiple swig modules configuration](#multiple-swig-modules-configuration)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# The Tutorial of Swig Workflow in Cocos Creator\n\n## How to Bind a New Module in Engine\n\n### Add a new module interface file\n\n- Add a new module interface file to `native/tools/swig-config` directory, e.g. `new-engine-module.i`\n\n- Copy the content in [swig-interface-template.i](../swig-interface-template.i) to new-engine-module.i\n\n- Add necessary configuration, you refer to the existed  `.i` files in `native/tools/swig-config` directory or refer to [the following section](#How to Bind a New Module in Developer's Project)\n  \n\n### Modify swig-config.js\n\n```js\n// ......\n// Engine Module Configuration\nconst configList = [\n    [ '2d.i', 'jsb_2d_auto.cpp' ],\n    // ......\n    [ 'renderer.i', 'jsb_render_auto.cpp' ],\n    [ 'new-engine-module.i', 'jsb_new_engine_module_auto.cpp' ], // Add this line\n];\n//......\n```\n\n### Generate bindings\n\n```bash\ncd engine/native/tools/swig-config\nnode genbindings.js\n```\n\n### Modify `engine/native/cocos/CMakeLists.txt`\n\n```cmake\n######## auto\ncocos_source_files(\n    NO_WERROR   NO_UBUILD   cocos/bindings/auto/jsb_new_engine_module_auto.cpp # Add this line\n                            cocos/bindings/auto/jsb_new_engine_module_auto.h # Add this line\n    NO_WERROR   NO_UBUILD   cocos/bindings/auto/jsb_cocos_auto.cpp\n                            cocos/bindings/auto/jsb_cocos_auto.h\n    ......\n```\n\n### Register the new module to Script Engine\n\nOpen `jsb_module_register.cpp` and do the following modifications\n\n```c++\n......\n#if CC_USE_PHYSICS_PHYSX\n    #include \"cocos/bindings/auto/jsb_physics_auto.h\"\n#endif\n#include \"cocos/bindings/auto/jsb_new_engine_module_auto.h\" // Add this line\n\nbool jsb_register_all_modules() {\n    se::ScriptEngine *se = se::ScriptEngine::getInstance();\n    ......\n    se->addRegisterCallback(register_all_my_new_engine_module); // Add this line\n\n    se->addAfterCleanupHook([]() {\n        cc::DeferredReleasePool::clear();\n        JSBClassType::cleanup();\n    });\n    return true;   \n}\n```\n\n## How to Bind a New Module in Developer's Project\n\nSuppose we have a Cocos Creator project located at `/Users/james/NewProject` directory.\n\nBuild a native project in Cocos Creator's build panel, we get `/Users/james/NewProject/native` directory.\n\n### Bind a simple class\n\n#### Create a simple class\n\nCreate a header file in `/Users/james/NewProject/native/engine/Classes/MyObject.h` , its content is \n\n```c++\n// MyObject.h\n#pragma once\n#include \"cocos/cocos.h\"\nnamespace my_ns {\nclass MyObject {\npublic:\n    MyObject() = default;\n    MyObject(int a, bool b) {}\n    virtual ~MyObject() = default;\n    void print() {\n        CC_LOG_DEBUG(\"==> a: %d, b: %d\\n\", _a, (int)_b);\n    }\n\n    float publicFloatProperty{1.23F};\nprivate:\n    int _a{100};\n    bool _b{true};\n};\n} // namespace my_ns {\n```\n\n#### Write an interface file\n\nCreate an interface called `my-module.i` file in  `/Users/james/NewProject/tools/swig-config`\n\n```c++\n// my-module.i\n%module(target_namespace=\"my_ns\") my_module\n\n// Insert code at the beginning of generated header file (.h)\n%insert(header_file) %{\n#pragma once\n#include \"bindings/jswrapper/SeApi.h\"\n#include \"bindings/manual/jsb_conversions.h\"\n\n#include \"MyObject.h\" // Add this line\n%}\n\n// Insert code at the beginning of generated source file (.cpp)\n%{\n#include \"bindings/auto/jsb_my_module_auto.h\"\n%}\n\n%include \"MyObject.h\"\n```\n\n#### Write a swig config file\n\nCreate a file called swig-config.js in `/Users/james/NewProject/tools/swig-config`\n\n```js\n// swig-config.js\n'use strict';\nconst path = require('path');\nconst configList = [\n    [ 'my-module.i', 'jsb_my_module_auto.cpp' ],\n];\n\nconst projectRoot = path.resolve(path.join(__dirname, '..', '..'));\nconst interfacesDir = path.join(projectRoot, 'tools', 'swig-config');\nconst bindingsOutDir = path.join(projectRoot, 'native', 'engine', 'common', 'bindings', 'auto');\n// includeDirs means header search path for Swig parser\nconst includeDirs = [\n    path.join(projectRoot, 'native', 'engine', 'common', 'Classes'),\n];\n\nmodule.exports = {\n    interfacesDir,\n    bindingsOutDir,\n    includeDirs,\n    configList\n};\n```\n\n#### Generate bindings for project\n\n```bash\n$ cd /Users/james/NewProject/tools/swig-config\n$ node < Engine Root >/native/tools/swig-config/genbindings.js\n```\n\nIf succeed, the files ( `jsb_my_module_auto.cpp/.h` ) contain JS binding code will be generated at `/Users/james/NewProject/native/engine/bindings/auto` directory\n\n#### Modify project's CMakeLists.txt\n\n- Open `/Users/james/NewProject/native/engine/common/CMakeLists.txt`, add `MyObject.h` and its binding code\n\n  ```cmake\n  include(${COCOS_X_PATH}/CMakeLists.txt)\n  \n  list(APPEND CC_COMMON_SOURCES\n      ${CMAKE_CURRENT_LIST_DIR}/Classes/Game.h\n      ${CMAKE_CURRENT_LIST_DIR}/Classes/Game.cpp\n      ############### Add the following lines ##############\n      ${CMAKE_CURRENT_LIST_DIR}/Classes/MyObject.h \n      ${CMAKE_CURRENT_LIST_DIR}/bindings/auto/jsb_my_module_auto.h\n      ${CMAKE_CURRENT_LIST_DIR}/bindings/auto/jsb_my_module_auto.cpp\n      ########################################################\n  )\n  ```\n\n- Modify `/Users/james/NewProject/native/engine/mac/CMakeLists.txt`\n\n  ```cmake\n  cmake_minimum_required(VERSION 3.8)\n  # ......\n  cc_mac_before_target(${EXECUTABLE_NAME})\n  add_executable(${EXECUTABLE_NAME} ${CC_ALL_SOURCES})\n  ############### Add the following lines ##############\n  target_include_directories(${EXECUTABLE_NAME} PRIVATE\n      ${CC_PROJECT_DIR}/../common\n  )\n  ########################################################\n  cc_mac_after_target(${EXECUTABLE_NAME})\n  ```\n\n\n#### Open project \n\nmacOS: `/Users/james/NewProject/build/mac/proj/NewProject.xcodeproj ` \n\nWindows: `< A specific directory >/NewProject/build/win64/proj/NewProject.sln`\n\n#### Register the new module to Script Engine\n\nModify `Game.cpp` :\n\n```c++\n#include \"Game.h\"\n#include \"bindings/auto/jsb_my_module_auto.h\" // Add this line\n//......\nint Game::init() {\n  // ......\n  se::ScriptEngine::getInstance()->addRegisterCallback(register_all_my_module); // Add this line\n  BaseGame::init();\n  return 0;\n}\n// ......\n```\n\n#### Test binding\n\n- Add a `my-module.d.ts` file in the root of project directory to make TS compiler know our binding class.\n\n  ```ts\n  // my-module.d.ts\n  declare namespace my_ns {\n  class MyObject {\n      constructor();\n      constructor(a: number, b: number);\n  \n      publicFloatProperty : number;\n      print() : void;\n  }\n  }\n  ```\n\n- Modify `/Users/james/NewProject/temp/tsconfig.cocos.json` file\n\n  ```js\n  {\n    \"$schema\": \"https://json.schemastore.org/tsconfig\",\n    \"compilerOptions\": {\n      \"target\": \"ES2015\",\n      \"module\": \"ES2015\",\n      \"strict\": true,\n      \"types\": [\n        \"./temp/declarations/cc.custom-macro\",\n        \"./temp/declarations/jsb\",\n        \"./temp/declarations/cc\",\n        \"./temp/declarations/cc.env\",\n        \"./my-module\" // Add this line\n      ],\n      // ......\n      \"forceConsistentCasingInFileNames\": true\n    }\n  }\n  ```\n\n- Open NewProject in Cocos Creator, create a cube object in scene and attach a script to cube, the script's content is\n\n  ```ts\n  import { _decorator, Component } from 'cc';\n  const { ccclass } = _decorator;\n  \n  @ccclass('MyComponent')\n  export class MyComponent extends Component {\n      start() {\n          const myObj = new my_ns.MyObject();\n          myObj.print(); // Invoke native print method\n          console.log(`==> myObj.publicFloatProperty: ${myObj.publicFloatProperty}`); // Get property defined in native\n      }\n  }\n  ```\n\n- Run project, if succeed, you could find the following logs in console \n\n  ```\n  17:31:44 [DEBUG]: ==> a: 100, b: 1\n  17:31:44 [DEBUG]: D/ JS: ==> myObj.publicFloatProperty: 1.2300000190734863\n  ```\n\n#### Section Conclusion\n\nIn this section, we have learned how to use `Swig` tool to bind a simple class, export its public methods and properties to JS. This section also cover the entire flow of binding native classes. Start from next section, we will focus on using more `Swig` features to satisfy more needs of JS bindings, for example:\n\n- How to import depended header files\n- How to ignore classes, methods, properties\n- How to rename classes, methods, properties\n- How to define attributes which bind c++ getter and setter as a JS property\n- How to configure C++ modules in .i file\n\n### Import depended header files\n\nSuppose we let MyObject class be inherited from MyRef class. But we don't want to bind MyRef class.\n\n```c++\n// MyRef.h\n#pragma once\nnamespace my_ns {\nclass MyRef  {\npublic:\n    MyRef() = default;\n    virtual ~MyRef() = default;\n    void addRef() { _ref++; }\n    void release() { --_ref; }\nprivate:\n    unsigned int _ref{0};\n};\n} // namespace my_ns {\n```\n\n```c++\n// MyObject.h\n#pragma once\n#include \"cocos/cocos.h\"\n#include \"MyRef.h\"\nnamespace my_ns {\n// MyObject inherits from MyRef\nclass MyObject : public MyRef {\npublic:\n    MyObject() = default;\n    MyObject(int a, bool b) {}\n    virtual ~MyObject() = default;\n    void print() {\n        CC_LOG_DEBUG(\"==> a: %d, b: %d\\n\", _a, (int)_b);\n    }\n\n    float publicFloatProperty{1.23F};\nprivate:\n    int _a{100};\n    bool _b{true};\n};\n} // namespace my_ns {\n```\n\nWhen Swig parses MyObject.h,  it will not know what `MyRef` is,  it will output a warning in console.\n\n```bash\n.../Classes/MyObject.h:7: Warning 401: Nothing known about base class 'MyRef'. Ignored.\n```\n\nIt's simple to fix this issue, we need to let Swig know that MyRef exists by using `%import` directive.\n\n```c++\n// ......\n// Insert code at the beginning of generated source file (.cpp)\n%{\n#include \"bindings/auto/jsb_my_module_auto.h\"\n%}\n\n%import \"MyRef.h\" // Add this line to fix the warning\n%include \"MyObject.h\"\n```\n\nAlthough Swig doesn't report the error now, the binding code will not be compiled, the error is:\n\n![](MyRefCompileError.jpg)\n\nWe fix this in the next section by `%ignore` directive.\n\n### Ignore classes, methods, properties\n\n#### Ignore classes\n\nIn last section, we got a compile error in `js_register_my_ns_MyObject`. Since MyRef should not be bound, we could use`%ignore` directive to ignore it.\n\n```c++\n// my-module.i\n// ......\n%ignore my_ns::MyRef; // Add this line\n%import \"MyRef.h\"\n%include \"MyObject.h\"\n```\n\nGenerate binding again, it compiles ok.\n\n```c++\n// jsb_my_module_auto.cpp\nbool js_register_my_ns_MyObject(se::Object* obj) {\n    auto* cls = se::Class::create(\"MyObject\", obj, nullptr, _SE(js_new_MyObject)); // parentProto will be set to nullptr\n    cls->defineProperty(\"publicFloatProperty\", _SE(js_my_ns_MyObject_publicFloatProperty_get), _SE(js_my_ns_MyObject_publicFloatProperty_set)); \n    cls->defineFunction(\"print\", _SE(js_my_ns_MyObject_print)); \n  // ......\n}\n```\n\n#### Ignore methods and properties\n\nWe add a new method `methodToBeIgnored` and a new property `propertyToBeIgnored` to `MyObject` class.\n\n```c++\n// MyObject.h\n#pragma once\n#include \"cocos/cocos.h\"\n#include \"MyRef.h\"\nnamespace my_ns {\n// MyObject inherits from MyRef\nclass MyObject : public MyRef {\npublic:\n// .....\n    void methodToBeIgnored() {} // Add this line\n    float propertyToBeIgnored{345.123F}; // Add this line\n// ......\n    float publicFloatProperty{1.23F};\nprivate:\n    int _a{100};\n    bool _b{true};\n};\n} // namespace my_ns {\n\n```\n\nRe-generate bindings, we'll get `methodToBeIgnored` and `propertyToBeIgnored` bound.\n\n```c++\n// jsb_my_module_auto.cpp\nbool js_register_my_ns_MyObject(se::Object* obj) {\n    auto* cls = se::Class::create(\"MyObject\", obj, nullptr, _SE(js_new_MyObject)); \n    cls->defineProperty(\"propertyToBeIgnored\", _SE(js_my_ns_MyObject_propertyToBeIgnored_get), _SE(js_my_ns_MyObject_propertyToBeIgnored_set)); // this property should not be bound\n    cls->defineProperty(\"publicFloatProperty\", _SE(js_my_ns_MyObject_publicFloatProperty_get), _SE(js_my_ns_MyObject_publicFloatProperty_set)); \n    cls->defineFunction(\"print\", _SE(js_my_ns_MyObject_print)); \n    cls->defineFunction(\"methodToBeIgnored\", _SE(js_my_ns_MyObject_methodToBeIgnored)); // this method should not be bound\n    // ......\n}\n```\n\nModify `my-module.i`to skip binding them.\n\n```c++\n// my-module.i\n// ......\n\n%ignore my_ns::MyRef;\n%ignore my_ns::MyObject::methodToBeIgnored; // Add this line\n%ignore my_ns::MyObject::propertyToBeIgnored; // Add this line\n\n%import \"MyRef.h\"\n%include \"MyObject.h\"\n```\n\nRe-generate bindings, they're ignored now.\n\n```c++\n// jsb_my_module_auto.cpp\nbool js_register_my_ns_MyObject(se::Object* obj) {\n    auto* cls = se::Class::create(\"MyObject\", obj, nullptr, _SE(js_new_MyObject)); \n    cls->defineProperty(\"publicFloatProperty\", _SE(js_my_ns_MyObject_publicFloatProperty_get), _SE(js_my_ns_MyObject_publicFloatProperty_set)); \n    cls->defineFunction(\"print\", _SE(js_my_ns_MyObject_print)); \n// ......\n}\n```\n\n### Rename classes, methods, properties\n\nSwig has defined a directive called `%rename` to rename classes, methods or properties. To demonstrate, we modify MyObject again.\n\n```c++\n// MyObject.h\n#pragma once\n#include \"cocos/cocos.h\"\n#include \"MyRef.h\"\nnamespace my_ns {\n// MyObject inherits from MyRef\nclass MyObject : public MyRef {\npublic:\n// ......\n    void methodToBeRenamed() { // Add this method\n        CC_LOG_DEBUG(\"==> hello MyObject::methodToBeRenamed\");\n    }\n    int propertyToBeRenamed{1234}; // Add this property\n\n    float publicFloatProperty{1.23F};\nprivate:\n    int _a{100};\n    bool _b{true};\n};\n} // namespace my_ns {\n```\n\nGenerate bindings, we get:\n\n```c++\n// jsb_my_module_auto.cpp\nbool js_register_my_ns_MyObject(se::Object* obj) {\n    auto* cls = se::Class::create(\"MyObject\", obj, nullptr, _SE(js_new_MyObject)); \n    cls->defineProperty(\"propertyToBeRenamed\", _SE(js_my_ns_MyObject_propertyToBeRenamed_get), _SE(js_my_ns_MyObject_propertyToBeRenamed_set)); \n    cls->defineProperty(\"publicFloatProperty\", _SE(js_my_ns_MyObject_publicFloatProperty_get), _SE(js_my_ns_MyObject_publicFloatProperty_set)); \n    \n    cls->defineFunction(\"print\", _SE(js_my_ns_MyObject_print)); \n    cls->defineFunction(\"methodToBeRenamed\", _SE(js_my_ns_MyObject_methodToBeRenamed)); \n```\n\nIf we want to rename `propertyToBeRenamed` to `coolProperty` and rename `methodToBeRenamed` to `coolMethod`, modify `my-module.i` as follows:\n\n```c++\n// my-module.i\n// ......\n%ignore my_ns::MyRef;\n%ignore my_ns::MyObject::methodToBeIgnored;\n%ignore my_ns::MyObject::propertyToBeIgnored;\n%rename(coolProperty) my_ns::MyObject::propertyToBeRenamed; // Add this line\n%rename(coolMethod) my_ns::MyObject::methodToBeRenamed; // Add this line\n\n%import \"MyRef.h\"\n%include \"MyObject.h\"\n```\n\nIf we want to rename `MyObject` class to `MyCoolObject`, I guess you have already known how to do.  Yes, add this line:\n\n```c++\n%rename(MyCoolObject) my_ns::MyObject;\n```\n\nRe-generate bindings, get the correct name exported to JS.\n\n```c++\n// jsb_my_module_auto.cpp\n// MyCoolObject, coolProperty, coolMethod are all what we want now.\nbool js_register_my_ns_MyObject(se::Object* obj) {\n    auto* cls = se::Class::create(\"MyCoolObject\", obj, nullptr, _SE(js_new_MyCoolObject));\n    cls->defineProperty(\"coolProperty\", _SE(js_my_ns_MyCoolObject_coolProperty_get), _SE(js_my_ns_MyCoolObject_coolProperty_set)); \n    cls->defineProperty(\"publicFloatProperty\", _SE(js_my_ns_MyCoolObject_publicFloatProperty_get), _SE(js_my_ns_MyCoolObject_publicFloatProperty_set)); \n    cls->defineFunction(\"print\", _SE(js_my_ns_MyCoolObject_print)); \n    cls->defineFunction(\"coolMethod\", _SE(js_my_ns_MyCoolObject_coolMethod)); \n    // ......\n}\n```\n\nTest it, update `my-module.d.ts` and `MyComponent.ts`\n\n```c++\n// my-module.d.ts\ndeclare namespace my_ns {\nclass MyCoolObject {\n    constructor();\n    constructor(a: number, b: number);\n\n    publicFloatProperty : number;\n    print() : void;\n    coolProperty: number;\n    coolMethod() : void;\n}\n}\n```\n\n```ts\n// MyComponent.ts\nimport { _decorator, Component } from 'cc';\nconst { ccclass } = _decorator;\n\n@ccclass('MyComponent')\nexport class MyComponent extends Component {\n    start() {\n        const myObj = new my_ns.MyCoolObject(); // Renamed to MyCoolObject\n        myObj.print();\n        console.log(`==> myObj.publicFloatProperty: ${myObj.publicFloatProperty}`);\n        // Add the follow lines\n        console.log(`==> old: myObj.coolProperty: ${myObj.coolProperty}`); \n        myObj.coolProperty = 666;\n        console.log(`==> new: myObj.coolProperty: ${myObj.coolProperty}`);\n        myObj.coolMethod();\n    }\n}\n```\n\nBuild and run project, get log:\n\n```\n17:53:28 [DEBUG]: ==> a: 100, b: 1\n17:53:28 [DEBUG]: D/ JS: ==> myObj.publicFloatProperty: 1.2300000190734863\n17:53:28 [DEBUG]: D/ JS: ==> old: myObj.coolProperty: 1234\n17:53:28 [DEBUG]: D/ JS: ==> new: myObj.coolProperty: 666\n17:53:28 [DEBUG]: ==> hello MyObject::methodToBeRenamed\n```\n\n### Define an attribute\n\n`%attribute` directive is used for bind C++ getter and setter functions as a JS property.\n\n#### Usage\n\n1. Define an attribute (JS property) without setter\n\n   ```c++\n   %attribute(your_namespace::your_class_name, cpp_member_variable_type, js_property_name, cpp_getter_function_name)\n   ```\n\n2. Define an attribute (JS property) with getter and setter\n\n   ```c++\n   %attribute(your_namespace::your_class_name, cpp_member_variable_type, js_property_name, cpp_getter_function_name, cpp_setter_function_name)\n   ```\n\n3. Define an attribute (JS property) without getter\n\n   ```c++\n   %attribute_writeonly(your_namespace::your_class_name, cpp_member_variable_type, js_property_name, cpp_setter_function_name)\n   ```\n\n#### Demo\n\nTo demonstrate, we add two new methods for MyObject class.\n\n```c++\n// MyObject.h\n#pragma once\n#include \"cocos/cocos.h\"\n#include \"MyRef.h\"\nnamespace my_ns {\n// MyObject inherits from MyRef\nclass MyObject : public MyRef {\npublic:\n// ......\n    void setType(int v) { _type = v; CC_LOG_DEBUG(\"==> setType: v: %d\", v); } // Add this line\n    int getType() const { return _type; } // Add this line\n\n    float publicFloatProperty{1.23F};\nprivate:\n    int _a{100};\n    bool _b{true};\n    int _type{333};\n};\n} // namespace my_ns {\n```\n\n```c++\n// my-module.i\n// ......\n%attribute(my_ns::MyObject, int, type, getType, setType); // Add this line\n\n%import \"MyRef.h\"\n%include \"MyObject.h\"\n```\n\n```c++\n// jsb_my_module_auto.cpp\nbool js_register_my_ns_MyObject(se::Object* obj) {\n// ......\n    cls->defineProperty(\"type\", _SE(js_my_ns_MyCoolObject_type_get), _SE(js_my_ns_MyCoolObject_type_set)); \n// ......\n}\n```\n\n```ts\n// MyComponent.ts\nimport { _decorator, Component } from 'cc';\nconst { ccclass } = _decorator;\n\n@ccclass('MyComponent')\nexport class MyComponent extends Component {\n    start() {\n        const myObj = new my_ns.MyCoolObject();\n        myObj.print();\n        console.log(`==> myObj.publicFloatProperty: ${myObj.publicFloatProperty}`);\n        console.log(`==> old: myObj.coolProperty: ${myObj.coolProperty}`);\n        myObj.coolProperty = 666;\n        console.log(`==> new: myObj.coolProperty: ${myObj.coolProperty}`);\n        myObj.coolMethod();\n        console.log(`==> old: myObj.type: ${myObj.type}`);\n        myObj.type = 888;\n        console.log(`==> new: myObj.type: ${myObj.type}`);\n    }\n}\n```\n\nBuild and run project\n\n```\n18:09:53 [DEBUG]: ==> a: 100, b: 1\n18:09:53 [DEBUG]: D/ JS: ==> myObj.publicFloatProperty: 1.2300000190734863\n18:09:53 [DEBUG]: D/ JS: ==> old: myObj.coolProperty: 1234\n18:09:53 [DEBUG]: D/ JS: ==> new: myObj.coolProperty: 666\n18:09:53 [DEBUG]: ==> hello MyObject::methodToBeRenamed\n18:09:53 [DEBUG]: D/ JS: ==> old: myObj.type: 333\n18:09:53 [DEBUG]: ==> setType: v: 888 // Cool, C++ setType is invoked\n18:09:53 [DEBUG]: D/ JS: ==> new: myObj.type: 888 // Cool, C++ getType is invoked, 888 is return from C++\n```\n\n#### %attribute_writeonly  directive\n\n`%attribute_writeonly` directive is an extension we added in swig  `Cocos` backend, it's used for the purpose that C++ class only has a `set` function and there isn't a `get` function.\n\nIn `native/tools/swig-config/cocos.i`, there are:\n\n```c++\n%attribute_writeonly(cc::ICanvasRenderingContext2D, float, width, setWidth);\n%attribute_writeonly(cc::ICanvasRenderingContext2D, float, height, setHeight);\n%attribute_writeonly(cc::ICanvasRenderingContext2D, float, lineWidth, setLineWidth);\n%attribute_writeonly(cc::ICanvasRenderingContext2D, ccstd::string&, fillStyle, setFillStyle);\n%attribute_writeonly(cc::ICanvasRenderingContext2D, ccstd::string&, font, setFont);\n```\n\nThis is the similar functionality in JS:\n\n```javascript\nObject.defineProperty(MyNewClass.prototype, 'width', {\n  configurable: true,\n  enumerable: true,\n  set(v) {\n    this._width = v;\n  },\n\t// No get() for property\n});\n```\n\n#### Reference type\n\nIf C++ `get` function returns a reference data type or `set` function accesses a reference data type , don't forget to add `&` suffix in %attribute or %attribute_writeonly directives. The following `ccstd::string&` is an example.\n\n```c++\n%attribute_writeonly(cc::ICanvasRenderingContext2D, ccstd::string&, fillStyle, setFillStyle);\n```\n\nIf `&` is missing, a temporary `ccstd::string` instance will be created while the binding function is invoked.\n\n#### %arg() directive\n\nSometimes, the type of C++ variable is a describled by C++ template, for instance:\n\n```c++\nclass MyNewClass {\n  public:\n\t\tconst std::map<std::string, std::string>& getConfig() const { return _config; }\n  \tvoid setConfig(const std::map<std::string, std::string> &config) { _config = config; }\n  private:\n  \tstd::map<std::string, std::string> _config;\n};\n```\n\nWe may write an `%attribute` in `.i` file like:\n\n```c++\n%attribute(MyNewClass, std::map<std::string, std::string>&, config, getConfig, setConfig);\n```\n\nYou will get an error while invoking `node genbindings.js`.\n\n```\nError: Macro '%attribute_custom' expects 7 arguments\n```\n\nThis is because `swig` doesn't know how to deal with comma (`,`) in `std::map<std::string, std::string>&`, it will split it to two parts:\n\n1. std::map<std::string\n2. std::string>&\n\nTherefore, this line of %attribute directive will be parsed with 6 arguments instead of 5.\n\nTo avoid making `swig` confused, we need to use `%arg` directive to tell `swig` that `std::map<std::string, std::string>&` is a whole thing.\n\n```c++\n%attribute(MyNewClass, %arg(std::map<std::string, std::string>&), config, getConfig, setConfig);\n```\n\nRe-run `node genbindings.js`, the error should have gone.\n\n#### Don't add `const` \n\nIn the above sample, `%arg(std::map<std::string, std::string>&)` is used as a C++ data type in %attribue directive. You may consider to add a `const` prefix before `std::map` like `%arg(const std::map<std::string, std::string>&)`. If you do that, you will make a readyonly `config` property which only binds `MyNewClass::getConfig`. That's obviously not what we expect. If we need a readonly property, just don't assign a `set` function. \n\n```c++\n// Don't assign setConfig means the property doesn't need a setter.\n%attribute(MyNewClass, %arg(std::map<std::string, std::string>&), config, getConfig); \n```\n\nSo to keep things simple, never add `const` prefix while writing a `%attribute` directive.\n\n### Configure C++ modules in .i file\n\nSometimes, whether to compile a class depends on whether a macro is enabled. For example, we add a `MyFeatureObject` class in `MyObject.h`\n\n```c++\n// MyObject.h\n#pragma once\n#include \"cocos/cocos.h\"\n#include \"MyRef.h\"\n\n#ifndef USE_MY_FEATURE\n#define USE_MY_FEATURE 1 // Enable USE_MY_FEATURE\n#endif\n\nnamespace my_ns {\n\n#if USE_MY_FEATURE\nclass MyFeatureObject {\npublic:\n    void foo() {\n        CC_LOG_DEBUG(\"==> MyFeatureObject::foo\");\n    }\n};\n#else\nclass MyFeatureObject;\n#endif\n\n// MyObject inherits from MyRef\nclass MyObject : public MyRef {\npublic:\n//......\n    MyFeatureObject* getFeatureObject() {\n#if USE_MY_FEATURE // getFeatureObject only returns valid value when USE_MY_FEATURE is enabled\n        if (_featureObject == nullptr) {\n            _featureObject = new MyFeatureObject();\n        }\n#endif\n        return _featureObject;\n    }\nprivate:\n    int _a{100};\n    bool _b{true};\n    int _type{333};\n    MyFeatureObject* _featureObject{nullptr}; // Add this line\n};\n} // namespace my_ns {\n```\n\n```c++\n// my-module.i\n// ......\n%rename(MyCoolObject) my_ns::MyObject;\n\n%attribute(my_ns::MyObject, int, type, getType, setType);\n\n%module_macro(USE_MY_FEATURE) my_ns::MyFeatureObject; // Add this line to let Swig know the generated code for MyFeatureObject needs to be wrapped by USE_MY_FEATURE macro\n%module_macro(USE_MY_FEATURE) my_ns::MyObject::getFeatureObject; // Add this line to let Swig know the generated code for MyObject::getFeatureObject should be wrapped by USE_MY_FEATURE macro\n\n#define USE_MY_FEATURE 1 // Must be 1 to trick Swig that we need to generate binding code\n// even this macro is disabled in C++. NOTE: this line should be after %module_macro\n\n%import \"MyRef.h\"\n%include \"MyObject.h\"\n```\n\n```c++\n// my-module.d.ts\ndeclare namespace my_ns {\nclass MyFeatureObject {\n    foo() : void;\n}\n\nclass MyCoolObject {\n    constructor();\n    constructor(a: number, b: number);\n\n    publicFloatProperty : number;\n    print() : void;\n    coolProperty: number;\n    coolMethod() : void;\n    type: number;\n    getFeatureObject() : MyFeatureObject;\n}\n}\n```\n\n```ts\n// MyComponent.ts\nimport { _decorator, Component } from 'cc';\nconst { ccclass } = _decorator;\n\n@ccclass('MyComponent')\nexport class MyComponent extends Component {\n    start() {\n        const myObj = new my_ns.MyCoolObject();\n        myObj.print();\n        console.log(`==> myObj.publicFloatProperty: ${myObj.publicFloatProperty}`);\n        console.log(`==> old: myObj.coolProperty: ${myObj.coolProperty}`);\n        myObj.coolProperty = 666;\n        console.log(`==> new: myObj.coolProperty: ${myObj.coolProperty}`);\n        myObj.coolMethod();\n        console.log(`==> old: myObj.type: ${myObj.type}`);\n        myObj.type = 888;\n        console.log(`==> new: myObj.type: ${myObj.type}`);\n        const featureObj = myObj.getFeatureObject();\n        console.log(`==> featureObj: ${featureObj}`);\n        if (featureObj) {\n            featureObj.foo();\n        }\n    }\n}\n```\n\nGenerate bindings, look at the binding code\n\n```c++\n#if USE_MY_FEATURE // NOTE THAT, all binding code of MyFeatureObject is wrapped by USE_MY_FEATURE macro\n\nse::Class* __jsb_my_ns_MyFeatureObject_class = nullptr;\nse::Object* __jsb_my_ns_MyFeatureObject_proto = nullptr;\nSE_DECLARE_FINALIZE_FUNC(js_delete_my_ns_MyFeatureObject) \n\nstatic bool js_my_ns_MyFeatureObject_foo(se::State& s)\n{\n// ......\n}\n// ......\nbool js_register_my_ns_MyFeatureObject(se::Object* obj) {\n    auto* cls = se::Class::create(\"MyFeatureObject\", obj, nullptr, _SE(js_new_my_ns_MyFeatureObject)); \n// ......\n}\n\n#endif // USE_MY_FEATURE\n\n// ......\nstatic bool js_my_ns_MyCoolObject_getFeatureObject(se::State& s)\n{\n#if USE_MY_FEATURE // getFeatureObject function is also wrapped by USE_MY_FEATURE\n// ......\n    ok &= nativevalue_to_se(result, s.rval(), s.thisObject() /*ctx*/);\n    SE_PRECONDITION2(ok, false, \"MyCoolObject_getFeatureObject, Error processing arguments\");\n    SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); \n#endif // USE_MY_FEATURE\n    return true;\n}\nSE_BIND_FUNC(js_my_ns_MyCoolObject_getFeatureObject) \n\n// ......\nbool register_all_my_module(se::Object* obj) {\n    // Get the ns\n    se::Value nsVal;\n    if (!obj->getProperty(\"my_ns\", &nsVal, true))\n    {\n        se::HandleObject jsobj(se::Object::createPlainObject());\n        nsVal.setObject(jsobj);\n        obj->setProperty(\"my_ns\", nsVal);\n    }\n    se::Object* ns = nsVal.toObject();\n    /* Register classes */\n#if USE_MY_FEATURE\n    js_register_my_ns_MyFeatureObject(ns); // js_register_my_ns_MyFeatureObject is wrapped by USE_MY_FEATURE\n#endif // USE_MY_FEATURE\n    js_register_my_ns_MyObject(ns); \n    return true;\n}\n```\n\nBuild and run the project, get output as following:\n\n```\n18:32:20 [DEBUG]: D/ JS: ==> featureObj: [object Object] // featureObj is valid if USE_MY_FEATURE macro is enabled\n18:32:20 [DEBUG]: ==> MyFeatureObject::foo // Invoke C++ foo method \n```\n\nWhen we don't need MyFeatureObject, set the macro to 0.\n\n```c++\n// MyObject.h\n#pragma once\n#include \"cocos/cocos.h\"\n#include \"MyRef.h\"\n\n#ifndef USE_MY_FEATURE\n#define USE_MY_FEATURE 0 // Disable USE_MY_FEATURE\n#endif\n```\n\nBuild and run the project\n\n```\n18:54:00 [DEBUG]: D/ JS: ==> featureObj: undefined // getFeatureObject returns undefined if USE_MY_FEATURE is disabled.\n```\n\n### Multiple swig modules configuration\n\nLet's create another header file `MyAnotherObject.h`.\n\n```c++\n// MyAnotherObject.h\n#pragma once\nnamespace my_another_ns {\nstruct MyAnotherObject {\n    float a{135.246};\n    int b{999};\n};\n} // namespace my_another_ns {\n```\n\nUpdate MyObject.h\n\n```c++\n// MyObject.h\n//......\nclass MyObject : public MyRef {\npublic:\n// ......\n    void helloWithAnotherObject(const my_another_ns::MyAnotherObject &obj) {\n        CC_LOG_DEBUG(\"==> helloWithAnotherObject, a: %f, b: %d\", obj.a, obj.b);\n    }\n// ......\n};\n} // namespace my_ns {\n```\n\nCreate `/Users/james/NewProject/tools/swig-config/another-module.i`\n\n```c++\n// another-module.i\n%module(target_namespace=\"another_ns\") another_module\n\n// Insert code at the beginning of generated header file (.h)\n%insert(header_file) %{\n#pragma once\n#include \"bindings/jswrapper/SeApi.h\"\n#include \"bindings/manual/jsb_conversions.h\"\n\n#include \"MyAnotherObject.h\" // Add this line\n%}\n\n// Insert code at the beginning of generated source file (.cpp)\n%{\n#include \"bindings/auto/jsb_another_module_auto.h\"\n%}\n\n%include \"MyAnotherObject.h\"\n```\n\nModify `/Users/james/NewProject/tools/swig-config/swig-config.js`\n\n```c++\n'use strict';\n\nconst path = require('path');\n\nconst configList = [\n    [ 'my-module.i', 'jsb_my_module_auto.cpp' ],\n    [ 'another-module.i', 'jsb_another_module_auto.cpp' ], // Add this line\n];\n\nconst projectRoot = path.resolve(path.join(__dirname, '..', '..'));\nconst interfacesDir = path.join(projectRoot, 'tools', 'swig-config');\nconst bindingsOutDir = path.join(projectRoot, 'native', 'engine', 'common', 'bindings', 'auto');\nconst includeDirs = [\n    path.join(projectRoot, 'native', 'engine', 'common', 'Classes'),\n];\n\nmodule.exports = {\n    interfacesDir,\n    bindingsOutDir,\n    includeDirs,\n    configList\n};\n```\n\nModify `/Users/james/NewProject/native/engine/common/CMakeLists.txt`\n\n```cmake\n# /Users/james/NewProject/native/engine/common/CMakeLists.txt\nlist(APPEND CC_COMMON_SOURCES\n    ${CMAKE_CURRENT_LIST_DIR}/Classes/Game.h\n    ${CMAKE_CURRENT_LIST_DIR}/Classes/Game.cpp\n    ${CMAKE_CURRENT_LIST_DIR}/Classes/MyObject.h\n    ${CMAKE_CURRENT_LIST_DIR}/Classes/MyAnotherObject.h # Add this line\n    ${CMAKE_CURRENT_LIST_DIR}/bindings/auto/jsb_my_module_auto.h\n    ${CMAKE_CURRENT_LIST_DIR}/bindings/auto/jsb_my_module_auto.cpp\n    ${CMAKE_CURRENT_LIST_DIR}/bindings/auto/jsb_another_module_auto.h # Add this line\n    ${CMAKE_CURRENT_LIST_DIR}/bindings/auto/jsb_another_module_auto.cpp # Add this line\n)\n```\n\nGenerate bindings again.\n\nUpdate Game.cpp\n\n```c++\n#include \"Game.h\"\n#include \"bindings/auto/jsb_my_module_auto.h\"\n#include \"bindings/auto/jsb_another_module_auto.h\" // Add this line\n//......\n\nint Game::init() {\n//......\n    se::ScriptEngine::getInstance()->addRegisterCallback(register_all_my_module);\n    se::ScriptEngine::getInstance()->addRegisterCallback(register_all_another_module); // Add this line\n//\n  BaseGame::init();\n  return 0;\n}\n```\n\nBuild and compile, but get an error\n\n![](another-module-compile-error.jpg)\n\nSince MyObject class depends on MyAnotherObject which is defined on another module. We need to update `my-module.i` and add `#include \"bindings/auto/jsb_another_module_auto.h\"`.\n\n```c++\n// my-module.i\n%module(target_namespace=\"my_ns\") my_module\n\n// Insert code at the beginning of generated header file (.h)\n%insert(header_file) %{\n#pragma once\n#include \"bindings/jswrapper/SeApi.h\"\n#include \"bindings/manual/jsb_conversions.h\"\n\n#include \"MyObject.h\"\n%}\n\n// Insert code at the beginning of generated source file (.cpp)\n%{\n#include \"bindings/auto/jsb_my_module_auto.h\"\n#include \"bindings/auto/jsb_another_module_auto.h\" // Add this line\n%}\n\n// ......\n```\n\nCompile project. It should compile ok now. \n\nNext, we update .d.ts\n\n```ts\n// my-module.d.ts\ndeclare namespace my_ns {\nclass MyFeatureObject {\n    foo() : void;\n}\n\nclass MyCoolObject {\n    constructor();\n    constructor(a: number, b: number);\n\n    publicFloatProperty : number;\n    print() : void;\n    coolProperty: number;\n    coolMethod() : void;\n    type: number;\n    getFeatureObject() : MyFeatureObject;\n    helloWithAnotherObject(obj: another_ns.MyAnotherObject) : void; // Add this line\n}\n}\n\n// Add the following lines\ndeclare namespace another_ns {\nclass MyAnotherObject {\n    a: number;\n    b: number;\n}\n}\n```\n\nWe add some more test code of reading the properties of  `MyAnotherObject.`\n\n```ts\n// MyComponent.ts\nimport { _decorator, Component } from 'cc';\nconst { ccclass } = _decorator;\n\n@ccclass('MyComponent')\nexport class MyComponent extends Component {\n    start() {\n        const myObj = new my_ns.MyCoolObject();\n        // ......\n        const anotherObj = new another_ns.MyAnotherObject(); // Add this line \n        myObj.helloWithAnotherObject(anotherObj); // Add this line\n    }\n}\n```\n\nBuild and run project, should get output:\n\n```\n15:05:36 [DEBUG]: ==> helloWithAnotherObject, a: 135.246002, b: 999\n```\n","native/tools/tojs/gen_d_ts/package-lock.json":"{\n  \"name\": \"gen_d_ts\",\n  \"version\": \"1.0.0\",\n  \"lockfileVersion\": 1,\n  \"requires\": true,\n  \"dependencies\": {\n    \"@types/node\": {\n      \"version\": \"16.10.3\",\n      \"resolved\": \"https://repo.huaweicloud.com/repository/npm/@types/node/-/node-16.10.3.tgz\",\n      \"integrity\": \"sha512-ho3Ruq+fFnBrZhUYI46n/bV2GjwzSkwuT4dTf0GkuNFmnb8nq4ny2z9JEVemFi6bdEJanHLlYfy9c6FN9B9McQ==\"\n    }\n  }\n}\n","native/tools/swig-config/README.md":"## Introduction\n\nFrom Cocos Creator 3.7.0，we switch the approach of generating JS binding code from [bindings-generator](https://github.com/cocos/cocos-engine/tree/d08a11244d2a31da1aac7af7d2aa8f1b6152e30c/native/tools/bindings-generator) to [Swig](https://www.swig.org). Swig has many benefits in generating glue code by parsing  its custom `interface` file (IDL) which is compatible with `C++`. For more about why we switch to Swig, you could refer to [the issue](https://github.com/cocos/cocos-engine/issues/10792) .\n\n## Generate JS Binding Code for Engine\n\nThe engine's binding code is now automatically generated by CMake, eliminating the need to run swig command manually. \n\nNotice: if any \".i\" configuration files are added or removed, please rebuild the project to ensure the changes are incorporated.\n\n## Generate JS Bindings Code for Developer's Project\n\n- Make sure you have installed NodeJS ( `>= v8.9.4` )\n\n- Open Terminal ( macOS / Linux) or Command Line Tool ( Windows )\n\n- Create a directory for generated code, e.g. `/Users/abc/my-project/native/engine/common/Classes/bindings/auto`\n\n- Write a JS configuration file\n  \n  - Create the JS configruation file, e.g.  `/Users/abc/my-project/tools/swig-config/swig-config.js` with the following content\n    \n    ```js\n    'use strict';\n    const path = require('path');\n    \n    // Developer's custom module configuration\n    // configList is required\n    const configList = [\n        [ 'your_module_interface_0.i', 'jsb_your_module_interface_0_auto.cpp' ],\n        [ 'your_module_interface_1.i', 'jsb_your_module_interface_1_auto.cpp' ],\n        // ......\n    ];\n    \n    const projectRoot = path.resolve(path.join(__dirname, '..', '..'));\n    // interfaceDir is optional\n    const interfacesDir = path.join(projectRoot, 'tools', 'swig-config');\n    // bindingsOutDir is optional\n    const bindingsOutDir = path.join(projectRoot, 'native', 'engine', 'common', 'Classes', 'bindings', 'auto');\n    \n    module.exports = {\n        interfacesDir, // optional, if it isn't exported, the items in configList should be absolute or relative to current directory of swig-config.js\n        bindingsOutDir, // optional, if it isn't exported, the items in configList should be absolute or relative to current directory of swig-config.js\n        configList // required\n    };\n    ```\n  \n  - Run the following command\n    \n    ```bash\n    # If current workspace is not in '/Users/abc/my-project/tools/swig-config'\n    $ node < Engine Root Path >/native/tools/swig-config/genbindings.js -c /Users/abc/my-project/tools/swig-config/swig-config.js\n    ```\n    \n    ```bash\n    # If you have already navigate to '/Users/abc/my-project/tools/swig-config' directory, you could run the command without -c argument like:\n    $ cd /Users/abc/my-project/tools/swig-config\n    $ node < Engine Root Path >/native/tools/swig-config/genbindings.js\n    ```\n\n## Swig Interface File\n\n- There is a [swig-interface-template.i](swig-interface-template.i) in `engine/native/tools/swig-config` directory, just copy and rename it to some place in your project. There some comments demonstrate how to configure your module in `.i` file.  You could also reference engine internal `.i` files in `engine/native/tools/swig-config`, for instance, `scene.i` or `assets.i` for a quick start.\n- If you're using `Visual Studio Code`, you could install `SWIG Language` extension which was developed by `Hong-She Liang` for highlight syntax support.\n- For more details of writing `.i` file, please visit [tutorial](#Tutorial) section.\n\n## Tutorial\n\nPlease visit [tutorial/index.md](tutorial/index.md),  which includes binding a new module in engine or user's project step by step.    \n","native/tools/tojs/gen_d_ts/tsconfig.json":"# Gen_d_ts Skill\n\nPath: `native/tools/tojs/gen_d_ts/tsconfig.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/cocos/cocos-engine/HEAD/native/tools/tojs/gen_d_ts/tsconfig.json)","native/tools/bindings-generator/targets/spidermonkey/conversions.yaml":"# Spidermonkey Skill\n\nPath: `native/tools/bindings-generator/targets/spidermonkey/conversions.yaml`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/cocos/cocos-engine/HEAD/native/tools/bindings-generator/targets/spidermonkey/conversions.yaml)","native/tools/simulator/frameworks/runtime-src/proj.win32/build-cfg.json":"# Proj.win32 Skill\n\nPath: `native/tools/simulator/frameworks/runtime-src/proj.win32/build-cfg.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/cocos/cocos-engine/HEAD/native/tools/simulator/frameworks/runtime-src/proj.win32/build-cfg.json)","native/tools/simulator/frameworks/runtime-src/proj.ios_mac/mac/build-cfg.json":"# Mac Skill\n\nPath: `native/tools/simulator/frameworks/runtime-src/proj.ios_mac/mac/build-cfg.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/cocos/cocos-engine/HEAD/native/tools/simulator/frameworks/runtime-src/proj.ios_mac/mac/build-cfg.json)","native/tools/simulator/frameworks/runtime-src/SimulatorApp-Mac/Images.xcassets/AppIcon.appiconset/Contents.json":"# AppIcon.appiconset Skill\n\nPath: `native/tools/simulator/frameworks/runtime-src/SimulatorApp-Mac/Images.xcassets/AppIcon.appiconset/Contents.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/cocos/cocos-engine/HEAD/native/tools/simulator/frameworks/runtime-src/SimulatorApp-Mac/Images.xcassets/AppIcon.appiconset/Contents.json)"},"files":{"native/tools/bindings-generator/README.md":"# What's new\n* Add a prebuilt libclang 12.0 in `libclang/`for linux, mac and windows.\n* If you want use the prebuilt libclang 12.0 work with Android NDK, then `only the NDK r21 can work corrently` with it.\n\n# Requirements\n\n* python 3.x (64-bit)\n* py-yaml version 5.4.1\n* cheetah3\n* libclang binary files\n\n# Usage\n\n    Usage: generator.py [options] {configfile}\n\n    Options:\n      -h, --help   show this help message and exit\n      -s SECTION   sets a specific section to be converted\n      -t TARGET    specifies the target vm. Will search for TARGET.yaml\n\nBasically, you specify a target vm (spidermonkey is the only current target vm) and the section from\nthe `.ini` file you want to generate code for.\n\n### Download libclang binary files\n\n* Download the pre-built binaries according to your platform from [here](https://github.com/llvm/llvm-project/releases/tag/llvmorg-12.0.0).\n* Unzip or install binaries. For example, unzip `clang+llvm-12.0.0-x86_64-apple-darwin.tar.xz` for macOS.\n* Find libclang.dll (windows) or libclang.dylib (macOS)\n* Copy the dynamic library to `bindings-generator/libclang` folder.\n\n## Run the simple test with prebuilt libclang 12.0\n\nIncluded in this repository is a simple test. Use this to confirm the generator is working and that your environment is set up correctly.\n\n#### NOTE\n\n* The test uses the prebuilt 12.0 libclang, so you should use `Android NDK r21` or higher version.\n* The test uses \\<string\\>; and \\<stdint.h\\>; so you need a C++ implementation that provides these\n* Currently, the test script is setup to use the Android NDK's llvm libc++\n\n### Mac OS X\n\n* The OSX 10.9 has a built-in python2.7 and if your os don't have python2.7 then use [Homebrew](http://brew.sh/) to install the python and use pip install the python dependencies.\n  ```bash\n  brew install python\n  ```\n\n* Install python dependices by pip.\n  ```bash\n  sudo easy_install pip3\n  sudo pip3 install PyYAML==5.4.1 Cheetah3\n  ```\n\n* Download NDK r21 from [google](https://developer.android.com/ndk/downloads/index.html)\n* If you are using python installed from other way, copy user.cfg.sample and rename it as `user.cfg` then set the absolute path to  python `PYTHON_BIN` in `user.cfg`\n* Run follow command, it will generate a `userconf.ini`, and check the values in it if it occorus any error.\n  ```bash\n  export NDK_ROOT=/path/to/android-ndk-r21\n  ./test.sh\n  ```\n### Windows 7 64bit\n* Download python3 (`64bit`) from (https://www.python.org).\n* Add the installed path of python (e.g. C:\\Python39) to PATH environment variable, if not already added in the installer.\n* Install python dependices by pip.\n  ```bash\n  python -m pip install PyYAML==5.4.1 Cheetah3\n  ```\n* Download NDK r21 or above from [google](https://developer.android.com/ndk/downloads/index.html)\n* Set the environment variables (`PYTHON_ROOT` and `NDK_ROOT`) or just them in `test.bat`.\n* Run \"test.bat\". The generated codes will be under \"simple_test_bindings\".\n\n### Expected output\n\nUpon running the test you might see some warnings but should not see any errors.\n\nThe test will create a directory named simple_test_bindings that contains 3 files\n\n* A .hpp header file for the bindings class\n* A .cpp file implementing the bindings class\n* A .js file that documents how to call (from JavaScript) the methods the C++ class exposes\n\n# The `.ini` file\n\nThe `.ini` file is a simple text file specifying the settings for the code generator. Here's the\ndefault one, used for cocos2d-x\n\n    [cocos2d-x]\n    prefix = cocos2dx\n    events  = CCNode#onEnter CCNode#onExit\n    extra_arguments = -I../../cocos2dx/include -I../../cocos2dx/platform -I../../cocos2dx/platform/ios -I../../cocos2dx -I../../cocos2dx/kazmath/include -arch i386 -DTARGET_OS_IPHONE -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk -x c++\n    headers = ../../cocos2dx/include/cocos2d.h\n    classes = CCSprite\n    functions = my_free_function\n\n## Required sections\n\n* prefix: the prefix for the project. Must be a valid identifier for the language of the target vm.\n  Most of the time, the name will be intermixed between the class name and the function name, since\n  all generated (probably) will be free functions, we do that in order to avoid name collition. The\n  script will generate ${prefix}.cpp and ${prefix}.hpp as a result.\n* events: a list of identifiers in the form of ClassName#functionName that are events to be called\n  from the native world to the target vm.\n* extra_arguments: extra arguments to pass to the clang interface. Basically you can think of this\n  as the arguments to pass to the \"compiler\", so add as many as you need here. If you're targetting\n  C++, make sure you add \"-x c++\" as the last argument to force C++ mode on a \".h\" file. Otherwise,\n  name your header files as \".hpp\".\n* headers: list of headers to parse. Usually you add a single header that in turn `#include`s the\n  rest of the files.\n* classes: the classes that will be parsed. Right not is just a string, but it will accept regular\n  expressions\n* functions: space-separated list of free functions to be binded. Same as with classes, it will\n  support regular expressions.\n* skip: a space-separated list of `Classes::functions` or just `functions` to not generate any code.\n\n# The templates\n\nThe generator is using [Cheetah templates](http://www.cheetahtemplate.org/) to create a more\nflexible generator. The way it was thought, is that for every target environment, you should provide\nwith a way to generate the same C/C++ functionality. Every template has access to the proper meta\ninformation for the code or generator (function, classes, etc.)\n\nRight now it's separated in the following set of templates:\n\n* prelude.c/.h: The header of the generated files.\n* ifunction.c/.h: The template for an instance function\n* ifunction_overloaded.c: The template for the implementation of an overloaded function. An\n  overloaded function is exactly the same as a function, but it has an array of functions sharing\n  the same name. The current implementation for spidermonkey only works if the overloading is with\n  different number of arguments.\n* sfunction.c/.h: The template for a static function\n* sfunction_overloaded.c: The template for an overloaded static function\n* register.c: Here you should add the constructor/finalizer, the registration function (if needed)\n  and the footer of the header file. This is the last chunk being generated\n\nTemplates are stored in the `templates/${target}` directory and follow the naming specified above.\n\nOne final part of the puzzle is the `${target}.yaml` file, that contains specific type conversion\nsnippets to be used by the templates. For instance, for spidermonkey, this is the place where we\nspecify the conversion routines for the native types (to and from int, float, string, etc.)\n\n# Limitations\n\nCurrently the generator is leveraging clang in order to get information about the C/C++ code, so we\ncan only get as much information as clang give us. Known list of things that won't work:\n\n* variable number of arguments. Solution: write a manual wrapper\n","editor/assets/tools/parsed-effect-info.json":"{\"list\":[{\"args\":[\"vec3 color\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\color\\\\aces.chunk\",\"line\":2,\"name\":\"ACESToneMap\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"vec4 shadowPos\",\"vec3 worldNormal\",\"float normalBias\",\"vec3 matViewDir0\",\"vec3 matViewDir1\",\"vec3 matViewDir2\",\"vec2 projScaleXY\"],\"column\":7,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":52,\"name\":\"ApplyShadowDepthBias_FaceNormal\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[\"vec4 shadowPos\",\"vec3 worldNormal\",\"float normalBias\",\"mat4 matLightView\",\"vec2 projScaleXY\"],\"column\":7,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":64,\"name\":\"ApplyShadowDepthBias_FaceNormal\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[\"vec4 shadowPos\",\"float viewspaceDepthBias\",\"float projScaleZ\",\"float projBiasZ\"],\"column\":7,\"comment\":\" (projScaleZ, projBiasZ) = cc_shadowProjDepthInfo.xy\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":110,\"name\":\"ApplyShadowDepthBias_Orthographic\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[\"vec4 shadowPos\",\"float viewspaceDepthBias\"],\"column\":7,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":85,\"name\":\"ApplyShadowDepthBias_Perspective\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[\"vec4 shadowPos\",\"float viewspaceDepthBias\",\"vec3 worldPos\"],\"column\":7,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":127,\"name\":\"ApplyShadowDepthBias_PerspectiveLinearDepth\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[\"float baseColor\",\"float detailedColor\"],\"column\":6,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\effect\\\\special-effects.chunk\",\"line\":21,\"name\":\"BlendDetailedColorMap\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec3 baseColor\",\"vec3 detailedColor\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\effect\\\\special-effects.chunk\",\"line\":36,\"name\":\"BlendDetailedColorMap\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"vec3 baseNormalFromMap\",\"vec3 detailedNormalFromMap\",\"float detailedIntensity\"],\"column\":5,\"comment\":\" NormalFromMap is: texture(normalmap) - 0.5\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\effect\\\\special-effects.chunk\",\"line\":15,\"name\":\"BlendDetailedNormalMap\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"out vec4 csmPos\",\"out vec4 csmPosWithBias\",\"vec3 worldPos\",\"vec3 N\",\"vec2 shadowBias\"],\"column\":10,\"comment\":\" output csmPos is non-biased position that can be used for sampling shadow map after homogeneous divid\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":347,\"name\":\"CCCSMFactorBase\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"out vec4 csmPos\",\"out vec4 csmPosWithBias\",\"vec3 worldPos\",\"vec3 N\",\"vec2 shadowBias\"],\"column\":10,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":416,\"name\":\"CCCSMFactorBase\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec3 worldPos\",\"vec3 N\",\"vec2 shadowBias\"],\"column\":8,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":428,\"name\":\"CCCSMFactorBase\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"out vec4 csmPos\",\"out vec4 shadowProjDepthInfo\",\"out vec4 shadowProjInfo\",\"out vec3 shadowViewDir0\",\"out vec3 shadowViewDir1\",\"out vec3 shadowViewDir2\",\"vec3 worldPos\",\"int level\"],\"column\":9,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":294,\"name\":\"CCGetCSMLevel\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[\"out bool isTransitionArea\",\"out highp float transitionRatio\",\"out vec4 csmPos\",\"out vec4 shadowProjDepthInfo\",\"out vec4 shadowProjInfo\",\"out vec3 shadowViewDir0\",\"out vec3 shadowViewDir1\",\"out vec3 shadowViewDir2\",\"vec3 worldPos\"],\"column\":8,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":313,\"name\":\"CCGetCSMLevel\",\"type\":\"int\",\"usage\":\"function\"},{\"args\":[\"out vec4 csmPos\",\"out vec4 shadowProjDepthInfo\",\"out vec4 shadowProjInfo\",\"out vec3 shadowViewDir0\",\"out vec3 shadowViewDir1\",\"out vec3 shadowViewDir2\",\"vec3 worldPos\"],\"column\":8,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":339,\"name\":\"CCGetCSMLevel\",\"type\":\"int\",\"usage\":\"function\"},{\"args\":[\"out vec4 csmPos\",\"out vec4 shadowProjDepthInfo\",\"out vec4 shadowProjInfo\",\"out vec3 shadowViewDir0\",\"out vec3 shadowViewDir1\",\"out vec3 shadowViewDir2\",\"vec3 worldPos\"],\"column\":8,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":412,\"name\":\"CCGetCSMLevel\",\"type\":\"int\",\"usage\":\"function\"},{\"args\":[\"out highp float ratio\",\"vec3 clipPos\"],\"column\":9,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":253,\"name\":\"CCGetCSMLevelWithTransition\",\"type\":\"bool\",\"usage\":\"function\"},{\"args\":[\"vec4 shadowPosWithDepthBias\"],\"column\":8,\"comment\":\"////////////////////////////////////////////////////////Directional Light Shadow\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":136,\"name\":\"CCGetDirLightShadowFactorHard\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec4 shadowPosWithDepthBias\"],\"column\":8,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":144,\"name\":\"CCGetDirLightShadowFactorSoft\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec4 shadowPosWithDepthBias\"],\"column\":8,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":152,\"name\":\"CCGetDirLightShadowFactorSoft3X\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec4 shadowPosWithDepthBias\"],\"column\":8,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":160,\"name\":\"CCGetDirLightShadowFactorSoft5X\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec3 worldPos\",\"float viewSpaceBias\"],\"column\":6,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":21,\"name\":\"CCGetLinearDepth\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec3 worldPos\"],\"column\":6,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":27,\"name\":\"CCGetLinearDepth\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec4 shadowPosWithDepthBias\",\"vec3 worldPos\"],\"column\":8,\"comment\":\"////////////////////////////////////////////////////////Spot Light Shadow\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":170,\"name\":\"CCGetSpotLightShadowFactorHard\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec4 shadowPosWithDepthBias\",\"vec3 worldPos\"],\"column\":8,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":178,\"name\":\"CCGetSpotLightShadowFactorSoft\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec4 shadowPosWithDepthBias\",\"vec3 worldPos\"],\"column\":8,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":186,\"name\":\"CCGetSpotLightShadowFactorSoft3X\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec4 shadowPosWithDepthBias\",\"vec3 worldPos\"],\"column\":8,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":194,\"name\":\"CCGetSpotLightShadowFactorSoft5X\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"out mat4 matWorld\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\world-transform.chunk\",\"line\":3,\"name\":\"CCGetWorldMatrix\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[\"out mat4 matWorld\",\"out mat4 matWorldIT\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\world-transform.chunk\",\"line\":17,\"name\":\"CCGetWorldMatrixFull\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[\"int level\",\"vec3 worldPos\"],\"column\":9,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":277,\"name\":\"CCHasCSMLevel\",\"type\":\"bool\",\"usage\":\"function\"},{\"args\":[\"out vec4 shadowPosWithDepthBias\",\"vec4 shadowPos\",\"vec3 N\",\"vec2 shadowBias\"],\"column\":8,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":229,\"name\":\"CCShadowFactorBase\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec4 shadowPos\",\"vec3 N\",\"vec2 shadowBias\"],\"column\":8,\"comment\":\" compatible version\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":423,\"name\":\"CCShadowFactorBase\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"out vec4 shadowPosWithDepthBias\",\"vec4 shadowPos\",\"vec3 worldPos\",\"vec2 shadowBias\"],\"column\":8,\"comment\":\"////////////////////////////////////////////////////////Main Functions\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":204,\"name\":\"CCSpotShadowFactorBase\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec4 shadowPos\",\"vec3 worldPos\",\"vec2 shadowBias\"],\"column\":8,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":433,\"name\":\"CCSpotShadowFactorBase\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"inout vec4 color\",\"float factor\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\fog.chunk\",\"line\":29,\"name\":\"CC_APPLY_FOG_BASE\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[\"uv\"],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":47,\"name\":\"CC_HANDLE_GET_CLIP_FLIP\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"uv\"],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":46,\"name\":\"CC_HANDLE_RT_SAMPLE_FLIP\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":98,\"name\":\"CC_SURFACES_ENABLE_DEBUG_VIEW\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":39,\"name\":\"CC_SURFACES_FLIP_UV\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":87,\"name\":\"CC_SURFACES_LIGHTING_2ND_LAYER_SPECULAR\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":48,\"name\":\"CC_SURFACES_LIGHTING_ANISOTROPIC\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":51,\"name\":\"CC_SURFACES_LIGHTING_ANISOTROPIC_ENVCONVOLUTION_COUNT\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":75,\"name\":\"CC_SURFACES_LIGHTING_CLEAR_COAT\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":72,\"name\":\"CC_SURFACES_LIGHTING_DUAL_LOBE_SPECULAR\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":81,\"name\":\"CC_SURFACES_LIGHTING_SSS\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":63,\"name\":\"CC_SURFACES_LIGHTING_TRANSMIT_DIFFUSE\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":60,\"name\":\"CC_SURFACES_LIGHTING_TRANSMIT_SPECULAR\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":69,\"name\":\"CC_SURFACES_LIGHTING_TRT\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":78,\"name\":\"CC_SURFACES_LIGHTING_TT\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":57,\"name\":\"CC_SURFACES_LIGHTING_USE_FRESNEL\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":66,\"name\":\"CC_SURFACES_LIGHTING_USE_SHADOWMAP_TRANSMIT\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":25,\"name\":\"CC_SURFACES_TRANSFER_CLIP_POS\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":22,\"name\":\"CC_SURFACES_TRANSFER_LOCAL_POS\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":54,\"name\":\"CC_SURFACES_USE_LEGACY_COMPATIBLE_LIGHTING\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":31,\"name\":\"CC_SURFACES_USE_LIGHT_MAP\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":45,\"name\":\"CC_SURFACES_USE_REFLECTION_DENOISE\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":13,\"name\":\"CC_SURFACES_USE_SECOND_UV\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":16,\"name\":\"CC_SURFACES_USE_TANGENT_SPACE\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":42,\"name\":\"CC_SURFACES_USE_TWO_SIDED\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":19,\"name\":\"CC_SURFACES_USE_VERTEX_COLOR\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\shading-entries\\\\data-structures\\\\vs-output.chunk\",\"line\":2,\"name\":\"CC_SURFACES_VARING_MODIFIER\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\shading-entries\\\\data-structures\\\\fs-input.chunk\",\"line\":2,\"name\":\"CC_SURFACES_VARING_MODIFIER\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"vec4 pos\",\"out float factor\"],\"column\":5,\"comment\":\" Fog helper functions\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\fog.chunk\",\"line\":14,\"name\":\"CC_TRANSFER_FOG_BASE\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[\"vec3 spotLightDir\",\"vec3 L\",\"float cosAngleOuter\"],\"column\":6,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\attenuation.chunk\",\"line\":42,\"name\":\"CalculateAngleAttenuation\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec3 normal\",\"vec3 tangent\",\"float mirrorNormal\"],\"column\":5,\"comment\":\" for right-hand coordinates, params must be normalized\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\math\\\\coordinates.chunk\",\"line\":60,\"name\":\"CalculateBinormal\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"vec3 R\",\"vec3 worldPos\",\"vec3 cubeCenterPos\",\"vec3 cubeBoxHalfSize\"],\"column\":5,\"comment\":\" fix cubemap direction with box projection\\r\\n return unnormalized vector and weight for exceeding\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\functions.chunk\",\"line\":72,\"name\":\"CalculateBoxProjectedDirection\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[\"float distToLightSqr\",\"float lightRadius\",\"float lightRange\"],\"column\":6,\"comment\":\" advanced\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\attenuation.chunk\",\"line\":31,\"name\":\"CalculateDistanceAttenuation\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"float ior\",\"float NoVSat\"],\"column\":6,\"comment\":\" saturated N dot V\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\bxdf.chunk\",\"line\":3,\"name\":\"CalculateFresnelCoefficient\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec3 tangent\",\"vec3 binormal\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\math\\\\coordinates.chunk\",\"line\":68,\"name\":\"CalculateNormal\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"vec3 normalFromTangentSpace\",\"float normalStrength\",\"vec3 normal\",\"vec3 tangent\",\"float mirrorNormal\"],\"column\":5,\"comment\":\" param1 is normal from normalmap\\r\\n return value is un-normalized\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\math\\\\coordinates.chunk\",\"line\":76,\"name\":\"CalculateNormalFromTangentSpace\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"vec3 N\",\"vec3 V\",\"vec3 worldPos\",\"vec4 plane\",\"vec3 cameraPos\",\"float probeReflectedDepth\"],\"column\":5,\"comment\":\" for bumped planar reflection\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\functions.chunk\",\"line\":44,\"name\":\"CalculatePlanarReflectPositionOnPlane\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"vec3 N\",\"vec3 V\",\"float NoV\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\functions.chunk\",\"line\":35,\"name\":\"CalculateReflectDirection\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"vec3 N\",\"vec3 V\",\"float NoV\",\"float ior\"],\"column\":5,\"comment\":\" return unnormalized vector, support oppo-side\\r\\n V from pixel to camera\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\functions.chunk\",\"line\":5,\"name\":\"CalculateRefractDirection\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"vec3 N\",\"vec3 V\",\"float NoV\",\"float ior\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\functions.chunk\",\"line\":23,\"name\":\"CalculateRefractDirectionFast\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"vec3 unscatteredColor\",\"float distance\",\"float outScatterExtinctCoef\",\"float inScatterExtinctCoef\",\"float inScatterCoef\",\"vec3 inScatterColor\",\"vec3 outScatterColor\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\bxdf.chunk\",\"line\":16,\"name\":\"CalculateScattering\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"vec3 normal\",\"vec3 binormal\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\math\\\\coordinates.chunk\",\"line\":64,\"name\":\"CalculateTangent\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"out vec2 deltaV\",\"float frameCount\",\"float animSpeed\",\"float elapseTime\"],\"column\":6,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\mesh\\\\vat-animation.chunk\",\"line\":29,\"name\":\"CalculateVATAnimationUV\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"float A\",\"float B\"],\"column\":6,\"comment\":\" Experimental\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\mesh\\\\vat-animation.chunk\",\"line\":168,\"name\":\"CalculateVATDecodeUV\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"inout vec3 L[5\",\", out int n\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\rect-area-light.chunk\",\"line\":12,\"name\":\"ClipQuadToHorizon\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[\"type\"],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\data\\\\packing.chunk\",\"line\":19,\"name\":\"DEFINE_PACK_HIGHP_FUNC\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"float roughness\",\"float NoH\"],\"column\":6,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\brdf.chunk\",\"line\":3,\"name\":\"D_GGX\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"float RoughnessX\",\"float RoughnessY\",\"float NoH\",\"vec3 H\",\"vec3 X\",\"vec3 Y\"],\"column\":6,\"comment\":\" How to get an anisotropic offset along T/B:\\r\\n 1. accurate: rotation TBN basis, let N intend to T/B, such as flow map as normalmap, output vec3(0, delta, 1) instead of vec3(0, 0, 1)\\r\\n 2. not accurate: H intend to V, and passed to this function\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\brdf.chunk\",\"line\":35,\"name\":\"D_GGXAniso\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"float roughness\",\"float NoH\"],\"column\":6,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\brdf.chunk\",\"line\":11,\"name\":\"D_GGXMobile\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec3 color\",\"float fraction\"],\"column\":5,\"comment\":\" fraction is saturation percentage, 0 means gray\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\graph-expression\\\\base.chunk\",\"line\":5,\"name\":\"Desaturation\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"vec4 clipPos\",\"vec2 screen_resolution\",\"float transparency\"],\"column\":5,\"comment\":\" dithered transparency (dithered alpha test), better looking with TAA\\r\\n arguments: FSInput_clipPos, cc_viewPort.zw, baseColor.a\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\effect\\\\special-effects.chunk\",\"line\":4,\"name\":\"DitheredAlphaClip\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":18,\"name\":\"EPSILON\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":19,\"name\":\"EPSILON_LOWP\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":21,\"name\":\"EXP_VALUE\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"samplerCube tex\",\"vec3 R\",\"float roughness\",\"float mipCount\"],\"column\":7,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\texture\\\\cubemap.chunk\",\"line\":33,\"name\":\"EnvReflection\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"vec3 R\",\"float roughness\",\"float mipCount\",\"float denoiseIntensity\"],\"column\":7,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\texture\\\\cubemap.chunk\",\"line\":3,\"name\":\"EnvReflectionWithMipFiltering\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"vec4 pos\",\"vec3 cameraPos\",\"float fogStart\",\"float fogDensity\",\"float fogAtten\"],\"column\":6,\"comment\":\"pos, cc_cameraPos.xyz, cc_fogBase.x, cc_fogBase.z, cc_fogAdd.z\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\effect\\\\fog.chunk\",\"line\":11,\"name\":\"ExpFog\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec4 pos\",\"vec3 cameraPos\",\"float fogStart\",\"float fogDensity\",\"float fogAtten\"],\"column\":6,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\effect\\\\fog.chunk\",\"line\":18,\"name\":\"ExpSquaredFog\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":22,\"name\":\"FP_MAX\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":23,\"name\":\"FP_SCALE\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":24,\"name\":\"FP_SCALE_INV\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\shading-entries\\\\data-structures\\\\fs-input.chunk\",\"line\":58,\"name\":\"FSInput_clipPos\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\shading-entries\\\\data-structures\\\\fs-input.chunk\",\"line\":15,\"name\":\"FSInput_faceSideSign\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\shading-entries\\\\data-structures\\\\fs-input.chunk\",\"line\":50,\"name\":\"FSInput_fogFactor\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\shading-entries\\\\data-structures\\\\fs-input.chunk\",\"line\":39,\"name\":\"FSInput_lightMapUV\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\shading-entries\\\\data-structures\\\\fs-input.chunk\",\"line\":54,\"name\":\"FSInput_localPos\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\shading-entries\\\\data-structures\\\\fs-input.chunk\",\"line\":26,\"name\":\"FSInput_mirrorNormal\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\shading-entries\\\\data-structures\\\\fs-input.chunk\",\"line\":46,\"name\":\"FSInput_reflectionProbeId\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\shading-entries\\\\data-structures\\\\fs-input.chunk\",\"line\":43,\"name\":\"FSInput_shadowBias\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\shading-entries\\\\data-structures\\\\fs-input.chunk\",\"line\":16,\"name\":\"FSInput_texcoord\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\shading-entries\\\\data-structures\\\\fs-input.chunk\",\"line\":33,\"name\":\"FSInput_texcoord1\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\shading-entries\\\\data-structures\\\\fs-input.chunk\",\"line\":19,\"name\":\"FSInput_vertexColor\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\shading-entries\\\\data-structures\\\\fs-input.chunk\",\"line\":14,\"name\":\"FSInput_worldNormal\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\shading-entries\\\\data-structures\\\\fs-input.chunk\",\"line\":13,\"name\":\"FSInput_worldPos\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\shading-entries\\\\data-structures\\\\fs-input.chunk\",\"line\":25,\"name\":\"FSInput_worldTangent\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":25,\"name\":\"GRAY_VECTOR\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"vec3 L\",\"vec3 litDir\",\"float litAngleScale\",\"float litAngleOffset\"],\"column\":6,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\attenuation.chunk\",\"line\":22,\"name\":\"GetAngleAtt\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"float roughness\",\"float anisotropyShape\",\"vec3 V\",\"vec3 N\",\"vec3 X\",\"vec3 Y\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\brdf.chunk\",\"line\":45,\"name\":\"GetAnisotropicReflect\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"float roughness\",\"float anisotropyShape\",\"out float roughnessX\",\"out float roughnessY\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\brdf.chunk\",\"line\":19,\"name\":\"GetAnisotropicRoughness\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[\"float depthHS\",\"mat4 matProj\"],\"column\":6,\"comment\":\" depthHS (Z) = ndc depth(-1 ~ +1)\\r\\n return camera depth (W), negative in RH\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\math\\\\coordinates.chunk\",\"line\":32,\"name\":\"GetCameraDepthRH\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"float depthHS\",\"float matProj32\",\"float matProj22\"],\"column\":6,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\math\\\\coordinates.chunk\",\"line\":36,\"name\":\"GetCameraDepthRH\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"out vec3 centerPos\",\"out vec3 boxHalfSize\",\"out float mipCount\",\"float probeId\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\probe.chunk\",\"line\":29,\"name\":\"GetCubeReflectionProbeData\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[\"float distSqr\",\"float invSqrAttRadius\"],\"column\":6,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\attenuation.chunk\",\"line\":16,\"name\":\"GetDistAtt\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"out vec3 lightmapColor\",\"out float dirShadow\",\"out float ao\",\"sampler2D lightingMap\",\"vec2 luv\",\"float lum\",\"vec3 worldNormal\"],\"column\":5,\"comment\":\" for surface shader\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\light-map.chunk\",\"line\":23,\"name\":\"GetLightMapColor\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[\"vec3 viewPos\",\"float near\",\"float far\"],\"column\":6,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\math\\\\coordinates.chunk\",\"line\":54,\"name\":\"GetLinearDepthFromViewSpace\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"out float metallic\",\"out vec3 albedo\",\"vec3 diffuse\",\"vec3 specular\",\"float channelFaultTolerant\",\"float f0\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\mesh\\\\material.chunk\",\"line\":1,\"name\":\"GetMetallicAlbedoFromDiffuseSpecularMathematic\",\"type\":\"bool\",\"usage\":\"function\"},{\"args\":[\"out float metallic\",\"out vec3 albedo\",\"vec3 diffuse\",\"vec3 specular\",\"float f0\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\mesh\\\\material.chunk\",\"line\":29,\"name\":\"GetMetallicAlbedoFromDiffuseSpecularWithoutColor\",\"type\":\"bool\",\"usage\":\"function\"},{\"args\":[\"vec3 worldPos\",\"mat4 matVirtualCameraViewProj\",\"float flipNDCSign\",\"vec3 viewDir\",\"vec3 reflectDir\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\math\\\\coordinates.chunk\",\"line\":21,\"name\":\"GetPlanarReflectScreenUV\",\"type\":\"vec2\",\"usage\":\"function\"},{\"args\":[\"out vec4 plane\",\"out float planarReflectionDepthScale\",\"out float mipCount\",\"float probeId\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\probe.chunk\",\"line\":11,\"name\":\"GetPlanarReflectionProbeData\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[\"vec4 clipPos\",\"float flipNDCSign\"],\"column\":5,\"comment\":\" return 0-1\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\math\\\\coordinates.chunk\",\"line\":7,\"name\":\"GetScreenUV\",\"type\":\"vec2\",\"usage\":\"function\"},{\"args\":[\"vec3 worldPos\",\"mat4 matViewProj\",\"float flipNDCSign\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\math\\\\coordinates.chunk\",\"line\":15,\"name\":\"GetScreenUV\",\"type\":\"vec2\",\"usage\":\"function\"},{\"args\":[\"out vec3 shadowNDCPos\",\"vec4 shadowPosWithDepthBias\"],\"column\":7,\"comment\":\"////////////////////////////////////////////////////////Helper Functions\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":40,\"name\":\"GetShadowNDCPos\",\"type\":\"bool\",\"usage\":\"function\"},{\"args\":[\"sampler2D dataMap\",\"float dataMapWidth\",\"float x\",\"float uv_y\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\probe.chunk\",\"line\":2,\"name\":\"GetTexData\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[\"vec3 posHS\",\"mat4 matProj\",\"mat4 matProjInv\"],\"column\":5,\"comment\":\" posHS = ndc pos (xyz: -1 ~ +1)\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\math\\\\coordinates.chunk\",\"line\":42,\"name\":\"GetViewPosFromNDCPosRH\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[\"float NDCDepth\",\"float projScaleZ\",\"float projBiasZ\"],\"column\":8,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":76,\"name\":\"GetViewSpaceDepthFromNDCDepth_Orthgraphic\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"float NDCDepth\",\"float homogenousDividW\",\"float invProjScaleZ\",\"float invProjBiasZ\"],\"column\":8,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":80,\"name\":\"GetViewSpaceDepthFromNDCDepth_Perspective\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec3 posHS\",\"mat4 matProj\",\"mat4 matViewProjInv\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\math\\\\coordinates.chunk\",\"line\":48,\"name\":\"GetWorldPosFromNDCPosRH\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":7,\"name\":\"HALF_PI\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"vec3 color\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\color\\\\tone-mapping.chunk\",\"line\":5,\"name\":\"HDRToLDR\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"value\",\"defined\"],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\data\\\\packing.chunk\",\"line\":53,\"name\":\"HIGHP_VALUE_FROM_STRUCT_DEFINED\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"value\",\"defined\"],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\data\\\\packing.chunk\",\"line\":70,\"name\":\"HIGHP_VALUE_FROM_STRUCT_DEFINED_SMALL_RANGE\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"type\",\"name\"],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\data\\\\packing.chunk\",\"line\":44,\"name\":\"HIGHP_VALUE_STRUCT_DEFINE\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"value\",\"defined\"],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\data\\\\packing.chunk\",\"line\":61,\"name\":\"HIGHP_VALUE_TO_STRUCT_DEFINED\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"value\",\"defined\"],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\data\\\\packing.chunk\",\"line\":78,\"name\":\"HIGHP_VALUE_TO_STRUCT_DEFINED_SMALL_RANGE\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":13,\"name\":\"INV_HALF_PI\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":14,\"name\":\"INV_PI\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":15,\"name\":\"INV_PI2\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":16,\"name\":\"INV_PI4\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":12,\"name\":\"INV_QUATER_PI\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"light_type\"],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":65,\"name\":\"IS_DIRECTIONAL_LIGHT\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"light_type\"],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":68,\"name\":\"IS_POINT_LIGHT\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"light_type\"],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":69,\"name\":\"IS_RANGED_DIRECTIONAL_LIGHT\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"light_type\"],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":66,\"name\":\"IS_SPHERE_LIGHT\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"light_type\"],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":67,\"name\":\"IS_SPOT_LIGHT\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"vec3 v1\",\"vec3 v2\"],\"column\":6,\"comment\":\" https://eheitzresearch.wordpress.com/415-2/\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\rect-area-light.chunk\",\"line\":107,\"name\":\"IntegrateEdge\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec3 specular\",\"float roughness\",\"float NoV\"],\"column\":5,\"comment\":\" EnvBRDFApprox\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\brdf.chunk\",\"line\":63,\"name\":\"IntegratedGFApprox\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":51,\"name\":\"LIGHT_MAP_TYPE_ALL_IN_ONE\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":50,\"name\":\"LIGHT_MAP_TYPE_DISABLED\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":52,\"name\":\"LIGHT_MAP_TYPE_INDIRECT_OCCLUSION\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":60,\"name\":\"LIGHT_TYPE_DIRECTIONAL\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":61,\"name\":\"LIGHT_TYPE_POINT\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":64,\"name\":\"LIGHT_TYPE_RANGED_DIRECTIONAL\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":63,\"name\":\"LIGHT_TYPE_SPHERE\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":62,\"name\":\"LIGHT_TYPE_SPOT\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":20,\"name\":\"LOG2\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"vec3 N\",\"vec3 V\",\"vec3 P\",\"mat3 Minv\",\"vec3 points[4]\"],\"column\":5,\"comment\":\" https://blog.magnum.graphics/guest-posts/area-lights-with-ltcs/\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\rect-area-light.chunk\",\"line\":114,\"name\":\"LTC_Evaluate\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"vec4 pos\",\"vec3 cameraPos\",\"float fogTop\",\"float fogRange\",\"float fogAtten\"],\"column\":6,\"comment\":\"pos, cc_cameraPos.xyz, cc_fogAdd.x, cc_fogAdd.y, cc_fogAdd.z\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\effect\\\\fog.chunk\",\"line\":26,\"name\":\"LayeredFog\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\lighting-models\\\\data-structures\\\\lighting-intermediate-data.chunk\",\"line\":3,\"name\":\"LightingIntermediateData\",\"type\":\"\",\"usage\":\"variable\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\lighting-models\\\\data-structures\\\\lighting-misc-data.chunk\",\"line\":3,\"name\":\"LightingMiscData\",\"type\":\"\",\"usage\":\"variable\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\lighting-models\\\\data-structures\\\\lighting-result.chunk\",\"line\":3,\"name\":\"LightingResult\",\"type\":\"\",\"usage\":\"variable\"},{\"args\":[\"vec4 pos\",\"vec3 cameraPos\",\"float fogStart\",\"float fogEnd\"],\"column\":6,\"comment\":\"pos, cc_cameraPos.xyz, cc_fogBase.x, cc_fogBase.y\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\effect\\\\fog.chunk\",\"line\":4,\"name\":\"LinearFog\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec3 linear\"],\"column\":5,\"comment\":\" #pragma define LinearToSRGB(linear) pow(linear, vec3(0.454545))\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\color\\\\gamma.chunk\",\"line\":19,\"name\":\"LinearToSRGB\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"v\"],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\data\\\\unpack.chunk\",\"line\":4,\"name\":\"MOD_FINT_128\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":8,\"name\":\"PI\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":9,\"name\":\"PI2\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":10,\"name\":\"PI4\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":6,\"name\":\"QUATER_PI\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":56,\"name\":\"REFLECTION_PROBE_TYPE_CUBE\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":55,\"name\":\"REFLECTION_PROBE_TYPE_NONE\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":57,\"name\":\"REFLECTION_PROBE_TYPE_PLANAR\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"inout vec3 binormal\",\"inout vec3 normal\",\"in vec3 tangent\",\"float rotationAngle\",\"float mirrorNormal\"],\"column\":5,\"comment\":\" fast rotation for anisotropic offset\\r\\n rotationAngle: -1 - +1\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\math\\\\coordinates.chunk\",\"line\":115,\"name\":\"RotateNormalAndBinormal\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[\"inout vec3 tangent\",\"inout vec3 binormal\",\"vec3 normal\",\"float rotationAngle\"],\"column\":5,\"comment\":\" rotationAngle: radians, 0-2Pi\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\math\\\\coordinates.chunk\",\"line\":99,\"name\":\"RotateTangentAndBinormal\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[\"vec3 v\",\"float cosTheta\",\"float sinTheta\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\math\\\\coordinates.chunk\",\"line\":84,\"name\":\"RotationVecFromAxisY\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"vec3 v\",\"float rotateAngleArc\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\math\\\\coordinates.chunk\",\"line\":93,\"name\":\"RotationVecFromAxisY\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"vec2 uv\",\"vec2 centerUV\",\"float time\",\"float speed\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\graph-expression\\\\base.chunk\",\"line\":11,\"name\":\"Rotator\",\"type\":\"vec2\",\"usage\":\"function\"},{\"args\":[\"vec3 normal\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\sh.chunk\",\"line\":4,\"name\":\"SHEvaluate\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"vec3 gamma\"],\"column\":5,\"comment\":\" #pragma define SRGBToLinear(gamma) pow(gamma, vec3(2.2))\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\color\\\\gamma.chunk\",\"line\":6,\"name\":\"SRGBToLinear\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"v\"],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\data\\\\unpack.chunk\",\"line\":3,\"name\":\"STEP_FINT_128\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":76,\"name\":\"SURFACES_MAX_TRANSMIT_DEPTH_VALUE\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"out vec3 lightmapColor\",\"out float dirShadow\",\"out float ao\",\"sampler2D lightingMap\",\"vec2 luv\",\"float lum\",\"vec3 worldNormal\"],\"column\":5,\"comment\":\" for legacy effects\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\light-map.chunk\",\"line\":2,\"name\":\"SampleAndDecodeLightMapColor\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[\"sampler2D exrRGBE\",\"vec2 uv\"],\"column\":5,\"comment\":\" for exr data texture and sub resources\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\texture\\\\texture-misc.chunk\",\"line\":3,\"name\":\"SampleTextureExr\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"sampler2D exrRGBE\",\"sampler2D exrSign\",\"vec2 uv\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\texture\\\\texture-misc.chunk\",\"line\":9,\"name\":\"SampleTextureExr\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"sampler2D exrRGBE\",\"sampler2D exrSign\",\"sampler2D exrAlpha\",\"vec2 uv\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\texture\\\\texture-misc.chunk\",\"line\":16,\"name\":\"SampleTextureExrWithAlpha\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[\"float distSqr\",\"float invSqrAttRadius\"],\"column\":6,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\attenuation.chunk\",\"line\":10,\"name\":\"SmoothDistAtt\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"float distSqr\",\"float invSqrAttRadius\"],\"column\":6,\"comment\":\" base\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\attenuation.chunk\",\"line\":2,\"name\":\"SmoothDistAtt2\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec2 center\",\"vec2 point\",\"float radius\",\"float hardness\"],\"column\":6,\"comment\":\" return 0.0 when out of range\\r\\n hardness: 0 - 1\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\graph-expression\\\\base.chunk\",\"line\":36,\"name\":\"SphereMask\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec3 center\",\"vec3 point\",\"float radius\",\"float hardness\"],\"column\":6,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\graph-expression\\\\base.chunk\",\"line\":42,\"name\":\"SphereMask\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\legacy\\\\shading-standard-base.chunk\",\"line\":3,\"name\":\"StandardSurface\",\"type\":\"\",\"usage\":\"variable\"},{\"args\":[],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_ALPHA_CLIP_ONLY\\r\\n for base shape without color usage, such as render-to-shadow\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":12,\"name\":\"SurfacesFragmentAlphaClipOnly\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[\"out float isRotation\"],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_ANISOTROPY_PARAMS\\r\\n isRotation=1.0: shape(0~1), rotation(0~2PI), 0.0, 0.0\\r\\n or\\r\\n isRotation=0.0: shape(0~1), anisoDir.xyz(-1~1)\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":57,\"name\":\"SurfacesFragmentModifyAnisotropyParams\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[\"out vec4 baseColorAndTransparency\",\"out vec3 shade1\",\"out vec3 shade2\",\"in vec3 baseColor\"],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_BASECOLOR_AND_TOONSHADE\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\toon-fs.chunk\",\"line\":5,\"name\":\"SurfacesFragmentModifyBaseColorAndToonShade\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_BASECOLOR_AND_TRANSPARENCY\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":3,\"name\":\"SurfacesFragmentModifyBaseColorAndTransparency\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[\"float roughness\"],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_DUAL_LOBE_SPECULAR_PARAMS\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":169,\"name\":\"SurfacesFragmentModifyDualLobeSpecularParams\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_EMISSIVE\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":66,\"name\":\"SurfacesFragmentModifyEmissive\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[],\"column\":6,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_IOR\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":46,\"name\":\"SurfacesFragmentModifyIOR\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_PBRPARAMS\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":74,\"name\":\"SurfacesFragmentModifyPBRParams\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_SSS_PARAMS\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":179,\"name\":\"SurfacesFragmentModifySSSParams\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[\"inout SurfacesMaterialData surfaceData\"],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_SHARED_DATA\\r\\n some material datas use shared raw data, avoid sample / calculate same raw data multiply times, use this function for better performance\\r\\n this function invokes at last\\r\\n should use corresponding shading-model header: #include <surfaces/data-structures/XXX> before function define\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":194,\"name\":\"SurfacesFragmentModifySharedData\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_TRT_COLOR\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":142,\"name\":\"SurfacesFragmentModifyTRTColor\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_TRT_PARAMS\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":131,\"name\":\"SurfacesFragmentModifyTRTParams\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[\"in vec3 baseColor\"],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_TT_COLOR\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":160,\"name\":\"SurfacesFragmentModifyTTColor\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_TT_PARAMS\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":150,\"name\":\"SurfacesFragmentModifyTTParams\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[],\"column\":6,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_TOON_SHADOW_COVER\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\toon-fs.chunk\",\"line\":22,\"name\":\"SurfacesFragmentModifyToonShadowCover\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_TOON_SPECULAR\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\toon-fs.chunk\",\"line\":30,\"name\":\"SurfacesFragmentModifyToonSpecular\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_TOON_STEP_AND_FEATHER\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\toon-fs.chunk\",\"line\":14,\"name\":\"SurfacesFragmentModifyToonStepAndFeather\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_TRANSMIT_DIFFUSE_PARAMS\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":115,\"name\":\"SurfacesFragmentModifyTransmitDiffuseParams\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_TRANSMIT_IN_SCATTERING_COLOR\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":98,\"name\":\"SurfacesFragmentModifyTransmitInScatteringColor\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_TRANSMIT_OUT_SCATTERING_COLOR\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":106,\"name\":\"SurfacesFragmentModifyTransmitOutScatteringColor\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_TRANSMIT_SCATTERING_PARAMS\\r\\n scattering related parameters and colors\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":84,\"name\":\"SurfacesFragmentModifyTransmitScatteringParams\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_WORLD_NORMAL\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":20,\"name\":\"SurfacesFragmentModifyWorldNormal\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"inout vec3 worldTangent\",\"inout vec3 worldBinormal\",\"vec3 worldNormal\"],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_WORLD_TANGENT_AND_BINORMAL\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":28,\"name\":\"SurfacesFragmentModifyWorldTangentAndBinormal\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[\"inout LightingResult result\",\"in LightingIntermediateData lightingData\",\"in SurfacesMaterialData surfaceData\",\"in LightingMiscData miscData\"],\"column\":7,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\lighting-models\\\\default-functions\\\\simple-skin.chunk\",\"line\":9,\"name\":\"SurfacesLightingModifyFinalResult\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\data-structures\\\\standard.chunk\",\"line\":3,\"name\":\"SurfacesMaterialData\",\"type\":\"\",\"usage\":\"variable\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\shading-entries\\\\data-structures\\\\vs-intermediate.chunk\",\"line\":3,\"name\":\"SurfacesStandardVertexIntermediate\",\"type\":\"\",\"usage\":\"variable\"},{\"args\":[\"in SurfacesStandardVertexIntermediate In\"","native/tools/gfx-define-generator/package.json":"{\n  \"name\": \"gfx-define-generator\",\n  \"version\": \"1.0.0\",\n  \"description\": \"GFX layer definition generator\",\n  \"main\": \"generate.js\",\n  \"scripts\": {\n    \"test\": \"echo \\\"Error: no test specified\\\" && exit 1\"\n  },\n  \"author\": \"YunHsiao\",\n  \"license\": \"MIT\",\n  \"dependencies\": {\n    \"js-yaml\": \"^4.0.0\"\n  }\n}\n","native/tools/gfx-define-generator/package-lock.json":"{\n  \"name\": \"gfx-define-generator\",\n  \"version\": \"1.0.0\",\n  \"lockfileVersion\": 3,\n  \"requires\": true,\n  \"packages\": {\n    \"\": {\n      \"name\": \"gfx-define-generator\",\n      \"version\": \"1.0.0\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"js-yaml\": \"^4.0.0\"\n      }\n    },\n    \"node_modules/argparse\": {\n      \"version\": \"2.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz\",\n      \"integrity\": \"sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==\"\n    },\n    \"node_modules/js-yaml\": {\n      \"version\": \"4.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/js-yaml/-/js-yaml-4.0.0.tgz\",\n      \"integrity\": \"sha512-pqon0s+4ScYUvX30wxQi3PogGFAlUyH0awepWvwkj4jD4v+ova3RiYw8bmA6x2rDrEaj8i/oWKoRxpVNW+Re8Q==\",\n      \"dependencies\": {\n        \"argparse\": \"^2.0.1\"\n      },\n      \"bin\": {\n        \"js-yaml\": \"bin/js-yaml.js\"\n      }\n    }\n  }\n}\n","native/tools/gles-wrangler-generator/package.json":"{\n  \"name\": \"gles-wrangler-generator\",\n  \"version\": \"1.0.0\",\n  \"description\": \"EGL/GLES loader code generator\",\n  \"main\": \"generate.js\",\n  \"scripts\": {\n    \"test\": \"echo \\\"Error: no test specified\\\" && exit 1\"\n  },\n  \"author\": \"YunHsiao\",\n  \"license\": \"MIT\",\n  \"dependencies\": {\n    \"axios\": \"^1.8.2\",\n    \"fast-xml-parser\": \"^3.17.6\"\n  }\n}\n","native/tools/gles-wrangler-generator/package-lock.json":"{\n  \"name\": \"gles-wrangler-generator\",\n  \"version\": \"1.0.0\",\n  \"lockfileVersion\": 3,\n  \"requires\": true,\n  \"packages\": {\n    \"\": {\n      \"version\": \"1.0.0\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"axios\": \"^1.8.2\",\n        \"fast-xml-parser\": \"^3.17.6\"\n      }\n    },\n    \"node_modules/asynckit\": {\n      \"version\": \"0.4.0\",\n      \"resolved\": \"https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz\",\n      \"integrity\": \"sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==\",\n      \"license\": \"MIT\"\n    },\n    \"node_modules/axios\": {\n      \"version\": \"1.8.2\",\n      \"resolved\": \"https://registry.npmjs.org/axios/-/axios-1.8.2.tgz\",\n      \"integrity\": \"sha512-ls4GYBm5aig9vWx8AWDSGLpnpDQRtWAfrjU+EuytuODrFBkqesN2RkOQCBzrA1RQNHw1SmRMSDDDSwzNAYQ6Rg==\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"follow-redirects\": \"^1.15.6\",\n        \"form-data\": \"^4.0.0\",\n        \"proxy-from-env\": \"^1.1.0\"\n      }\n    },\n    \"node_modules/call-bind-apply-helpers\": {\n      \"version\": \"1.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz\",\n      \"integrity\": \"sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"es-errors\": \"^1.3.0\",\n        \"function-bind\": \"^1.1.2\"\n      },\n      \"engines\": {\n        \"node\": \">= 0.4\"\n      }\n    },\n    \"node_modules/combined-stream\": {\n      \"version\": \"1.0.8\",\n      \"resolved\": \"https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz\",\n      \"integrity\": \"sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"delayed-stream\": \"~1.0.0\"\n      },\n      \"engines\": {\n        \"node\": \">= 0.8\"\n      }\n    },\n    \"node_modules/delayed-stream\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz\",\n      \"integrity\": \"sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==\",\n      \"license\": \"MIT\",\n      \"engines\": {\n        \"node\": \">=0.4.0\"\n      }\n    },\n    \"node_modules/dunder-proto\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz\",\n      \"integrity\": \"sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"call-bind-apply-helpers\": \"^1.0.1\",\n        \"es-errors\": \"^1.3.0\",\n        \"gopd\": \"^1.2.0\"\n      },\n      \"engines\": {\n        \"node\": \">= 0.4\"\n      }\n    },\n    \"node_modules/es-define-property\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz\",\n      \"integrity\": \"sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==\",\n      \"license\": \"MIT\",\n      \"engines\": {\n        \"node\": \">= 0.4\"\n      }\n    },\n    \"node_modules/es-errors\": {\n      \"version\": \"1.3.0\",\n      \"resolved\": \"https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz\",\n      \"integrity\": \"sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==\",\n      \"license\": \"MIT\",\n      \"engines\": {\n        \"node\": \">= 0.4\"\n      }\n    },\n    \"node_modules/es-object-atoms\": {\n      \"version\": \"1.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz\",\n      \"integrity\": \"sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"es-errors\": \"^1.3.0\"\n      },\n      \"engines\": {\n        \"node\": \">= 0.4\"\n      }\n    },\n    \"node_modules/es-set-tostringtag\": {\n      \"version\": \"2.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz\",\n      \"integrity\": \"sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"es-errors\": \"^1.3.0\",\n        \"get-intrinsic\": \"^1.2.6\",\n        \"has-tostringtag\": \"^1.0.2\",\n        \"hasown\": \"^2.0.2\"\n      },\n      \"engines\": {\n        \"node\": \">= 0.4\"\n      }\n    },\n    \"node_modules/fast-xml-parser\": {\n      \"version\": \"3.17.6\",\n      \"resolved\": \"https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-3.17.6.tgz\",\n      \"integrity\": \"sha512-40WHI/5d2MOzf1sD2bSaTXlPn1lueJLAX6j1xH5dSAr6tNeut8B9ktEL6sjAK9yVON4uNj9//axOdBJUuruCzw==\",\n      \"bin\": {\n        \"xml2js\": \"cli.js\"\n      },\n      \"funding\": {\n        \"type\": \"paypal\",\n        \"url\": \"https://paypal.me/naturalintelligence\"\n      }\n    },\n    \"node_modules/follow-redirects\": {\n      \"version\": \"1.15.9\",\n      \"resolved\": \"https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz\",\n      \"integrity\": \"sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==\",\n      \"funding\": [\n        {\n          \"type\": \"individual\",\n          \"url\": \"https://github.com/sponsors/RubenVerborgh\"\n        }\n      ],\n      \"license\": \"MIT\",\n      \"engines\": {\n        \"node\": \">=4.0\"\n      },\n      \"peerDependenciesMeta\": {\n        \"debug\": {\n          \"optional\": true\n        }\n      }\n    },\n    \"node_modules/form-data\": {\n      \"version\": \"4.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/form-data/-/form-data-4.0.2.tgz\",\n      \"integrity\": \"sha512-hGfm/slu0ZabnNt4oaRZ6uREyfCj6P4fT/n6A1rGV+Z0VdGXjfOhVUpkn6qVQONHGIFwmveGXyDs75+nr6FM8w==\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"asynckit\": \"^0.4.0\",\n        \"combined-stream\": \"^1.0.8\",\n        \"es-set-tostringtag\": \"^2.1.0\",\n        \"mime-types\": \"^2.1.12\"\n      },\n      \"engines\": {\n        \"node\": \">= 6\"\n      }\n    },\n    \"node_modules/function-bind\": {\n      \"version\": \"1.1.2\",\n      \"resolved\": \"https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz\",\n      \"integrity\": \"sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==\",\n      \"license\": \"MIT\",\n      \"funding\": {\n        \"url\": \"https://github.com/sponsors/ljharb\"\n      }\n    },\n    \"node_modules/get-intrinsic\": {\n      \"version\": \"1.3.0\",\n      \"resolved\": \"https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz\",\n      \"integrity\": \"sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"call-bind-apply-helpers\": \"^1.0.2\",\n        \"es-define-property\": \"^1.0.1\",\n        \"es-errors\": \"^1.3.0\",\n        \"es-object-atoms\": \"^1.1.1\",\n        \"function-bind\": \"^1.1.2\",\n        \"get-proto\": \"^1.0.1\",\n        \"gopd\": \"^1.2.0\",\n        \"has-symbols\": \"^1.1.0\",\n        \"hasown\": \"^2.0.2\",\n        \"math-intrinsics\": \"^1.1.0\"\n      },\n      \"engines\": {\n        \"node\": \">= 0.4\"\n      },\n      \"funding\": {\n        \"url\": \"https://github.com/sponsors/ljharb\"\n      }\n    },\n    \"node_modules/get-proto\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz\",\n      \"integrity\": \"sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"dunder-proto\": \"^1.0.1\",\n        \"es-object-atoms\": \"^1.0.0\"\n      },\n      \"engines\": {\n        \"node\": \">= 0.4\"\n      }\n    },\n    \"node_modules/gopd\": {\n      \"version\": \"1.2.0\",\n      \"resolved\": \"https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz\",\n      \"integrity\": \"sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==\",\n      \"license\": \"MIT\",\n      \"engines\": {\n        \"node\": \">= 0.4\"\n      },\n      \"funding\": {\n        \"url\": \"https://github.com/sponsors/ljharb\"\n      }\n    },\n    \"node_modules/has-symbols\": {\n      \"version\": \"1.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz\",\n      \"integrity\": \"sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==\",\n      \"license\": \"MIT\",\n      \"engines\": {\n        \"node\": \">= 0.4\"\n      },\n      \"funding\": {\n        \"url\": \"https://github.com/sponsors/ljharb\"\n      }\n    },\n    \"node_modules/has-tostringtag\": {\n      \"version\": \"1.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz\",\n      \"integrity\": \"sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"has-symbols\": \"^1.0.3\"\n      },\n      \"engines\": {\n        \"node\": \">= 0.4\"\n      },\n      \"funding\": {\n        \"url\": \"https://github.com/sponsors/ljharb\"\n      }\n    },\n    \"node_modules/hasown\": {\n      \"version\": \"2.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz\",\n      \"integrity\": \"sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"function-bind\": \"^1.1.2\"\n      },\n      \"engines\": {\n        \"node\": \">= 0.4\"\n      }\n    },\n    \"node_modules/math-intrinsics\": {\n      \"version\": \"1.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz\",\n      \"integrity\": \"sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==\",\n      \"license\": \"MIT\",\n      \"engines\": {\n        \"node\": \">= 0.4\"\n      }\n    },\n    \"node_modules/mime-db\": {\n      \"version\": \"1.52.0\",\n      \"resolved\": \"https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz\",\n      \"integrity\": \"sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==\",\n      \"license\": \"MIT\",\n      \"engines\": {\n        \"node\": \">= 0.6\"\n      }\n    },\n    \"node_modules/mime-types\": {\n      \"version\": \"2.1.35\",\n      \"resolved\": \"https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz\",\n      \"integrity\": \"sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"mime-db\": \"1.52.0\"\n      },\n      \"engines\": {\n        \"node\": \">= 0.6\"\n      }\n    },\n    \"node_modules/proxy-from-env\": {\n      \"version\": \"1.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz\",\n      \"integrity\": \"sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==\",\n      \"license\": \"MIT\"\n    }\n  }\n}\n","native/tools/simulator/.cocos-project.json":"{\n    \"has_native\": true,\n    \"project_type\": \"js\"\n}\n","native/tools/simulator/config.json":"{\n    \"init_cfg\":{\n        \"isLandscape\": true,\n        \"isWindowTop\": false,\n        \"waitForConnect\": false,\n        \"name\": \"Simulator\",\n        \"width\": 960,\n        \"height\": 640,\n        \"entry\": \"main.js\",\n        \"consolePort\": 6050,\n        \"uploadPort\": 6060,\n        \"debugPort\": 5086\n    },\n    \"simulator_screen_size\": [\n        {\n            \"title\": \"Apple iPhone 5 (640x1136)\",\n            \"width\": 640,\n            \"height\": 1136\n        },\n        {\n            \"title\": \"Apple iPhone 6 (750x1334)\",\n            \"width\": 750,\n            \"height\": 1334\n        },\n        {\n            \"title\": \"Apple iPhone 6Plus (1080x1920)\",\n            \"width\": 1080,\n            \"height\": 1920\n        },\n        {\n            \"title\": \"Apple iPhone 7 (750x1334)\",\n            \"width\": 750,\n            \"height\": 1334\n        },\n        {\n            \"title\": \"Apple iPhone 7Plus (1080x1920)\",\n            \"width\": 1080,\n            \"height\": 1920\n        },\n        {\n            \"title\": \"Apple iPhone X (1125x2436)\",\n            \"width\": 1125,\n            \"height\": 2436\n        },\n        {\n            \"title\": \"Apple iPad (2048x1536)\",\n            \"width\": 2048,\n            \"height\": 1536\n        },\n        {\n            \"title\": \"Apple iPad Air 2 (1536x2048)\",\n            \"width\": 1536,\n            \"height\": 2048\n        },\n        {\n            \"title\": \"Apple iPad Pro 10.5-inch (1668x2224)\",\n            \"width\": 1668,\n            \"height\": 2224\n        },\n        {\n            \"title\": \"Apple iPad Pro 12.9-inch (2048x2732)\",\n            \"width\": 2048,\n            \"height\": 2732\n        },\n        {\n          \"title\": \"Huawei P9 (1080x1920)\",\n          \"width\": 1080,\n          \"height\": 1920\n        },\n        {\n          \"title\": \"Huawei Mate9 Pro (1440x2560)\",\n          \"width\": 1440,\n          \"height\": 2560\n        },\n        {\n          \"title\": \"Goolge Nexus 5 (1080x2880)\",\n          \"width\": 1080,\n          \"height\": 2880\n        },\n        {\n          \"title\": \"Goolge Nexus 5X (1079x1919)\",\n          \"width\": 1079,\n          \"height\": 1919\n        },\n        {\n          \"title\": \"Goolge Nexus 6 (1442x2562)\",\n          \"width\": 1442,\n          \"height\": 2562\n        },\n        {\n          \"title\": \"Goolge Nexus 7 (1920x1200)\",\n          \"width\": 1920,\n          \"height\": 1200\n        }\n    ]\n}\n","native/tools/tojs/gen_d_ts/package.json":"{\n  \"name\": \"gen_d_ts\",\n  \"version\": \"1.0.0\",\n  \"description\": \"\",\n  \"main\": \"index.js\",\n  \"scripts\": {\n    \"test\": \"echo \\\"Error: no test specified\\\" && exit 1\"\n  },\n  \"author\": \"\",\n  \"license\": \"ISC\",\n  \"dependencies\": {\n    \"@types/node\": \"^16.10.3\"\n  }\n}\n","native/tools/swig-config/tutorial/index.md":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**\n\n- [The Tutorial of Swig Workflow in Cocos Creator](#the-tutorial-of-swig-workflow-in-cocos-creator)\n  * [How to Bind a New Module in Engine](#how-to-bind-a-new-module-in-engine)\n    + [Add a new module interface file](#add-a-new-module-interface-file)\n    + [Modify swig-config.js](#modify-swig-configjs)\n    + [Generate bindings](#generate-bindings)\n    + [Modify `engine/native/cocos/CMakeLists.txt`](#modify-enginenativecocoscmakeliststxt)\n    + [Register the new module to Script Engine](#register-the-new-module-to-script-engine)\n  * [How to Bind a New Module in Developer's Project](#how-to-bind-a-new-module-in-developers-project)\n    + [Bind a simple class](#bind-a-simple-class)\n      - [Create a simple class](#create-a-simple-class)\n      - [Write an interface file](#write-an-interface-file)\n      - [Write a swig config file](#write-a-swig-config-file)\n      - [Generate bindings for project](#generate-bindings-for-project)\n      - [Modify project's CMakeLists.txt](#modify-projects-cmakeliststxt)\n      - [Open project](#open-project)\n      - [Register the new module to Script Engine](#register-the-new-module-to-script-engine-1)\n      - [Test binding](#test-binding)\n      - [Section Conclusion](#section-conclusion)\n    + [Import depended header files](#import-depended-header-files)\n    + [Ignore classes, methods, properties](#ignore-classes-methods-properties)\n      - [Ignore classes](#ignore-classes)\n      - [Ignore methods and properties](#ignore-methods-and-properties)\n    + [Rename classes, methods, properties](#rename-classes-methods-properties)\n    + [Define an attribute](#define-an-attribute)\n      - [Usage](#usage)\n      - [Demo](#demo)\n      - [%attribute_writeonly directive](#%25attribute_writeonly--directive)\n      - [Reference type](#reference-type)\n      - [%arg() directive](#%25arg-directive)\n      - [Don't add `const`](#dont-add-const)\n    + [Configure C++ modules in .i file](#configure-c-modules-in-i-file)\n    + [Multiple swig modules configuration](#multiple-swig-modules-configuration)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# The Tutorial of Swig Workflow in Cocos Creator\n\n## How to Bind a New Module in Engine\n\n### Add a new module interface file\n\n- Add a new module interface file to `native/tools/swig-config` directory, e.g. `new-engine-module.i`\n\n- Copy the content in [swig-interface-template.i](../swig-interface-template.i) to new-engine-module.i\n\n- Add necessary configuration, you refer to the existed  `.i` files in `native/tools/swig-config` directory or refer to [the following section](#How to Bind a New Module in Developer's Project)\n  \n\n### Modify swig-config.js\n\n```js\n// ......\n// Engine Module Configuration\nconst configList = [\n    [ '2d.i', 'jsb_2d_auto.cpp' ],\n    // ......\n    [ 'renderer.i', 'jsb_render_auto.cpp' ],\n    [ 'new-engine-module.i', 'jsb_new_engine_module_auto.cpp' ], // Add this line\n];\n//......\n```\n\n### Generate bindings\n\n```bash\ncd engine/native/tools/swig-config\nnode genbindings.js\n```\n\n### Modify `engine/native/cocos/CMakeLists.txt`\n\n```cmake\n######## auto\ncocos_source_files(\n    NO_WERROR   NO_UBUILD   cocos/bindings/auto/jsb_new_engine_module_auto.cpp # Add this line\n                            cocos/bindings/auto/jsb_new_engine_module_auto.h # Add this line\n    NO_WERROR   NO_UBUILD   cocos/bindings/auto/jsb_cocos_auto.cpp\n                            cocos/bindings/auto/jsb_cocos_auto.h\n    ......\n```\n\n### Register the new module to Script Engine\n\nOpen `jsb_module_register.cpp` and do the following modifications\n\n```c++\n......\n#if CC_USE_PHYSICS_PHYSX\n    #include \"cocos/bindings/auto/jsb_physics_auto.h\"\n#endif\n#include \"cocos/bindings/auto/jsb_new_engine_module_auto.h\" // Add this line\n\nbool jsb_register_all_modules() {\n    se::ScriptEngine *se = se::ScriptEngine::getInstance();\n    ......\n    se->addRegisterCallback(register_all_my_new_engine_module); // Add this line\n\n    se->addAfterCleanupHook([]() {\n        cc::DeferredReleasePool::clear();\n        JSBClassType::cleanup();\n    });\n    return true;   \n}\n```\n\n## How to Bind a New Module in Developer's Project\n\nSuppose we have a Cocos Creator project located at `/Users/james/NewProject` directory.\n\nBuild a native project in Cocos Creator's build panel, we get `/Users/james/NewProject/native` directory.\n\n### Bind a simple class\n\n#### Create a simple class\n\nCreate a header file in `/Users/james/NewProject/native/engine/Classes/MyObject.h` , its content is \n\n```c++\n// MyObject.h\n#pragma once\n#include \"cocos/cocos.h\"\nnamespace my_ns {\nclass MyObject {\npublic:\n    MyObject() = default;\n    MyObject(int a, bool b) {}\n    virtual ~MyObject() = default;\n    void print() {\n        CC_LOG_DEBUG(\"==> a: %d, b: %d\\n\", _a, (int)_b);\n    }\n\n    float publicFloatProperty{1.23F};\nprivate:\n    int _a{100};\n    bool _b{true};\n};\n} // namespace my_ns {\n```\n\n#### Write an interface file\n\nCreate an interface called `my-module.i` file in  `/Users/james/NewProject/tools/swig-config`\n\n```c++\n// my-module.i\n%module(target_namespace=\"my_ns\") my_module\n\n// Insert code at the beginning of generated header file (.h)\n%insert(header_file) %{\n#pragma once\n#include \"bindings/jswrapper/SeApi.h\"\n#include \"bindings/manual/jsb_conversions.h\"\n\n#include \"MyObject.h\" // Add this line\n%}\n\n// Insert code at the beginning of generated source file (.cpp)\n%{\n#include \"bindings/auto/jsb_my_module_auto.h\"\n%}\n\n%include \"MyObject.h\"\n```\n\n#### Write a swig config file\n\nCreate a file called swig-config.js in `/Users/james/NewProject/tools/swig-config`\n\n```js\n// swig-config.js\n'use strict';\nconst path = require('path');\nconst configList = [\n    [ 'my-module.i', 'jsb_my_module_auto.cpp' ],\n];\n\nconst projectRoot = path.resolve(path.join(__dirname, '..', '..'));\nconst interfacesDir = path.join(projectRoot, 'tools', 'swig-config');\nconst bindingsOutDir = path.join(projectRoot, 'native', 'engine', 'common', 'bindings', 'auto');\n// includeDirs means header search path for Swig parser\nconst includeDirs = [\n    path.join(projectRoot, 'native', 'engine', 'common', 'Classes'),\n];\n\nmodule.exports = {\n    interfacesDir,\n    bindingsOutDir,\n    includeDirs,\n    configList\n};\n```\n\n#### Generate bindings for project\n\n```bash\n$ cd /Users/james/NewProject/tools/swig-config\n$ node < Engine Root >/native/tools/swig-config/genbindings.js\n```\n\nIf succeed, the files ( `jsb_my_module_auto.cpp/.h` ) contain JS binding code will be generated at `/Users/james/NewProject/native/engine/bindings/auto` directory\n\n#### Modify project's CMakeLists.txt\n\n- Open `/Users/james/NewProject/native/engine/common/CMakeLists.txt`, add `MyObject.h` and its binding code\n\n  ```cmake\n  include(${COCOS_X_PATH}/CMakeLists.txt)\n  \n  list(APPEND CC_COMMON_SOURCES\n      ${CMAKE_CURRENT_LIST_DIR}/Classes/Game.h\n      ${CMAKE_CURRENT_LIST_DIR}/Classes/Game.cpp\n      ############### Add the following lines ##############\n      ${CMAKE_CURRENT_LIST_DIR}/Classes/MyObject.h \n      ${CMAKE_CURRENT_LIST_DIR}/bindings/auto/jsb_my_module_auto.h\n      ${CMAKE_CURRENT_LIST_DIR}/bindings/auto/jsb_my_module_auto.cpp\n      ########################################################\n  )\n  ```\n\n- Modify `/Users/james/NewProject/native/engine/mac/CMakeLists.txt`\n\n  ```cmake\n  cmake_minimum_required(VERSION 3.8)\n  # ......\n  cc_mac_before_target(${EXECUTABLE_NAME})\n  add_executable(${EXECUTABLE_NAME} ${CC_ALL_SOURCES})\n  ############### Add the following lines ##############\n  target_include_directories(${EXECUTABLE_NAME} PRIVATE\n      ${CC_PROJECT_DIR}/../common\n  )\n  ########################################################\n  cc_mac_after_target(${EXECUTABLE_NAME})\n  ```\n\n\n#### Open project \n\nmacOS: `/Users/james/NewProject/build/mac/proj/NewProject.xcodeproj ` \n\nWindows: `< A specific directory >/NewProject/build/win64/proj/NewProject.sln`\n\n#### Register the new module to Script Engine\n\nModify `Game.cpp` :\n\n```c++\n#include \"Game.h\"\n#include \"bindings/auto/jsb_my_module_auto.h\" // Add this line\n//......\nint Game::init() {\n  // ......\n  se::ScriptEngine::getInstance()->addRegisterCallback(register_all_my_module); // Add this line\n  BaseGame::init();\n  return 0;\n}\n// ......\n```\n\n#### Test binding\n\n- Add a `my-module.d.ts` file in the root of project directory to make TS compiler know our binding class.\n\n  ```ts\n  // my-module.d.ts\n  declare namespace my_ns {\n  class MyObject {\n      constructor();\n      constructor(a: number, b: number);\n  \n      publicFloatProperty : number;\n      print() : void;\n  }\n  }\n  ```\n\n- Modify `/Users/james/NewProject/temp/tsconfig.cocos.json` file\n\n  ```js\n  {\n    \"$schema\": \"https://json.schemastore.org/tsconfig\",\n    \"compilerOptions\": {\n      \"target\": \"ES2015\",\n      \"module\": \"ES2015\",\n      \"strict\": true,\n      \"types\": [\n        \"./temp/declarations/cc.custom-macro\",\n        \"./temp/declarations/jsb\",\n        \"./temp/declarations/cc\",\n        \"./temp/declarations/cc.env\",\n        \"./my-module\" // Add this line\n      ],\n      // ......\n      \"forceConsistentCasingInFileNames\": true\n    }\n  }\n  ```\n\n- Open NewProject in Cocos Creator, create a cube object in scene and attach a script to cube, the script's content is\n\n  ```ts\n  import { _decorator, Component } from 'cc';\n  const { ccclass } = _decorator;\n  \n  @ccclass('MyComponent')\n  export class MyComponent extends Component {\n      start() {\n          const myObj = new my_ns.MyObject();\n          myObj.print(); // Invoke native print method\n          console.log(`==> myObj.publicFloatProperty: ${myObj.publicFloatProperty}`); // Get property defined in native\n      }\n  }\n  ```\n\n- Run project, if succeed, you could find the following logs in console \n\n  ```\n  17:31:44 [DEBUG]: ==> a: 100, b: 1\n  17:31:44 [DEBUG]: D/ JS: ==> myObj.publicFloatProperty: 1.2300000190734863\n  ```\n\n#### Section Conclusion\n\nIn this section, we have learned how to use `Swig` tool to bind a simple class, export its public methods and properties to JS. This section also cover the entire flow of binding native classes. Start from next section, we will focus on using more `Swig` features to satisfy more needs of JS bindings, for example:\n\n- How to import depended header files\n- How to ignore classes, methods, properties\n- How to rename classes, methods, properties\n- How to define attributes which bind c++ getter and setter as a JS property\n- How to configure C++ modules in .i file\n\n### Import depended header files\n\nSuppose we let MyObject class be inherited from MyRef class. But we don't want to bind MyRef class.\n\n```c++\n// MyRef.h\n#pragma once\nnamespace my_ns {\nclass MyRef  {\npublic:\n    MyRef() = default;\n    virtual ~MyRef() = default;\n    void addRef() { _ref++; }\n    void release() { --_ref; }\nprivate:\n    unsigned int _ref{0};\n};\n} // namespace my_ns {\n```\n\n```c++\n// MyObject.h\n#pragma once\n#include \"cocos/cocos.h\"\n#include \"MyRef.h\"\nnamespace my_ns {\n// MyObject inherits from MyRef\nclass MyObject : public MyRef {\npublic:\n    MyObject() = default;\n    MyObject(int a, bool b) {}\n    virtual ~MyObject() = default;\n    void print() {\n        CC_LOG_DEBUG(\"==> a: %d, b: %d\\n\", _a, (int)_b);\n    }\n\n    float publicFloatProperty{1.23F};\nprivate:\n    int _a{100};\n    bool _b{true};\n};\n} // namespace my_ns {\n```\n\nWhen Swig parses MyObject.h,  it will not know what `MyRef` is,  it will output a warning in console.\n\n```bash\n.../Classes/MyObject.h:7: Warning 401: Nothing known about base class 'MyRef'. Ignored.\n```\n\nIt's simple to fix this issue, we need to let Swig know that MyRef exists by using `%import` directive.\n\n```c++\n// ......\n// Insert code at the beginning of generated source file (.cpp)\n%{\n#include \"bindings/auto/jsb_my_module_auto.h\"\n%}\n\n%import \"MyRef.h\" // Add this line to fix the warning\n%include \"MyObject.h\"\n```\n\nAlthough Swig doesn't report the error now, the binding code will not be compiled, the error is:\n\n![](MyRefCompileError.jpg)\n\nWe fix this in the next section by `%ignore` directive.\n\n### Ignore classes, methods, properties\n\n#### Ignore classes\n\nIn last section, we got a compile error in `js_register_my_ns_MyObject`. Since MyRef should not be bound, we could use`%ignore` directive to ignore it.\n\n```c++\n// my-module.i\n// ......\n%ignore my_ns::MyRef; // Add this line\n%import \"MyRef.h\"\n%include \"MyObject.h\"\n```\n\nGenerate binding again, it compiles ok.\n\n```c++\n// jsb_my_module_auto.cpp\nbool js_register_my_ns_MyObject(se::Object* obj) {\n    auto* cls = se::Class::create(\"MyObject\", obj, nullptr, _SE(js_new_MyObject)); // parentProto will be set to nullptr\n    cls->defineProperty(\"publicFloatProperty\", _SE(js_my_ns_MyObject_publicFloatProperty_get), _SE(js_my_ns_MyObject_publicFloatProperty_set)); \n    cls->defineFunction(\"print\", _SE(js_my_ns_MyObject_print)); \n  // ......\n}\n```\n\n#### Ignore methods and properties\n\nWe add a new method `methodToBeIgnored` and a new property `propertyToBeIgnored` to `MyObject` class.\n\n```c++\n// MyObject.h\n#pragma once\n#include \"cocos/cocos.h\"\n#include \"MyRef.h\"\nnamespace my_ns {\n// MyObject inherits from MyRef\nclass MyObject : public MyRef {\npublic:\n// .....\n    void methodToBeIgnored() {} // Add this line\n    float propertyToBeIgnored{345.123F}; // Add this line\n// ......\n    float publicFloatProperty{1.23F};\nprivate:\n    int _a{100};\n    bool _b{true};\n};\n} // namespace my_ns {\n\n```\n\nRe-generate bindings, we'll get `methodToBeIgnored` and `propertyToBeIgnored` bound.\n\n```c++\n// jsb_my_module_auto.cpp\nbool js_register_my_ns_MyObject(se::Object* obj) {\n    auto* cls = se::Class::create(\"MyObject\", obj, nullptr, _SE(js_new_MyObject)); \n    cls->defineProperty(\"propertyToBeIgnored\", _SE(js_my_ns_MyObject_propertyToBeIgnored_get), _SE(js_my_ns_MyObject_propertyToBeIgnored_set)); // this property should not be bound\n    cls->defineProperty(\"publicFloatProperty\", _SE(js_my_ns_MyObject_publicFloatProperty_get), _SE(js_my_ns_MyObject_publicFloatProperty_set)); \n    cls->defineFunction(\"print\", _SE(js_my_ns_MyObject_print)); \n    cls->defineFunction(\"methodToBeIgnored\", _SE(js_my_ns_MyObject_methodToBeIgnored)); // this method should not be bound\n    // ......\n}\n```\n\nModify `my-module.i`to skip binding them.\n\n```c++\n// my-module.i\n// ......\n\n%ignore my_ns::MyRef;\n%ignore my_ns::MyObject::methodToBeIgnored; // Add this line\n%ignore my_ns::MyObject::propertyToBeIgnored; // Add this line\n\n%import \"MyRef.h\"\n%include \"MyObject.h\"\n```\n\nRe-generate bindings, they're ignored now.\n\n```c++\n// jsb_my_module_auto.cpp\nbool js_register_my_ns_MyObject(se::Object* obj) {\n    auto* cls = se::Class::create(\"MyObject\", obj, nullptr, _SE(js_new_MyObject)); \n    cls->defineProperty(\"publicFloatProperty\", _SE(js_my_ns_MyObject_publicFloatProperty_get), _SE(js_my_ns_MyObject_publicFloatProperty_set)); \n    cls->defineFunction(\"print\", _SE(js_my_ns_MyObject_print)); \n// ......\n}\n```\n\n### Rename classes, methods, properties\n\nSwig has defined a directive called `%rename` to rename classes, methods or properties. To demonstrate, we modify MyObject again.\n\n```c++\n// MyObject.h\n#pragma once\n#include \"cocos/cocos.h\"\n#include \"MyRef.h\"\nnamespace my_ns {\n// MyObject inherits from MyRef\nclass MyObject : public MyRef {\npublic:\n// ......\n    void methodToBeRenamed() { // Add this method\n        CC_LOG_DEBUG(\"==> hello MyObject::methodToBeRenamed\");\n    }\n    int propertyToBeRenamed{1234}; // Add this property\n\n    float publicFloatProperty{1.23F};\nprivate:\n    int _a{100};\n    bool _b{true};\n};\n} // namespace my_ns {\n```\n\nGenerate bindings, we get:\n\n```c++\n// jsb_my_module_auto.cpp\nbool js_register_my_ns_MyObject(se::Object* obj) {\n    auto* cls = se::Class::create(\"MyObject\", obj, nullptr, _SE(js_new_MyObject)); \n    cls->defineProperty(\"propertyToBeRenamed\", _SE(js_my_ns_MyObject_propertyToBeRenamed_get), _SE(js_my_ns_MyObject_propertyToBeRenamed_set)); \n    cls->defineProperty(\"publicFloatProperty\", _SE(js_my_ns_MyObject_publicFloatProperty_get), _SE(js_my_ns_MyObject_publicFloatProperty_set)); \n    \n    cls->defineFunction(\"print\", _SE(js_my_ns_MyObject_print)); \n    cls->defineFunction(\"methodToBeRenamed\", _SE(js_my_ns_MyObject_methodToBeRenamed)); \n```\n\nIf we want to rename `propertyToBeRenamed` to `coolProperty` and rename `methodToBeRenamed` to `coolMethod`, modify `my-module.i` as follows:\n\n```c++\n// my-module.i\n// ......\n%ignore my_ns::MyRef;\n%ignore my_ns::MyObject::methodToBeIgnored;\n%ignore my_ns::MyObject::propertyToBeIgnored;\n%rename(coolProperty) my_ns::MyObject::propertyToBeRenamed; // Add this line\n%rename(coolMethod) my_ns::MyObject::methodToBeRenamed; // Add this line\n\n%import \"MyRef.h\"\n%include \"MyObject.h\"\n```\n\nIf we want to rename `MyObject` class to `MyCoolObject`, I guess you have already known how to do.  Yes, add this line:\n\n```c++\n%rename(MyCoolObject) my_ns::MyObject;\n```\n\nRe-generate bindings, get the correct name exported to JS.\n\n```c++\n// jsb_my_module_auto.cpp\n// MyCoolObject, coolProperty, coolMethod are all what we want now.\nbool js_register_my_ns_MyObject(se::Object* obj) {\n    auto* cls = se::Class::create(\"MyCoolObject\", obj, nullptr, _SE(js_new_MyCoolObject));\n    cls->defineProperty(\"coolProperty\", _SE(js_my_ns_MyCoolObject_coolProperty_get), _SE(js_my_ns_MyCoolObject_coolProperty_set)); \n    cls->defineProperty(\"publicFloatProperty\", _SE(js_my_ns_MyCoolObject_publicFloatProperty_get), _SE(js_my_ns_MyCoolObject_publicFloatProperty_set)); \n    cls->defineFunction(\"print\", _SE(js_my_ns_MyCoolObject_print)); \n    cls->defineFunction(\"coolMethod\", _SE(js_my_ns_MyCoolObject_coolMethod)); \n    // ......\n}\n```\n\nTest it, update `my-module.d.ts` and `MyComponent.ts`\n\n```c++\n// my-module.d.ts\ndeclare namespace my_ns {\nclass MyCoolObject {\n    constructor();\n    constructor(a: number, b: number);\n\n    publicFloatProperty : number;\n    print() : void;\n    coolProperty: number;\n    coolMethod() : void;\n}\n}\n```\n\n```ts\n// MyComponent.ts\nimport { _decorator, Component } from 'cc';\nconst { ccclass } = _decorator;\n\n@ccclass('MyComponent')\nexport class MyComponent extends Component {\n    start() {\n        const myObj = new my_ns.MyCoolObject(); // Renamed to MyCoolObject\n        myObj.print();\n        console.log(`==> myObj.publicFloatProperty: ${myObj.publicFloatProperty}`);\n        // Add the follow lines\n        console.log(`==> old: myObj.coolProperty: ${myObj.coolProperty}`); \n        myObj.coolProperty = 666;\n        console.log(`==> new: myObj.coolProperty: ${myObj.coolProperty}`);\n        myObj.coolMethod();\n    }\n}\n```\n\nBuild and run project, get log:\n\n```\n17:53:28 [DEBUG]: ==> a: 100, b: 1\n17:53:28 [DEBUG]: D/ JS: ==> myObj.publicFloatProperty: 1.2300000190734863\n17:53:28 [DEBUG]: D/ JS: ==> old: myObj.coolProperty: 1234\n17:53:28 [DEBUG]: D/ JS: ==> new: myObj.coolProperty: 666\n17:53:28 [DEBUG]: ==> hello MyObject::methodToBeRenamed\n```\n\n### Define an attribute\n\n`%attribute` directive is used for bind C++ getter and setter functions as a JS property.\n\n#### Usage\n\n1. Define an attribute (JS property) without setter\n\n   ```c++\n   %attribute(your_namespace::your_class_name, cpp_member_variable_type, js_property_name, cpp_getter_function_name)\n   ```\n\n2. Define an attribute (JS property) with getter and setter\n\n   ```c++\n   %attribute(your_namespace::your_class_name, cpp_member_variable_type, js_property_name, cpp_getter_function_name, cpp_setter_function_name)\n   ```\n\n3. Define an attribute (JS property) without getter\n\n   ```c++\n   %attribute_writeonly(your_namespace::your_class_name, cpp_member_variable_type, js_property_name, cpp_setter_function_name)\n   ```\n\n#### Demo\n\nTo demonstrate, we add two new methods for MyObject class.\n\n```c++\n// MyObject.h\n#pragma once\n#include \"cocos/cocos.h\"\n#include \"MyRef.h\"\nnamespace my_ns {\n// MyObject inherits from MyRef\nclass MyObject : public MyRef {\npublic:\n// ......\n    void setType(int v) { _type = v; CC_LOG_DEBUG(\"==> setType: v: %d\", v); } // Add this line\n    int getType() const { return _type; } // Add this line\n\n    float publicFloatProperty{1.23F};\nprivate:\n    int _a{100};\n    bool _b{true};\n    int _type{333};\n};\n} // namespace my_ns {\n```\n\n```c++\n// my-module.i\n// ......\n%attribute(my_ns::MyObject, int, type, getType, setType); // Add this line\n\n%import \"MyRef.h\"\n%include \"MyObject.h\"\n```\n\n```c++\n// jsb_my_module_auto.cpp\nbool js_register_my_ns_MyObject(se::Object* obj) {\n// ......\n    cls->defineProperty(\"type\", _SE(js_my_ns_MyCoolObject_type_get), _SE(js_my_ns_MyCoolObject_type_set)); \n// ......\n}\n```\n\n```ts\n// MyComponent.ts\nimport { _decorator, Component } from 'cc';\nconst { ccclass } = _decorator;\n\n@ccclass('MyComponent')\nexport class MyComponent extends Component {\n    start() {\n        const myObj = new my_ns.MyCoolObject();\n        myObj.print();\n        console.log(`==> myObj.publicFloatProperty: ${myObj.publicFloatProperty}`);\n        console.log(`==> old: myObj.coolProperty: ${myObj.coolProperty}`);\n        myObj.coolProperty = 666;\n        console.log(`==> new: myObj.coolProperty: ${myObj.coolProperty}`);\n        myObj.coolMethod();\n        console.log(`==> old: myObj.type: ${myObj.type}`);\n        myObj.type = 888;\n        console.log(`==> new: myObj.type: ${myObj.type}`);\n    }\n}\n```\n\nBuild and run project\n\n```\n18:09:53 [DEBUG]: ==> a: 100, b: 1\n18:09:53 [DEBUG]: D/ JS: ==> myObj.publicFloatProperty: 1.2300000190734863\n18:09:53 [DEBUG]: D/ JS: ==> old: myObj.coolProperty: 1234\n18:09:53 [DEBUG]: D/ JS: ==> new: myObj.coolProperty: 666\n18:09:53 [DEBUG]: ==> hello MyObject::methodToBeRenamed\n18:09:53 [DEBUG]: D/ JS: ==> old: myObj.type: 333\n18:09:53 [DEBUG]: ==> setType: v: 888 // Cool, C++ setType is invoked\n18:09:53 [DEBUG]: D/ JS: ==> new: myObj.type: 888 // Cool, C++ getType is invoked, 888 is return from C++\n```\n\n#### %attribute_writeonly  directive\n\n`%attribute_writeonly` directive is an extension we added in swig  `Cocos` backend, it's used for the purpose that C++ class only has a `set` function and there isn't a `get` function.\n\nIn `native/tools/swig-config/cocos.i`, there are:\n\n```c++\n%attribute_writeonly(cc::ICanvasRenderingContext2D, float, width, setWidth);\n%attribute_writeonly(cc::ICanvasRenderingContext2D, float, height, setHeight);\n%attribute_writeonly(cc::ICanvasRenderingContext2D, float, lineWidth, setLineWidth);\n%attribute_writeonly(cc::ICanvasRenderingContext2D, ccstd::string&, fillStyle, setFillStyle);\n%attribute_writeonly(cc::ICanvasRenderingContext2D, ccstd::string&, font, setFont);\n```\n\nThis is the similar functionality in JS:\n\n```javascript\nObject.defineProperty(MyNewClass.prototype, 'width', {\n  configurable: true,\n  enumerable: true,\n  set(v) {\n    this._width = v;\n  },\n\t// No get() for property\n});\n```\n\n#### Reference type\n\nIf C++ `get` function returns a reference data type or `set` function accesses a reference data type , don't forget to add `&` suffix in %attribute or %attribute_writeonly directives. The following `ccstd::string&` is an example.\n\n```c++\n%attribute_writeonly(cc::ICanvasRenderingContext2D, ccstd::string&, fillStyle, setFillStyle);\n```\n\nIf `&` is missing, a temporary `ccstd::string` instance will be created while the binding function is invoked.\n\n#### %arg() directive\n\nSometimes, the type of C++ variable is a describled by C++ template, for instance:\n\n```c++\nclass MyNewClass {\n  public:\n\t\tconst std::map<std::string, std::string>& getConfig() const { return _config; }\n  \tvoid setConfig(const std::map<std::string, std::string> &config) { _config = config; }\n  private:\n  \tstd::map<std::string, std::string> _config;\n};\n```\n\nWe may write an `%attribute` in `.i` file like:\n\n```c++\n%attribute(MyNewClass, std::map<std::string, std::string>&, config, getConfig, setConfig);\n```\n\nYou will get an error while invoking `node genbindings.js`.\n\n```\nError: Macro '%attribute_custom' expects 7 arguments\n```\n\nThis is because `swig` doesn't know how to deal with comma (`,`) in `std::map<std::string, std::string>&`, it will split it to two parts:\n\n1. std::map<std::string\n2. std::string>&\n\nTherefore, this line of %attribute directive will be parsed with 6 arguments instead of 5.\n\nTo avoid making `swig` confused, we need to use `%arg` directive to tell `swig` that `std::map<std::string, std::string>&` is a whole thing.\n\n```c++\n%attribute(MyNewClass, %arg(std::map<std::string, std::string>&), config, getConfig, setConfig);\n```\n\nRe-run `node genbindings.js`, the error should have gone.\n\n#### Don't add `const` \n\nIn the above sample, `%arg(std::map<std::string, std::string>&)` is used as a C++ data type in %attribue directive. You may consider to add a `const` prefix before `std::map` like `%arg(const std::map<std::string, std::string>&)`. If you do that, you will make a readyonly `config` property which only binds `MyNewClass::getConfig`. That's obviously not what we expect. If we need a readonly property, just don't assign a `set` function. \n\n```c++\n// Don't assign setConfig means the property doesn't need a setter.\n%attribute(MyNewClass, %arg(std::map<std::string, std::string>&), config, getConfig); \n```\n\nSo to keep things simple, never add `const` prefix while writing a `%attribute` directive.\n\n### Configure C++ modules in .i file\n\nSometimes, whether to compile a class depends on whether a macro is enabled. For example, we add a `MyFeatureObject` class in `MyObject.h`\n\n```c++\n// MyObject.h\n#pragma once\n#include \"cocos/cocos.h\"\n#include \"MyRef.h\"\n\n#ifndef USE_MY_FEATURE\n#define USE_MY_FEATURE 1 // Enable USE_MY_FEATURE\n#endif\n\nnamespace my_ns {\n\n#if USE_MY_FEATURE\nclass MyFeatureObject {\npublic:\n    void foo() {\n        CC_LOG_DEBUG(\"==> MyFeatureObject::foo\");\n    }\n};\n#else\nclass MyFeatureObject;\n#endif\n\n// MyObject inherits from MyRef\nclass MyObject : public MyRef {\npublic:\n//......\n    MyFeatureObject* getFeatureObject() {\n#if USE_MY_FEATURE // getFeatureObject only returns valid value when USE_MY_FEATURE is enabled\n        if (_featureObject == nullptr) {\n            _featureObject = new MyFeatureObject();\n        }\n#endif\n        return _featureObject;\n    }\nprivate:\n    int _a{100};\n    bool _b{true};\n    int _type{333};\n    MyFeatureObject* _featureObject{nullptr}; // Add this line\n};\n} // namespace my_ns {\n```\n\n```c++\n// my-module.i\n// ......\n%rename(MyCoolObject) my_ns::MyObject;\n\n%attribute(my_ns::MyObject, int, type, getType, setType);\n\n%module_macro(USE_MY_FEATURE) my_ns::MyFeatureObject; // Add this line to let Swig know the generated code for MyFeatureObject needs to be wrapped by USE_MY_FEATURE macro\n%module_macro(USE_MY_FEATURE) my_ns::MyObject::getFeatureObject; // Add this line to let Swig know the generated code for MyObject::getFeatureObject should be wrapped by USE_MY_FEATURE macro\n\n#define USE_MY_FEATURE 1 // Must be 1 to trick Swig that we need to generate binding code\n// even this macro is disabled in C++. NOTE: this line should be after %module_macro\n\n%import \"MyRef.h\"\n%include \"MyObject.h\"\n```\n\n```c++\n// my-module.d.ts\ndeclare namespace my_ns {\nclass MyFeatureObject {\n    foo() : void;\n}\n\nclass MyCoolObject {\n    constructor();\n    constructor(a: number, b: number);\n\n    publicFloatProperty : number;\n    print() : void;\n    coolProperty: number;\n    coolMethod() : void;\n    type: number;\n    getFeatureObject() : MyFeatureObject;\n}\n}\n```\n\n```ts\n// MyComponent.ts\nimport { _decorator, Component } from 'cc';\nconst { ccclass } = _decorator;\n\n@ccclass('MyComponent')\nexport class MyComponent extends Component {\n    start() {\n        const myObj = new my_ns.MyCoolObject();\n        myObj.print();\n        console.log(`==> myObj.publicFloatProperty: ${myObj.publicFloatProperty}`);\n        console.log(`==> old: myObj.coolProperty: ${myObj.coolProperty}`);\n        myObj.coolProperty = 666;\n        console.log(`==> new: myObj.coolProperty: ${myObj.coolProperty}`);\n        myObj.coolMethod();\n        console.log(`==> old: myObj.type: ${myObj.type}`);\n        myObj.type = 888;\n        console.log(`==> new: myObj.type: ${myObj.type}`);\n        const featureObj = myObj.getFeatureObject();\n        console.log(`==> featureObj: ${featureObj}`);\n        if (featureObj) {\n            featureObj.foo();\n        }\n    }\n}\n```\n\nGenerate bindings, look at the binding code\n\n```c++\n#if USE_MY_FEATURE // NOTE THAT, all binding code of MyFeatureObject is wrapped by USE_MY_FEATURE macro\n\nse::Class* __jsb_my_ns_MyFeatureObject_class = nullptr;\nse::Object* __jsb_my_ns_MyFeatureObject_proto = nullptr;\nSE_DECLARE_FINALIZE_FUNC(js_delete_my_ns_MyFeatureObject) \n\nstatic bool js_my_ns_MyFeatureObject_foo(se::State& s)\n{\n// ......\n}\n// ......\nbool js_register_my_ns_MyFeatureObject(se::Object* obj) {\n    auto* cls = se::Class::create(\"MyFeatureObject\", obj, nullptr, _SE(js_new_my_ns_MyFeatureObject)); \n// ......\n}\n\n#endif // USE_MY_FEATURE\n\n// ......\nstatic bool js_my_ns_MyCoolObject_getFeatureObject(se::State& s)\n{\n#if USE_MY_FEATURE // getFeatureObject function is also wrapped by USE_MY_FEATURE\n// ......\n    ok &= nativevalue_to_se(result, s.rval(), s.thisObject() /*ctx*/);\n    SE_PRECONDITION2(ok, false, \"MyCoolObject_getFeatureObject, Error processing arguments\");\n    SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); \n#endif // USE_MY_FEATURE\n    return true;\n}\nSE_BIND_FUNC(js_my_ns_MyCoolObject_getFeatureObject) \n\n// ......\nbool register_all_my_module(se::Object* obj) {\n    // Get the ns\n    se::Value nsVal;\n    if (!obj->getProperty(\"my_ns\", &nsVal, true))\n    {\n        se::HandleObject jsobj(se::Object::createPlainObject());\n        nsVal.setObject(jsobj);\n        obj->setProperty(\"my_ns\", nsVal);\n    }\n    se::Object* ns = nsVal.toObject();\n    /* Register classes */\n#if USE_MY_FEATURE\n    js_register_my_ns_MyFeatureObject(ns); // js_register_my_ns_MyFeatureObject is wrapped by USE_MY_FEATURE\n#endif // USE_MY_FEATURE\n    js_register_my_ns_MyObject(ns); \n    return true;\n}\n```\n\nBuild and run the project, get output as following:\n\n```\n18:32:20 [DEBUG]: D/ JS: ==> featureObj: [object Object] // featureObj is valid if USE_MY_FEATURE macro is enabled\n18:32:20 [DEBUG]: ==> MyFeatureObject::foo // Invoke C++ foo method \n```\n\nWhen we don't need MyFeatureObject, set the macro to 0.\n\n```c++\n// MyObject.h\n#pragma once\n#include \"cocos/cocos.h\"\n#include \"MyRef.h\"\n\n#ifndef USE_MY_FEATURE\n#define USE_MY_FEATURE 0 // Disable USE_MY_FEATURE\n#endif\n```\n\nBuild and run the project\n\n```\n18:54:00 [DEBUG]: D/ JS: ==> featureObj: undefined // getFeatureObject returns undefined if USE_MY_FEATURE is disabled.\n```\n\n### Multiple swig modules configuration\n\nLet's create another header file `MyAnotherObject.h`.\n\n```c++\n// MyAnotherObject.h\n#pragma once\nnamespace my_another_ns {\nstruct MyAnotherObject {\n    float a{135.246};\n    int b{999};\n};\n} // namespace my_another_ns {\n```\n\nUpdate MyObject.h\n\n```c++\n// MyObject.h\n//......\nclass MyObject : public MyRef {\npublic:\n// ......\n    void helloWithAnotherObject(const my_another_ns::MyAnotherObject &obj) {\n        CC_LOG_DEBUG(\"==> helloWithAnotherObject, a: %f, b: %d\", obj.a, obj.b);\n    }\n// ......\n};\n} // namespace my_ns {\n```\n\nCreate `/Users/james/NewProject/tools/swig-config/another-module.i`\n\n```c++\n// another-module.i\n%module(target_namespace=\"another_ns\") another_module\n\n// Insert code at the beginning of generated header file (.h)\n%insert(header_file) %{\n#pragma once\n#include \"bindings/jswrapper/SeApi.h\"\n#include \"bindings/manual/jsb_conversions.h\"\n\n#include \"MyAnotherObject.h\" // Add this line\n%}\n\n// Insert code at the beginning of generated source file (.cpp)\n%{\n#include \"bindings/auto/jsb_another_module_auto.h\"\n%}\n\n%include \"MyAnotherObject.h\"\n```\n\nModify `/Users/james/NewProject/tools/swig-config/swig-config.js`\n\n```c++\n'use strict';\n\nconst path = require('path');\n\nconst configList = [\n    [ 'my-module.i', 'jsb_my_module_auto.cpp' ],\n    [ 'another-module.i', 'jsb_another_module_auto.cpp' ], // Add this line\n];\n\nconst projectRoot = path.resolve(path.join(__dirname, '..', '..'));\nconst interfacesDir = path.join(projectRoot, 'tools', 'swig-config');\nconst bindingsOutDir = path.join(projectRoot, 'native', 'engine', 'common', 'bindings', 'auto');\nconst includeDirs = [\n    path.join(projectRoot, 'native', 'engine', 'common', 'Classes'),\n];\n\nmodule.exports = {\n    interfacesDir,\n    bindingsOutDir,\n    includeDirs,\n    configList\n};\n```\n\nModify `/Users/james/NewProject/native/engine/common/CMakeLists.txt`\n\n```cmake\n# /Users/james/NewProject/native/engine/common/CMakeLists.txt\nlist(APPEND CC_COMMON_SOURCES\n    ${CMAKE_CURRENT_LIST_DIR}/Classes/Game.h\n    ${CMAKE_CURRENT_LIST_DIR}/Classes/Game.cpp\n    ${CMAKE_CURRENT_LIST_DIR}/Classes/MyObject.h\n    ${CMAKE_CURRENT_LIST_DIR}/Classes/MyAnotherObject.h # Add this line\n    ${CMAKE_CURRENT_LIST_DIR}/bindings/auto/jsb_my_module_auto.h\n    ${CMAKE_CURRENT_LIST_DIR}/bindings/auto/jsb_my_module_auto.cpp\n    ${CMAKE_CURRENT_LIST_DIR}/bindings/auto/jsb_another_module_auto.h # Add this line\n    ${CMAKE_CURRENT_LIST_DIR}/bindings/auto/jsb_another_module_auto.cpp # Add this line\n)\n```\n\nGenerate bindings again.\n\nUpdate Game.cpp\n\n```c++\n#include \"Game.h\"\n#include \"bindings/auto/jsb_my_module_auto.h\"\n#include \"bindings/auto/jsb_another_module_auto.h\" // Add this line\n//......\n\nint Game::init() {\n//......\n    se::ScriptEngine::getInstance()->addRegisterCallback(register_all_my_module);\n    se::ScriptEngine::getInstance()->addRegisterCallback(register_all_another_module); // Add this line\n//\n  BaseGame::init();\n  return 0;\n}\n```\n\nBuild and compile, but get an error\n\n![](another-module-compile-error.jpg)\n\nSince MyObject class depends on MyAnotherObject which is defined on another module. We need to update `my-module.i` and add `#include \"bindings/auto/jsb_another_module_auto.h\"`.\n\n```c++\n// my-module.i\n%module(target_namespace=\"my_ns\") my_module\n\n// Insert code at the beginning of generated header file (.h)\n%insert(header_file) %{\n#pragma once\n#include \"bindings/jswrapper/SeApi.h\"\n#include \"bindings/manual/jsb_conversions.h\"\n\n#include \"MyObject.h\"\n%}\n\n// Insert code at the beginning of generated source file (.cpp)\n%{\n#include \"bindings/auto/jsb_my_module_auto.h\"\n#include \"bindings/auto/jsb_another_module_auto.h\" // Add this line\n%}\n\n// ......\n```\n\nCompile project. It should compile ok now. \n\nNext, we update .d.ts\n\n```ts\n// my-module.d.ts\ndeclare namespace my_ns {\nclass MyFeatureObject {\n    foo() : void;\n}\n\nclass MyCoolObject {\n    constructor();\n    constructor(a: number, b: number);\n\n    publicFloatProperty : number;\n    print() : void;\n    coolProperty: number;\n    coolMethod() : void;\n    type: number;\n    getFeatureObject() : MyFeatureObject;\n    helloWithAnotherObject(obj: another_ns.MyAnotherObject) : void; // Add this line\n}\n}\n\n// Add the following lines\ndeclare namespace another_ns {\nclass MyAnotherObject {\n    a: number;\n    b: number;\n}\n}\n```\n\nWe add some more test code of reading the properties of  `MyAnotherObject.`\n\n```ts\n// MyComponent.ts\nimport { _decorator, Component } from 'cc';\nconst { ccclass } = _decorator;\n\n@ccclass('MyComponent')\nexport class MyComponent extends Component {\n    start() {\n        const myObj = new my_ns.MyCoolObject();\n        // ......\n        const anotherObj = new another_ns.MyAnotherObject(); // Add this line \n        myObj.helloWithAnotherObject(anotherObj); // Add this line\n    }\n}\n```\n\nBuild and run project, should get output:\n\n```\n15:05:36 [DEBUG]: ==> helloWithAnotherObject, a: 135.246002, b: 999\n```\n","native/tools/tojs/gen_d_ts/package-lock.json":"{\n  \"name\": \"gen_d_ts\",\n  \"version\": \"1.0.0\",\n  \"lockfileVersion\": 1,\n  \"requires\": true,\n  \"dependencies\": {\n    \"@types/node\": {\n      \"version\": \"16.10.3\",\n      \"resolved\": \"https://repo.huaweicloud.com/repository/npm/@types/node/-/node-16.10.3.tgz\",\n      \"integrity\": \"sha512-ho3Ruq+fFnBrZhUYI46n/bV2GjwzSkwuT4dTf0GkuNFmnb8nq4ny2z9JEVemFi6bdEJanHLlYfy9c6FN9B9McQ==\"\n    }\n  }\n}\n","native/tools/swig-config/README.md":"## Introduction\n\nFrom Cocos Creator 3.7.0，we switch the approach of generating JS binding code from [bindings-generator](https://github.com/cocos/cocos-engine/tree/d08a11244d2a31da1aac7af7d2aa8f1b6152e30c/native/tools/bindings-generator) to [Swig](https://www.swig.org). Swig has many benefits in generating glue code by parsing  its custom `interface` file (IDL) which is compatible with `C++`. For more about why we switch to Swig, you could refer to [the issue](https://github.com/cocos/cocos-engine/issues/10792) .\n\n## Generate JS Binding Code for Engine\n\nThe engine's binding code is now automatically generated by CMake, eliminating the need to run swig command manually. \n\nNotice: if any \".i\" configuration files are added or removed, please rebuild the project to ensure the changes are incorporated.\n\n## Generate JS Bindings Code for Developer's Project\n\n- Make sure you have installed NodeJS ( `>= v8.9.4` )\n\n- Open Terminal ( macOS / Linux) or Command Line Tool ( Windows )\n\n- Create a directory for generated code, e.g. `/Users/abc/my-project/native/engine/common/Classes/bindings/auto`\n\n- Write a JS configuration file\n  \n  - Create the JS configruation file, e.g.  `/Users/abc/my-project/tools/swig-config/swig-config.js` with the following content\n    \n    ```js\n    'use strict';\n    const path = require('path');\n    \n    // Developer's custom module configuration\n    // configList is required\n    const configList = [\n        [ 'your_module_interface_0.i', 'jsb_your_module_interface_0_auto.cpp' ],\n        [ 'your_module_interface_1.i', 'jsb_your_module_interface_1_auto.cpp' ],\n        // ......\n    ];\n    \n    const projectRoot = path.resolve(path.join(__dirname, '..', '..'));\n    // interfaceDir is optional\n    const interfacesDir = path.join(projectRoot, 'tools', 'swig-config');\n    // bindingsOutDir is optional\n    const bindingsOutDir = path.join(projectRoot, 'native', 'engine', 'common', 'Classes', 'bindings', 'auto');\n    \n    module.exports = {\n        interfacesDir, // optional, if it isn't exported, the items in configList should be absolute or relative to current directory of swig-config.js\n        bindingsOutDir, // optional, if it isn't exported, the items in configList should be absolute or relative to current directory of swig-config.js\n        configList // required\n    };\n    ```\n  \n  - Run the following command\n    \n    ```bash\n    # If current workspace is not in '/Users/abc/my-project/tools/swig-config'\n    $ node < Engine Root Path >/native/tools/swig-config/genbindings.js -c /Users/abc/my-project/tools/swig-config/swig-config.js\n    ```\n    \n    ```bash\n    # If you have already navigate to '/Users/abc/my-project/tools/swig-config' directory, you could run the command without -c argument like:\n    $ cd /Users/abc/my-project/tools/swig-config\n    $ node < Engine Root Path >/native/tools/swig-config/genbindings.js\n    ```\n\n## Swig Interface File\n\n- There is a [swig-interface-template.i](swig-interface-template.i) in `engine/native/tools/swig-config` directory, just copy and rename it to some place in your project. There some comments demonstrate how to configure your module in `.i` file.  You could also reference engine internal `.i` files in `engine/native/tools/swig-config`, for instance, `scene.i` or `assets.i` for a quick start.\n- If you're using `Visual Studio Code`, you could install `SWIG Language` extension which was developed by `Hong-She Liang` for highlight syntax support.\n- For more details of writing `.i` file, please visit [tutorial](#Tutorial) section.\n\n## Tutorial\n\nPlease visit [tutorial/index.md](tutorial/index.md),  which includes binding a new module in engine or user's project step by step.    \n","native/tools/tojs/gen_d_ts/tsconfig.json":"# Gen_d_ts Skill\n\nPath: `native/tools/tojs/gen_d_ts/tsconfig.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/cocos/cocos-engine/HEAD/native/tools/tojs/gen_d_ts/tsconfig.json)","native/tools/bindings-generator/targets/spidermonkey/conversions.yaml":"# Spidermonkey Skill\n\nPath: `native/tools/bindings-generator/targets/spidermonkey/conversions.yaml`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/cocos/cocos-engine/HEAD/native/tools/bindings-generator/targets/spidermonkey/conversions.yaml)","native/tools/simulator/frameworks/runtime-src/proj.win32/build-cfg.json":"# Proj.win32 Skill\n\nPath: `native/tools/simulator/frameworks/runtime-src/proj.win32/build-cfg.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/cocos/cocos-engine/HEAD/native/tools/simulator/frameworks/runtime-src/proj.win32/build-cfg.json)","native/tools/simulator/frameworks/runtime-src/proj.ios_mac/mac/build-cfg.json":"# Mac Skill\n\nPath: `native/tools/simulator/frameworks/runtime-src/proj.ios_mac/mac/build-cfg.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/cocos/cocos-engine/HEAD/native/tools/simulator/frameworks/runtime-src/proj.ios_mac/mac/build-cfg.json)","native/tools/simulator/frameworks/runtime-src/SimulatorApp-Mac/Images.xcassets/AppIcon.appiconset/Contents.json":"# AppIcon.appiconset Skill\n\nPath: `native/tools/simulator/frameworks/runtime-src/SimulatorApp-Mac/Images.xcassets/AppIcon.appiconset/Contents.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/cocos/cocos-engine/HEAD/native/tools/simulator/frameworks/runtime-src/SimulatorApp-Mac/Images.xcassets/AppIcon.appiconset/Contents.json)"},"items":[{"name":"parsed-effect-info.json","path":"editor/assets/tools/parsed-effect-info.json","rawUrl":"https://raw.githubusercontent.com/cocos/cocos-engine/HEAD/editor/assets/tools/parsed-effect-info.json","title":"Tools Skill","category":"anthropic-skill","format":"json","content":"{\"list\":[{\"args\":[\"vec3 color\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\color\\\\aces.chunk\",\"line\":2,\"name\":\"ACESToneMap\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"vec4 shadowPos\",\"vec3 worldNormal\",\"float normalBias\",\"vec3 matViewDir0\",\"vec3 matViewDir1\",\"vec3 matViewDir2\",\"vec2 projScaleXY\"],\"column\":7,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":52,\"name\":\"ApplyShadowDepthBias_FaceNormal\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[\"vec4 shadowPos\",\"vec3 worldNormal\",\"float normalBias\",\"mat4 matLightView\",\"vec2 projScaleXY\"],\"column\":7,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":64,\"name\":\"ApplyShadowDepthBias_FaceNormal\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[\"vec4 shadowPos\",\"float viewspaceDepthBias\",\"float projScaleZ\",\"float projBiasZ\"],\"column\":7,\"comment\":\" (projScaleZ, projBiasZ) = cc_shadowProjDepthInfo.xy\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":110,\"name\":\"ApplyShadowDepthBias_Orthographic\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[\"vec4 shadowPos\",\"float viewspaceDepthBias\"],\"column\":7,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":85,\"name\":\"ApplyShadowDepthBias_Perspective\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[\"vec4 shadowPos\",\"float viewspaceDepthBias\",\"vec3 worldPos\"],\"column\":7,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":127,\"name\":\"ApplyShadowDepthBias_PerspectiveLinearDepth\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[\"float baseColor\",\"float detailedColor\"],\"column\":6,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\effect\\\\special-effects.chunk\",\"line\":21,\"name\":\"BlendDetailedColorMap\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec3 baseColor\",\"vec3 detailedColor\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\effect\\\\special-effects.chunk\",\"line\":36,\"name\":\"BlendDetailedColorMap\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"vec3 baseNormalFromMap\",\"vec3 detailedNormalFromMap\",\"float detailedIntensity\"],\"column\":5,\"comment\":\" NormalFromMap is: texture(normalmap) - 0.5\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\effect\\\\special-effects.chunk\",\"line\":15,\"name\":\"BlendDetailedNormalMap\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"out vec4 csmPos\",\"out vec4 csmPosWithBias\",\"vec3 worldPos\",\"vec3 N\",\"vec2 shadowBias\"],\"column\":10,\"comment\":\" output csmPos is non-biased position that can be used for sampling shadow map after homogeneous divid\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":347,\"name\":\"CCCSMFactorBase\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"out vec4 csmPos\",\"out vec4 csmPosWithBias\",\"vec3 worldPos\",\"vec3 N\",\"vec2 shadowBias\"],\"column\":10,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":416,\"name\":\"CCCSMFactorBase\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec3 worldPos\",\"vec3 N\",\"vec2 shadowBias\"],\"column\":8,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":428,\"name\":\"CCCSMFactorBase\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"out vec4 csmPos\",\"out vec4 shadowProjDepthInfo\",\"out vec4 shadowProjInfo\",\"out vec3 shadowViewDir0\",\"out vec3 shadowViewDir1\",\"out vec3 shadowViewDir2\",\"vec3 worldPos\",\"int level\"],\"column\":9,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":294,\"name\":\"CCGetCSMLevel\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[\"out bool isTransitionArea\",\"out highp float transitionRatio\",\"out vec4 csmPos\",\"out vec4 shadowProjDepthInfo\",\"out vec4 shadowProjInfo\",\"out vec3 shadowViewDir0\",\"out vec3 shadowViewDir1\",\"out vec3 shadowViewDir2\",\"vec3 worldPos\"],\"column\":8,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":313,\"name\":\"CCGetCSMLevel\",\"type\":\"int\",\"usage\":\"function\"},{\"args\":[\"out vec4 csmPos\",\"out vec4 shadowProjDepthInfo\",\"out vec4 shadowProjInfo\",\"out vec3 shadowViewDir0\",\"out vec3 shadowViewDir1\",\"out vec3 shadowViewDir2\",\"vec3 worldPos\"],\"column\":8,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":339,\"name\":\"CCGetCSMLevel\",\"type\":\"int\",\"usage\":\"function\"},{\"args\":[\"out vec4 csmPos\",\"out vec4 shadowProjDepthInfo\",\"out vec4 shadowProjInfo\",\"out vec3 shadowViewDir0\",\"out vec3 shadowViewDir1\",\"out vec3 shadowViewDir2\",\"vec3 worldPos\"],\"column\":8,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":412,\"name\":\"CCGetCSMLevel\",\"type\":\"int\",\"usage\":\"function\"},{\"args\":[\"out highp float ratio\",\"vec3 clipPos\"],\"column\":9,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":253,\"name\":\"CCGetCSMLevelWithTransition\",\"type\":\"bool\",\"usage\":\"function\"},{\"args\":[\"vec4 shadowPosWithDepthBias\"],\"column\":8,\"comment\":\"////////////////////////////////////////////////////////Directional Light Shadow\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":136,\"name\":\"CCGetDirLightShadowFactorHard\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec4 shadowPosWithDepthBias\"],\"column\":8,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":144,\"name\":\"CCGetDirLightShadowFactorSoft\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec4 shadowPosWithDepthBias\"],\"column\":8,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":152,\"name\":\"CCGetDirLightShadowFactorSoft3X\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec4 shadowPosWithDepthBias\"],\"column\":8,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":160,\"name\":\"CCGetDirLightShadowFactorSoft5X\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec3 worldPos\",\"float viewSpaceBias\"],\"column\":6,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":21,\"name\":\"CCGetLinearDepth\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec3 worldPos\"],\"column\":6,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":27,\"name\":\"CCGetLinearDepth\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec4 shadowPosWithDepthBias\",\"vec3 worldPos\"],\"column\":8,\"comment\":\"////////////////////////////////////////////////////////Spot Light Shadow\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":170,\"name\":\"CCGetSpotLightShadowFactorHard\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec4 shadowPosWithDepthBias\",\"vec3 worldPos\"],\"column\":8,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":178,\"name\":\"CCGetSpotLightShadowFactorSoft\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec4 shadowPosWithDepthBias\",\"vec3 worldPos\"],\"column\":8,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":186,\"name\":\"CCGetSpotLightShadowFactorSoft3X\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec4 shadowPosWithDepthBias\",\"vec3 worldPos\"],\"column\":8,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":194,\"name\":\"CCGetSpotLightShadowFactorSoft5X\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"out mat4 matWorld\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\world-transform.chunk\",\"line\":3,\"name\":\"CCGetWorldMatrix\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[\"out mat4 matWorld\",\"out mat4 matWorldIT\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\world-transform.chunk\",\"line\":17,\"name\":\"CCGetWorldMatrixFull\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[\"int level\",\"vec3 worldPos\"],\"column\":9,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":277,\"name\":\"CCHasCSMLevel\",\"type\":\"bool\",\"usage\":\"function\"},{\"args\":[\"out vec4 shadowPosWithDepthBias\",\"vec4 shadowPos\",\"vec3 N\",\"vec2 shadowBias\"],\"column\":8,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":229,\"name\":\"CCShadowFactorBase\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec4 shadowPos\",\"vec3 N\",\"vec2 shadowBias\"],\"column\":8,\"comment\":\" compatible version\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":423,\"name\":\"CCShadowFactorBase\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"out vec4 shadowPosWithDepthBias\",\"vec4 shadowPos\",\"vec3 worldPos\",\"vec2 shadowBias\"],\"column\":8,\"comment\":\"////////////////////////////////////////////////////////Main Functions\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":204,\"name\":\"CCSpotShadowFactorBase\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec4 shadowPos\",\"vec3 worldPos\",\"vec2 shadowBias\"],\"column\":8,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":433,\"name\":\"CCSpotShadowFactorBase\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"inout vec4 color\",\"float factor\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\fog.chunk\",\"line\":29,\"name\":\"CC_APPLY_FOG_BASE\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[\"uv\"],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":47,\"name\":\"CC_HANDLE_GET_CLIP_FLIP\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"uv\"],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":46,\"name\":\"CC_HANDLE_RT_SAMPLE_FLIP\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":98,\"name\":\"CC_SURFACES_ENABLE_DEBUG_VIEW\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":39,\"name\":\"CC_SURFACES_FLIP_UV\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":87,\"name\":\"CC_SURFACES_LIGHTING_2ND_LAYER_SPECULAR\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":48,\"name\":\"CC_SURFACES_LIGHTING_ANISOTROPIC\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":51,\"name\":\"CC_SURFACES_LIGHTING_ANISOTROPIC_ENVCONVOLUTION_COUNT\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":75,\"name\":\"CC_SURFACES_LIGHTING_CLEAR_COAT\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":72,\"name\":\"CC_SURFACES_LIGHTING_DUAL_LOBE_SPECULAR\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":81,\"name\":\"CC_SURFACES_LIGHTING_SSS\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":63,\"name\":\"CC_SURFACES_LIGHTING_TRANSMIT_DIFFUSE\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":60,\"name\":\"CC_SURFACES_LIGHTING_TRANSMIT_SPECULAR\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":69,\"name\":\"CC_SURFACES_LIGHTING_TRT\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":78,\"name\":\"CC_SURFACES_LIGHTING_TT\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":57,\"name\":\"CC_SURFACES_LIGHTING_USE_FRESNEL\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":66,\"name\":\"CC_SURFACES_LIGHTING_USE_SHADOWMAP_TRANSMIT\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":25,\"name\":\"CC_SURFACES_TRANSFER_CLIP_POS\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":22,\"name\":\"CC_SURFACES_TRANSFER_LOCAL_POS\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":54,\"name\":\"CC_SURFACES_USE_LEGACY_COMPATIBLE_LIGHTING\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":31,\"name\":\"CC_SURFACES_USE_LIGHT_MAP\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":45,\"name\":\"CC_SURFACES_USE_REFLECTION_DENOISE\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":13,\"name\":\"CC_SURFACES_USE_SECOND_UV\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":16,\"name\":\"CC_SURFACES_USE_TANGENT_SPACE\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":42,\"name\":\"CC_SURFACES_USE_TWO_SIDED\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":19,\"name\":\"CC_SURFACES_USE_VERTEX_COLOR\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\shading-entries\\\\data-structures\\\\vs-output.chunk\",\"line\":2,\"name\":\"CC_SURFACES_VARING_MODIFIER\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\shading-entries\\\\data-structures\\\\fs-input.chunk\",\"line\":2,\"name\":\"CC_SURFACES_VARING_MODIFIER\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"vec4 pos\",\"out float factor\"],\"column\":5,\"comment\":\" Fog helper functions\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\fog.chunk\",\"line\":14,\"name\":\"CC_TRANSFER_FOG_BASE\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[\"vec3 spotLightDir\",\"vec3 L\",\"float cosAngleOuter\"],\"column\":6,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\attenuation.chunk\",\"line\":42,\"name\":\"CalculateAngleAttenuation\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec3 normal\",\"vec3 tangent\",\"float mirrorNormal\"],\"column\":5,\"comment\":\" for right-hand coordinates, params must be normalized\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\math\\\\coordinates.chunk\",\"line\":60,\"name\":\"CalculateBinormal\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"vec3 R\",\"vec3 worldPos\",\"vec3 cubeCenterPos\",\"vec3 cubeBoxHalfSize\"],\"column\":5,\"comment\":\" fix cubemap direction with box projection\\r\\n return unnormalized vector and weight for exceeding\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\functions.chunk\",\"line\":72,\"name\":\"CalculateBoxProjectedDirection\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[\"float distToLightSqr\",\"float lightRadius\",\"float lightRange\"],\"column\":6,\"comment\":\" advanced\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\attenuation.chunk\",\"line\":31,\"name\":\"CalculateDistanceAttenuation\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"float ior\",\"float NoVSat\"],\"column\":6,\"comment\":\" saturated N dot V\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\bxdf.chunk\",\"line\":3,\"name\":\"CalculateFresnelCoefficient\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec3 tangent\",\"vec3 binormal\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\math\\\\coordinates.chunk\",\"line\":68,\"name\":\"CalculateNormal\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"vec3 normalFromTangentSpace\",\"float normalStrength\",\"vec3 normal\",\"vec3 tangent\",\"float mirrorNormal\"],\"column\":5,\"comment\":\" param1 is normal from normalmap\\r\\n return value is un-normalized\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\math\\\\coordinates.chunk\",\"line\":76,\"name\":\"CalculateNormalFromTangentSpace\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"vec3 N\",\"vec3 V\",\"vec3 worldPos\",\"vec4 plane\",\"vec3 cameraPos\",\"float probeReflectedDepth\"],\"column\":5,\"comment\":\" for bumped planar reflection\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\functions.chunk\",\"line\":44,\"name\":\"CalculatePlanarReflectPositionOnPlane\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"vec3 N\",\"vec3 V\",\"float NoV\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\functions.chunk\",\"line\":35,\"name\":\"CalculateReflectDirection\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"vec3 N\",\"vec3 V\",\"float NoV\",\"float ior\"],\"column\":5,\"comment\":\" return unnormalized vector, support oppo-side\\r\\n V from pixel to camera\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\functions.chunk\",\"line\":5,\"name\":\"CalculateRefractDirection\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"vec3 N\",\"vec3 V\",\"float NoV\",\"float ior\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\functions.chunk\",\"line\":23,\"name\":\"CalculateRefractDirectionFast\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"vec3 unscatteredColor\",\"float distance\",\"float outScatterExtinctCoef\",\"float inScatterExtinctCoef\",\"float inScatterCoef\",\"vec3 inScatterColor\",\"vec3 outScatterColor\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\bxdf.chunk\",\"line\":16,\"name\":\"CalculateScattering\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"vec3 normal\",\"vec3 binormal\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\math\\\\coordinates.chunk\",\"line\":64,\"name\":\"CalculateTangent\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"out vec2 deltaV\",\"float frameCount\",\"float animSpeed\",\"float elapseTime\"],\"column\":6,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\mesh\\\\vat-animation.chunk\",\"line\":29,\"name\":\"CalculateVATAnimationUV\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"float A\",\"float B\"],\"column\":6,\"comment\":\" Experimental\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\mesh\\\\vat-animation.chunk\",\"line\":168,\"name\":\"CalculateVATDecodeUV\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"inout vec3 L[5\",\", out int n\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\rect-area-light.chunk\",\"line\":12,\"name\":\"ClipQuadToHorizon\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[\"type\"],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\data\\\\packing.chunk\",\"line\":19,\"name\":\"DEFINE_PACK_HIGHP_FUNC\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"float roughness\",\"float NoH\"],\"column\":6,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\brdf.chunk\",\"line\":3,\"name\":\"D_GGX\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"float RoughnessX\",\"float RoughnessY\",\"float NoH\",\"vec3 H\",\"vec3 X\",\"vec3 Y\"],\"column\":6,\"comment\":\" How to get an anisotropic offset along T/B:\\r\\n 1. accurate: rotation TBN basis, let N intend to T/B, such as flow map as normalmap, output vec3(0, delta, 1) instead of vec3(0, 0, 1)\\r\\n 2. not accurate: H intend to V, and passed to this function\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\brdf.chunk\",\"line\":35,\"name\":\"D_GGXAniso\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"float roughness\",\"float NoH\"],\"column\":6,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\brdf.chunk\",\"line\":11,\"name\":\"D_GGXMobile\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec3 color\",\"float fraction\"],\"column\":5,\"comment\":\" fraction is saturation percentage, 0 means gray\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\graph-expression\\\\base.chunk\",\"line\":5,\"name\":\"Desaturation\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"vec4 clipPos\",\"vec2 screen_resolution\",\"float transparency\"],\"column\":5,\"comment\":\" dithered transparency (dithered alpha test), better looking with TAA\\r\\n arguments: FSInput_clipPos, cc_viewPort.zw, baseColor.a\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\effect\\\\special-effects.chunk\",\"line\":4,\"name\":\"DitheredAlphaClip\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":18,\"name\":\"EPSILON\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":19,\"name\":\"EPSILON_LOWP\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":21,\"name\":\"EXP_VALUE\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"samplerCube tex\",\"vec3 R\",\"float roughness\",\"float mipCount\"],\"column\":7,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\texture\\\\cubemap.chunk\",\"line\":33,\"name\":\"EnvReflection\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"vec3 R\",\"float roughness\",\"float mipCount\",\"float denoiseIntensity\"],\"column\":7,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\texture\\\\cubemap.chunk\",\"line\":3,\"name\":\"EnvReflectionWithMipFiltering\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"vec4 pos\",\"vec3 cameraPos\",\"float fogStart\",\"float fogDensity\",\"float fogAtten\"],\"column\":6,\"comment\":\"pos, cc_cameraPos.xyz, cc_fogBase.x, cc_fogBase.z, cc_fogAdd.z\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\effect\\\\fog.chunk\",\"line\":11,\"name\":\"ExpFog\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec4 pos\",\"vec3 cameraPos\",\"float fogStart\",\"float fogDensity\",\"float fogAtten\"],\"column\":6,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\effect\\\\fog.chunk\",\"line\":18,\"name\":\"ExpSquaredFog\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":22,\"name\":\"FP_MAX\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":23,\"name\":\"FP_SCALE\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":24,\"name\":\"FP_SCALE_INV\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\shading-entries\\\\data-structures\\\\fs-input.chunk\",\"line\":58,\"name\":\"FSInput_clipPos\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\shading-entries\\\\data-structures\\\\fs-input.chunk\",\"line\":15,\"name\":\"FSInput_faceSideSign\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\shading-entries\\\\data-structures\\\\fs-input.chunk\",\"line\":50,\"name\":\"FSInput_fogFactor\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\shading-entries\\\\data-structures\\\\fs-input.chunk\",\"line\":39,\"name\":\"FSInput_lightMapUV\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\shading-entries\\\\data-structures\\\\fs-input.chunk\",\"line\":54,\"name\":\"FSInput_localPos\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\shading-entries\\\\data-structures\\\\fs-input.chunk\",\"line\":26,\"name\":\"FSInput_mirrorNormal\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\shading-entries\\\\data-structures\\\\fs-input.chunk\",\"line\":46,\"name\":\"FSInput_reflectionProbeId\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\shading-entries\\\\data-structures\\\\fs-input.chunk\",\"line\":43,\"name\":\"FSInput_shadowBias\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\shading-entries\\\\data-structures\\\\fs-input.chunk\",\"line\":16,\"name\":\"FSInput_texcoord\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\shading-entries\\\\data-structures\\\\fs-input.chunk\",\"line\":33,\"name\":\"FSInput_texcoord1\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\shading-entries\\\\data-structures\\\\fs-input.chunk\",\"line\":19,\"name\":\"FSInput_vertexColor\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\shading-entries\\\\data-structures\\\\fs-input.chunk\",\"line\":14,\"name\":\"FSInput_worldNormal\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\shading-entries\\\\data-structures\\\\fs-input.chunk\",\"line\":13,\"name\":\"FSInput_worldPos\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\shading-entries\\\\data-structures\\\\fs-input.chunk\",\"line\":25,\"name\":\"FSInput_worldTangent\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":25,\"name\":\"GRAY_VECTOR\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"vec3 L\",\"vec3 litDir\",\"float litAngleScale\",\"float litAngleOffset\"],\"column\":6,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\attenuation.chunk\",\"line\":22,\"name\":\"GetAngleAtt\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"float roughness\",\"float anisotropyShape\",\"vec3 V\",\"vec3 N\",\"vec3 X\",\"vec3 Y\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\brdf.chunk\",\"line\":45,\"name\":\"GetAnisotropicReflect\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"float roughness\",\"float anisotropyShape\",\"out float roughnessX\",\"out float roughnessY\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\brdf.chunk\",\"line\":19,\"name\":\"GetAnisotropicRoughness\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[\"float depthHS\",\"mat4 matProj\"],\"column\":6,\"comment\":\" depthHS (Z) = ndc depth(-1 ~ +1)\\r\\n return camera depth (W), negative in RH\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\math\\\\coordinates.chunk\",\"line\":32,\"name\":\"GetCameraDepthRH\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"float depthHS\",\"float matProj32\",\"float matProj22\"],\"column\":6,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\math\\\\coordinates.chunk\",\"line\":36,\"name\":\"GetCameraDepthRH\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"out vec3 centerPos\",\"out vec3 boxHalfSize\",\"out float mipCount\",\"float probeId\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\probe.chunk\",\"line\":29,\"name\":\"GetCubeReflectionProbeData\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[\"float distSqr\",\"float invSqrAttRadius\"],\"column\":6,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\attenuation.chunk\",\"line\":16,\"name\":\"GetDistAtt\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"out vec3 lightmapColor\",\"out float dirShadow\",\"out float ao\",\"sampler2D lightingMap\",\"vec2 luv\",\"float lum\",\"vec3 worldNormal\"],\"column\":5,\"comment\":\" for surface shader\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\light-map.chunk\",\"line\":23,\"name\":\"GetLightMapColor\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[\"vec3 viewPos\",\"float near\",\"float far\"],\"column\":6,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\math\\\\coordinates.chunk\",\"line\":54,\"name\":\"GetLinearDepthFromViewSpace\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"out float metallic\",\"out vec3 albedo\",\"vec3 diffuse\",\"vec3 specular\",\"float channelFaultTolerant\",\"float f0\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\mesh\\\\material.chunk\",\"line\":1,\"name\":\"GetMetallicAlbedoFromDiffuseSpecularMathematic\",\"type\":\"bool\",\"usage\":\"function\"},{\"args\":[\"out float metallic\",\"out vec3 albedo\",\"vec3 diffuse\",\"vec3 specular\",\"float f0\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\mesh\\\\material.chunk\",\"line\":29,\"name\":\"GetMetallicAlbedoFromDiffuseSpecularWithoutColor\",\"type\":\"bool\",\"usage\":\"function\"},{\"args\":[\"vec3 worldPos\",\"mat4 matVirtualCameraViewProj\",\"float flipNDCSign\",\"vec3 viewDir\",\"vec3 reflectDir\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\math\\\\coordinates.chunk\",\"line\":21,\"name\":\"GetPlanarReflectScreenUV\",\"type\":\"vec2\",\"usage\":\"function\"},{\"args\":[\"out vec4 plane\",\"out float planarReflectionDepthScale\",\"out float mipCount\",\"float probeId\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\probe.chunk\",\"line\":11,\"name\":\"GetPlanarReflectionProbeData\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[\"vec4 clipPos\",\"float flipNDCSign\"],\"column\":5,\"comment\":\" return 0-1\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\math\\\\coordinates.chunk\",\"line\":7,\"name\":\"GetScreenUV\",\"type\":\"vec2\",\"usage\":\"function\"},{\"args\":[\"vec3 worldPos\",\"mat4 matViewProj\",\"float flipNDCSign\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\math\\\\coordinates.chunk\",\"line\":15,\"name\":\"GetScreenUV\",\"type\":\"vec2\",\"usage\":\"function\"},{\"args\":[\"out vec3 shadowNDCPos\",\"vec4 shadowPosWithDepthBias\"],\"column\":7,\"comment\":\"////////////////////////////////////////////////////////Helper Functions\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":40,\"name\":\"GetShadowNDCPos\",\"type\":\"bool\",\"usage\":\"function\"},{\"args\":[\"sampler2D dataMap\",\"float dataMapWidth\",\"float x\",\"float uv_y\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\probe.chunk\",\"line\":2,\"name\":\"GetTexData\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[\"vec3 posHS\",\"mat4 matProj\",\"mat4 matProjInv\"],\"column\":5,\"comment\":\" posHS = ndc pos (xyz: -1 ~ +1)\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\math\\\\coordinates.chunk\",\"line\":42,\"name\":\"GetViewPosFromNDCPosRH\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[\"float NDCDepth\",\"float projScaleZ\",\"float projBiasZ\"],\"column\":8,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":76,\"name\":\"GetViewSpaceDepthFromNDCDepth_Orthgraphic\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"float NDCDepth\",\"float homogenousDividW\",\"float invProjScaleZ\",\"float invProjBiasZ\"],\"column\":8,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":80,\"name\":\"GetViewSpaceDepthFromNDCDepth_Perspective\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec3 posHS\",\"mat4 matProj\",\"mat4 matViewProjInv\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\math\\\\coordinates.chunk\",\"line\":48,\"name\":\"GetWorldPosFromNDCPosRH\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":7,\"name\":\"HALF_PI\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"vec3 color\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\color\\\\tone-mapping.chunk\",\"line\":5,\"name\":\"HDRToLDR\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"value\",\"defined\"],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\data\\\\packing.chunk\",\"line\":53,\"name\":\"HIGHP_VALUE_FROM_STRUCT_DEFINED\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"value\",\"defined\"],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\data\\\\packing.chunk\",\"line\":70,\"name\":\"HIGHP_VALUE_FROM_STRUCT_DEFINED_SMALL_RANGE\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"type\",\"name\"],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\data\\\\packing.chunk\",\"line\":44,\"name\":\"HIGHP_VALUE_STRUCT_DEFINE\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"value\",\"defined\"],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\data\\\\packing.chunk\",\"line\":61,\"name\":\"HIGHP_VALUE_TO_STRUCT_DEFINED\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"value\",\"defined\"],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\data\\\\packing.chunk\",\"line\":78,\"name\":\"HIGHP_VALUE_TO_STRUCT_DEFINED_SMALL_RANGE\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":13,\"name\":\"INV_HALF_PI\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":14,\"name\":\"INV_PI\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":15,\"name\":\"INV_PI2\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":16,\"name\":\"INV_PI4\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":12,\"name\":\"INV_QUATER_PI\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"light_type\"],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":65,\"name\":\"IS_DIRECTIONAL_LIGHT\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"light_type\"],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":68,\"name\":\"IS_POINT_LIGHT\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"light_type\"],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":69,\"name\":\"IS_RANGED_DIRECTIONAL_LIGHT\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"light_type\"],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":66,\"name\":\"IS_SPHERE_LIGHT\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"light_type\"],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":67,\"name\":\"IS_SPOT_LIGHT\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"vec3 v1\",\"vec3 v2\"],\"column\":6,\"comment\":\" https://eheitzresearch.wordpress.com/415-2/\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\rect-area-light.chunk\",\"line\":107,\"name\":\"IntegrateEdge\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec3 specular\",\"float roughness\",\"float NoV\"],\"column\":5,\"comment\":\" EnvBRDFApprox\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\brdf.chunk\",\"line\":63,\"name\":\"IntegratedGFApprox\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":51,\"name\":\"LIGHT_MAP_TYPE_ALL_IN_ONE\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":50,\"name\":\"LIGHT_MAP_TYPE_DISABLED\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":52,\"name\":\"LIGHT_MAP_TYPE_INDIRECT_OCCLUSION\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":60,\"name\":\"LIGHT_TYPE_DIRECTIONAL\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":61,\"name\":\"LIGHT_TYPE_POINT\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":64,\"name\":\"LIGHT_TYPE_RANGED_DIRECTIONAL\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":63,\"name\":\"LIGHT_TYPE_SPHERE\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":62,\"name\":\"LIGHT_TYPE_SPOT\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":20,\"name\":\"LOG2\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"vec3 N\",\"vec3 V\",\"vec3 P\",\"mat3 Minv\",\"vec3 points[4]\"],\"column\":5,\"comment\":\" https://blog.magnum.graphics/guest-posts/area-lights-with-ltcs/\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\rect-area-light.chunk\",\"line\":114,\"name\":\"LTC_Evaluate\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"vec4 pos\",\"vec3 cameraPos\",\"float fogTop\",\"float fogRange\",\"float fogAtten\"],\"column\":6,\"comment\":\"pos, cc_cameraPos.xyz, cc_fogAdd.x, cc_fogAdd.y, cc_fogAdd.z\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\effect\\\\fog.chunk\",\"line\":26,\"name\":\"LayeredFog\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\lighting-models\\\\data-structures\\\\lighting-intermediate-data.chunk\",\"line\":3,\"name\":\"LightingIntermediateData\",\"type\":\"\",\"usage\":\"variable\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\lighting-models\\\\data-structures\\\\lighting-misc-data.chunk\",\"line\":3,\"name\":\"LightingMiscData\",\"type\":\"\",\"usage\":\"variable\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\lighting-models\\\\data-structures\\\\lighting-result.chunk\",\"line\":3,\"name\":\"LightingResult\",\"type\":\"\",\"usage\":\"variable\"},{\"args\":[\"vec4 pos\",\"vec3 cameraPos\",\"float fogStart\",\"float fogEnd\"],\"column\":6,\"comment\":\"pos, cc_cameraPos.xyz, cc_fogBase.x, cc_fogBase.y\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\effect\\\\fog.chunk\",\"line\":4,\"name\":\"LinearFog\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec3 linear\"],\"column\":5,\"comment\":\" #pragma define LinearToSRGB(linear) pow(linear, vec3(0.454545))\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\color\\\\gamma.chunk\",\"line\":19,\"name\":\"LinearToSRGB\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"v\"],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\data\\\\unpack.chunk\",\"line\":4,\"name\":\"MOD_FINT_128\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":8,\"name\":\"PI\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":9,\"name\":\"PI2\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":10,\"name\":\"PI4\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":6,\"name\":\"QUATER_PI\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":56,\"name\":\"REFLECTION_PROBE_TYPE_CUBE\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":55,\"name\":\"REFLECTION_PROBE_TYPE_NONE\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":57,\"name\":\"REFLECTION_PROBE_TYPE_PLANAR\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"inout vec3 binormal\",\"inout vec3 normal\",\"in vec3 tangent\",\"float rotationAngle\",\"float mirrorNormal\"],\"column\":5,\"comment\":\" fast rotation for anisotropic offset\\r\\n rotationAngle: -1 - +1\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\math\\\\coordinates.chunk\",\"line\":115,\"name\":\"RotateNormalAndBinormal\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[\"inout vec3 tangent\",\"inout vec3 binormal\",\"vec3 normal\",\"float rotationAngle\"],\"column\":5,\"comment\":\" rotationAngle: radians, 0-2Pi\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\math\\\\coordinates.chunk\",\"line\":99,\"name\":\"RotateTangentAndBinormal\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[\"vec3 v\",\"float cosTheta\",\"float sinTheta\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\math\\\\coordinates.chunk\",\"line\":84,\"name\":\"RotationVecFromAxisY\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"vec3 v\",\"float rotateAngleArc\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\math\\\\coordinates.chunk\",\"line\":93,\"name\":\"RotationVecFromAxisY\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"vec2 uv\",\"vec2 centerUV\",\"float time\",\"float speed\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\graph-expression\\\\base.chunk\",\"line\":11,\"name\":\"Rotator\",\"type\":\"vec2\",\"usage\":\"function\"},{\"args\":[\"vec3 normal\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\sh.chunk\",\"line\":4,\"name\":\"SHEvaluate\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"vec3 gamma\"],\"column\":5,\"comment\":\" #pragma define SRGBToLinear(gamma) pow(gamma, vec3(2.2))\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\color\\\\gamma.chunk\",\"line\":6,\"name\":\"SRGBToLinear\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"v\"],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\data\\\\unpack.chunk\",\"line\":3,\"name\":\"STEP_FINT_128\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":76,\"name\":\"SURFACES_MAX_TRANSMIT_DEPTH_VALUE\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"out vec3 lightmapColor\",\"out float dirShadow\",\"out float ao\",\"sampler2D lightingMap\",\"vec2 luv\",\"float lum\",\"vec3 worldNormal\"],\"column\":5,\"comment\":\" for legacy effects\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\light-map.chunk\",\"line\":2,\"name\":\"SampleAndDecodeLightMapColor\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[\"sampler2D exrRGBE\",\"vec2 uv\"],\"column\":5,\"comment\":\" for exr data texture and sub resources\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\texture\\\\texture-misc.chunk\",\"line\":3,\"name\":\"SampleTextureExr\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"sampler2D exrRGBE\",\"sampler2D exrSign\",\"vec2 uv\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\texture\\\\texture-misc.chunk\",\"line\":9,\"name\":\"SampleTextureExr\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"sampler2D exrRGBE\",\"sampler2D exrSign\",\"sampler2D exrAlpha\",\"vec2 uv\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\texture\\\\texture-misc.chunk\",\"line\":16,\"name\":\"SampleTextureExrWithAlpha\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[\"float distSqr\",\"float invSqrAttRadius\"],\"column\":6,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\attenuation.chunk\",\"line\":10,\"name\":\"SmoothDistAtt\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"float distSqr\",\"float invSqrAttRadius\"],\"column\":6,\"comment\":\" base\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\attenuation.chunk\",\"line\":2,\"name\":\"SmoothDistAtt2\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec2 center\",\"vec2 point\",\"float radius\",\"float hardness\"],\"column\":6,\"comment\":\" return 0.0 when out of range\\r\\n hardness: 0 - 1\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\graph-expression\\\\base.chunk\",\"line\":36,\"name\":\"SphereMask\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec3 center\",\"vec3 point\",\"float radius\",\"float hardness\"],\"column\":6,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\graph-expression\\\\base.chunk\",\"line\":42,\"name\":\"SphereMask\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\legacy\\\\shading-standard-base.chunk\",\"line\":3,\"name\":\"StandardSurface\",\"type\":\"\",\"usage\":\"variable\"},{\"args\":[],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_ALPHA_CLIP_ONLY\\r\\n for base shape without color usage, such as render-to-shadow\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":12,\"name\":\"SurfacesFragmentAlphaClipOnly\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[\"out float isRotation\"],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_ANISOTROPY_PARAMS\\r\\n isRotation=1.0: shape(0~1), rotation(0~2PI), 0.0, 0.0\\r\\n or\\r\\n isRotation=0.0: shape(0~1), anisoDir.xyz(-1~1)\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":57,\"name\":\"SurfacesFragmentModifyAnisotropyParams\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[\"out vec4 baseColorAndTransparency\",\"out vec3 shade1\",\"out vec3 shade2\",\"in vec3 baseColor\"],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_BASECOLOR_AND_TOONSHADE\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\toon-fs.chunk\",\"line\":5,\"name\":\"SurfacesFragmentModifyBaseColorAndToonShade\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_BASECOLOR_AND_TRANSPARENCY\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":3,\"name\":\"SurfacesFragmentModifyBaseColorAndTransparency\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[\"float roughness\"],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_DUAL_LOBE_SPECULAR_PARAMS\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":169,\"name\":\"SurfacesFragmentModifyDualLobeSpecularParams\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_EMISSIVE\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":66,\"name\":\"SurfacesFragmentModifyEmissive\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[],\"column\":6,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_IOR\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":46,\"name\":\"SurfacesFragmentModifyIOR\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_PBRPARAMS\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":74,\"name\":\"SurfacesFragmentModifyPBRParams\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_SSS_PARAMS\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":179,\"name\":\"SurfacesFragmentModifySSSParams\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[\"inout SurfacesMaterialData surfaceData\"],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_SHARED_DATA\\r\\n some material datas use shared raw data, avoid sample / calculate same raw data multiply times, use this function for better performance\\r\\n this function invokes at last\\r\\n should use corresponding shading-model header: #include <surfaces/data-structures/XXX> before function define\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":194,\"name\":\"SurfacesFragmentModifySharedData\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_TRT_COLOR\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":142,\"name\":\"SurfacesFragmentModifyTRTColor\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_TRT_PARAMS\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":131,\"name\":\"SurfacesFragmentModifyTRTParams\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[\"in vec3 baseColor\"],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_TT_COLOR\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":160,\"name\":\"SurfacesFragmentModifyTTColor\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_TT_PARAMS\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":150,\"name\":\"SurfacesFragmentModifyTTParams\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[],\"column\":6,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_TOON_SHADOW_COVER\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\toon-fs.chunk\",\"line\":22,\"name\":\"SurfacesFragmentModifyToonShadowCover\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_TOON_SPECULAR\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\toon-fs.chunk\",\"line\":30,\"name\":\"SurfacesFragmentModifyToonSpecular\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_TOON_STEP_AND_FEATHER\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\toon-fs.chunk\",\"line\":14,\"name\":\"SurfacesFragmentModifyToonStepAndFeather\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_TRANSMIT_DIFFUSE_PARAMS\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":115,\"name\":\"SurfacesFragmentModifyTransmitDiffuseParams\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_TRANSMIT_IN_SCATTERING_COLOR\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":98,\"name\":\"SurfacesFragmentModifyTransmitInScatteringColor\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_TRANSMIT_OUT_SCATTERING_COLOR\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":106,\"name\":\"SurfacesFragmentModifyTransmitOutScatteringColor\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_TRANSMIT_SCATTERING_PARAMS\\r\\n scattering related parameters and colors\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":84,\"name\":\"SurfacesFragmentModifyTransmitScatteringParams\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_WORLD_NORMAL\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":20,\"name\":\"SurfacesFragmentModifyWorldNormal\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"inout vec3 worldTangent\",\"inout vec3 worldBinormal\",\"vec3 worldNormal\"],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_WORLD_TANGENT_AND_BINORMAL\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":28,\"name\":\"SurfacesFragmentModifyWorldTangentAndBinormal\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[\"inout LightingResult result\",\"in LightingIntermediateData lightingData\",\"in SurfacesMaterialData surfaceData\",\"in LightingMiscData miscData\"],\"column\":7,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\lighting-models\\\\default-functions\\\\simple-skin.chunk\",\"line\":9,\"name\":\"SurfacesLightingModifyFinalResult\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\data-structures\\\\standard.chunk\",\"line\":3,\"name\":\"SurfacesMaterialData\",\"type\":\"\",\"usage\":\"variable\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\shading-entries\\\\data-structures\\\\vs-intermediate.chunk\",\"line\":3,\"name\":\"SurfacesStandardVertexIntermediate\",\"type\":\"\",\"usage\":\"variable\"},{\"args\":[\"in SurfacesStandardVertexIntermediate In\"","isInternal":false,"tokens":13053,"sizeBytes":50000},{"name":"conversions.yaml","path":"native/tools/bindings-generator/targets/spidermonkey/conversions.yaml","rawUrl":"https://raw.githubusercontent.com/cocos/cocos-engine/HEAD/native/tools/bindings-generator/targets/spidermonkey/conversions.yaml","title":"Spidermonkey Skill","category":"anthropic-skill","format":"yaml","content":"# Spidermonkey Skill\n\nPath: `native/tools/bindings-generator/targets/spidermonkey/conversions.yaml`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/cocos/cocos-engine/HEAD/native/tools/bindings-generator/targets/spidermonkey/conversions.yaml)","tokens":300,"sizeBytes":258},{"name":"package-lock.json","path":"native/tools/gfx-define-generator/package-lock.json","rawUrl":"https://raw.githubusercontent.com/cocos/cocos-engine/HEAD/native/tools/gfx-define-generator/package-lock.json","title":"gfx-define-generator","category":"anthropic-skill","format":"json","content":"{\n  \"name\": \"gfx-define-generator\",\n  \"version\": \"1.0.0\",\n  \"lockfileVersion\": 3,\n  \"requires\": true,\n  \"packages\": {\n    \"\": {\n      \"name\": \"gfx-define-generator\",\n      \"version\": \"1.0.0\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"js-yaml\": \"^4.0.0\"\n      }\n    },\n    \"node_modules/argparse\": {\n      \"version\": \"2.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz\",\n      \"integrity\": \"sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==\"\n    },\n    \"node_modules/js-yaml\": {\n      \"version\": \"4.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/js-yaml/-/js-yaml-4.0.0.tgz\",\n      \"integrity\": \"sha512-pqon0s+4ScYUvX30wxQi3PogGFAlUyH0awepWvwkj4jD4v+ova3RiYw8bmA6x2rDrEaj8i/oWKoRxpVNW+Re8Q==\",\n      \"dependencies\": {\n        \"argparse\": \"^2.0.1\"\n      },\n      \"bin\": {\n        \"js-yaml\": \"bin/js-yaml.js\"\n      }\n    }\n  }\n}\n","frontmatter":{"name":"gfx-define-generator","version":"1.0.0","lockfileVersion":3,"requires":true,"packages":{"":{"name":"gfx-define-generator","version":"1.0.0","license":"MIT","dependencies":{"js-yaml":"^4.0.0"}},"node_modules/argparse":{"version":"2.0.1","resolved":"https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz","integrity":"sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="},"node_modules/js-yaml":{"version":"4.0.0","resolved":"https://registry.npmjs.org/js-yaml/-/js-yaml-4.0.0.tgz","integrity":"sha512-pqon0s+4ScYUvX30wxQi3PogGFAlUyH0awepWvwkj4jD4v+ova3RiYw8bmA6x2rDrEaj8i/oWKoRxpVNW+Re8Q==","dependencies":{"argparse":"^2.0.1"},"bin":{"js-yaml":"bin/js-yaml.js"}}}},"isInternal":false,"tokens":383,"sizeBytes":925},{"name":"package.json","path":"native/tools/gfx-define-generator/package.json","rawUrl":"https://raw.githubusercontent.com/cocos/cocos-engine/HEAD/native/tools/gfx-define-generator/package.json","title":"gfx-define-generator","category":"anthropic-skill","format":"json","content":"{\n  \"name\": \"gfx-define-generator\",\n  \"version\": \"1.0.0\",\n  \"description\": \"GFX layer definition generator\",\n  \"main\": \"generate.js\",\n  \"scripts\": {\n    \"test\": \"echo \\\"Error: no test specified\\\" && exit 1\"\n  },\n  \"author\": \"YunHsiao\",\n  \"license\": \"MIT\",\n  \"dependencies\": {\n    \"js-yaml\": \"^4.0.0\"\n  }\n}\n","frontmatter":{"name":"gfx-define-generator","version":"1.0.0","description":"GFX layer definition generator","main":"generate.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"YunHsiao","license":"MIT","dependencies":{"js-yaml":"^4.0.0"}},"isInternal":false,"tokens":105,"sizeBytes":306},{"name":"package-lock.json","path":"native/tools/gles-wrangler-generator/package-lock.json","rawUrl":"https://raw.githubusercontent.com/cocos/cocos-engine/HEAD/native/tools/gles-wrangler-generator/package-lock.json","title":"gles-wrangler-generator","category":"anthropic-skill","format":"json","content":"{\n  \"name\": \"gles-wrangler-generator\",\n  \"version\": \"1.0.0\",\n  \"lockfileVersion\": 3,\n  \"requires\": true,\n  \"packages\": {\n    \"\": {\n      \"version\": \"1.0.0\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"axios\": \"^1.8.2\",\n        \"fast-xml-parser\": \"^3.17.6\"\n      }\n    },\n    \"node_modules/asynckit\": {\n      \"version\": \"0.4.0\",\n      \"resolved\": \"https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz\",\n      \"integrity\": \"sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==\",\n      \"license\": \"MIT\"\n    },\n    \"node_modules/axios\": {\n      \"version\": \"1.8.2\",\n      \"resolved\": \"https://registry.npmjs.org/axios/-/axios-1.8.2.tgz\",\n      \"integrity\": \"sha512-ls4GYBm5aig9vWx8AWDSGLpnpDQRtWAfrjU+EuytuODrFBkqesN2RkOQCBzrA1RQNHw1SmRMSDDDSwzNAYQ6Rg==\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"follow-redirects\": \"^1.15.6\",\n        \"form-data\": \"^4.0.0\",\n        \"proxy-from-env\": \"^1.1.0\"\n      }\n    },\n    \"node_modules/call-bind-apply-helpers\": {\n      \"version\": \"1.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz\",\n      \"integrity\": \"sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"es-errors\": \"^1.3.0\",\n        \"function-bind\": \"^1.1.2\"\n      },\n      \"engines\": {\n        \"node\": \">= 0.4\"\n      }\n    },\n    \"node_modules/combined-stream\": {\n      \"version\": \"1.0.8\",\n      \"resolved\": \"https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz\",\n      \"integrity\": \"sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"delayed-stream\": \"~1.0.0\"\n      },\n      \"engines\": {\n        \"node\": \">= 0.8\"\n      }\n    },\n    \"node_modules/delayed-stream\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz\",\n      \"integrity\": \"sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==\",\n      \"license\": \"MIT\",\n      \"engines\": {\n        \"node\": \">=0.4.0\"\n      }\n    },\n    \"node_modules/dunder-proto\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz\",\n      \"integrity\": \"sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"call-bind-apply-helpers\": \"^1.0.1\",\n        \"es-errors\": \"^1.3.0\",\n        \"gopd\": \"^1.2.0\"\n      },\n      \"engines\": {\n        \"node\": \">= 0.4\"\n      }\n    },\n    \"node_modules/es-define-property\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz\",\n      \"integrity\": \"sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==\",\n      \"license\": \"MIT\",\n      \"engines\": {\n        \"node\": \">= 0.4\"\n      }\n    },\n    \"node_modules/es-errors\": {\n      \"version\": \"1.3.0\",\n      \"resolved\": \"https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz\",\n      \"integrity\": \"sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==\",\n      \"license\": \"MIT\",\n      \"engines\": {\n        \"node\": \">= 0.4\"\n      }\n    },\n    \"node_modules/es-object-atoms\": {\n      \"version\": \"1.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz\",\n      \"integrity\": \"sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"es-errors\": \"^1.3.0\"\n      },\n      \"engines\": {\n        \"node\": \">= 0.4\"\n      }\n    },\n    \"node_modules/es-set-tostringtag\": {\n      \"version\": \"2.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz\",\n      \"integrity\": \"sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"es-errors\": \"^1.3.0\",\n        \"get-intrinsic\": \"^1.2.6\",\n        \"has-tostringtag\": \"^1.0.2\",\n        \"hasown\": \"^2.0.2\"\n      },\n      \"engines\": {\n        \"node\": \">= 0.4\"\n      }\n    },\n    \"node_modules/fast-xml-parser\": {\n      \"version\": \"3.17.6\",\n      \"resolved\": \"https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-3.17.6.tgz\",\n      \"integrity\": \"sha512-40WHI/5d2MOzf1sD2bSaTXlPn1lueJLAX6j1xH5dSAr6tNeut8B9ktEL6sjAK9yVON4uNj9//axOdBJUuruCzw==\",\n      \"bin\": {\n        \"xml2js\": \"cli.js\"\n      },\n      \"funding\": {\n        \"type\": \"paypal\",\n        \"url\": \"https://paypal.me/naturalintelligence\"\n      }\n    },\n    \"node_modules/follow-redirects\": {\n      \"version\": \"1.15.9\",\n      \"resolved\": \"https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz\",\n      \"integrity\": \"sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==\",\n      \"funding\": [\n        {\n          \"type\": \"individual\",\n          \"url\": \"https://github.com/sponsors/RubenVerborgh\"\n        }\n      ],\n      \"license\": \"MIT\",\n      \"engines\": {\n        \"node\": \">=4.0\"\n      },\n      \"peerDependenciesMeta\": {\n        \"debug\": {\n          \"optional\": true\n        }\n      }\n    },\n    \"node_modules/form-data\": {\n      \"version\": \"4.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/form-data/-/form-data-4.0.2.tgz\",\n      \"integrity\": \"sha512-hGfm/slu0ZabnNt4oaRZ6uREyfCj6P4fT/n6A1rGV+Z0VdGXjfOhVUpkn6qVQONHGIFwmveGXyDs75+nr6FM8w==\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"asynckit\": \"^0.4.0\",\n        \"combined-stream\": \"^1.0.8\",\n        \"es-set-tostringtag\": \"^2.1.0\",\n        \"mime-types\": \"^2.1.12\"\n      },\n      \"engines\": {\n        \"node\": \">= 6\"\n      }\n    },\n    \"node_modules/function-bind\": {\n      \"version\": \"1.1.2\",\n      \"resolved\": \"https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz\",\n      \"integrity\": \"sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==\",\n      \"license\": \"MIT\",\n      \"funding\": {\n        \"url\": \"https://github.com/sponsors/ljharb\"\n      }\n    },\n    \"node_modules/get-intrinsic\": {\n      \"version\": \"1.3.0\",\n      \"resolved\": \"https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz\",\n      \"integrity\": \"sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"call-bind-apply-helpers\": \"^1.0.2\",\n        \"es-define-property\": \"^1.0.1\",\n        \"es-errors\": \"^1.3.0\",\n        \"es-object-atoms\": \"^1.1.1\",\n        \"function-bind\": \"^1.1.2\",\n        \"get-proto\": \"^1.0.1\",\n        \"gopd\": \"^1.2.0\",\n        \"has-symbols\": \"^1.1.0\",\n        \"hasown\": \"^2.0.2\",\n        \"math-intrinsics\": \"^1.1.0\"\n      },\n      \"engines\": {\n        \"node\": \">= 0.4\"\n      },\n      \"funding\": {\n        \"url\": \"https://github.com/sponsors/ljharb\"\n      }\n    },\n    \"node_modules/get-proto\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz\",\n      \"integrity\": \"sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"dunder-proto\": \"^1.0.1\",\n        \"es-object-atoms\": \"^1.0.0\"\n      },\n      \"engines\": {\n        \"node\": \">= 0.4\"\n      }\n    },\n    \"node_modules/gopd\": {\n      \"version\": \"1.2.0\",\n      \"resolved\": \"https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz\",\n      \"integrity\": \"sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==\",\n      \"license\": \"MIT\",\n      \"engines\": {\n        \"node\": \">= 0.4\"\n      },\n      \"funding\": {\n        \"url\": \"https://github.com/sponsors/ljharb\"\n      }\n    },\n    \"node_modules/has-symbols\": {\n      \"version\": \"1.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz\",\n      \"integrity\": \"sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==\",\n      \"license\": \"MIT\",\n      \"engines\": {\n        \"node\": \">= 0.4\"\n      },\n      \"funding\": {\n        \"url\": \"https://github.com/sponsors/ljharb\"\n      }\n    },\n    \"node_modules/has-tostringtag\": {\n      \"version\": \"1.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz\",\n      \"integrity\": \"sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"has-symbols\": \"^1.0.3\"\n      },\n      \"engines\": {\n        \"node\": \">= 0.4\"\n      },\n      \"funding\": {\n        \"url\": \"https://github.com/sponsors/ljharb\"\n      }\n    },\n    \"node_modules/hasown\": {\n      \"version\": \"2.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz\",\n      \"integrity\": \"sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"function-bind\": \"^1.1.2\"\n      },\n      \"engines\": {\n        \"node\": \">= 0.4\"\n      }\n    },\n    \"node_modules/math-intrinsics\": {\n      \"version\": \"1.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz\",\n      \"integrity\": \"sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==\",\n      \"license\": \"MIT\",\n      \"engines\": {\n        \"node\": \">= 0.4\"\n      }\n    },\n    \"node_modules/mime-db\": {\n      \"version\": \"1.52.0\",\n      \"resolved\": \"https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz\",\n      \"integrity\": \"sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==\",\n      \"license\": \"MIT\",\n      \"engines\": {\n        \"node\": \">= 0.6\"\n      }\n    },\n    \"node_modules/mime-types\": {\n      \"version\": \"2.1.35\",\n      \"resolved\": \"https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz\",\n      \"integrity\": \"sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"mime-db\": \"1.52.0\"\n      },\n      \"engines\": {\n        \"node\": \">= 0.6\"\n      }\n    },\n    \"node_modules/proxy-from-env\": {\n      \"version\": \"1.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz\",\n      \"integrity\": \"sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==\",\n      \"license\": \"MIT\"\n    }\n  }\n}\n","frontmatter":{"name":"gles-wrangler-generator","version":"1.0.0","lockfileVersion":3,"requires":true,"packages":{"":{"version":"1.0.0","license":"MIT","dependencies":{"axios":"^1.8.2","fast-xml-parser":"^3.17.6"}},"node_modules/asynckit":{"version":"0.4.0","resolved":"https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz","integrity":"sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==","license":"MIT"},"node_modules/axios":{"version":"1.8.2","resolved":"https://registry.npmjs.org/axios/-/axios-1.8.2.tgz","integrity":"sha512-ls4GYBm5aig9vWx8AWDSGLpnpDQRtWAfrjU+EuytuODrFBkqesN2RkOQCBzrA1RQNHw1SmRMSDDDSwzNAYQ6Rg==","license":"MIT","dependencies":{"follow-redirects":"^1.15.6","form-data":"^4.0.0","proxy-from-env":"^1.1.0"}},"node_modules/call-bind-apply-helpers":{"version":"1.0.2","resolved":"https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz","integrity":"sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==","license":"MIT","dependencies":{"es-errors":"^1.3.0","function-bind":"^1.1.2"},"engines":{"node":">= 0.4"}},"node_modules/combined-stream":{"version":"1.0.8","resolved":"https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz","integrity":"sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==","license":"MIT","dependencies":{"delayed-stream":"~1.0.0"},"engines":{"node":">= 0.8"}},"node_modules/delayed-stream":{"version":"1.0.0","resolved":"https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz","integrity":"sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==","license":"MIT","engines":{"node":">=0.4.0"}},"node_modules/dunder-proto":{"version":"1.0.1","resolved":"https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz","integrity":"sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==","license":"MIT","dependencies":{"call-bind-apply-helpers":"^1.0.1","es-errors":"^1.3.0","gopd":"^1.2.0"},"engines":{"node":">= 0.4"}},"node_modules/es-define-property":{"version":"1.0.1","resolved":"https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz","integrity":"sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==","license":"MIT","engines":{"node":">= 0.4"}},"node_modules/es-errors":{"version":"1.3.0","resolved":"https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz","integrity":"sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==","license":"MIT","engines":{"node":">= 0.4"}},"node_modules/es-object-atoms":{"version":"1.1.1","resolved":"https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz","integrity":"sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==","license":"MIT","dependencies":{"es-errors":"^1.3.0"},"engines":{"node":">= 0.4"}},"node_modules/es-set-tostringtag":{"version":"2.1.0","resolved":"https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz","integrity":"sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==","license":"MIT","dependencies":{"es-errors":"^1.3.0","get-intrinsic":"^1.2.6","has-tostringtag":"^1.0.2","hasown":"^2.0.2"},"engines":{"node":">= 0.4"}},"node_modules/fast-xml-parser":{"version":"3.17.6","resolved":"https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-3.17.6.tgz","integrity":"sha512-40WHI/5d2MOzf1sD2bSaTXlPn1lueJLAX6j1xH5dSAr6tNeut8B9ktEL6sjAK9yVON4uNj9//axOdBJUuruCzw==","bin":{"xml2js":"cli.js"},"funding":{"type":"paypal","url":"https://paypal.me/naturalintelligence"}},"node_modules/follow-redirects":{"version":"1.15.9","resolved":"https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz","integrity":"sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==","funding":[{"type":"individual","url":"https://github.com/sponsors/RubenVerborgh"}],"license":"MIT","engines":{"node":">=4.0"},"peerDependenciesMeta":{"debug":{"optional":true}}},"node_modules/form-data":{"version":"4.0.2","resolved":"https://registry.npmjs.org/form-data/-/form-data-4.0.2.tgz","integrity":"sha512-hGfm/slu0ZabnNt4oaRZ6uREyfCj6P4fT/n6A1rGV+Z0VdGXjfOhVUpkn6qVQONHGIFwmveGXyDs75+nr6FM8w==","license":"MIT","dependencies":{"asynckit":"^0.4.0","combined-stream":"^1.0.8","es-set-tostringtag":"^2.1.0","mime-types":"^2.1.12"},"engines":{"node":">= 6"}},"node_modules/function-bind":{"version":"1.1.2","resolved":"https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz","integrity":"sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==","license":"MIT","funding":{"url":"https://github.com/sponsors/ljharb"}},"node_modules/get-intrinsic":{"version":"1.3.0","resolved":"https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz","integrity":"sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==","license":"MIT","dependencies":{"call-bind-apply-helpers":"^1.0.2","es-define-property":"^1.0.1","es-errors":"^1.3.0","es-object-atoms":"^1.1.1","function-bind":"^1.1.2","get-proto":"^1.0.1","gopd":"^1.2.0","has-symbols":"^1.1.0","hasown":"^2.0.2","math-intrinsics":"^1.1.0"},"engines":{"node":">= 0.4"},"funding":{"url":"https://github.com/sponsors/ljharb"}},"node_modules/get-proto":{"version":"1.0.1","resolved":"https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz","integrity":"sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==","license":"MIT","dependencies":{"dunder-proto":"^1.0.1","es-object-atoms":"^1.0.0"},"engines":{"node":">= 0.4"}},"node_modules/gopd":{"version":"1.2.0","resolved":"https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz","integrity":"sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==","license":"MIT","engines":{"node":">= 0.4"},"funding":{"url":"https://github.com/sponsors/ljharb"}},"node_modules/has-symbols":{"version":"1.1.0","resolved":"https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz","integrity":"sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==","license":"MIT","engines":{"node":">= 0.4"},"funding":{"url":"https://github.com/sponsors/ljharb"}},"node_modules/has-tostringtag":{"version":"1.0.2","resolved":"https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz","integrity":"sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==","license":"MIT","dependencies":{"has-symbols":"^1.0.3"},"engines":{"node":">= 0.4"},"funding":{"url":"https://github.com/sponsors/ljharb"}},"node_modules/hasown":{"version":"2.0.2","resolved":"https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz","integrity":"sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==","license":"MIT","dependencies":{"function-bind":"^1.1.2"},"engines":{"node":">= 0.4"}},"node_modules/math-intrinsics":{"version":"1.1.0","resolved":"https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz","integrity":"sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==","license":"MIT","engines":{"node":">= 0.4"}},"node_modules/mime-db":{"version":"1.52.0","resolved":"https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz","integrity":"sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==","license":"MIT","engines":{"node":">= 0.6"}},"node_modules/mime-types":{"version":"2.1.35","resolved":"https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz","integrity":"sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==","license":"MIT","dependencies":{"mime-db":"1.52.0"},"engines":{"node":">= 0.6"}},"node_modules/proxy-from-env":{"version":"1.1.0","resolved":"https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz","integrity":"sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==","license":"MIT"}}},"isInternal":false,"tokens":4345,"sizeBytes":10681},{"name":"package.json","path":"native/tools/gles-wrangler-generator/package.json","rawUrl":"https://raw.githubusercontent.com/cocos/cocos-engine/HEAD/native/tools/gles-wrangler-generator/package.json","title":"gles-wrangler-generator","category":"anthropic-skill","format":"json","content":"{\n  \"name\": \"gles-wrangler-generator\",\n  \"version\": \"1.0.0\",\n  \"description\": \"EGL/GLES loader code generator\",\n  \"main\": \"generate.js\",\n  \"scripts\": {\n    \"test\": \"echo \\\"Error: no test specified\\\" && exit 1\"\n  },\n  \"author\": \"YunHsiao\",\n  \"license\": \"MIT\",\n  \"dependencies\": {\n    \"axios\": \"^1.8.2\",\n    \"fast-xml-parser\": \"^3.17.6\"\n  }\n}\n","frontmatter":{"name":"gles-wrangler-generator","version":"1.0.0","description":"EGL/GLES loader code generator","main":"generate.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"YunHsiao","license":"MIT","dependencies":{"axios":"^1.8.2","fast-xml-parser":"^3.17.6"}},"isInternal":false,"tokens":120,"sizeBytes":341},{"name":".cocos-project.json","path":"native/tools/simulator/.cocos-project.json","rawUrl":"https://raw.githubusercontent.com/cocos/cocos-engine/HEAD/native/tools/simulator/.cocos-project.json","title":"Simulator Skill","category":"anthropic-skill","format":"json","content":"{\n    \"has_native\": true,\n    \"project_type\": \"js\"\n}\n","frontmatter":{"has_native":true,"project_type":"js"},"isInternal":false,"tokens":17,"sizeBytes":53},{"name":"config.json","path":"native/tools/simulator/config.json","rawUrl":"https://raw.githubusercontent.com/cocos/cocos-engine/HEAD/native/tools/simulator/config.json","title":"Simulator Skill","category":"anthropic-skill","format":"json","content":"{\n    \"init_cfg\":{\n        \"isLandscape\": true,\n        \"isWindowTop\": false,\n        \"waitForConnect\": false,\n        \"name\": \"Simulator\",\n        \"width\": 960,\n        \"height\": 640,\n        \"entry\": \"main.js\",\n        \"consolePort\": 6050,\n        \"uploadPort\": 6060,\n        \"debugPort\": 5086\n    },\n    \"simulator_screen_size\": [\n        {\n            \"title\": \"Apple iPhone 5 (640x1136)\",\n            \"width\": 640,\n            \"height\": 1136\n        },\n        {\n            \"title\": \"Apple iPhone 6 (750x1334)\",\n            \"width\": 750,\n            \"height\": 1334\n        },\n        {\n            \"title\": \"Apple iPhone 6Plus (1080x1920)\",\n            \"width\": 1080,\n            \"height\": 1920\n        },\n        {\n            \"title\": \"Apple iPhone 7 (750x1334)\",\n            \"width\": 750,\n            \"height\": 1334\n        },\n        {\n            \"title\": \"Apple iPhone 7Plus (1080x1920)\",\n            \"width\": 1080,\n            \"height\": 1920\n        },\n        {\n            \"title\": \"Apple iPhone X (1125x2436)\",\n            \"width\": 1125,\n            \"height\": 2436\n        },\n        {\n            \"title\": \"Apple iPad (2048x1536)\",\n            \"width\": 2048,\n            \"height\": 1536\n        },\n        {\n            \"title\": \"Apple iPad Air 2 (1536x2048)\",\n            \"width\": 1536,\n            \"height\": 2048\n        },\n        {\n            \"title\": \"Apple iPad Pro 10.5-inch (1668x2224)\",\n            \"width\": 1668,\n            \"height\": 2224\n        },\n        {\n            \"title\": \"Apple iPad Pro 12.9-inch (2048x2732)\",\n            \"width\": 2048,\n            \"height\": 2732\n        },\n        {\n          \"title\": \"Huawei P9 (1080x1920)\",\n          \"width\": 1080,\n          \"height\": 1920\n        },\n        {\n          \"title\": \"Huawei Mate9 Pro (1440x2560)\",\n          \"width\": 1440,\n          \"height\": 2560\n        },\n        {\n          \"title\": \"Goolge Nexus 5 (1080x2880)\",\n          \"width\": 1080,\n          \"height\": 2880\n        },\n        {\n          \"title\": \"Goolge Nexus 5X (1079x1919)\",\n          \"width\": 1079,\n          \"height\": 1919\n        },\n        {\n          \"title\": \"Goolge Nexus 6 (1442x2562)\",\n          \"width\": 1442,\n          \"height\": 2562\n        },\n        {\n          \"title\": \"Goolge Nexus 7 (1920x1200)\",\n          \"width\": 1920,\n          \"height\": 1200\n        }\n    ]\n}\n","frontmatter":{"init_cfg":{"isLandscape":true,"isWindowTop":false,"waitForConnect":false,"name":"Simulator","width":960,"height":640,"entry":"main.js","consolePort":6050,"uploadPort":6060,"debugPort":5086},"simulator_screen_size":[{"title":"Apple iPhone 5 (640x1136)","width":640,"height":1136},{"title":"Apple iPhone 6 (750x1334)","width":750,"height":1334},{"title":"Apple iPhone 6Plus (1080x1920)","width":1080,"height":1920},{"title":"Apple iPhone 7 (750x1334)","width":750,"height":1334},{"title":"Apple iPhone 7Plus (1080x1920)","width":1080,"height":1920},{"title":"Apple iPhone X (1125x2436)","width":1125,"height":2436},{"title":"Apple iPad (2048x1536)","width":2048,"height":1536},{"title":"Apple iPad Air 2 (1536x2048)","width":1536,"height":2048},{"title":"Apple iPad Pro 10.5-inch (1668x2224)","width":1668,"height":2224},{"title":"Apple iPad Pro 12.9-inch (2048x2732)","width":2048,"height":2732},{"title":"Huawei P9 (1080x1920)","width":1080,"height":1920},{"title":"Huawei Mate9 Pro (1440x2560)","width":1440,"height":2560},{"title":"Goolge Nexus 5 (1080x2880)","width":1080,"height":2880},{"title":"Goolge Nexus 5X (1079x1919)","width":1079,"height":1919},{"title":"Goolge Nexus 6 (1442x2562)","width":1442,"height":2562},{"title":"Goolge Nexus 7 (1920x1200)","width":1920,"height":1200}]},"isInternal":false,"tokens":687,"sizeBytes":2339},{"name":"build-cfg.json","path":"native/tools/simulator/frameworks/runtime-src/proj.ios_mac/mac/build-cfg.json","rawUrl":"https://raw.githubusercontent.com/cocos/cocos-engine/HEAD/native/tools/simulator/frameworks/runtime-src/proj.ios_mac/mac/build-cfg.json","title":"Mac Skill","category":"anthropic-skill","format":"json","content":"# Mac Skill\n\nPath: `native/tools/simulator/frameworks/runtime-src/proj.ios_mac/mac/build-cfg.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/cocos/cocos-engine/HEAD/native/tools/simulator/frameworks/runtime-src/proj.ios_mac/mac/build-cfg.json)","tokens":300,"sizeBytes":265},{"name":"build-cfg.json","path":"native/tools/simulator/frameworks/runtime-src/proj.win32/build-cfg.json","rawUrl":"https://raw.githubusercontent.com/cocos/cocos-engine/HEAD/native/tools/simulator/frameworks/runtime-src/proj.win32/build-cfg.json","title":"Proj.win32 Skill","category":"anthropic-skill","format":"json","content":"# Proj.win32 Skill\n\nPath: `native/tools/simulator/frameworks/runtime-src/proj.win32/build-cfg.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/cocos/cocos-engine/HEAD/native/tools/simulator/frameworks/runtime-src/proj.win32/build-cfg.json)","tokens":300,"sizeBytes":260},{"name":"Contents.json","path":"native/tools/simulator/frameworks/runtime-src/SimulatorApp-Mac/Images.xcassets/AppIcon.appiconset/Contents.json","rawUrl":"https://raw.githubusercontent.com/cocos/cocos-engine/HEAD/native/tools/simulator/frameworks/runtime-src/SimulatorApp-Mac/Images.xcassets/AppIcon.appiconset/Contents.json","title":"AppIcon.appiconset Skill","category":"anthropic-skill","format":"json","content":"# AppIcon.appiconset Skill\n\nPath: `native/tools/simulator/frameworks/runtime-src/SimulatorApp-Mac/Images.xcassets/AppIcon.appiconset/Contents.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/cocos/cocos-engine/HEAD/native/tools/simulator/frameworks/runtime-src/SimulatorApp-Mac/Images.xcassets/AppIcon.appiconset/Contents.json)","tokens":300,"sizeBytes":348},{"name":"index.md","path":"native/tools/swig-config/tutorial/index.md","rawUrl":"https://raw.githubusercontent.com/cocos/cocos-engine/HEAD/native/tools/swig-config/tutorial/index.md","title":"Tutorial Skill","category":"anthropic-skill","format":"markdown","content":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**\n\n- [The Tutorial of Swig Workflow in Cocos Creator](#the-tutorial-of-swig-workflow-in-cocos-creator)\n  * [How to Bind a New Module in Engine](#how-to-bind-a-new-module-in-engine)\n    + [Add a new module interface file](#add-a-new-module-interface-file)\n    + [Modify swig-config.js](#modify-swig-configjs)\n    + [Generate bindings](#generate-bindings)\n    + [Modify `engine/native/cocos/CMakeLists.txt`](#modify-enginenativecocoscmakeliststxt)\n    + [Register the new module to Script Engine](#register-the-new-module-to-script-engine)\n  * [How to Bind a New Module in Developer's Project](#how-to-bind-a-new-module-in-developers-project)\n    + [Bind a simple class](#bind-a-simple-class)\n      - [Create a simple class](#create-a-simple-class)\n      - [Write an interface file](#write-an-interface-file)\n      - [Write a swig config file](#write-a-swig-config-file)\n      - [Generate bindings for project](#generate-bindings-for-project)\n      - [Modify project's CMakeLists.txt](#modify-projects-cmakeliststxt)\n      - [Open project](#open-project)\n      - [Register the new module to Script Engine](#register-the-new-module-to-script-engine-1)\n      - [Test binding](#test-binding)\n      - [Section Conclusion](#section-conclusion)\n    + [Import depended header files](#import-depended-header-files)\n    + [Ignore classes, methods, properties](#ignore-classes-methods-properties)\n      - [Ignore classes](#ignore-classes)\n      - [Ignore methods and properties](#ignore-methods-and-properties)\n    + [Rename classes, methods, properties](#rename-classes-methods-properties)\n    + [Define an attribute](#define-an-attribute)\n      - [Usage](#usage)\n      - [Demo](#demo)\n      - [%attribute_writeonly directive](#%25attribute_writeonly--directive)\n      - [Reference type](#reference-type)\n      - [%arg() directive](#%25arg-directive)\n      - [Don't add `const`](#dont-add-const)\n    + [Configure C++ modules in .i file](#configure-c-modules-in-i-file)\n    + [Multiple swig modules configuration](#multiple-swig-modules-configuration)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# The Tutorial of Swig Workflow in Cocos Creator\n\n## How to Bind a New Module in Engine\n\n### Add a new module interface file\n\n- Add a new module interface file to `native/tools/swig-config` directory, e.g. `new-engine-module.i`\n\n- Copy the content in [swig-interface-template.i](../swig-interface-template.i) to new-engine-module.i\n\n- Add necessary configuration, you refer to the existed  `.i` files in `native/tools/swig-config` directory or refer to [the following section](#How to Bind a New Module in Developer's Project)\n  \n\n### Modify swig-config.js\n\n```js\n// ......\n// Engine Module Configuration\nconst configList = [\n    [ '2d.i', 'jsb_2d_auto.cpp' ],\n    // ......\n    [ 'renderer.i', 'jsb_render_auto.cpp' ],\n    [ 'new-engine-module.i', 'jsb_new_engine_module_auto.cpp' ], // Add this line\n];\n//......\n```\n\n### Generate bindings\n\n```bash\ncd engine/native/tools/swig-config\nnode genbindings.js\n```\n\n### Modify `engine/native/cocos/CMakeLists.txt`\n\n```cmake\n######## auto\ncocos_source_files(\n    NO_WERROR   NO_UBUILD   cocos/bindings/auto/jsb_new_engine_module_auto.cpp # Add this line\n                            cocos/bindings/auto/jsb_new_engine_module_auto.h # Add this line\n    NO_WERROR   NO_UBUILD   cocos/bindings/auto/jsb_cocos_auto.cpp\n                            cocos/bindings/auto/jsb_cocos_auto.h\n    ......\n```\n\n### Register the new module to Script Engine\n\nOpen `jsb_module_register.cpp` and do the following modifications\n\n```c++\n......\n#if CC_USE_PHYSICS_PHYSX\n    #include \"cocos/bindings/auto/jsb_physics_auto.h\"\n#endif\n#include \"cocos/bindings/auto/jsb_new_engine_module_auto.h\" // Add this line\n\nbool jsb_register_all_modules() {\n    se::ScriptEngine *se = se::ScriptEngine::getInstance();\n    ......\n    se->addRegisterCallback(register_all_my_new_engine_module); // Add this line\n\n    se->addAfterCleanupHook([]() {\n        cc::DeferredReleasePool::clear();\n        JSBClassType::cleanup();\n    });\n    return true;   \n}\n```\n\n## How to Bind a New Module in Developer's Project\n\nSuppose we have a Cocos Creator project located at `/Users/james/NewProject` directory.\n\nBuild a native project in Cocos Creator's build panel, we get `/Users/james/NewProject/native` directory.\n\n### Bind a simple class\n\n#### Create a simple class\n\nCreate a header file in `/Users/james/NewProject/native/engine/Classes/MyObject.h` , its content is \n\n```c++\n// MyObject.h\n#pragma once\n#include \"cocos/cocos.h\"\nnamespace my_ns {\nclass MyObject {\npublic:\n    MyObject() = default;\n    MyObject(int a, bool b) {}\n    virtual ~MyObject() = default;\n    void print() {\n        CC_LOG_DEBUG(\"==> a: %d, b: %d\\n\", _a, (int)_b);\n    }\n\n    float publicFloatProperty{1.23F};\nprivate:\n    int _a{100};\n    bool _b{true};\n};\n} // namespace my_ns {\n```\n\n#### Write an interface file\n\nCreate an interface called `my-module.i` file in  `/Users/james/NewProject/tools/swig-config`\n\n```c++\n// my-module.i\n%module(target_namespace=\"my_ns\") my_module\n\n// Insert code at the beginning of generated header file (.h)\n%insert(header_file) %{\n#pragma once\n#include \"bindings/jswrapper/SeApi.h\"\n#include \"bindings/manual/jsb_conversions.h\"\n\n#include \"MyObject.h\" // Add this line\n%}\n\n// Insert code at the beginning of generated source file (.cpp)\n%{\n#include \"bindings/auto/jsb_my_module_auto.h\"\n%}\n\n%include \"MyObject.h\"\n```\n\n#### Write a swig config file\n\nCreate a file called swig-config.js in `/Users/james/NewProject/tools/swig-config`\n\n```js\n// swig-config.js\n'use strict';\nconst path = require('path');\nconst configList = [\n    [ 'my-module.i', 'jsb_my_module_auto.cpp' ],\n];\n\nconst projectRoot = path.resolve(path.join(__dirname, '..', '..'));\nconst interfacesDir = path.join(projectRoot, 'tools', 'swig-config');\nconst bindingsOutDir = path.join(projectRoot, 'native', 'engine', 'common', 'bindings', 'auto');\n// includeDirs means header search path for Swig parser\nconst includeDirs = [\n    path.join(projectRoot, 'native', 'engine', 'common', 'Classes'),\n];\n\nmodule.exports = {\n    interfacesDir,\n    bindingsOutDir,\n    includeDirs,\n    configList\n};\n```\n\n#### Generate bindings for project\n\n```bash\n$ cd /Users/james/NewProject/tools/swig-config\n$ node < Engine Root >/native/tools/swig-config/genbindings.js\n```\n\nIf succeed, the files ( `jsb_my_module_auto.cpp/.h` ) contain JS binding code will be generated at `/Users/james/NewProject/native/engine/bindings/auto` directory\n\n#### Modify project's CMakeLists.txt\n\n- Open `/Users/james/NewProject/native/engine/common/CMakeLists.txt`, add `MyObject.h` and its binding code\n\n  ```cmake\n  include(${COCOS_X_PATH}/CMakeLists.txt)\n  \n  list(APPEND CC_COMMON_SOURCES\n      ${CMAKE_CURRENT_LIST_DIR}/Classes/Game.h\n      ${CMAKE_CURRENT_LIST_DIR}/Classes/Game.cpp\n      ############### Add the following lines ##############\n      ${CMAKE_CURRENT_LIST_DIR}/Classes/MyObject.h \n      ${CMAKE_CURRENT_LIST_DIR}/bindings/auto/jsb_my_module_auto.h\n      ${CMAKE_CURRENT_LIST_DIR}/bindings/auto/jsb_my_module_auto.cpp\n      ########################################################\n  )\n  ```\n\n- Modify `/Users/james/NewProject/native/engine/mac/CMakeLists.txt`\n\n  ```cmake\n  cmake_minimum_required(VERSION 3.8)\n  # ......\n  cc_mac_before_target(${EXECUTABLE_NAME})\n  add_executable(${EXECUTABLE_NAME} ${CC_ALL_SOURCES})\n  ############### Add the following lines ##############\n  target_include_directories(${EXECUTABLE_NAME} PRIVATE\n      ${CC_PROJECT_DIR}/../common\n  )\n  ########################################################\n  cc_mac_after_target(${EXECUTABLE_NAME})\n  ```\n\n\n#### Open project \n\nmacOS: `/Users/james/NewProject/build/mac/proj/NewProject.xcodeproj ` \n\nWindows: `< A specific directory >/NewProject/build/win64/proj/NewProject.sln`\n\n#### Register the new module to Script Engine\n\nModify `Game.cpp` :\n\n```c++\n#include \"Game.h\"\n#include \"bindings/auto/jsb_my_module_auto.h\" // Add this line\n//......\nint Game::init() {\n  // ......\n  se::ScriptEngine::getInstance()->addRegisterCallback(register_all_my_module); // Add this line\n  BaseGame::init();\n  return 0;\n}\n// ......\n```\n\n#### Test binding\n\n- Add a `my-module.d.ts` file in the root of project directory to make TS compiler know our binding class.\n\n  ```ts\n  // my-module.d.ts\n  declare namespace my_ns {\n  class MyObject {\n      constructor();\n      constructor(a: number, b: number);\n  \n      publicFloatProperty : number;\n      print() : void;\n  }\n  }\n  ```\n\n- Modify `/Users/james/NewProject/temp/tsconfig.cocos.json` file\n\n  ```js\n  {\n    \"$schema\": \"https://json.schemastore.org/tsconfig\",\n    \"compilerOptions\": {\n      \"target\": \"ES2015\",\n      \"module\": \"ES2015\",\n      \"strict\": true,\n      \"types\": [\n        \"./temp/declarations/cc.custom-macro\",\n        \"./temp/declarations/jsb\",\n        \"./temp/declarations/cc\",\n        \"./temp/declarations/cc.env\",\n        \"./my-module\" // Add this line\n      ],\n      // ......\n      \"forceConsistentCasingInFileNames\": true\n    }\n  }\n  ```\n\n- Open NewProject in Cocos Creator, create a cube object in scene and attach a script to cube, the script's content is\n\n  ```ts\n  import { _decorator, Component } from 'cc';\n  const { ccclass } = _decorator;\n  \n  @ccclass('MyComponent')\n  export class MyComponent extends Component {\n      start() {\n          const myObj = new my_ns.MyObject();\n          myObj.print(); // Invoke native print method\n          console.log(`==> myObj.publicFloatProperty: ${myObj.publicFloatProperty}`); // Get property defined in native\n      }\n  }\n  ```\n\n- Run project, if succeed, you could find the following logs in console \n\n  ```\n  17:31:44 [DEBUG]: ==> a: 100, b: 1\n  17:31:44 [DEBUG]: D/ JS: ==> myObj.publicFloatProperty: 1.2300000190734863\n  ```\n\n#### Section Conclusion\n\nIn this section, we have learned how to use `Swig` tool to bind a simple class, export its public methods and properties to JS. This section also cover the entire flow of binding native classes. Start from next section, we will focus on using more `Swig` features to satisfy more needs of JS bindings, for example:\n\n- How to import depended header files\n- How to ignore classes, methods, properties\n- How to rename classes, methods, properties\n- How to define attributes which bind c++ getter and setter as a JS property\n- How to configure C++ modules in .i file\n\n### Import depended header files\n\nSuppose we let MyObject class be inherited from MyRef class. But we don't want to bind MyRef class.\n\n```c++\n// MyRef.h\n#pragma once\nnamespace my_ns {\nclass MyRef  {\npublic:\n    MyRef() = default;\n    virtual ~MyRef() = default;\n    void addRef() { _ref++; }\n    void release() { --_ref; }\nprivate:\n    unsigned int _ref{0};\n};\n} // namespace my_ns {\n```\n\n```c++\n// MyObject.h\n#pragma once\n#include \"cocos/cocos.h\"\n#include \"MyRef.h\"\nnamespace my_ns {\n// MyObject inherits from MyRef\nclass MyObject : public MyRef {\npublic:\n    MyObject() = default;\n    MyObject(int a, bool b) {}\n    virtual ~MyObject() = default;\n    void print() {\n        CC_LOG_DEBUG(\"==> a: %d, b: %d\\n\", _a, (int)_b);\n    }\n\n    float publicFloatProperty{1.23F};\nprivate:\n    int _a{100};\n    bool _b{true};\n};\n} // namespace my_ns {\n```\n\nWhen Swig parses MyObject.h,  it will not know what `MyRef` is,  it will output a warning in console.\n\n```bash\n.../Classes/MyObject.h:7: Warning 401: Nothing known about base class 'MyRef'. Ignored.\n```\n\nIt's simple to fix this issue, we need to let Swig know that MyRef exists by using `%import` directive.\n\n```c++\n// ......\n// Insert code at the beginning of generated source file (.cpp)\n%{\n#include \"bindings/auto/jsb_my_module_auto.h\"\n%}\n\n%import \"MyRef.h\" // Add this line to fix the warning\n%include \"MyObject.h\"\n```\n\nAlthough Swig doesn't report the error now, the binding code will not be compiled, the error is:\n\n![](MyRefCompileError.jpg)\n\nWe fix this in the next section by `%ignore` directive.\n\n### Ignore classes, methods, properties\n\n#### Ignore classes\n\nIn last section, we got a compile error in `js_register_my_ns_MyObject`. Since MyRef should not be bound, we could use`%ignore` directive to ignore it.\n\n```c++\n// my-module.i\n// ......\n%ignore my_ns::MyRef; // Add this line\n%import \"MyRef.h\"\n%include \"MyObject.h\"\n```\n\nGenerate binding again, it compiles ok.\n\n```c++\n// jsb_my_module_auto.cpp\nbool js_register_my_ns_MyObject(se::Object* obj) {\n    auto* cls = se::Class::create(\"MyObject\", obj, nullptr, _SE(js_new_MyObject)); // parentProto will be set to nullptr\n    cls->defineProperty(\"publicFloatProperty\", _SE(js_my_ns_MyObject_publicFloatProperty_get), _SE(js_my_ns_MyObject_publicFloatProperty_set)); \n    cls->defineFunction(\"print\", _SE(js_my_ns_MyObject_print)); \n  // ......\n}\n```\n\n#### Ignore methods and properties\n\nWe add a new method `methodToBeIgnored` and a new property `propertyToBeIgnored` to `MyObject` class.\n\n```c++\n// MyObject.h\n#pragma once\n#include \"cocos/cocos.h\"\n#include \"MyRef.h\"\nnamespace my_ns {\n// MyObject inherits from MyRef\nclass MyObject : public MyRef {\npublic:\n// .....\n    void methodToBeIgnored() {} // Add this line\n    float propertyToBeIgnored{345.123F}; // Add this line\n// ......\n    float publicFloatProperty{1.23F};\nprivate:\n    int _a{100};\n    bool _b{true};\n};\n} // namespace my_ns {\n\n```\n\nRe-generate bindings, we'll get `methodToBeIgnored` and `propertyToBeIgnored` bound.\n\n```c++\n// jsb_my_module_auto.cpp\nbool js_register_my_ns_MyObject(se::Object* obj) {\n    auto* cls = se::Class::create(\"MyObject\", obj, nullptr, _SE(js_new_MyObject)); \n    cls->defineProperty(\"propertyToBeIgnored\", _SE(js_my_ns_MyObject_propertyToBeIgnored_get), _SE(js_my_ns_MyObject_propertyToBeIgnored_set)); // this property should not be bound\n    cls->defineProperty(\"publicFloatProperty\", _SE(js_my_ns_MyObject_publicFloatProperty_get), _SE(js_my_ns_MyObject_publicFloatProperty_set)); \n    cls->defineFunction(\"print\", _SE(js_my_ns_MyObject_print)); \n    cls->defineFunction(\"methodToBeIgnored\", _SE(js_my_ns_MyObject_methodToBeIgnored)); // this method should not be bound\n    // ......\n}\n```\n\nModify `my-module.i`to skip binding them.\n\n```c++\n// my-module.i\n// ......\n\n%ignore my_ns::MyRef;\n%ignore my_ns::MyObject::methodToBeIgnored; // Add this line\n%ignore my_ns::MyObject::propertyToBeIgnored; // Add this line\n\n%import \"MyRef.h\"\n%include \"MyObject.h\"\n```\n\nRe-generate bindings, they're ignored now.\n\n```c++\n// jsb_my_module_auto.cpp\nbool js_register_my_ns_MyObject(se::Object* obj) {\n    auto* cls = se::Class::create(\"MyObject\", obj, nullptr, _SE(js_new_MyObject)); \n    cls->defineProperty(\"publicFloatProperty\", _SE(js_my_ns_MyObject_publicFloatProperty_get), _SE(js_my_ns_MyObject_publicFloatProperty_set)); \n    cls->defineFunction(\"print\", _SE(js_my_ns_MyObject_print)); \n// ......\n}\n```\n\n### Rename classes, methods, properties\n\nSwig has defined a directive called `%rename` to rename classes, methods or properties. To demonstrate, we modify MyObject again.\n\n```c++\n// MyObject.h\n#pragma once\n#include \"cocos/cocos.h\"\n#include \"MyRef.h\"\nnamespace my_ns {\n// MyObject inherits from MyRef\nclass MyObject : public MyRef {\npublic:\n// ......\n    void methodToBeRenamed() { // Add this method\n        CC_LOG_DEBUG(\"==> hello MyObject::methodToBeRenamed\");\n    }\n    int propertyToBeRenamed{1234}; // Add this property\n\n    float publicFloatProperty{1.23F};\nprivate:\n    int _a{100};\n    bool _b{true};\n};\n} // namespace my_ns {\n```\n\nGenerate bindings, we get:\n\n```c++\n// jsb_my_module_auto.cpp\nbool js_register_my_ns_MyObject(se::Object* obj) {\n    auto* cls = se::Class::create(\"MyObject\", obj, nullptr, _SE(js_new_MyObject)); \n    cls->defineProperty(\"propertyToBeRenamed\", _SE(js_my_ns_MyObject_propertyToBeRenamed_get), _SE(js_my_ns_MyObject_propertyToBeRenamed_set)); \n    cls->defineProperty(\"publicFloatProperty\", _SE(js_my_ns_MyObject_publicFloatProperty_get), _SE(js_my_ns_MyObject_publicFloatProperty_set)); \n    \n    cls->defineFunction(\"print\", _SE(js_my_ns_MyObject_print)); \n    cls->defineFunction(\"methodToBeRenamed\", _SE(js_my_ns_MyObject_methodToBeRenamed)); \n```\n\nIf we want to rename `propertyToBeRenamed` to `coolProperty` and rename `methodToBeRenamed` to `coolMethod`, modify `my-module.i` as follows:\n\n```c++\n// my-module.i\n// ......\n%ignore my_ns::MyRef;\n%ignore my_ns::MyObject::methodToBeIgnored;\n%ignore my_ns::MyObject::propertyToBeIgnored;\n%rename(coolProperty) my_ns::MyObject::propertyToBeRenamed; // Add this line\n%rename(coolMethod) my_ns::MyObject::methodToBeRenamed; // Add this line\n\n%import \"MyRef.h\"\n%include \"MyObject.h\"\n```\n\nIf we want to rename `MyObject` class to `MyCoolObject`, I guess you have already known how to do.  Yes, add this line:\n\n```c++\n%rename(MyCoolObject) my_ns::MyObject;\n```\n\nRe-generate bindings, get the correct name exported to JS.\n\n```c++\n// jsb_my_module_auto.cpp\n// MyCoolObject, coolProperty, coolMethod are all what we want now.\nbool js_register_my_ns_MyObject(se::Object* obj) {\n    auto* cls = se::Class::create(\"MyCoolObject\", obj, nullptr, _SE(js_new_MyCoolObject));\n    cls->defineProperty(\"coolProperty\", _SE(js_my_ns_MyCoolObject_coolProperty_get), _SE(js_my_ns_MyCoolObject_coolProperty_set)); \n    cls->defineProperty(\"publicFloatProperty\", _SE(js_my_ns_MyCoolObject_publicFloatProperty_get), _SE(js_my_ns_MyCoolObject_publicFloatProperty_set)); \n    cls->defineFunction(\"print\", _SE(js_my_ns_MyCoolObject_print)); \n    cls->defineFunction(\"coolMethod\", _SE(js_my_ns_MyCoolObject_coolMethod)); \n    // ......\n}\n```\n\nTest it, update `my-module.d.ts` and `MyComponent.ts`\n\n```c++\n// my-module.d.ts\ndeclare namespace my_ns {\nclass MyCoolObject {\n    constructor();\n    constructor(a: number, b: number);\n\n    publicFloatProperty : number;\n    print() : void;\n    coolProperty: number;\n    coolMethod() : void;\n}\n}\n```\n\n```ts\n// MyComponent.ts\nimport { _decorator, Component } from 'cc';\nconst { ccclass } = _decorator;\n\n@ccclass('MyComponent')\nexport class MyComponent extends Component {\n    start() {\n        const myObj = new my_ns.MyCoolObject(); // Renamed to MyCoolObject\n        myObj.print();\n        console.log(`==> myObj.publicFloatProperty: ${myObj.publicFloatProperty}`);\n        // Add the follow lines\n        console.log(`==> old: myObj.coolProperty: ${myObj.coolProperty}`); \n        myObj.coolProperty = 666;\n        console.log(`==> new: myObj.coolProperty: ${myObj.coolProperty}`);\n        myObj.coolMethod();\n    }\n}\n```\n\nBuild and run project, get log:\n\n```\n17:53:28 [DEBUG]: ==> a: 100, b: 1\n17:53:28 [DEBUG]: D/ JS: ==> myObj.publicFloatProperty: 1.2300000190734863\n17:53:28 [DEBUG]: D/ JS: ==> old: myObj.coolProperty: 1234\n17:53:28 [DEBUG]: D/ JS: ==> new: myObj.coolProperty: 666\n17:53:28 [DEBUG]: ==> hello MyObject::methodToBeRenamed\n```\n\n### Define an attribute\n\n`%attribute` directive is used for bind C++ getter and setter functions as a JS property.\n\n#### Usage\n\n1. Define an attribute (JS property) without setter\n\n   ```c++\n   %attribute(your_namespace::your_class_name, cpp_member_variable_type, js_property_name, cpp_getter_function_name)\n   ```\n\n2. Define an attribute (JS property) with getter and setter\n\n   ```c++\n   %attribute(your_namespace::your_class_name, cpp_member_variable_type, js_property_name, cpp_getter_function_name, cpp_setter_function_name)\n   ```\n\n3. Define an attribute (JS property) without getter\n\n   ```c++\n   %attribute_writeonly(your_namespace::your_class_name, cpp_member_variable_type, js_property_name, cpp_setter_function_name)\n   ```\n\n#### Demo\n\nTo demonstrate, we add two new methods for MyObject class.\n\n```c++\n// MyObject.h\n#pragma once\n#include \"cocos/cocos.h\"\n#include \"MyRef.h\"\nnamespace my_ns {\n// MyObject inherits from MyRef\nclass MyObject : public MyRef {\npublic:\n// ......\n    void setType(int v) { _type = v; CC_LOG_DEBUG(\"==> setType: v: %d\", v); } // Add this line\n    int getType() const { return _type; } // Add this line\n\n    float publicFloatProperty{1.23F};\nprivate:\n    int _a{100};\n    bool _b{true};\n    int _type{333};\n};\n} // namespace my_ns {\n```\n\n```c++\n// my-module.i\n// ......\n%attribute(my_ns::MyObject, int, type, getType, setType); // Add this line\n\n%import \"MyRef.h\"\n%include \"MyObject.h\"\n```\n\n```c++\n// jsb_my_module_auto.cpp\nbool js_register_my_ns_MyObject(se::Object* obj) {\n// ......\n    cls->defineProperty(\"type\", _SE(js_my_ns_MyCoolObject_type_get), _SE(js_my_ns_MyCoolObject_type_set)); \n// ......\n}\n```\n\n```ts\n// MyComponent.ts\nimport { _decorator, Component } from 'cc';\nconst { ccclass } = _decorator;\n\n@ccclass('MyComponent')\nexport class MyComponent extends Component {\n    start() {\n        const myObj = new my_ns.MyCoolObject();\n        myObj.print();\n        console.log(`==> myObj.publicFloatProperty: ${myObj.publicFloatProperty}`);\n        console.log(`==> old: myObj.coolProperty: ${myObj.coolProperty}`);\n        myObj.coolProperty = 666;\n        console.log(`==> new: myObj.coolProperty: ${myObj.coolProperty}`);\n        myObj.coolMethod();\n        console.log(`==> old: myObj.type: ${myObj.type}`);\n        myObj.type = 888;\n        console.log(`==> new: myObj.type: ${myObj.type}`);\n    }\n}\n```\n\nBuild and run project\n\n```\n18:09:53 [DEBUG]: ==> a: 100, b: 1\n18:09:53 [DEBUG]: D/ JS: ==> myObj.publicFloatProperty: 1.2300000190734863\n18:09:53 [DEBUG]: D/ JS: ==> old: myObj.coolProperty: 1234\n18:09:53 [DEBUG]: D/ JS: ==> new: myObj.coolProperty: 666\n18:09:53 [DEBUG]: ==> hello MyObject::methodToBeRenamed\n18:09:53 [DEBUG]: D/ JS: ==> old: myObj.type: 333\n18:09:53 [DEBUG]: ==> setType: v: 888 // Cool, C++ setType is invoked\n18:09:53 [DEBUG]: D/ JS: ==> new: myObj.type: 888 // Cool, C++ getType is invoked, 888 is return from C++\n```\n\n#### %attribute_writeonly  directive\n\n`%attribute_writeonly` directive is an extension we added in swig  `Cocos` backend, it's used for the purpose that C++ class only has a `set` function and there isn't a `get` function.\n\nIn `native/tools/swig-config/cocos.i`, there are:\n\n```c++\n%attribute_writeonly(cc::ICanvasRenderingContext2D, float, width, setWidth);\n%attribute_writeonly(cc::ICanvasRenderingContext2D, float, height, setHeight);\n%attribute_writeonly(cc::ICanvasRenderingContext2D, float, lineWidth, setLineWidth);\n%attribute_writeonly(cc::ICanvasRenderingContext2D, ccstd::string&, fillStyle, setFillStyle);\n%attribute_writeonly(cc::ICanvasRenderingContext2D, ccstd::string&, font, setFont);\n```\n\nThis is the similar functionality in JS:\n\n```javascript\nObject.defineProperty(MyNewClass.prototype, 'width', {\n  configurable: true,\n  enumerable: true,\n  set(v) {\n    this._width = v;\n  },\n\t// No get() for property\n});\n```\n\n#### Reference type\n\nIf C++ `get` function returns a reference data type or `set` function accesses a reference data type , don't forget to add `&` suffix in %attribute or %attribute_writeonly directives. The following `ccstd::string&` is an example.\n\n```c++\n%attribute_writeonly(cc::ICanvasRenderingContext2D, ccstd::string&, fillStyle, setFillStyle);\n```\n\nIf `&` is missing, a temporary `ccstd::string` instance will be created while the binding function is invoked.\n\n#### %arg() directive\n\nSometimes, the type of C++ variable is a describled by C++ template, for instance:\n\n```c++\nclass MyNewClass {\n  public:\n\t\tconst std::map<std::string, std::string>& getConfig() const { return _config; }\n  \tvoid setConfig(const std::map<std::string, std::string> &config) { _config = config; }\n  private:\n  \tstd::map<std::string, std::string> _config;\n};\n```\n\nWe may write an `%attribute` in `.i` file like:\n\n```c++\n%attribute(MyNewClass, std::map<std::string, std::string>&, config, getConfig, setConfig);\n```\n\nYou will get an error while invoking `node genbindings.js`.\n\n```\nError: Macro '%attribute_custom' expects 7 arguments\n```\n\nThis is because `swig` doesn't know how to deal with comma (`,`) in `std::map<std::string, std::string>&`, it will split it to two parts:\n\n1. std::map<std::string\n2. std::string>&\n\nTherefore, this line of %attribute directive will be parsed with 6 arguments instead of 5.\n\nTo avoid making `swig` confused, we need to use `%arg` directive to tell `swig` that `std::map<std::string, std::string>&` is a whole thing.\n\n```c++\n%attribute(MyNewClass, %arg(std::map<std::string, std::string>&), config, getConfig, setConfig);\n```\n\nRe-run `node genbindings.js`, the error should have gone.\n\n#### Don't add `const` \n\nIn the above sample, `%arg(std::map<std::string, std::string>&)` is used as a C++ data type in %attribue directive. You may consider to add a `const` prefix before `std::map` like `%arg(const std::map<std::string, std::string>&)`. If you do that, you will make a readyonly `config` property which only binds `MyNewClass::getConfig`. That's obviously not what we expect. If we need a readonly property, just don't assign a `set` function. \n\n```c++\n// Don't assign setConfig means the property doesn't need a setter.\n%attribute(MyNewClass, %arg(std::map<std::string, std::string>&), config, getConfig); \n```\n\nSo to keep things simple, never add `const` prefix while writing a `%attribute` directive.\n\n### Configure C++ modules in .i file\n\nSometimes, whether to compile a class depends on whether a macro is enabled. For example, we add a `MyFeatureObject` class in `MyObject.h`\n\n```c++\n// MyObject.h\n#pragma once\n#include \"cocos/cocos.h\"\n#include \"MyRef.h\"\n\n#ifndef USE_MY_FEATURE\n#define USE_MY_FEATURE 1 // Enable USE_MY_FEATURE\n#endif\n\nnamespace my_ns {\n\n#if USE_MY_FEATURE\nclass MyFeatureObject {\npublic:\n    void foo() {\n        CC_LOG_DEBUG(\"==> MyFeatureObject::foo\");\n    }\n};\n#else\nclass MyFeatureObject;\n#endif\n\n// MyObject inherits from MyRef\nclass MyObject : public MyRef {\npublic:\n//......\n    MyFeatureObject* getFeatureObject() {\n#if USE_MY_FEATURE // getFeatureObject only returns valid value when USE_MY_FEATURE is enabled\n        if (_featureObject == nullptr) {\n            _featureObject = new MyFeatureObject();\n        }\n#endif\n        return _featureObject;\n    }\nprivate:\n    int _a{100};\n    bool _b{true};\n    int _type{333};\n    MyFeatureObject* _featureObject{nullptr}; // Add this line\n};\n} // namespace my_ns {\n```\n\n```c++\n// my-module.i\n// ......\n%rename(MyCoolObject) my_ns::MyObject;\n\n%attribute(my_ns::MyObject, int, type, getType, setType);\n\n%module_macro(USE_MY_FEATURE) my_ns::MyFeatureObject; // Add this line to let Swig know the generated code for MyFeatureObject needs to be wrapped by USE_MY_FEATURE macro\n%module_macro(USE_MY_FEATURE) my_ns::MyObject::getFeatureObject; // Add this line to let Swig know the generated code for MyObject::getFeatureObject should be wrapped by USE_MY_FEATURE macro\n\n#define USE_MY_FEATURE 1 // Must be 1 to trick Swig that we need to generate binding code\n// even this macro is disabled in C++. NOTE: this line should be after %module_macro\n\n%import \"MyRef.h\"\n%include \"MyObject.h\"\n```\n\n```c++\n// my-module.d.ts\ndeclare namespace my_ns {\nclass MyFeatureObject {\n    foo() : void;\n}\n\nclass MyCoolObject {\n    constructor();\n    constructor(a: number, b: number);\n\n    publicFloatProperty : number;\n    print() : void;\n    coolProperty: number;\n    coolMethod() : void;\n    type: number;\n    getFeatureObject() : MyFeatureObject;\n}\n}\n```\n\n```ts\n// MyComponent.ts\nimport { _decorator, Component } from 'cc';\nconst { ccclass } = _decorator;\n\n@ccclass('MyComponent')\nexport class MyComponent extends Component {\n    start() {\n        const myObj = new my_ns.MyCoolObject();\n        myObj.print();\n        console.log(`==> myObj.publicFloatProperty: ${myObj.publicFloatProperty}`);\n        console.log(`==> old: myObj.coolProperty: ${myObj.coolProperty}`);\n        myObj.coolProperty = 666;\n        console.log(`==> new: myObj.coolProperty: ${myObj.coolProperty}`);\n        myObj.coolMethod();\n        console.log(`==> old: myObj.type: ${myObj.type}`);\n        myObj.type = 888;\n        console.log(`==> new: myObj.type: ${myObj.type}`);\n        const featureObj = myObj.getFeatureObject();\n        console.log(`==> featureObj: ${featureObj}`);\n        if (featureObj) {\n            featureObj.foo();\n        }\n    }\n}\n```\n\nGenerate bindings, look at the binding code\n\n```c++\n#if USE_MY_FEATURE // NOTE THAT, all binding code of MyFeatureObject is wrapped by USE_MY_FEATURE macro\n\nse::Class* __jsb_my_ns_MyFeatureObject_class = nullptr;\nse::Object* __jsb_my_ns_MyFeatureObject_proto = nullptr;\nSE_DECLARE_FINALIZE_FUNC(js_delete_my_ns_MyFeatureObject) \n\nstatic bool js_my_ns_MyFeatureObject_foo(se::State& s)\n{\n// ......\n}\n// ......\nbool js_register_my_ns_MyFeatureObject(se::Object* obj) {\n    auto* cls = se::Class::create(\"MyFeatureObject\", obj, nullptr, _SE(js_new_my_ns_MyFeatureObject)); \n// ......\n}\n\n#endif // USE_MY_FEATURE\n\n// ......\nstatic bool js_my_ns_MyCoolObject_getFeatureObject(se::State& s)\n{\n#if USE_MY_FEATURE // getFeatureObject function is also wrapped by USE_MY_FEATURE\n// ......\n    ok &= nativevalue_to_se(result, s.rval(), s.thisObject() /*ctx*/);\n    SE_PRECONDITION2(ok, false, \"MyCoolObject_getFeatureObject, Error processing arguments\");\n    SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); \n#endif // USE_MY_FEATURE\n    return true;\n}\nSE_BIND_FUNC(js_my_ns_MyCoolObject_getFeatureObject) \n\n// ......\nbool register_all_my_module(se::Object* obj) {\n    // Get the ns\n    se::Value nsVal;\n    if (!obj->getProperty(\"my_ns\", &nsVal, true))\n    {\n        se::HandleObject jsobj(se::Object::createPlainObject());\n        nsVal.setObject(jsobj);\n        obj->setProperty(\"my_ns\", nsVal);\n    }\n    se::Object* ns = nsVal.toObject();\n    /* Register classes */\n#if USE_MY_FEATURE\n    js_register_my_ns_MyFeatureObject(ns); // js_register_my_ns_MyFeatureObject is wrapped by USE_MY_FEATURE\n#endif // USE_MY_FEATURE\n    js_register_my_ns_MyObject(ns); \n    return true;\n}\n```\n\nBuild and run the project, get output as following:\n\n```\n18:32:20 [DEBUG]: D/ JS: ==> featureObj: [object Object] // featureObj is valid if USE_MY_FEATURE macro is enabled\n18:32:20 [DEBUG]: ==> MyFeatureObject::foo // Invoke C++ foo method \n```\n\nWhen we don't need MyFeatureObject, set the macro to 0.\n\n```c++\n// MyObject.h\n#pragma once\n#include \"cocos/cocos.h\"\n#include \"MyRef.h\"\n\n#ifndef USE_MY_FEATURE\n#define USE_MY_FEATURE 0 // Disable USE_MY_FEATURE\n#endif\n```\n\nBuild and run the project\n\n```\n18:54:00 [DEBUG]: D/ JS: ==> featureObj: undefined // getFeatureObject returns undefined if USE_MY_FEATURE is disabled.\n```\n\n### Multiple swig modules configuration\n\nLet's create another header file `MyAnotherObject.h`.\n\n```c++\n// MyAnotherObject.h\n#pragma once\nnamespace my_another_ns {\nstruct MyAnotherObject {\n    float a{135.246};\n    int b{999};\n};\n} // namespace my_another_ns {\n```\n\nUpdate MyObject.h\n\n```c++\n// MyObject.h\n//......\nclass MyObject : public MyRef {\npublic:\n// ......\n    void helloWithAnotherObject(const my_another_ns::MyAnotherObject &obj) {\n        CC_LOG_DEBUG(\"==> helloWithAnotherObject, a: %f, b: %d\", obj.a, obj.b);\n    }\n// ......\n};\n} // namespace my_ns {\n```\n\nCreate `/Users/james/NewProject/tools/swig-config/another-module.i`\n\n```c++\n// another-module.i\n%module(target_namespace=\"another_ns\") another_module\n\n// Insert code at the beginning of generated header file (.h)\n%insert(header_file) %{\n#pragma once\n#include \"bindings/jswrapper/SeApi.h\"\n#include \"bindings/manual/jsb_conversions.h\"\n\n#include \"MyAnotherObject.h\" // Add this line\n%}\n\n// Insert code at the beginning of generated source file (.cpp)\n%{\n#include \"bindings/auto/jsb_another_module_auto.h\"\n%}\n\n%include \"MyAnotherObject.h\"\n```\n\nModify `/Users/james/NewProject/tools/swig-config/swig-config.js`\n\n```c++\n'use strict';\n\nconst path = require('path');\n\nconst configList = [\n    [ 'my-module.i', 'jsb_my_module_auto.cpp' ],\n    [ 'another-module.i', 'jsb_another_module_auto.cpp' ], // Add this line\n];\n\nconst projectRoot = path.resolve(path.join(__dirname, '..', '..'));\nconst interfacesDir = path.join(projectRoot, 'tools', 'swig-config');\nconst bindingsOutDir = path.join(projectRoot, 'native', 'engine', 'common', 'bindings', 'auto');\nconst includeDirs = [\n    path.join(projectRoot, 'native', 'engine', 'common', 'Classes'),\n];\n\nmodule.exports = {\n    interfacesDir,\n    bindingsOutDir,\n    includeDirs,\n    configList\n};\n```\n\nModify `/Users/james/NewProject/native/engine/common/CMakeLists.txt`\n\n```cmake\n# /Users/james/NewProject/native/engine/common/CMakeLists.txt\nlist(APPEND CC_COMMON_SOURCES\n    ${CMAKE_CURRENT_LIST_DIR}/Classes/Game.h\n    ${CMAKE_CURRENT_LIST_DIR}/Classes/Game.cpp\n    ${CMAKE_CURRENT_LIST_DIR}/Classes/MyObject.h\n    ${CMAKE_CURRENT_LIST_DIR}/Classes/MyAnotherObject.h # Add this line\n    ${CMAKE_CURRENT_LIST_DIR}/bindings/auto/jsb_my_module_auto.h\n    ${CMAKE_CURRENT_LIST_DIR}/bindings/auto/jsb_my_module_auto.cpp\n    ${CMAKE_CURRENT_LIST_DIR}/bindings/auto/jsb_another_module_auto.h # Add this line\n    ${CMAKE_CURRENT_LIST_DIR}/bindings/auto/jsb_another_module_auto.cpp # Add this line\n)\n```\n\nGenerate bindings again.\n\nUpdate Game.cpp\n\n```c++\n#include \"Game.h\"\n#include \"bindings/auto/jsb_my_module_auto.h\"\n#include \"bindings/auto/jsb_another_module_auto.h\" // Add this line\n//......\n\nint Game::init() {\n//......\n    se::ScriptEngine::getInstance()->addRegisterCallback(register_all_my_module);\n    se::ScriptEngine::getInstance()->addRegisterCallback(register_all_another_module); // Add this line\n//\n  BaseGame::init();\n  return 0;\n}\n```\n\nBuild and compile, but get an error\n\n![](another-module-compile-error.jpg)\n\nSince MyObject class depends on MyAnotherObject which is defined on another module. We need to update `my-module.i` and add `#include \"bindings/auto/jsb_another_module_auto.h\"`.\n\n```c++\n// my-module.i\n%module(target_namespace=\"my_ns\") my_module\n\n// Insert code at the beginning of generated header file (.h)\n%insert(header_file) %{\n#pragma once\n#include \"bindings/jswrapper/SeApi.h\"\n#include \"bindings/manual/jsb_conversions.h\"\n\n#include \"MyObject.h\"\n%}\n\n// Insert code at the beginning of generated source file (.cpp)\n%{\n#include \"bindings/auto/jsb_my_module_auto.h\"\n#include \"bindings/auto/jsb_another_module_auto.h\" // Add this line\n%}\n\n// ......\n```\n\nCompile project. It should compile ok now. \n\nNext, we update .d.ts\n\n```ts\n// my-module.d.ts\ndeclare namespace my_ns {\nclass MyFeatureObject {\n    foo() : void;\n}\n\nclass MyCoolObject {\n    constructor();\n    constructor(a: number, b: number);\n\n    publicFloatProperty : number;\n    print() : void;\n    coolProperty: number;\n    coolMethod() : void;\n    type: number;\n    getFeatureObject() : MyFeatureObject;\n    helloWithAnotherObject(obj: another_ns.MyAnotherObject) : void; // Add this line\n}\n}\n\n// Add the following lines\ndeclare namespace another_ns {\nclass MyAnotherObject {\n    a: number;\n    b: number;\n}\n}\n```\n\nWe add some more test code of reading the properties of  `MyAnotherObject.`\n\n```ts\n// MyComponent.ts\nimport { _decorator, Component } from 'cc';\nconst { ccclass } = _decorator;\n\n@ccclass('MyComponent')\nexport class MyComponent extends Component {\n    start() {\n        const myObj = new my_ns.MyCoolObject();\n        // ......\n        const anotherObj = new another_ns.MyAnotherObject(); // Add this line \n        myObj.helloWithAnotherObject(anotherObj); // Add this line\n    }\n}\n```\n\nBuild and run project, should get output:\n\n```\n15:05:36 [DEBUG]: ==> helloWithAnotherObject, a: 135.246002, b: 999\n```\n","isInternal":false,"tokens":9398,"sizeBytes":35343},{"name":"package-lock.json","path":"native/tools/tojs/gen_d_ts/package-lock.json","rawUrl":"https://raw.githubusercontent.com/cocos/cocos-engine/HEAD/native/tools/tojs/gen_d_ts/package-lock.json","title":"gen_d_ts","category":"anthropic-skill","format":"json","content":"{\n  \"name\": \"gen_d_ts\",\n  \"version\": \"1.0.0\",\n  \"lockfileVersion\": 1,\n  \"requires\": true,\n  \"dependencies\": {\n    \"@types/node\": {\n      \"version\": \"16.10.3\",\n      \"resolved\": \"https://repo.huaweicloud.com/repository/npm/@types/node/-/node-16.10.3.tgz\",\n      \"integrity\": \"sha512-ho3Ruq+fFnBrZhUYI46n/bV2GjwzSkwuT4dTf0GkuNFmnb8nq4ny2z9JEVemFi6bdEJanHLlYfy9c6FN9B9McQ==\"\n    }\n  }\n}\n","frontmatter":{"name":"gen_d_ts","version":"1.0.0","lockfileVersion":1,"requires":true,"dependencies":{"@types/node":{"version":"16.10.3","resolved":"https://repo.huaweicloud.com/repository/npm/@types/node/-/node-16.10.3.tgz","integrity":"sha512-ho3Ruq+fFnBrZhUYI46n/bV2GjwzSkwuT4dTf0GkuNFmnb8nq4ny2z9JEVemFi6bdEJanHLlYfy9c6FN9B9McQ=="}}},"isInternal":false,"tokens":164,"sizeBytes":384},{"name":"package.json","path":"native/tools/tojs/gen_d_ts/package.json","rawUrl":"https://raw.githubusercontent.com/cocos/cocos-engine/HEAD/native/tools/tojs/gen_d_ts/package.json","title":"gen_d_ts","category":"anthropic-skill","format":"json","content":"{\n  \"name\": \"gen_d_ts\",\n  \"version\": \"1.0.0\",\n  \"description\": \"\",\n  \"main\": \"index.js\",\n  \"scripts\": {\n    \"test\": \"echo \\\"Error: no test specified\\\" && exit 1\"\n  },\n  \"author\": \"\",\n  \"license\": \"ISC\",\n  \"dependencies\": {\n    \"@types/node\": \"^16.10.3\"\n  }\n}\n","frontmatter":{"name":"gen_d_ts","version":"1.0.0","description":"","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"ISC","dependencies":{"@types/node":"^16.10.3"}},"isInternal":false,"tokens":91,"sizeBytes":259},{"name":"tsconfig.json","path":"native/tools/tojs/gen_d_ts/tsconfig.json","rawUrl":"https://raw.githubusercontent.com/cocos/cocos-engine/HEAD/native/tools/tojs/gen_d_ts/tsconfig.json","title":"Gen_d_ts Skill","category":"anthropic-skill","format":"json","content":"# Gen_d_ts Skill\n\nPath: `native/tools/tojs/gen_d_ts/tsconfig.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/cocos/cocos-engine/HEAD/native/tools/tojs/gen_d_ts/tsconfig.json)","tokens":300,"sizeBytes":196},{"name":"README.md","path":"native/tools/bindings-generator/README.md","rawUrl":"https://raw.githubusercontent.com/cocos/cocos-engine/HEAD/native/tools/bindings-generator/README.md","title":"bindings-generator Documentation","category":"plugin-manifest","format":"markdown","content":"# What's new\n* Add a prebuilt libclang 12.0 in `libclang/`for linux, mac and windows.\n* If you want use the prebuilt libclang 12.0 work with Android NDK, then `only the NDK r21 can work corrently` with it.\n\n# Requirements\n\n* python 3.x (64-bit)\n* py-yaml version 5.4.1\n* cheetah3\n* libclang binary files\n\n# Usage\n\n    Usage: generator.py [options] {configfile}\n\n    Options:\n      -h, --help   show this help message and exit\n      -s SECTION   sets a specific section to be converted\n      -t TARGET    specifies the target vm. Will search for TARGET.yaml\n\nBasically, you specify a target vm (spidermonkey is the only current target vm) and the section from\nthe `.ini` file you want to generate code for.\n\n### Download libclang binary files\n\n* Download the pre-built binaries according to your platform from [here](https://github.com/llvm/llvm-project/releases/tag/llvmorg-12.0.0).\n* Unzip or install binaries. For example, unzip `clang+llvm-12.0.0-x86_64-apple-darwin.tar.xz` for macOS.\n* Find libclang.dll (windows) or libclang.dylib (macOS)\n* Copy the dynamic library to `bindings-generator/libclang` folder.\n\n## Run the simple test with prebuilt libclang 12.0\n\nIncluded in this repository is a simple test. Use this to confirm the generator is working and that your environment is set up correctly.\n\n#### NOTE\n\n* The test uses the prebuilt 12.0 libclang, so you should use `Android NDK r21` or higher version.\n* The test uses \\<string\\>; and \\<stdint.h\\>; so you need a C++ implementation that provides these\n* Currently, the test script is setup to use the Android NDK's llvm libc++\n\n### Mac OS X\n\n* The OSX 10.9 has a built-in python2.7 and if your os don't have python2.7 then use [Homebrew](http://brew.sh/) to install the python and use pip install the python dependencies.\n  ```bash\n  brew install python\n  ```\n\n* Install python dependices by pip.\n  ```bash\n  sudo easy_install pip3\n  sudo pip3 install PyYAML==5.4.1 Cheetah3\n  ```\n\n* Download NDK r21 from [google](https://developer.android.com/ndk/downloads/index.html)\n* If you are using python installed from other way, copy user.cfg.sample and rename it as `user.cfg` then set the absolute path to  python `PYTHON_BIN` in `user.cfg`\n* Run follow command, it will generate a `userconf.ini`, and check the values in it if it occorus any error.\n  ```bash\n  export NDK_ROOT=/path/to/android-ndk-r21\n  ./test.sh\n  ```\n### Windows 7 64bit\n* Download python3 (`64bit`) from (https://www.python.org).\n* Add the installed path of python (e.g. C:\\Python39) to PATH environment variable, if not already added in the installer.\n* Install python dependices by pip.\n  ```bash\n  python -m pip install PyYAML==5.4.1 Cheetah3\n  ```\n* Download NDK r21 or above from [google](https://developer.android.com/ndk/downloads/index.html)\n* Set the environment variables (`PYTHON_ROOT` and `NDK_ROOT`) or just them in `test.bat`.\n* Run \"test.bat\". The generated codes will be under \"simple_test_bindings\".\n\n### Expected output\n\nUpon running the test you might see some warnings but should not see any errors.\n\nThe test will create a directory named simple_test_bindings that contains 3 files\n\n* A .hpp header file for the bindings class\n* A .cpp file implementing the bindings class\n* A .js file that documents how to call (from JavaScript) the methods the C++ class exposes\n\n# The `.ini` file\n\nThe `.ini` file is a simple text file specifying the settings for the code generator. Here's the\ndefault one, used for cocos2d-x\n\n    [cocos2d-x]\n    prefix = cocos2dx\n    events  = CCNode#onEnter CCNode#onExit\n    extra_arguments = -I../../cocos2dx/include -I../../cocos2dx/platform -I../../cocos2dx/platform/ios -I../../cocos2dx -I../../cocos2dx/kazmath/include -arch i386 -DTARGET_OS_IPHONE -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk -x c++\n    headers = ../../cocos2dx/include/cocos2d.h\n    classes = CCSprite\n    functions = my_free_function\n\n## Required sections\n\n* prefix: the prefix for the project. Must be a valid identifier for the language of the target vm.\n  Most of the time, the name will be intermixed between the class name and the function name, since\n  all generated (probably) will be free functions, we do that in order to avoid name collition. The\n  script will generate ${prefix}.cpp and ${prefix}.hpp as a result.\n* events: a list of identifiers in the form of ClassName#functionName that are events to be called\n  from the native world to the target vm.\n* extra_arguments: extra arguments to pass to the clang interface. Basically you can think of this\n  as the arguments to pass to the \"compiler\", so add as many as you need here. If you're targetting\n  C++, make sure you add \"-x c++\" as the last argument to force C++ mode on a \".h\" file. Otherwise,\n  name your header files as \".hpp\".\n* headers: list of headers to parse. Usually you add a single header that in turn `#include`s the\n  rest of the files.\n* classes: the classes that will be parsed. Right not is just a string, but it will accept regular\n  expressions\n* functions: space-separated list of free functions to be binded. Same as with classes, it will\n  support regular expressions.\n* skip: a space-separated list of `Classes::functions` or just `functions` to not generate any code.\n\n# The templates\n\nThe generator is using [Cheetah templates](http://www.cheetahtemplate.org/) to create a more\nflexible generator. The way it was thought, is that for every target environment, you should provide\nwith a way to generate the same C/C++ functionality. Every template has access to the proper meta\ninformation for the code or generator (function, classes, etc.)\n\nRight now it's separated in the following set of templates:\n\n* prelude.c/.h: The header of the generated files.\n* ifunction.c/.h: The template for an instance function\n* ifunction_overloaded.c: The template for the implementation of an overloaded function. An\n  overloaded function is exactly the same as a function, but it has an array of functions sharing\n  the same name. The current implementation for spidermonkey only works if the overloading is with\n  different number of arguments.\n* sfunction.c/.h: The template for a static function\n* sfunction_overloaded.c: The template for an overloaded static function\n* register.c: Here you should add the constructor/finalizer, the registration function (if needed)\n  and the footer of the header file. This is the last chunk being generated\n\nTemplates are stored in the `templates/${target}` directory and follow the naming specified above.\n\nOne final part of the puzzle is the `${target}.yaml` file, that contains specific type conversion\nsnippets to be used by the templates. For instance, for spidermonkey, this is the place where we\nspecify the conversion routines for the native types (to and from int, float, string, etc.)\n\n# Limitations\n\nCurrently the generator is leveraging clang in order to get information about the C/C++ code, so we\ncan only get as much information as clang give us. Known list of things that won't work:\n\n* variable number of arguments. Solution: write a manual wrapper\n","isInternal":false,"tokens":1778,"sizeBytes":7117},{"name":"README.md","path":"native/tools/swig-config/README.md","rawUrl":"https://raw.githubusercontent.com/cocos/cocos-engine/HEAD/native/tools/swig-config/README.md","title":"swig-config Documentation","category":"plugin-manifest","format":"markdown","content":"## Introduction\n\nFrom Cocos Creator 3.7.0，we switch the approach of generating JS binding code from [bindings-generator](https://github.com/cocos/cocos-engine/tree/d08a11244d2a31da1aac7af7d2aa8f1b6152e30c/native/tools/bindings-generator) to [Swig](https://www.swig.org). Swig has many benefits in generating glue code by parsing  its custom `interface` file (IDL) which is compatible with `C++`. For more about why we switch to Swig, you could refer to [the issue](https://github.com/cocos/cocos-engine/issues/10792) .\n\n## Generate JS Binding Code for Engine\n\nThe engine's binding code is now automatically generated by CMake, eliminating the need to run swig command manually. \n\nNotice: if any \".i\" configuration files are added or removed, please rebuild the project to ensure the changes are incorporated.\n\n## Generate JS Bindings Code for Developer's Project\n\n- Make sure you have installed NodeJS ( `>= v8.9.4` )\n\n- Open Terminal ( macOS / Linux) or Command Line Tool ( Windows )\n\n- Create a directory for generated code, e.g. `/Users/abc/my-project/native/engine/common/Classes/bindings/auto`\n\n- Write a JS configuration file\n  \n  - Create the JS configruation file, e.g.  `/Users/abc/my-project/tools/swig-config/swig-config.js` with the following content\n    \n    ```js\n    'use strict';\n    const path = require('path');\n    \n    // Developer's custom module configuration\n    // configList is required\n    const configList = [\n        [ 'your_module_interface_0.i', 'jsb_your_module_interface_0_auto.cpp' ],\n        [ 'your_module_interface_1.i', 'jsb_your_module_interface_1_auto.cpp' ],\n        // ......\n    ];\n    \n    const projectRoot = path.resolve(path.join(__dirname, '..', '..'));\n    // interfaceDir is optional\n    const interfacesDir = path.join(projectRoot, 'tools', 'swig-config');\n    // bindingsOutDir is optional\n    const bindingsOutDir = path.join(projectRoot, 'native', 'engine', 'common', 'Classes', 'bindings', 'auto');\n    \n    module.exports = {\n        interfacesDir, // optional, if it isn't exported, the items in configList should be absolute or relative to current directory of swig-config.js\n        bindingsOutDir, // optional, if it isn't exported, the items in configList should be absolute or relative to current directory of swig-config.js\n        configList // required\n    };\n    ```\n  \n  - Run the following command\n    \n    ```bash\n    # If current workspace is not in '/Users/abc/my-project/tools/swig-config'\n    $ node < Engine Root Path >/native/tools/swig-config/genbindings.js -c /Users/abc/my-project/tools/swig-config/swig-config.js\n    ```\n    \n    ```bash\n    # If you have already navigate to '/Users/abc/my-project/tools/swig-config' directory, you could run the command without -c argument like:\n    $ cd /Users/abc/my-project/tools/swig-config\n    $ node < Engine Root Path >/native/tools/swig-config/genbindings.js\n    ```\n\n## Swig Interface File\n\n- There is a [swig-interface-template.i](swig-interface-template.i) in `engine/native/tools/swig-config` directory, just copy and rename it to some place in your project. There some comments demonstrate how to configure your module in `.i` file.  You could also reference engine internal `.i` files in `engine/native/tools/swig-config`, for instance, `scene.i` or `assets.i` for a quick start.\n- If you're using `Visual Studio Code`, you could install `SWIG Language` extension which was developed by `Hong-She Liang` for highlight syntax support.\n- For more details of writing `.i` file, please visit [tutorial](#Tutorial) section.\n\n## Tutorial\n\nPlease visit [tutorial/index.md](tutorial/index.md),  which includes binding a new module in engine or user's project step by step.    \n","isInternal":false,"tokens":887,"sizeBytes":3698}],"systemPromptSnippet":"<yakaai_skills repo=\"cocos/cocos-engine\">\n<!-- File: editor/assets/tools/parsed-effect-info.json (Tokens: ~13053 | Category: anthropic-skill) -->\n{\"list\":[{\"args\":[\"vec3 color\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\color\\\\aces.chunk\",\"line\":2,\"name\":\"ACESToneMap\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"vec4 shadowPos\",\"vec3 worldNormal\",\"float normalBias\",\"vec3 matViewDir0\",\"vec3 matViewDir1\",\"vec3 matViewDir2\",\"vec2 projScaleXY\"],\"column\":7,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":52,\"name\":\"ApplyShadowDepthBias_FaceNormal\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[\"vec4 shadowPos\",\"vec3 worldNormal\",\"float normalBias\",\"mat4 matLightView\",\"vec2 projScaleXY\"],\"column\":7,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":64,\"name\":\"ApplyShadowDepthBias_FaceNormal\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[\"vec4 shadowPos\",\"float viewspaceDepthBias\",\"float projScaleZ\",\"float projBiasZ\"],\"column\":7,\"comment\":\" (projScaleZ, projBiasZ) = cc_shadowProjDepthInfo.xy\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":110,\"name\":\"ApplyShadowDepthBias_Orthographic\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[\"vec4 shadowPos\",\"float viewspaceDepthBias\"],\"column\":7,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":85,\"name\":\"ApplyShadowDepthBias_Perspective\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[\"vec4 shadowPos\",\"float viewspaceDepthBias\",\"vec3 worldPos\"],\"column\":7,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":127,\"name\":\"ApplyShadowDepthBias_PerspectiveLinearDepth\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[\"float baseColor\",\"float detailedColor\"],\"column\":6,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\effect\\\\special-effects.chunk\",\"line\":21,\"name\":\"BlendDetailedColorMap\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec3 baseColor\",\"vec3 detailedColor\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\effect\\\\special-effects.chunk\",\"line\":36,\"name\":\"BlendDetailedColorMap\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"vec3 baseNormalFromMap\",\"vec3 detailedNormalFromMap\",\"float detailedIntensity\"],\"column\":5,\"comment\":\" NormalFromMap is: texture(normalmap) - 0.5\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\effect\\\\special-effects.chunk\",\"line\":15,\"name\":\"BlendDetailedNormalMap\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"out vec4 csmPos\",\"out vec4 csmPosWithBias\",\"vec3 worldPos\",\"vec3 N\",\"vec2 shadowBias\"],\"column\":10,\"comment\":\" output csmPos is non-biased position that can be used for sampling shadow map after homogeneous divid\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":347,\"name\":\"CCCSMFactorBase\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"out vec4 csmPos\",\"out vec4 csmPosWithBias\",\"vec3 worldPos\",\"vec3 N\",\"vec2 shadowBias\"],\"column\":10,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":416,\"name\":\"CCCSMFactorBase\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec3 worldPos\",\"vec3 N\",\"vec2 shadowBias\"],\"column\":8,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":428,\"name\":\"CCCSMFactorBase\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"out vec4 csmPos\",\"out vec4 shadowProjDepthInfo\",\"out vec4 shadowProjInfo\",\"out vec3 shadowViewDir0\",\"out vec3 shadowViewDir1\",\"out vec3 shadowViewDir2\",\"vec3 worldPos\",\"int level\"],\"column\":9,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":294,\"name\":\"CCGetCSMLevel\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[\"out bool isTransitionArea\",\"out highp float transitionRatio\",\"out vec4 csmPos\",\"out vec4 shadowProjDepthInfo\",\"out vec4 shadowProjInfo\",\"out vec3 shadowViewDir0\",\"out vec3 shadowViewDir1\",\"out vec3 shadowViewDir2\",\"vec3 worldPos\"],\"column\":8,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":313,\"name\":\"CCGetCSMLevel\",\"type\":\"int\",\"usage\":\"function\"},{\"args\":[\"out vec4 csmPos\",\"out vec4 shadowProjDepthInfo\",\"out vec4 shadowProjInfo\",\"out vec3 shadowViewDir0\",\"out vec3 shadowViewDir1\",\"out vec3 shadowViewDir2\",\"vec3 worldPos\"],\"column\":8,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":339,\"name\":\"CCGetCSMLevel\",\"type\":\"int\",\"usage\":\"function\"},{\"args\":[\"out vec4 csmPos\",\"out vec4 shadowProjDepthInfo\",\"out vec4 shadowProjInfo\",\"out vec3 shadowViewDir0\",\"out vec3 shadowViewDir1\",\"out vec3 shadowViewDir2\",\"vec3 worldPos\"],\"column\":8,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":412,\"name\":\"CCGetCSMLevel\",\"type\":\"int\",\"usage\":\"function\"},{\"args\":[\"out highp float ratio\",\"vec3 clipPos\"],\"column\":9,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":253,\"name\":\"CCGetCSMLevelWithTransition\",\"type\":\"bool\",\"usage\":\"function\"},{\"args\":[\"vec4 shadowPosWithDepthBias\"],\"column\":8,\"comment\":\"////////////////////////////////////////////////////////Directional Light Shadow\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":136,\"name\":\"CCGetDirLightShadowFactorHard\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec4 shadowPosWithDepthBias\"],\"column\":8,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":144,\"name\":\"CCGetDirLightShadowFactorSoft\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec4 shadowPosWithDepthBias\"],\"column\":8,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":152,\"name\":\"CCGetDirLightShadowFactorSoft3X\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec4 shadowPosWithDepthBias\"],\"column\":8,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":160,\"name\":\"CCGetDirLightShadowFactorSoft5X\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec3 worldPos\",\"float viewSpaceBias\"],\"column\":6,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":21,\"name\":\"CCGetLinearDepth\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec3 worldPos\"],\"column\":6,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":27,\"name\":\"CCGetLinearDepth\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec4 shadowPosWithDepthBias\",\"vec3 worldPos\"],\"column\":8,\"comment\":\"////////////////////////////////////////////////////////Spot Light Shadow\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":170,\"name\":\"CCGetSpotLightShadowFactorHard\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec4 shadowPosWithDepthBias\",\"vec3 worldPos\"],\"column\":8,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":178,\"name\":\"CCGetSpotLightShadowFactorSoft\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec4 shadowPosWithDepthBias\",\"vec3 worldPos\"],\"column\":8,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":186,\"name\":\"CCGetSpotLightShadowFactorSoft3X\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec4 shadowPosWithDepthBias\",\"vec3 worldPos\"],\"column\":8,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":194,\"name\":\"CCGetSpotLightShadowFactorSoft5X\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"out mat4 matWorld\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\world-transform.chunk\",\"line\":3,\"name\":\"CCGetWorldMatrix\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[\"out mat4 matWorld\",\"out mat4 matWorldIT\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\world-transform.chunk\",\"line\":17,\"name\":\"CCGetWorldMatrixFull\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[\"int level\",\"vec3 worldPos\"],\"column\":9,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":277,\"name\":\"CCHasCSMLevel\",\"type\":\"bool\",\"usage\":\"function\"},{\"args\":[\"out vec4 shadowPosWithDepthBias\",\"vec4 shadowPos\",\"vec3 N\",\"vec2 shadowBias\"],\"column\":8,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":229,\"name\":\"CCShadowFactorBase\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec4 shadowPos\",\"vec3 N\",\"vec2 shadowBias\"],\"column\":8,\"comment\":\" compatible version\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":423,\"name\":\"CCShadowFactorBase\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"out vec4 shadowPosWithDepthBias\",\"vec4 shadowPos\",\"vec3 worldPos\",\"vec2 shadowBias\"],\"column\":8,\"comment\":\"////////////////////////////////////////////////////////Main Functions\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":204,\"name\":\"CCSpotShadowFactorBase\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec4 shadowPos\",\"vec3 worldPos\",\"vec2 shadowBias\"],\"column\":8,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":433,\"name\":\"CCSpotShadowFactorBase\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"inout vec4 color\",\"float factor\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\fog.chunk\",\"line\":29,\"name\":\"CC_APPLY_FOG_BASE\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[\"uv\"],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":47,\"name\":\"CC_HANDLE_GET_CLIP_FLIP\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"uv\"],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":46,\"name\":\"CC_HANDLE_RT_SAMPLE_FLIP\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":98,\"name\":\"CC_SURFACES_ENABLE_DEBUG_VIEW\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":39,\"name\":\"CC_SURFACES_FLIP_UV\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":87,\"name\":\"CC_SURFACES_LIGHTING_2ND_LAYER_SPECULAR\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":48,\"name\":\"CC_SURFACES_LIGHTING_ANISOTROPIC\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":51,\"name\":\"CC_SURFACES_LIGHTING_ANISOTROPIC_ENVCONVOLUTION_COUNT\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":75,\"name\":\"CC_SURFACES_LIGHTING_CLEAR_COAT\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":72,\"name\":\"CC_SURFACES_LIGHTING_DUAL_LOBE_SPECULAR\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":81,\"name\":\"CC_SURFACES_LIGHTING_SSS\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":63,\"name\":\"CC_SURFACES_LIGHTING_TRANSMIT_DIFFUSE\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":60,\"name\":\"CC_SURFACES_LIGHTING_TRANSMIT_SPECULAR\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":69,\"name\":\"CC_SURFACES_LIGHTING_TRT\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":78,\"name\":\"CC_SURFACES_LIGHTING_TT\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":57,\"name\":\"CC_SURFACES_LIGHTING_USE_FRESNEL\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":66,\"name\":\"CC_SURFACES_LIGHTING_USE_SHADOWMAP_TRANSMIT\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":25,\"name\":\"CC_SURFACES_TRANSFER_CLIP_POS\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":22,\"name\":\"CC_SURFACES_TRANSFER_LOCAL_POS\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":54,\"name\":\"CC_SURFACES_USE_LEGACY_COMPATIBLE_LIGHTING\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":31,\"name\":\"CC_SURFACES_USE_LIGHT_MAP\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":45,\"name\":\"CC_SURFACES_USE_REFLECTION_DENOISE\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":13,\"name\":\"CC_SURFACES_USE_SECOND_UV\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":16,\"name\":\"CC_SURFACES_USE_TANGENT_SPACE\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":42,\"name\":\"CC_SURFACES_USE_TWO_SIDED\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\effect-macros\\\\common-macros.chunk\",\"line\":19,\"name\":\"CC_SURFACES_USE_VERTEX_COLOR\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\shading-entries\\\\data-structures\\\\vs-output.chunk\",\"line\":2,\"name\":\"CC_SURFACES_VARING_MODIFIER\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\shading-entries\\\\data-structures\\\\fs-input.chunk\",\"line\":2,\"name\":\"CC_SURFACES_VARING_MODIFIER\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"vec4 pos\",\"out float factor\"],\"column\":5,\"comment\":\" Fog helper functions\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\fog.chunk\",\"line\":14,\"name\":\"CC_TRANSFER_FOG_BASE\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[\"vec3 spotLightDir\",\"vec3 L\",\"float cosAngleOuter\"],\"column\":6,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\attenuation.chunk\",\"line\":42,\"name\":\"CalculateAngleAttenuation\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec3 normal\",\"vec3 tangent\",\"float mirrorNormal\"],\"column\":5,\"comment\":\" for right-hand coordinates, params must be normalized\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\math\\\\coordinates.chunk\",\"line\":60,\"name\":\"CalculateBinormal\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"vec3 R\",\"vec3 worldPos\",\"vec3 cubeCenterPos\",\"vec3 cubeBoxHalfSize\"],\"column\":5,\"comment\":\" fix cubemap direction with box projection\\r\\n return unnormalized vector and weight for exceeding\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\functions.chunk\",\"line\":72,\"name\":\"CalculateBoxProjectedDirection\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[\"float distToLightSqr\",\"float lightRadius\",\"float lightRange\"],\"column\":6,\"comment\":\" advanced\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\attenuation.chunk\",\"line\":31,\"name\":\"CalculateDistanceAttenuation\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"float ior\",\"float NoVSat\"],\"column\":6,\"comment\":\" saturated N dot V\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\bxdf.chunk\",\"line\":3,\"name\":\"CalculateFresnelCoefficient\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec3 tangent\",\"vec3 binormal\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\math\\\\coordinates.chunk\",\"line\":68,\"name\":\"CalculateNormal\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"vec3 normalFromTangentSpace\",\"float normalStrength\",\"vec3 normal\",\"vec3 tangent\",\"float mirrorNormal\"],\"column\":5,\"comment\":\" param1 is normal from normalmap\\r\\n return value is un-normalized\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\math\\\\coordinates.chunk\",\"line\":76,\"name\":\"CalculateNormalFromTangentSpace\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"vec3 N\",\"vec3 V\",\"vec3 worldPos\",\"vec4 plane\",\"vec3 cameraPos\",\"float probeReflectedDepth\"],\"column\":5,\"comment\":\" for bumped planar reflection\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\functions.chunk\",\"line\":44,\"name\":\"CalculatePlanarReflectPositionOnPlane\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"vec3 N\",\"vec3 V\",\"float NoV\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\functions.chunk\",\"line\":35,\"name\":\"CalculateReflectDirection\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"vec3 N\",\"vec3 V\",\"float NoV\",\"float ior\"],\"column\":5,\"comment\":\" return unnormalized vector, support oppo-side\\r\\n V from pixel to camera\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\functions.chunk\",\"line\":5,\"name\":\"CalculateRefractDirection\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"vec3 N\",\"vec3 V\",\"float NoV\",\"float ior\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\functions.chunk\",\"line\":23,\"name\":\"CalculateRefractDirectionFast\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"vec3 unscatteredColor\",\"float distance\",\"float outScatterExtinctCoef\",\"float inScatterExtinctCoef\",\"float inScatterCoef\",\"vec3 inScatterColor\",\"vec3 outScatterColor\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\bxdf.chunk\",\"line\":16,\"name\":\"CalculateScattering\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"vec3 normal\",\"vec3 binormal\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\math\\\\coordinates.chunk\",\"line\":64,\"name\":\"CalculateTangent\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"out vec2 deltaV\",\"float frameCount\",\"float animSpeed\",\"float elapseTime\"],\"column\":6,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\mesh\\\\vat-animation.chunk\",\"line\":29,\"name\":\"CalculateVATAnimationUV\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"float A\",\"float B\"],\"column\":6,\"comment\":\" Experimental\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\mesh\\\\vat-animation.chunk\",\"line\":168,\"name\":\"CalculateVATDecodeUV\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"inout vec3 L[5\",\", out int n\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\rect-area-light.chunk\",\"line\":12,\"name\":\"ClipQuadToHorizon\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[\"type\"],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\data\\\\packing.chunk\",\"line\":19,\"name\":\"DEFINE_PACK_HIGHP_FUNC\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"float roughness\",\"float NoH\"],\"column\":6,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\brdf.chunk\",\"line\":3,\"name\":\"D_GGX\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"float RoughnessX\",\"float RoughnessY\",\"float NoH\",\"vec3 H\",\"vec3 X\",\"vec3 Y\"],\"column\":6,\"comment\":\" How to get an anisotropic offset along T/B:\\r\\n 1. accurate: rotation TBN basis, let N intend to T/B, such as flow map as normalmap, output vec3(0, delta, 1) instead of vec3(0, 0, 1)\\r\\n 2. not accurate: H intend to V, and passed to this function\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\brdf.chunk\",\"line\":35,\"name\":\"D_GGXAniso\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"float roughness\",\"float NoH\"],\"column\":6,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\brdf.chunk\",\"line\":11,\"name\":\"D_GGXMobile\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec3 color\",\"float fraction\"],\"column\":5,\"comment\":\" fraction is saturation percentage, 0 means gray\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\graph-expression\\\\base.chunk\",\"line\":5,\"name\":\"Desaturation\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"vec4 clipPos\",\"vec2 screen_resolution\",\"float transparency\"],\"column\":5,\"comment\":\" dithered transparency (dithered alpha test), better looking with TAA\\r\\n arguments: FSInput_clipPos, cc_viewPort.zw, baseColor.a\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\effect\\\\special-effects.chunk\",\"line\":4,\"name\":\"DitheredAlphaClip\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":18,\"name\":\"EPSILON\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":19,\"name\":\"EPSILON_LOWP\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":21,\"name\":\"EXP_VALUE\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"samplerCube tex\",\"vec3 R\",\"float roughness\",\"float mipCount\"],\"column\":7,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\texture\\\\cubemap.chunk\",\"line\":33,\"name\":\"EnvReflection\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"vec3 R\",\"float roughness\",\"float mipCount\",\"float denoiseIntensity\"],\"column\":7,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\texture\\\\cubemap.chunk\",\"line\":3,\"name\":\"EnvReflectionWithMipFiltering\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"vec4 pos\",\"vec3 cameraPos\",\"float fogStart\",\"float fogDensity\",\"float fogAtten\"],\"column\":6,\"comment\":\"pos, cc_cameraPos.xyz, cc_fogBase.x, cc_fogBase.z, cc_fogAdd.z\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\effect\\\\fog.chunk\",\"line\":11,\"name\":\"ExpFog\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec4 pos\",\"vec3 cameraPos\",\"float fogStart\",\"float fogDensity\",\"float fogAtten\"],\"column\":6,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\effect\\\\fog.chunk\",\"line\":18,\"name\":\"ExpSquaredFog\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":22,\"name\":\"FP_MAX\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":23,\"name\":\"FP_SCALE\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":24,\"name\":\"FP_SCALE_INV\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\shading-entries\\\\data-structures\\\\fs-input.chunk\",\"line\":58,\"name\":\"FSInput_clipPos\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\shading-entries\\\\data-structures\\\\fs-input.chunk\",\"line\":15,\"name\":\"FSInput_faceSideSign\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\shading-entries\\\\data-structures\\\\fs-input.chunk\",\"line\":50,\"name\":\"FSInput_fogFactor\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\shading-entries\\\\data-structures\\\\fs-input.chunk\",\"line\":39,\"name\":\"FSInput_lightMapUV\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\shading-entries\\\\data-structures\\\\fs-input.chunk\",\"line\":54,\"name\":\"FSInput_localPos\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\shading-entries\\\\data-structures\\\\fs-input.chunk\",\"line\":26,\"name\":\"FSInput_mirrorNormal\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\shading-entries\\\\data-structures\\\\fs-input.chunk\",\"line\":46,\"name\":\"FSInput_reflectionProbeId\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\shading-entries\\\\data-structures\\\\fs-input.chunk\",\"line\":43,\"name\":\"FSInput_shadowBias\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\shading-entries\\\\data-structures\\\\fs-input.chunk\",\"line\":16,\"name\":\"FSInput_texcoord\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\shading-entries\\\\data-structures\\\\fs-input.chunk\",\"line\":33,\"name\":\"FSInput_texcoord1\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\shading-entries\\\\data-structures\\\\fs-input.chunk\",\"line\":19,\"name\":\"FSInput_vertexColor\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\shading-entries\\\\data-structures\\\\fs-input.chunk\",\"line\":14,\"name\":\"FSInput_worldNormal\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\shading-entries\\\\data-structures\\\\fs-input.chunk\",\"line\":13,\"name\":\"FSInput_worldPos\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\shading-entries\\\\data-structures\\\\fs-input.chunk\",\"line\":25,\"name\":\"FSInput_worldTangent\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":25,\"name\":\"GRAY_VECTOR\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"vec3 L\",\"vec3 litDir\",\"float litAngleScale\",\"float litAngleOffset\"],\"column\":6,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\attenuation.chunk\",\"line\":22,\"name\":\"GetAngleAtt\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"float roughness\",\"float anisotropyShape\",\"vec3 V\",\"vec3 N\",\"vec3 X\",\"vec3 Y\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\brdf.chunk\",\"line\":45,\"name\":\"GetAnisotropicReflect\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"float roughness\",\"float anisotropyShape\",\"out float roughnessX\",\"out float roughnessY\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\brdf.chunk\",\"line\":19,\"name\":\"GetAnisotropicRoughness\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[\"float depthHS\",\"mat4 matProj\"],\"column\":6,\"comment\":\" depthHS (Z) = ndc depth(-1 ~ +1)\\r\\n return camera depth (W), negative in RH\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\math\\\\coordinates.chunk\",\"line\":32,\"name\":\"GetCameraDepthRH\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"float depthHS\",\"float matProj32\",\"float matProj22\"],\"column\":6,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\math\\\\coordinates.chunk\",\"line\":36,\"name\":\"GetCameraDepthRH\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"out vec3 centerPos\",\"out vec3 boxHalfSize\",\"out float mipCount\",\"float probeId\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\probe.chunk\",\"line\":29,\"name\":\"GetCubeReflectionProbeData\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[\"float distSqr\",\"float invSqrAttRadius\"],\"column\":6,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\attenuation.chunk\",\"line\":16,\"name\":\"GetDistAtt\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"out vec3 lightmapColor\",\"out float dirShadow\",\"out float ao\",\"sampler2D lightingMap\",\"vec2 luv\",\"float lum\",\"vec3 worldNormal\"],\"column\":5,\"comment\":\" for surface shader\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\light-map.chunk\",\"line\":23,\"name\":\"GetLightMapColor\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[\"vec3 viewPos\",\"float near\",\"float far\"],\"column\":6,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\math\\\\coordinates.chunk\",\"line\":54,\"name\":\"GetLinearDepthFromViewSpace\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"out float metallic\",\"out vec3 albedo\",\"vec3 diffuse\",\"vec3 specular\",\"float channelFaultTolerant\",\"float f0\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\mesh\\\\material.chunk\",\"line\":1,\"name\":\"GetMetallicAlbedoFromDiffuseSpecularMathematic\",\"type\":\"bool\",\"usage\":\"function\"},{\"args\":[\"out float metallic\",\"out vec3 albedo\",\"vec3 diffuse\",\"vec3 specular\",\"float f0\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\mesh\\\\material.chunk\",\"line\":29,\"name\":\"GetMetallicAlbedoFromDiffuseSpecularWithoutColor\",\"type\":\"bool\",\"usage\":\"function\"},{\"args\":[\"vec3 worldPos\",\"mat4 matVirtualCameraViewProj\",\"float flipNDCSign\",\"vec3 viewDir\",\"vec3 reflectDir\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\math\\\\coordinates.chunk\",\"line\":21,\"name\":\"GetPlanarReflectScreenUV\",\"type\":\"vec2\",\"usage\":\"function\"},{\"args\":[\"out vec4 plane\",\"out float planarReflectionDepthScale\",\"out float mipCount\",\"float probeId\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\probe.chunk\",\"line\":11,\"name\":\"GetPlanarReflectionProbeData\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[\"vec4 clipPos\",\"float flipNDCSign\"],\"column\":5,\"comment\":\" return 0-1\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\math\\\\coordinates.chunk\",\"line\":7,\"name\":\"GetScreenUV\",\"type\":\"vec2\",\"usage\":\"function\"},{\"args\":[\"vec3 worldPos\",\"mat4 matViewProj\",\"float flipNDCSign\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\math\\\\coordinates.chunk\",\"line\":15,\"name\":\"GetScreenUV\",\"type\":\"vec2\",\"usage\":\"function\"},{\"args\":[\"out vec3 shadowNDCPos\",\"vec4 shadowPosWithDepthBias\"],\"column\":7,\"comment\":\"////////////////////////////////////////////////////////Helper Functions\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":40,\"name\":\"GetShadowNDCPos\",\"type\":\"bool\",\"usage\":\"function\"},{\"args\":[\"sampler2D dataMap\",\"float dataMapWidth\",\"float x\",\"float uv_y\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\probe.chunk\",\"line\":2,\"name\":\"GetTexData\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[\"vec3 posHS\",\"mat4 matProj\",\"mat4 matProjInv\"],\"column\":5,\"comment\":\" posHS = ndc pos (xyz: -1 ~ +1)\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\math\\\\coordinates.chunk\",\"line\":42,\"name\":\"GetViewPosFromNDCPosRH\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[\"float NDCDepth\",\"float projScaleZ\",\"float projBiasZ\"],\"column\":8,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":76,\"name\":\"GetViewSpaceDepthFromNDCDepth_Orthgraphic\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"float NDCDepth\",\"float homogenousDividW\",\"float invProjScaleZ\",\"float invProjBiasZ\"],\"column\":8,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\shadow-map.chunk\",\"line\":80,\"name\":\"GetViewSpaceDepthFromNDCDepth_Perspective\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec3 posHS\",\"mat4 matProj\",\"mat4 matViewProjInv\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\math\\\\coordinates.chunk\",\"line\":48,\"name\":\"GetWorldPosFromNDCPosRH\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":7,\"name\":\"HALF_PI\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"vec3 color\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\color\\\\tone-mapping.chunk\",\"line\":5,\"name\":\"HDRToLDR\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"value\",\"defined\"],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\data\\\\packing.chunk\",\"line\":53,\"name\":\"HIGHP_VALUE_FROM_STRUCT_DEFINED\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"value\",\"defined\"],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\data\\\\packing.chunk\",\"line\":70,\"name\":\"HIGHP_VALUE_FROM_STRUCT_DEFINED_SMALL_RANGE\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"type\",\"name\"],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\data\\\\packing.chunk\",\"line\":44,\"name\":\"HIGHP_VALUE_STRUCT_DEFINE\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"value\",\"defined\"],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\data\\\\packing.chunk\",\"line\":61,\"name\":\"HIGHP_VALUE_TO_STRUCT_DEFINED\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"value\",\"defined\"],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\data\\\\packing.chunk\",\"line\":78,\"name\":\"HIGHP_VALUE_TO_STRUCT_DEFINED_SMALL_RANGE\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":13,\"name\":\"INV_HALF_PI\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":14,\"name\":\"INV_PI\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":15,\"name\":\"INV_PI2\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":16,\"name\":\"INV_PI4\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":12,\"name\":\"INV_QUATER_PI\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"light_type\"],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":65,\"name\":\"IS_DIRECTIONAL_LIGHT\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"light_type\"],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":68,\"name\":\"IS_POINT_LIGHT\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"light_type\"],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":69,\"name\":\"IS_RANGED_DIRECTIONAL_LIGHT\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"light_type\"],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":66,\"name\":\"IS_SPHERE_LIGHT\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"light_type\"],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":67,\"name\":\"IS_SPOT_LIGHT\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"vec3 v1\",\"vec3 v2\"],\"column\":6,\"comment\":\" https://eheitzresearch.wordpress.com/415-2/\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\rect-area-light.chunk\",\"line\":107,\"name\":\"IntegrateEdge\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec3 specular\",\"float roughness\",\"float NoV\"],\"column\":5,\"comment\":\" EnvBRDFApprox\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\brdf.chunk\",\"line\":63,\"name\":\"IntegratedGFApprox\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":51,\"name\":\"LIGHT_MAP_TYPE_ALL_IN_ONE\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":50,\"name\":\"LIGHT_MAP_TYPE_DISABLED\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":52,\"name\":\"LIGHT_MAP_TYPE_INDIRECT_OCCLUSION\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":60,\"name\":\"LIGHT_TYPE_DIRECTIONAL\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":61,\"name\":\"LIGHT_TYPE_POINT\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":64,\"name\":\"LIGHT_TYPE_RANGED_DIRECTIONAL\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":63,\"name\":\"LIGHT_TYPE_SPHERE\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":62,\"name\":\"LIGHT_TYPE_SPOT\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":20,\"name\":\"LOG2\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"vec3 N\",\"vec3 V\",\"vec3 P\",\"mat3 Minv\",\"vec3 points[4]\"],\"column\":5,\"comment\":\" https://blog.magnum.graphics/guest-posts/area-lights-with-ltcs/\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\rect-area-light.chunk\",\"line\":114,\"name\":\"LTC_Evaluate\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"vec4 pos\",\"vec3 cameraPos\",\"float fogTop\",\"float fogRange\",\"float fogAtten\"],\"column\":6,\"comment\":\"pos, cc_cameraPos.xyz, cc_fogAdd.x, cc_fogAdd.y, cc_fogAdd.z\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\effect\\\\fog.chunk\",\"line\":26,\"name\":\"LayeredFog\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\lighting-models\\\\data-structures\\\\lighting-intermediate-data.chunk\",\"line\":3,\"name\":\"LightingIntermediateData\",\"type\":\"\",\"usage\":\"variable\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\lighting-models\\\\data-structures\\\\lighting-misc-data.chunk\",\"line\":3,\"name\":\"LightingMiscData\",\"type\":\"\",\"usage\":\"variable\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\lighting-models\\\\data-structures\\\\lighting-result.chunk\",\"line\":3,\"name\":\"LightingResult\",\"type\":\"\",\"usage\":\"variable\"},{\"args\":[\"vec4 pos\",\"vec3 cameraPos\",\"float fogStart\",\"float fogEnd\"],\"column\":6,\"comment\":\"pos, cc_cameraPos.xyz, cc_fogBase.x, cc_fogBase.y\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\effect\\\\fog.chunk\",\"line\":4,\"name\":\"LinearFog\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec3 linear\"],\"column\":5,\"comment\":\" #pragma define LinearToSRGB(linear) pow(linear, vec3(0.454545))\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\color\\\\gamma.chunk\",\"line\":19,\"name\":\"LinearToSRGB\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"v\"],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\data\\\\unpack.chunk\",\"line\":4,\"name\":\"MOD_FINT_128\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":8,\"name\":\"PI\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":9,\"name\":\"PI2\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":10,\"name\":\"PI4\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":6,\"name\":\"QUATER_PI\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":56,\"name\":\"REFLECTION_PROBE_TYPE_CUBE\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":55,\"name\":\"REFLECTION_PROBE_TYPE_NONE\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":57,\"name\":\"REFLECTION_PROBE_TYPE_PLANAR\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"inout vec3 binormal\",\"inout vec3 normal\",\"in vec3 tangent\",\"float rotationAngle\",\"float mirrorNormal\"],\"column\":5,\"comment\":\" fast rotation for anisotropic offset\\r\\n rotationAngle: -1 - +1\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\math\\\\coordinates.chunk\",\"line\":115,\"name\":\"RotateNormalAndBinormal\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[\"inout vec3 tangent\",\"inout vec3 binormal\",\"vec3 normal\",\"float rotationAngle\"],\"column\":5,\"comment\":\" rotationAngle: radians, 0-2Pi\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\math\\\\coordinates.chunk\",\"line\":99,\"name\":\"RotateTangentAndBinormal\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[\"vec3 v\",\"float cosTheta\",\"float sinTheta\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\math\\\\coordinates.chunk\",\"line\":84,\"name\":\"RotationVecFromAxisY\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"vec3 v\",\"float rotateAngleArc\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\math\\\\coordinates.chunk\",\"line\":93,\"name\":\"RotationVecFromAxisY\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"vec2 uv\",\"vec2 centerUV\",\"float time\",\"float speed\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\graph-expression\\\\base.chunk\",\"line\":11,\"name\":\"Rotator\",\"type\":\"vec2\",\"usage\":\"function\"},{\"args\":[\"vec3 normal\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\builtin\\\\functionalities\\\\sh.chunk\",\"line\":4,\"name\":\"SHEvaluate\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"vec3 gamma\"],\"column\":5,\"comment\":\" #pragma define SRGBToLinear(gamma) pow(gamma, vec3(2.2))\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\color\\\\gamma.chunk\",\"line\":6,\"name\":\"SRGBToLinear\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"v\"],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\data\\\\unpack.chunk\",\"line\":3,\"name\":\"STEP_FINT_128\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\common-define.chunk\",\"line\":76,\"name\":\"SURFACES_MAX_TRANSMIT_DEPTH_VALUE\",\"type\":\"\",\"usage\":\"macro\"},{\"args\":[\"out vec3 lightmapColor\",\"out float dirShadow\",\"out float ao\",\"sampler2D lightingMap\",\"vec2 luv\",\"float lum\",\"vec3 worldNormal\"],\"column\":5,\"comment\":\" for legacy effects\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\light-map.chunk\",\"line\":2,\"name\":\"SampleAndDecodeLightMapColor\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[\"sampler2D exrRGBE\",\"vec2 uv\"],\"column\":5,\"comment\":\" for exr data texture and sub resources\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\texture\\\\texture-misc.chunk\",\"line\":3,\"name\":\"SampleTextureExr\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"sampler2D exrRGBE\",\"sampler2D exrSign\",\"vec2 uv\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\texture\\\\texture-misc.chunk\",\"line\":9,\"name\":\"SampleTextureExr\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"sampler2D exrRGBE\",\"sampler2D exrSign\",\"sampler2D exrAlpha\",\"vec2 uv\"],\"column\":5,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\texture\\\\texture-misc.chunk\",\"line\":16,\"name\":\"SampleTextureExrWithAlpha\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[\"float distSqr\",\"float invSqrAttRadius\"],\"column\":6,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\attenuation.chunk\",\"line\":10,\"name\":\"SmoothDistAtt\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"float distSqr\",\"float invSqrAttRadius\"],\"column\":6,\"comment\":\" base\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\lighting\\\\attenuation.chunk\",\"line\":2,\"name\":\"SmoothDistAtt2\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec2 center\",\"vec2 point\",\"float radius\",\"float hardness\"],\"column\":6,\"comment\":\" return 0.0 when out of range\\r\\n hardness: 0 - 1\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\graph-expression\\\\base.chunk\",\"line\":36,\"name\":\"SphereMask\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[\"vec3 center\",\"vec3 point\",\"float radius\",\"float hardness\"],\"column\":6,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\common\\\\graph-expression\\\\base.chunk\",\"line\":42,\"name\":\"SphereMask\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\legacy\\\\shading-standard-base.chunk\",\"line\":3,\"name\":\"StandardSurface\",\"type\":\"\",\"usage\":\"variable\"},{\"args\":[],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_ALPHA_CLIP_ONLY\\r\\n for base shape without color usage, such as render-to-shadow\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":12,\"name\":\"SurfacesFragmentAlphaClipOnly\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[\"out float isRotation\"],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_ANISOTROPY_PARAMS\\r\\n isRotation=1.0: shape(0~1), rotation(0~2PI), 0.0, 0.0\\r\\n or\\r\\n isRotation=0.0: shape(0~1), anisoDir.xyz(-1~1)\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":57,\"name\":\"SurfacesFragmentModifyAnisotropyParams\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[\"out vec4 baseColorAndTransparency\",\"out vec3 shade1\",\"out vec3 shade2\",\"in vec3 baseColor\"],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_BASECOLOR_AND_TOONSHADE\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\toon-fs.chunk\",\"line\":5,\"name\":\"SurfacesFragmentModifyBaseColorAndToonShade\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_BASECOLOR_AND_TRANSPARENCY\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":3,\"name\":\"SurfacesFragmentModifyBaseColorAndTransparency\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[\"float roughness\"],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_DUAL_LOBE_SPECULAR_PARAMS\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":169,\"name\":\"SurfacesFragmentModifyDualLobeSpecularParams\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_EMISSIVE\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":66,\"name\":\"SurfacesFragmentModifyEmissive\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[],\"column\":6,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_IOR\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":46,\"name\":\"SurfacesFragmentModifyIOR\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_PBRPARAMS\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":74,\"name\":\"SurfacesFragmentModifyPBRParams\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_SSS_PARAMS\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":179,\"name\":\"SurfacesFragmentModifySSSParams\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[\"inout SurfacesMaterialData surfaceData\"],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_SHARED_DATA\\r\\n some material datas use shared raw data, avoid sample / calculate same raw data multiply times, use this function for better performance\\r\\n this function invokes at last\\r\\n should use corresponding shading-model header: #include <surfaces/data-structures/XXX> before function define\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":194,\"name\":\"SurfacesFragmentModifySharedData\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_TRT_COLOR\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":142,\"name\":\"SurfacesFragmentModifyTRTColor\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_TRT_PARAMS\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":131,\"name\":\"SurfacesFragmentModifyTRTParams\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[\"in vec3 baseColor\"],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_TT_COLOR\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":160,\"name\":\"SurfacesFragmentModifyTTColor\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_TT_PARAMS\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":150,\"name\":\"SurfacesFragmentModifyTTParams\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[],\"column\":6,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_TOON_SHADOW_COVER\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\toon-fs.chunk\",\"line\":22,\"name\":\"SurfacesFragmentModifyToonShadowCover\",\"type\":\"float\",\"usage\":\"function\"},{\"args\":[],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_TOON_SPECULAR\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\toon-fs.chunk\",\"line\":30,\"name\":\"SurfacesFragmentModifyToonSpecular\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_TOON_STEP_AND_FEATHER\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\toon-fs.chunk\",\"line\":14,\"name\":\"SurfacesFragmentModifyToonStepAndFeather\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_TRANSMIT_DIFFUSE_PARAMS\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":115,\"name\":\"SurfacesFragmentModifyTransmitDiffuseParams\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_TRANSMIT_IN_SCATTERING_COLOR\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":98,\"name\":\"SurfacesFragmentModifyTransmitInScatteringColor\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_TRANSMIT_OUT_SCATTERING_COLOR\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":106,\"name\":\"SurfacesFragmentModifyTransmitOutScatteringColor\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_TRANSMIT_SCATTERING_PARAMS\\r\\n scattering related parameters and colors\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":84,\"name\":\"SurfacesFragmentModifyTransmitScatteringParams\",\"type\":\"vec4\",\"usage\":\"function\"},{\"args\":[],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_WORLD_NORMAL\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":20,\"name\":\"SurfacesFragmentModifyWorldNormal\",\"type\":\"vec3\",\"usage\":\"function\"},{\"args\":[\"inout vec3 worldTangent\",\"inout vec3 worldBinormal\",\"vec3 worldNormal\"],\"column\":5,\"comment\":\" depends on CC_SURFACES_FRAGMENT_MODIFY_WORLD_TANGENT_AND_BINORMAL\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\default-functions\\\\standard-fs.chunk\",\"line\":28,\"name\":\"SurfacesFragmentModifyWorldTangentAndBinormal\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[\"inout LightingResult result\",\"in LightingIntermediateData lightingData\",\"in SurfacesMaterialData surfaceData\",\"in LightingMiscData miscData\"],\"column\":7,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\lighting-models\\\\default-functions\\\\simple-skin.chunk\",\"line\":9,\"name\":\"SurfacesLightingModifyFinalResult\",\"type\":\"void\",\"usage\":\"function\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\surfaces\\\\data-structures\\\\standard.chunk\",\"line\":3,\"name\":\"SurfacesMaterialData\",\"type\":\"\",\"usage\":\"variable\"},{\"args\":[],\"column\":1,\"comment\":\"\",\"file\":\"editor\\\\assets\\\\chunks\\\\shading-entries\\\\data-structures\\\\vs-intermediate.chunk\",\"line\":3,\"name\":\"SurfacesStandardVertexIntermediate\",\"type\":\"\",\"usage\":\"variable\"},{\"args\":[\"in SurfacesStandardVertexIntermediate In\"\n\n<!-- File: native/tools/bindings-generator/targets/spidermonkey/conversions.yaml (Tokens: ~300 | Category: anthropic-skill) -->\n# Spidermonkey Skill\n\nPath: `native/tools/bindings-generator/targets/spidermonkey/conversions.yaml`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/cocos/cocos-engine/HEAD/native/tools/bindings-generator/targets/spidermonkey/conversions.yaml)\n\n<!-- File: native/tools/gfx-define-generator/package-lock.json (Tokens: ~383 | Category: anthropic-skill) -->\n{\n  \"name\": \"gfx-define-generator\",\n  \"version\": \"1.0.0\",\n  \"lockfileVersion\": 3,\n  \"requires\": true,\n  \"packages\": {\n    \"\": {\n      \"name\": \"gfx-define-generator\",\n      \"version\": \"1.0.0\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"js-yaml\": \"^4.0.0\"\n      }\n    },\n    \"node_modules/argparse\": {\n      \"version\": \"2.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz\",\n      \"integrity\": \"sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==\"\n    },\n    \"node_modules/js-yaml\": {\n      \"version\": \"4.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/js-yaml/-/js-yaml-4.0.0.tgz\",\n      \"integrity\": \"sha512-pqon0s+4ScYUvX30wxQi3PogGFAlUyH0awepWvwkj4jD4v+ova3RiYw8bmA6x2rDrEaj8i/oWKoRxpVNW+Re8Q==\",\n      \"dependencies\": {\n        \"argparse\": \"^2.0.1\"\n      },\n      \"bin\": {\n        \"js-yaml\": \"bin/js-yaml.js\"\n      }\n    }\n  }\n}\n\n<!-- File: native/tools/gfx-define-generator/package.json (Tokens: ~105 | Category: anthropic-skill) -->\n{\n  \"name\": \"gfx-define-generator\",\n  \"version\": \"1.0.0\",\n  \"description\": \"GFX layer definition generator\",\n  \"main\": \"generate.js\",\n  \"scripts\": {\n    \"test\": \"echo \\\"Error: no test specified\\\" && exit 1\"\n  },\n  \"author\": \"YunHsiao\",\n  \"license\": \"MIT\",\n  \"dependencies\": {\n    \"js-yaml\": \"^4.0.0\"\n  }\n}\n\n<!-- File: native/tools/gles-wrangler-generator/package-lock.json (Tokens: ~4345 | Category: anthropic-skill) -->\n{\n  \"name\": \"gles-wrangler-generator\",\n  \"version\": \"1.0.0\",\n  \"lockfileVersion\": 3,\n  \"requires\": true,\n  \"packages\": {\n    \"\": {\n      \"version\": \"1.0.0\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"axios\": \"^1.8.2\",\n        \"fast-xml-parser\": \"^3.17.6\"\n      }\n    },\n    \"node_modules/asynckit\": {\n      \"version\": \"0.4.0\",\n      \"resolved\": \"https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz\",\n      \"integrity\": \"sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==\",\n      \"license\": \"MIT\"\n    },\n    \"node_modules/axios\": {\n      \"version\": \"1.8.2\",\n      \"resolved\": \"https://registry.npmjs.org/axios/-/axios-1.8.2.tgz\",\n      \"integrity\": \"sha512-ls4GYBm5aig9vWx8AWDSGLpnpDQRtWAfrjU+EuytuODrFBkqesN2RkOQCBzrA1RQNHw1SmRMSDDDSwzNAYQ6Rg==\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"follow-redirects\": \"^1.15.6\",\n        \"form-data\": \"^4.0.0\",\n        \"proxy-from-env\": \"^1.1.0\"\n      }\n    },\n    \"node_modules/call-bind-apply-helpers\": {\n      \"version\": \"1.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz\",\n      \"integrity\": \"sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"es-errors\": \"^1.3.0\",\n        \"function-bind\": \"^1.1.2\"\n      },\n      \"engines\": {\n        \"node\": \">= 0.4\"\n      }\n    },\n    \"node_modules/combined-stream\": {\n      \"version\": \"1.0.8\",\n      \"resolved\": \"https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz\",\n      \"integrity\": \"sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"delayed-stream\": \"~1.0.0\"\n      },\n      \"engines\": {\n        \"node\": \">= 0.8\"\n      }\n    },\n    \"node_modules/delayed-stream\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz\",\n      \"integrity\": \"sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==\",\n      \"license\": \"MIT\",\n      \"engines\": {\n        \"node\": \">=0.4.0\"\n      }\n    },\n    \"node_modules/dunder-proto\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz\",\n      \"integrity\": \"sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"call-bind-apply-helpers\": \"^1.0.1\",\n        \"es-errors\": \"^1.3.0\",\n        \"gopd\": \"^1.2.0\"\n      },\n      \"engines\": {\n        \"node\": \">= 0.4\"\n      }\n    },\n    \"node_modules/es-define-property\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz\",\n      \"integrity\": \"sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==\",\n      \"license\": \"MIT\",\n      \"engines\": {\n        \"node\": \">= 0.4\"\n      }\n    },\n    \"node_modules/es-errors\": {\n      \"version\": \"1.3.0\",\n      \"resolved\": \"https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz\",\n      \"integrity\": \"sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==\",\n      \"license\": \"MIT\",\n      \"engines\": {\n        \"node\": \">= 0.4\"\n      }\n    },\n    \"node_modules/es-object-atoms\": {\n      \"version\": \"1.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz\",\n      \"integrity\": \"sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"es-errors\": \"^1.3.0\"\n      },\n      \"engines\": {\n        \"node\": \">= 0.4\"\n      }\n    },\n    \"node_modules/es-set-tostringtag\": {\n      \"version\": \"2.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz\",\n      \"integrity\": \"sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"es-errors\": \"^1.3.0\",\n        \"get-intrinsic\": \"^1.2.6\",\n        \"has-tostringtag\": \"^1.0.2\",\n        \"hasown\": \"^2.0.2\"\n      },\n      \"engines\": {\n        \"node\": \">= 0.4\"\n      }\n    },\n    \"node_modules/fast-xml-parser\": {\n      \"version\": \"3.17.6\",\n      \"resolved\": \"https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-3.17.6.tgz\",\n      \"integrity\": \"sha512-40WHI/5d2MOzf1sD2bSaTXlPn1lueJLAX6j1xH5dSAr6tNeut8B9ktEL6sjAK9yVON4uNj9//axOdBJUuruCzw==\",\n      \"bin\": {\n        \"xml2js\": \"cli.js\"\n      },\n      \"funding\": {\n        \"type\": \"paypal\",\n        \"url\": \"https://paypal.me/naturalintelligence\"\n      }\n    },\n    \"node_modules/follow-redirects\": {\n      \"version\": \"1.15.9\",\n      \"resolved\": \"https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz\",\n      \"integrity\": \"sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==\",\n      \"funding\": [\n        {\n          \"type\": \"individual\",\n          \"url\": \"https://github.com/sponsors/RubenVerborgh\"\n        }\n      ],\n      \"license\": \"MIT\",\n      \"engines\": {\n        \"node\": \">=4.0\"\n      },\n      \"peerDependenciesMeta\": {\n        \"debug\": {\n          \"optional\": true\n        }\n      }\n    },\n    \"node_modules/form-data\": {\n      \"version\": \"4.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/form-data/-/form-data-4.0.2.tgz\",\n      \"integrity\": \"sha512-hGfm/slu0ZabnNt4oaRZ6uREyfCj6P4fT/n6A1rGV+Z0VdGXjfOhVUpkn6qVQONHGIFwmveGXyDs75+nr6FM8w==\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"asynckit\": \"^0.4.0\",\n        \"combined-stream\": \"^1.0.8\",\n        \"es-set-tostringtag\": \"^2.1.0\",\n        \"mime-types\": \"^2.1.12\"\n      },\n      \"engines\": {\n        \"node\": \">= 6\"\n      }\n    },\n    \"node_modules/function-bind\": {\n      \"version\": \"1.1.2\",\n      \"resolved\": \"https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz\",\n      \"integrity\": \"sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==\",\n      \"license\": \"MIT\",\n      \"funding\": {\n        \"url\": \"https://github.com/sponsors/ljharb\"\n      }\n    },\n    \"node_modules/get-intrinsic\": {\n      \"version\": \"1.3.0\",\n      \"resolved\": \"https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz\",\n      \"integrity\": \"sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"call-bind-apply-helpers\": \"^1.0.2\",\n        \"es-define-property\": \"^1.0.1\",\n        \"es-errors\": \"^1.3.0\",\n        \"es-object-atoms\": \"^1.1.1\",\n        \"function-bind\": \"^1.1.2\",\n        \"get-proto\": \"^1.0.1\",\n        \"gopd\": \"^1.2.0\",\n        \"has-symbols\": \"^1.1.0\",\n        \"hasown\": \"^2.0.2\",\n        \"math-intrinsics\": \"^1.1.0\"\n      },\n      \"engines\": {\n        \"node\": \">= 0.4\"\n      },\n      \"funding\": {\n        \"url\": \"https://github.com/sponsors/ljharb\"\n      }\n    },\n    \"node_modules/get-proto\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz\",\n      \"integrity\": \"sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"dunder-proto\": \"^1.0.1\",\n        \"es-object-atoms\": \"^1.0.0\"\n      },\n      \"engines\": {\n        \"node\": \">= 0.4\"\n      }\n    },\n    \"node_modules/gopd\": {\n      \"version\": \"1.2.0\",\n      \"resolved\": \"https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz\",\n      \"integrity\": \"sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==\",\n      \"license\": \"MIT\",\n      \"engines\": {\n        \"node\": \">= 0.4\"\n      },\n      \"funding\": {\n        \"url\": \"https://github.com/sponsors/ljharb\"\n      }\n    },\n    \"node_modules/has-symbols\": {\n      \"version\": \"1.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz\",\n      \"integrity\": \"sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==\",\n      \"license\": \"MIT\",\n      \"engines\": {\n        \"node\": \">= 0.4\"\n      },\n      \"funding\": {\n        \"url\": \"https://github.com/sponsors/ljharb\"\n      }\n    },\n    \"node_modules/has-tostringtag\": {\n      \"version\": \"1.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz\",\n      \"integrity\": \"sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"has-symbols\": \"^1.0.3\"\n      },\n      \"engines\": {\n        \"node\": \">= 0.4\"\n      },\n      \"funding\": {\n        \"url\": \"https://github.com/sponsors/ljharb\"\n      }\n    },\n    \"node_modules/hasown\": {\n      \"version\": \"2.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz\",\n      \"integrity\": \"sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"function-bind\": \"^1.1.2\"\n      },\n      \"engines\": {\n        \"node\": \">= 0.4\"\n      }\n    },\n    \"node_modules/math-intrinsics\": {\n      \"version\": \"1.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz\",\n      \"integrity\": \"sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==\",\n      \"license\": \"MIT\",\n      \"engines\": {\n        \"node\": \">= 0.4\"\n      }\n    },\n    \"node_modules/mime-db\": {\n      \"version\": \"1.52.0\",\n      \"resolved\": \"https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz\",\n      \"integrity\": \"sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==\",\n      \"license\": \"MIT\",\n      \"engines\": {\n        \"node\": \">= 0.6\"\n      }\n    },\n    \"node_modules/mime-types\": {\n      \"version\": \"2.1.35\",\n      \"resolved\": \"https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz\",\n      \"integrity\": \"sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"mime-db\": \"1.52.0\"\n      },\n      \"engines\": {\n        \"node\": \">= 0.6\"\n      }\n    },\n    \"node_modules/proxy-from-env\": {\n      \"version\": \"1.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz\",\n      \"integrity\": \"sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==\",\n      \"license\": \"MIT\"\n    }\n  }\n}\n\n<!-- File: native/tools/gles-wrangler-generator/package.json (Tokens: ~120 | Category: anthropic-skill) -->\n{\n  \"name\": \"gles-wrangler-generator\",\n  \"version\": \"1.0.0\",\n  \"description\": \"EGL/GLES loader code generator\",\n  \"main\": \"generate.js\",\n  \"scripts\": {\n    \"test\": \"echo \\\"Error: no test specified\\\" && exit 1\"\n  },\n  \"author\": \"YunHsiao\",\n  \"license\": \"MIT\",\n  \"dependencies\": {\n    \"axios\": \"^1.8.2\",\n    \"fast-xml-parser\": \"^3.17.6\"\n  }\n}\n\n<!-- File: native/tools/simulator/.cocos-project.json (Tokens: ~17 | Category: anthropic-skill) -->\n{\n    \"has_native\": true,\n    \"project_type\": \"js\"\n}\n\n<!-- File: native/tools/simulator/config.json (Tokens: ~687 | Category: anthropic-skill) -->\n{\n    \"init_cfg\":{\n        \"isLandscape\": true,\n        \"isWindowTop\": false,\n        \"waitForConnect\": false,\n        \"name\": \"Simulator\",\n        \"width\": 960,\n        \"height\": 640,\n        \"entry\": \"main.js\",\n        \"consolePort\": 6050,\n        \"uploadPort\": 6060,\n        \"debugPort\": 5086\n    },\n    \"simulator_screen_size\": [\n        {\n            \"title\": \"Apple iPhone 5 (640x1136)\",\n            \"width\": 640,\n            \"height\": 1136\n        },\n        {\n            \"title\": \"Apple iPhone 6 (750x1334)\",\n            \"width\": 750,\n            \"height\": 1334\n        },\n        {\n            \"title\": \"Apple iPhone 6Plus (1080x1920)\",\n            \"width\": 1080,\n            \"height\": 1920\n        },\n        {\n            \"title\": \"Apple iPhone 7 (750x1334)\",\n            \"width\": 750,\n            \"height\": 1334\n        },\n        {\n            \"title\": \"Apple iPhone 7Plus (1080x1920)\",\n            \"width\": 1080,\n            \"height\": 1920\n        },\n        {\n            \"title\": \"Apple iPhone X (1125x2436)\",\n            \"width\": 1125,\n            \"height\": 2436\n        },\n        {\n            \"title\": \"Apple iPad (2048x1536)\",\n            \"width\": 2048,\n            \"height\": 1536\n        },\n        {\n            \"title\": \"Apple iPad Air 2 (1536x2048)\",\n            \"width\": 1536,\n            \"height\": 2048\n        },\n        {\n            \"title\": \"Apple iPad Pro 10.5-inch (1668x2224)\",\n            \"width\": 1668,\n            \"height\": 2224\n        },\n        {\n            \"title\": \"Apple iPad Pro 12.9-inch (2048x2732)\",\n            \"width\": 2048,\n            \"height\": 2732\n        },\n        {\n          \"title\": \"Huawei P9 (1080x1920)\",\n          \"width\": 1080,\n          \"height\": 1920\n        },\n        {\n          \"title\": \"Huawei Mate9 Pro (1440x2560)\",\n          \"width\": 1440,\n          \"height\": 2560\n        },\n        {\n          \"title\": \"Goolge Nexus 5 (1080x2880)\",\n          \"width\": 1080,\n          \"height\": 2880\n        },\n        {\n          \"title\": \"Goolge Nexus 5X (1079x1919)\",\n          \"width\": 1079,\n          \"height\": 1919\n        },\n        {\n          \"title\": \"Goolge Nexus 6 (1442x2562)\",\n          \"width\": 1442,\n          \"height\": 2562\n        },\n        {\n          \"title\": \"Goolge Nexus 7 (1920x1200)\",\n          \"width\": 1920,\n          \"height\": 1200\n        }\n    ]\n}\n\n<!-- File: native/tools/simulator/frameworks/runtime-src/proj.ios_mac/mac/build-cfg.json (Tokens: ~300 | Category: anthropic-skill) -->\n# Mac Skill\n\nPath: `native/tools/simulator/frameworks/runtime-src/proj.ios_mac/mac/build-cfg.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/cocos/cocos-engine/HEAD/native/tools/simulator/frameworks/runtime-src/proj.ios_mac/mac/build-cfg.json)\n\n<!-- File: native/tools/simulator/frameworks/runtime-src/proj.win32/build-cfg.json (Tokens: ~300 | Category: anthropic-skill) -->\n# Proj.win32 Skill\n\nPath: `native/tools/simulator/frameworks/runtime-src/proj.win32/build-cfg.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/cocos/cocos-engine/HEAD/native/tools/simulator/frameworks/runtime-src/proj.win32/build-cfg.json)\n\n<!-- File: native/tools/simulator/frameworks/runtime-src/SimulatorApp-Mac/Images.xcassets/AppIcon.appiconset/Contents.json (Tokens: ~300 | Category: anthropic-skill) -->\n# AppIcon.appiconset Skill\n\nPath: `native/tools/simulator/frameworks/runtime-src/SimulatorApp-Mac/Images.xcassets/AppIcon.appiconset/Contents.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/cocos/cocos-engine/HEAD/native/tools/simulator/frameworks/runtime-src/SimulatorApp-Mac/Images.xcassets/AppIcon.appiconset/Contents.json)\n\n<!-- File: native/tools/swig-config/tutorial/index.md (Tokens: ~9398 | Category: anthropic-skill) -->\n<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**\n\n- [The Tutorial of Swig Workflow in Cocos Creator](#the-tutorial-of-swig-workflow-in-cocos-creator)\n  * [How to Bind a New Module in Engine](#how-to-bind-a-new-module-in-engine)\n    + [Add a new module interface file](#add-a-new-module-interface-file)\n    + [Modify swig-config.js](#modify-swig-configjs)\n    + [Generate bindings](#generate-bindings)\n    + [Modify `engine/native/cocos/CMakeLists.txt`](#modify-enginenativecocoscmakeliststxt)\n    + [Register the new module to Script Engine](#register-the-new-module-to-script-engine)\n  * [How to Bind a New Module in Developer's Project](#how-to-bind-a-new-module-in-developers-project)\n    + [Bind a simple class](#bind-a-simple-class)\n      - [Create a simple class](#create-a-simple-class)\n      - [Write an interface file](#write-an-interface-file)\n      - [Write a swig config file](#write-a-swig-config-file)\n      - [Generate bindings for project](#generate-bindings-for-project)\n      - [Modify project's CMakeLists.txt](#modify-projects-cmakeliststxt)\n      - [Open project](#open-project)\n      - [Register the new module to Script Engine](#register-the-new-module-to-script-engine-1)\n      - [Test binding](#test-binding)\n      - [Section Conclusion](#section-conclusion)\n    + [Import depended header files](#import-depended-header-files)\n    + [Ignore classes, methods, properties](#ignore-classes-methods-properties)\n      - [Ignore classes](#ignore-classes)\n      - [Ignore methods and properties](#ignore-methods-and-properties)\n    + [Rename classes, methods, properties](#rename-classes-methods-properties)\n    + [Define an attribute](#define-an-attribute)\n      - [Usage](#usage)\n      - [Demo](#demo)\n      - [%attribute_writeonly directive](#%25attribute_writeonly--directive)\n      - [Reference type](#reference-type)\n      - [%arg() directive](#%25arg-directive)\n      - [Don't add `const`](#dont-add-const)\n    + [Configure C++ modules in .i file](#configure-c-modules-in-i-file)\n    + [Multiple swig modules configuration](#multiple-swig-modules-configuration)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# The Tutorial of Swig Workflow in Cocos Creator\n\n## How to Bind a New Module in Engine\n\n### Add a new module interface file\n\n- Add a new module interface file to `native/tools/swig-config` directory, e.g. `new-engine-module.i`\n\n- Copy the content in [swig-interface-template.i](../swig-interface-template.i) to new-engine-module.i\n\n- Add necessary configuration, you refer to the existed  `.i` files in `native/tools/swig-config` directory or refer to [the following section](#How to Bind a New Module in Developer's Project)\n  \n\n### Modify swig-config.js\n\n```js\n// ......\n// Engine Module Configuration\nconst configList = [\n    [ '2d.i', 'jsb_2d_auto.cpp' ],\n    // ......\n    [ 'renderer.i', 'jsb_render_auto.cpp' ],\n    [ 'new-engine-module.i', 'jsb_new_engine_module_auto.cpp' ], // Add this line\n];\n//......\n```\n\n### Generate bindings\n\n```bash\ncd engine/native/tools/swig-config\nnode genbindings.js\n```\n\n### Modify `engine/native/cocos/CMakeLists.txt`\n\n```cmake\n######## auto\ncocos_source_files(\n    NO_WERROR   NO_UBUILD   cocos/bindings/auto/jsb_new_engine_module_auto.cpp # Add this line\n                            cocos/bindings/auto/jsb_new_engine_module_auto.h # Add this line\n    NO_WERROR   NO_UBUILD   cocos/bindings/auto/jsb_cocos_auto.cpp\n                            cocos/bindings/auto/jsb_cocos_auto.h\n    ......\n```\n\n### Register the new module to Script Engine\n\nOpen `jsb_module_register.cpp` and do the following modifications\n\n```c++\n......\n#if CC_USE_PHYSICS_PHYSX\n    #include \"cocos/bindings/auto/jsb_physics_auto.h\"\n#endif\n#include \"cocos/bindings/auto/jsb_new_engine_module_auto.h\" // Add this line\n\nbool jsb_register_all_modules() {\n    se::ScriptEngine *se = se::ScriptEngine::getInstance();\n    ......\n    se->addRegisterCallback(register_all_my_new_engine_module); // Add this line\n\n    se->addAfterCleanupHook([]() {\n        cc::DeferredReleasePool::clear();\n        JSBClassType::cleanup();\n    });\n    return true;   \n}\n```\n\n## How to Bind a New Module in Developer's Project\n\nSuppose we have a Cocos Creator project located at `/Users/james/NewProject` directory.\n\nBuild a native project in Cocos Creator's build panel, we get `/Users/james/NewProject/native` directory.\n\n### Bind a simple class\n\n#### Create a simple class\n\nCreate a header file in `/Users/james/NewProject/native/engine/Classes/MyObject.h` , its content is \n\n```c++\n// MyObject.h\n#pragma once\n#include \"cocos/cocos.h\"\nnamespace my_ns {\nclass MyObject {\npublic:\n    MyObject() = default;\n    MyObject(int a, bool b) {}\n    virtual ~MyObject() = default;\n    void print() {\n        CC_LOG_DEBUG(\"==> a: %d, b: %d\\n\", _a, (int)_b);\n    }\n\n    float publicFloatProperty{1.23F};\nprivate:\n    int _a{100};\n    bool _b{true};\n};\n} // namespace my_ns {\n```\n\n#### Write an interface file\n\nCreate an interface called `my-module.i` file in  `/Users/james/NewProject/tools/swig-config`\n\n```c++\n// my-module.i\n%module(target_namespace=\"my_ns\") my_module\n\n// Insert code at the beginning of generated header file (.h)\n%insert(header_file) %{\n#pragma once\n#include \"bindings/jswrapper/SeApi.h\"\n#include \"bindings/manual/jsb_conversions.h\"\n\n#include \"MyObject.h\" // Add this line\n%}\n\n// Insert code at the beginning of generated source file (.cpp)\n%{\n#include \"bindings/auto/jsb_my_module_auto.h\"\n%}\n\n%include \"MyObject.h\"\n```\n\n#### Write a swig config file\n\nCreate a file called swig-config.js in `/Users/james/NewProject/tools/swig-config`\n\n```js\n// swig-config.js\n'use strict';\nconst path = require('path');\nconst configList = [\n    [ 'my-module.i', 'jsb_my_module_auto.cpp' ],\n];\n\nconst projectRoot = path.resolve(path.join(__dirname, '..', '..'));\nconst interfacesDir = path.join(projectRoot, 'tools', 'swig-config');\nconst bindingsOutDir = path.join(projectRoot, 'native', 'engine', 'common', 'bindings', 'auto');\n// includeDirs means header search path for Swig parser\nconst includeDirs = [\n    path.join(projectRoot, 'native', 'engine', 'common', 'Classes'),\n];\n\nmodule.exports = {\n    interfacesDir,\n    bindingsOutDir,\n    includeDirs,\n    configList\n};\n```\n\n#### Generate bindings for project\n\n```bash\n$ cd /Users/james/NewProject/tools/swig-config\n$ node < Engine Root >/native/tools/swig-config/genbindings.js\n```\n\nIf succeed, the files ( `jsb_my_module_auto.cpp/.h` ) contain JS binding code will be generated at `/Users/james/NewProject/native/engine/bindings/auto` directory\n\n#### Modify project's CMakeLists.txt\n\n- Open `/Users/james/NewProject/native/engine/common/CMakeLists.txt`, add `MyObject.h` and its binding code\n\n  ```cmake\n  include(${COCOS_X_PATH}/CMakeLists.txt)\n  \n  list(APPEND CC_COMMON_SOURCES\n      ${CMAKE_CURRENT_LIST_DIR}/Classes/Game.h\n      ${CMAKE_CURRENT_LIST_DIR}/Classes/Game.cpp\n      ############### Add the following lines ##############\n      ${CMAKE_CURRENT_LIST_DIR}/Classes/MyObject.h \n      ${CMAKE_CURRENT_LIST_DIR}/bindings/auto/jsb_my_module_auto.h\n      ${CMAKE_CURRENT_LIST_DIR}/bindings/auto/jsb_my_module_auto.cpp\n      ########################################################\n  )\n  ```\n\n- Modify `/Users/james/NewProject/native/engine/mac/CMakeLists.txt`\n\n  ```cmake\n  cmake_minimum_required(VERSION 3.8)\n  # ......\n  cc_mac_before_target(${EXECUTABLE_NAME})\n  add_executable(${EXECUTABLE_NAME} ${CC_ALL_SOURCES})\n  ############### Add the following lines ##############\n  target_include_directories(${EXECUTABLE_NAME} PRIVATE\n      ${CC_PROJECT_DIR}/../common\n  )\n  ########################################################\n  cc_mac_after_target(${EXECUTABLE_NAME})\n  ```\n\n\n#### Open project \n\nmacOS: `/Users/james/NewProject/build/mac/proj/NewProject.xcodeproj ` \n\nWindows: `< A specific directory >/NewProject/build/win64/proj/NewProject.sln`\n\n#### Register the new module to Script Engine\n\nModify `Game.cpp` :\n\n```c++\n#include \"Game.h\"\n#include \"bindings/auto/jsb_my_module_auto.h\" // Add this line\n//......\nint Game::init() {\n  // ......\n  se::ScriptEngine::getInstance()->addRegisterCallback(register_all_my_module); // Add this line\n  BaseGame::init();\n  return 0;\n}\n// ......\n```\n\n#### Test binding\n\n- Add a `my-module.d.ts` file in the root of project directory to make TS compiler know our binding class.\n\n  ```ts\n  // my-module.d.ts\n  declare namespace my_ns {\n  class MyObject {\n      constructor();\n      constructor(a: number, b: number);\n  \n      publicFloatProperty : number;\n      print() : void;\n  }\n  }\n  ```\n\n- Modify `/Users/james/NewProject/temp/tsconfig.cocos.json` file\n\n  ```js\n  {\n    \"$schema\": \"https://json.schemastore.org/tsconfig\",\n    \"compilerOptions\": {\n      \"target\": \"ES2015\",\n      \"module\": \"ES2015\",\n      \"strict\": true,\n      \"types\": [\n        \"./temp/declarations/cc.custom-macro\",\n        \"./temp/declarations/jsb\",\n        \"./temp/declarations/cc\",\n        \"./temp/declarations/cc.env\",\n        \"./my-module\" // Add this line\n      ],\n      // ......\n      \"forceConsistentCasingInFileNames\": true\n    }\n  }\n  ```\n\n- Open NewProject in Cocos Creator, create a cube object in scene and attach a script to cube, the script's content is\n\n  ```ts\n  import { _decorator, Component } from 'cc';\n  const { ccclass } = _decorator;\n  \n  @ccclass('MyComponent')\n  export class MyComponent extends Component {\n      start() {\n          const myObj = new my_ns.MyObject();\n          myObj.print(); // Invoke native print method\n          console.log(`==> myObj.publicFloatProperty: ${myObj.publicFloatProperty}`); // Get property defined in native\n      }\n  }\n  ```\n\n- Run project, if succeed, you could find the following logs in console \n\n  ```\n  17:31:44 [DEBUG]: ==> a: 100, b: 1\n  17:31:44 [DEBUG]: D/ JS: ==> myObj.publicFloatProperty: 1.2300000190734863\n  ```\n\n#### Section Conclusion\n\nIn this section, we have learned how to use `Swig` tool to bind a simple class, export its public methods and properties to JS. This section also cover the entire flow of binding native classes. Start from next section, we will focus on using more `Swig` features to satisfy more needs of JS bindings, for example:\n\n- How to import depended header files\n- How to ignore classes, methods, properties\n- How to rename classes, methods, properties\n- How to define attributes which bind c++ getter and setter as a JS property\n- How to configure C++ modules in .i file\n\n### Import depended header files\n\nSuppose we let MyObject class be inherited from MyRef class. But we don't want to bind MyRef class.\n\n```c++\n// MyRef.h\n#pragma once\nnamespace my_ns {\nclass MyRef  {\npublic:\n    MyRef() = default;\n    virtual ~MyRef() = default;\n    void addRef() { _ref++; }\n    void release() { --_ref; }\nprivate:\n    unsigned int _ref{0};\n};\n} // namespace my_ns {\n```\n\n```c++\n// MyObject.h\n#pragma once\n#include \"cocos/cocos.h\"\n#include \"MyRef.h\"\nnamespace my_ns {\n// MyObject inherits from MyRef\nclass MyObject : public MyRef {\npublic:\n    MyObject() = default;\n    MyObject(int a, bool b) {}\n    virtual ~MyObject() = default;\n    void print() {\n        CC_LOG_DEBUG(\"==> a: %d, b: %d\\n\", _a, (int)_b);\n    }\n\n    float publicFloatProperty{1.23F};\nprivate:\n    int _a{100};\n    bool _b{true};\n};\n} // namespace my_ns {\n```\n\nWhen Swig parses MyObject.h,  it will not know what `MyRef` is,  it will output a warning in console.\n\n```bash\n.../Classes/MyObject.h:7: Warning 401: Nothing known about base class 'MyRef'. Ignored.\n```\n\nIt's simple to fix this issue, we need to let Swig know that MyRef exists by using `%import` directive.\n\n```c++\n// ......\n// Insert code at the beginning of generated source file (.cpp)\n%{\n#include \"bindings/auto/jsb_my_module_auto.h\"\n%}\n\n%import \"MyRef.h\" // Add this line to fix the warning\n%include \"MyObject.h\"\n```\n\nAlthough Swig doesn't report the error now, the binding code will not be compiled, the error is:\n\n![](MyRefCompileError.jpg)\n\nWe fix this in the next section by `%ignore` directive.\n\n### Ignore classes, methods, properties\n\n#### Ignore classes\n\nIn last section, we got a compile error in `js_register_my_ns_MyObject`. Since MyRef should not be bound, we could use`%ignore` directive to ignore it.\n\n```c++\n// my-module.i\n// ......\n%ignore my_ns::MyRef; // Add this line\n%import \"MyRef.h\"\n%include \"MyObject.h\"\n```\n\nGenerate binding again, it compiles ok.\n\n```c++\n// jsb_my_module_auto.cpp\nbool js_register_my_ns_MyObject(se::Object* obj) {\n    auto* cls = se::Class::create(\"MyObject\", obj, nullptr, _SE(js_new_MyObject)); // parentProto will be set to nullptr\n    cls->defineProperty(\"publicFloatProperty\", _SE(js_my_ns_MyObject_publicFloatProperty_get), _SE(js_my_ns_MyObject_publicFloatProperty_set)); \n    cls->defineFunction(\"print\", _SE(js_my_ns_MyObject_print)); \n  // ......\n}\n```\n\n#### Ignore methods and properties\n\nWe add a new method `methodToBeIgnored` and a new property `propertyToBeIgnored` to `MyObject` class.\n\n```c++\n// MyObject.h\n#pragma once\n#include \"cocos/cocos.h\"\n#include \"MyRef.h\"\nnamespace my_ns {\n// MyObject inherits from MyRef\nclass MyObject : public MyRef {\npublic:\n// .....\n    void methodToBeIgnored() {} // Add this line\n    float propertyToBeIgnored{345.123F}; // Add this line\n// ......\n    float publicFloatProperty{1.23F};\nprivate:\n    int _a{100};\n    bool _b{true};\n};\n} // namespace my_ns {\n\n```\n\nRe-generate bindings, we'll get `methodToBeIgnored` and `propertyToBeIgnored` bound.\n\n```c++\n// jsb_my_module_auto.cpp\nbool js_register_my_ns_MyObject(se::Object* obj) {\n    auto* cls = se::Class::create(\"MyObject\", obj, nullptr, _SE(js_new_MyObject)); \n    cls->defineProperty(\"propertyToBeIgnored\", _SE(js_my_ns_MyObject_propertyToBeIgnored_get), _SE(js_my_ns_MyObject_propertyToBeIgnored_set)); // this property should not be bound\n    cls->defineProperty(\"publicFloatProperty\", _SE(js_my_ns_MyObject_publicFloatProperty_get), _SE(js_my_ns_MyObject_publicFloatProperty_set)); \n    cls->defineFunction(\"print\", _SE(js_my_ns_MyObject_print)); \n    cls->defineFunction(\"methodToBeIgnored\", _SE(js_my_ns_MyObject_methodToBeIgnored)); // this method should not be bound\n    // ......\n}\n```\n\nModify `my-module.i`to skip binding them.\n\n```c++\n// my-module.i\n// ......\n\n%ignore my_ns::MyRef;\n%ignore my_ns::MyObject::methodToBeIgnored; // Add this line\n%ignore my_ns::MyObject::propertyToBeIgnored; // Add this line\n\n%import \"MyRef.h\"\n%include \"MyObject.h\"\n```\n\nRe-generate bindings, they're ignored now.\n\n```c++\n// jsb_my_module_auto.cpp\nbool js_register_my_ns_MyObject(se::Object* obj) {\n    auto* cls = se::Class::create(\"MyObject\", obj, nullptr, _SE(js_new_MyObject)); \n    cls->defineProperty(\"publicFloatProperty\", _SE(js_my_ns_MyObject_publicFloatProperty_get), _SE(js_my_ns_MyObject_publicFloatProperty_set)); \n    cls->defineFunction(\"print\", _SE(js_my_ns_MyObject_print)); \n// ......\n}\n```\n\n### Rename classes, methods, properties\n\nSwig has defined a directive called `%rename` to rename classes, methods or properties. To demonstrate, we modify MyObject again.\n\n```c++\n// MyObject.h\n#pragma once\n#include \"cocos/cocos.h\"\n#include \"MyRef.h\"\nnamespace my_ns {\n// MyObject inherits from MyRef\nclass MyObject : public MyRef {\npublic:\n// ......\n    void methodToBeRenamed() { // Add this method\n        CC_LOG_DEBUG(\"==> hello MyObject::methodToBeRenamed\");\n    }\n    int propertyToBeRenamed{1234}; // Add this property\n\n    float publicFloatProperty{1.23F};\nprivate:\n    int _a{100};\n    bool _b{true};\n};\n} // namespace my_ns {\n```\n\nGenerate bindings, we get:\n\n```c++\n// jsb_my_module_auto.cpp\nbool js_register_my_ns_MyObject(se::Object* obj) {\n    auto* cls = se::Class::create(\"MyObject\", obj, nullptr, _SE(js_new_MyObject)); \n    cls->defineProperty(\"propertyToBeRenamed\", _SE(js_my_ns_MyObject_propertyToBeRenamed_get), _SE(js_my_ns_MyObject_propertyToBeRenamed_set)); \n    cls->defineProperty(\"publicFloatProperty\", _SE(js_my_ns_MyObject_publicFloatProperty_get), _SE(js_my_ns_MyObject_publicFloatProperty_set)); \n    \n    cls->defineFunction(\"print\", _SE(js_my_ns_MyObject_print)); \n    cls->defineFunction(\"methodToBeRenamed\", _SE(js_my_ns_MyObject_methodToBeRenamed)); \n```\n\nIf we want to rename `propertyToBeRenamed` to `coolProperty` and rename `methodToBeRenamed` to `coolMethod`, modify `my-module.i` as follows:\n\n```c++\n// my-module.i\n// ......\n%ignore my_ns::MyRef;\n%ignore my_ns::MyObject::methodToBeIgnored;\n%ignore my_ns::MyObject::propertyToBeIgnored;\n%rename(coolProperty) my_ns::MyObject::propertyToBeRenamed; // Add this line\n%rename(coolMethod) my_ns::MyObject::methodToBeRenamed; // Add this line\n\n%import \"MyRef.h\"\n%include \"MyObject.h\"\n```\n\nIf we want to rename `MyObject` class to `MyCoolObject`, I guess you have already known how to do.  Yes, add this line:\n\n```c++\n%rename(MyCoolObject) my_ns::MyObject;\n```\n\nRe-generate bindings, get the correct name exported to JS.\n\n```c++\n// jsb_my_module_auto.cpp\n// MyCoolObject, coolProperty, coolMethod are all what we want now.\nbool js_register_my_ns_MyObject(se::Object* obj) {\n    auto* cls = se::Class::create(\"MyCoolObject\", obj, nullptr, _SE(js_new_MyCoolObject));\n    cls->defineProperty(\"coolProperty\", _SE(js_my_ns_MyCoolObject_coolProperty_get), _SE(js_my_ns_MyCoolObject_coolProperty_set)); \n    cls->defineProperty(\"publicFloatProperty\", _SE(js_my_ns_MyCoolObject_publicFloatProperty_get), _SE(js_my_ns_MyCoolObject_publicFloatProperty_set)); \n    cls->defineFunction(\"print\", _SE(js_my_ns_MyCoolObject_print)); \n    cls->defineFunction(\"coolMethod\", _SE(js_my_ns_MyCoolObject_coolMethod)); \n    // ......\n}\n```\n\nTest it, update `my-module.d.ts` and `MyComponent.ts`\n\n```c++\n// my-module.d.ts\ndeclare namespace my_ns {\nclass MyCoolObject {\n    constructor();\n    constructor(a: number, b: number);\n\n    publicFloatProperty : number;\n    print() : void;\n    coolProperty: number;\n    coolMethod() : void;\n}\n}\n```\n\n```ts\n// MyComponent.ts\nimport { _decorator, Component } from 'cc';\nconst { ccclass } = _decorator;\n\n@ccclass('MyComponent')\nexport class MyComponent extends Component {\n    start() {\n        const myObj = new my_ns.MyCoolObject(); // Renamed to MyCoolObject\n        myObj.print();\n        console.log(`==> myObj.publicFloatProperty: ${myObj.publicFloatProperty}`);\n        // Add the follow lines\n        console.log(`==> old: myObj.coolProperty: ${myObj.coolProperty}`); \n        myObj.coolProperty = 666;\n        console.log(`==> new: myObj.coolProperty: ${myObj.coolProperty}`);\n        myObj.coolMethod();\n    }\n}\n```\n\nBuild and run project, get log:\n\n```\n17:53:28 [DEBUG]: ==> a: 100, b: 1\n17:53:28 [DEBUG]: D/ JS: ==> myObj.publicFloatProperty: 1.2300000190734863\n17:53:28 [DEBUG]: D/ JS: ==> old: myObj.coolProperty: 1234\n17:53:28 [DEBUG]: D/ JS: ==> new: myObj.coolProperty: 666\n17:53:28 [DEBUG]: ==> hello MyObject::methodToBeRenamed\n```\n\n### Define an attribute\n\n`%attribute` directive is used for bind C++ getter and setter functions as a JS property.\n\n#### Usage\n\n1. Define an attribute (JS property) without setter\n\n   ```c++\n   %attribute(your_namespace::your_class_name, cpp_member_variable_type, js_property_name, cpp_getter_function_name)\n   ```\n\n2. Define an attribute (JS property) with getter and setter\n\n   ```c++\n   %attribute(your_namespace::your_class_name, cpp_member_variable_type, js_property_name, cpp_getter_function_name, cpp_setter_function_name)\n   ```\n\n3. Define an attribute (JS property) without getter\n\n   ```c++\n   %attribute_writeonly(your_namespace::your_class_name, cpp_member_variable_type, js_property_name, cpp_setter_function_name)\n   ```\n\n#### Demo\n\nTo demonstrate, we add two new methods for MyObject class.\n\n```c++\n// MyObject.h\n#pragma once\n#include \"cocos/cocos.h\"\n#include \"MyRef.h\"\nnamespace my_ns {\n// MyObject inherits from MyRef\nclass MyObject : public MyRef {\npublic:\n// ......\n    void setType(int v) { _type = v; CC_LOG_DEBUG(\"==> setType: v: %d\", v); } // Add this line\n    int getType() const { return _type; } // Add this line\n\n    float publicFloatProperty{1.23F};\nprivate:\n    int _a{100};\n    bool _b{true};\n    int _type{333};\n};\n} // namespace my_ns {\n```\n\n```c++\n// my-module.i\n// ......\n%attribute(my_ns::MyObject, int, type, getType, setType); // Add this line\n\n%import \"MyRef.h\"\n%include \"MyObject.h\"\n```\n\n```c++\n// jsb_my_module_auto.cpp\nbool js_register_my_ns_MyObject(se::Object* obj) {\n// ......\n    cls->defineProperty(\"type\", _SE(js_my_ns_MyCoolObject_type_get), _SE(js_my_ns_MyCoolObject_type_set)); \n// ......\n}\n```\n\n```ts\n// MyComponent.ts\nimport { _decorator, Component } from 'cc';\nconst { ccclass } = _decorator;\n\n@ccclass('MyComponent')\nexport class MyComponent extends Component {\n    start() {\n        const myObj = new my_ns.MyCoolObject();\n        myObj.print();\n        console.log(`==> myObj.publicFloatProperty: ${myObj.publicFloatProperty}`);\n        console.log(`==> old: myObj.coolProperty: ${myObj.coolProperty}`);\n        myObj.coolProperty = 666;\n        console.log(`==> new: myObj.coolProperty: ${myObj.coolProperty}`);\n        myObj.coolMethod();\n        console.log(`==> old: myObj.type: ${myObj.type}`);\n        myObj.type = 888;\n        console.log(`==> new: myObj.type: ${myObj.type}`);\n    }\n}\n```\n\nBuild and run project\n\n```\n18:09:53 [DEBUG]: ==> a: 100, b: 1\n18:09:53 [DEBUG]: D/ JS: ==> myObj.publicFloatProperty: 1.2300000190734863\n18:09:53 [DEBUG]: D/ JS: ==> old: myObj.coolProperty: 1234\n18:09:53 [DEBUG]: D/ JS: ==> new: myObj.coolProperty: 666\n18:09:53 [DEBUG]: ==> hello MyObject::methodToBeRenamed\n18:09:53 [DEBUG]: D/ JS: ==> old: myObj.type: 333\n18:09:53 [DEBUG]: ==> setType: v: 888 // Cool, C++ setType is invoked\n18:09:53 [DEBUG]: D/ JS: ==> new: myObj.type: 888 // Cool, C++ getType is invoked, 888 is return from C++\n```\n\n#### %attribute_writeonly  directive\n\n`%attribute_writeonly` directive is an extension we added in swig  `Cocos` backend, it's used for the purpose that C++ class only has a `set` function and there isn't a `get` function.\n\nIn `native/tools/swig-config/cocos.i`, there are:\n\n```c++\n%attribute_writeonly(cc::ICanvasRenderingContext2D, float, width, setWidth);\n%attribute_writeonly(cc::ICanvasRenderingContext2D, float, height, setHeight);\n%attribute_writeonly(cc::ICanvasRenderingContext2D, float, lineWidth, setLineWidth);\n%attribute_writeonly(cc::ICanvasRenderingContext2D, ccstd::string&, fillStyle, setFillStyle);\n%attribute_writeonly(cc::ICanvasRenderingContext2D, ccstd::string&, font, setFont);\n```\n\nThis is the similar functionality in JS:\n\n```javascript\nObject.defineProperty(MyNewClass.prototype, 'width', {\n  configurable: true,\n  enumerable: true,\n  set(v) {\n    this._width = v;\n  },\n\t// No get() for property\n});\n```\n\n#### Reference type\n\nIf C++ `get` function returns a reference data type or `set` function accesses a reference data type , don't forget to add `&` suffix in %attribute or %attribute_writeonly directives. The following `ccstd::string&` is an example.\n\n```c++\n%attribute_writeonly(cc::ICanvasRenderingContext2D, ccstd::string&, fillStyle, setFillStyle);\n```\n\nIf `&` is missing, a temporary `ccstd::string` instance will be created while the binding function is invoked.\n\n#### %arg() directive\n\nSometimes, the type of C++ variable is a describled by C++ template, for instance:\n\n```c++\nclass MyNewClass {\n  public:\n\t\tconst std::map<std::string, std::string>& getConfig() const { return _config; }\n  \tvoid setConfig(const std::map<std::string, std::string> &config) { _config = config; }\n  private:\n  \tstd::map<std::string, std::string> _config;\n};\n```\n\nWe may write an `%attribute` in `.i` file like:\n\n```c++\n%attribute(MyNewClass, std::map<std::string, std::string>&, config, getConfig, setConfig);\n```\n\nYou will get an error while invoking `node genbindings.js`.\n\n```\nError: Macro '%attribute_custom' expects 7 arguments\n```\n\nThis is because `swig` doesn't know how to deal with comma (`,`) in `std::map<std::string, std::string>&`, it will split it to two parts:\n\n1. std::map<std::string\n2. std::string>&\n\nTherefore, this line of %attribute directive will be parsed with 6 arguments instead of 5.\n\nTo avoid making `swig` confused, we need to use `%arg` directive to tell `swig` that `std::map<std::string, std::string>&` is a whole thing.\n\n```c++\n%attribute(MyNewClass, %arg(std::map<std::string, std::string>&), config, getConfig, setConfig);\n```\n\nRe-run `node genbindings.js`, the error should have gone.\n\n#### Don't add `const` \n\nIn the above sample, `%arg(std::map<std::string, std::string>&)` is used as a C++ data type in %attribue directive. You may consider to add a `const` prefix before `std::map` like `%arg(const std::map<std::string, std::string>&)`. If you do that, you will make a readyonly `config` property which only binds `MyNewClass::getConfig`. That's obviously not what we expect. If we need a readonly property, just don't assign a `set` function. \n\n```c++\n// Don't assign setConfig means the property doesn't need a setter.\n%attribute(MyNewClass, %arg(std::map<std::string, std::string>&), config, getConfig); \n```\n\nSo to keep things simple, never add `const` prefix while writing a `%attribute` directive.\n\n### Configure C++ modules in .i file\n\nSometimes, whether to compile a class depends on whether a macro is enabled. For example, we add a `MyFeatureObject` class in `MyObject.h`\n\n```c++\n// MyObject.h\n#pragma once\n#include \"cocos/cocos.h\"\n#include \"MyRef.h\"\n\n#ifndef USE_MY_FEATURE\n#define USE_MY_FEATURE 1 // Enable USE_MY_FEATURE\n#endif\n\nnamespace my_ns {\n\n#if USE_MY_FEATURE\nclass MyFeatureObject {\npublic:\n    void foo() {\n        CC_LOG_DEBUG(\"==> MyFeatureObject::foo\");\n    }\n};\n#else\nclass MyFeatureObject;\n#endif\n\n// MyObject inherits from MyRef\nclass MyObject : public MyRef {\npublic:\n//......\n    MyFeatureObject* getFeatureObject() {\n#if USE_MY_FEATURE // getFeatureObject only returns valid value when USE_MY_FEATURE is enabled\n        if (_featureObject == nullptr) {\n            _featureObject = new MyFeatureObject();\n        }\n#endif\n        return _featureObject;\n    }\nprivate:\n    int _a{100};\n    bool _b{true};\n    int _type{333};\n    MyFeatureObject* _featureObject{nullptr}; // Add this line\n};\n} // namespace my_ns {\n```\n\n```c++\n// my-module.i\n// ......\n%rename(MyCoolObject) my_ns::MyObject;\n\n%attribute(my_ns::MyObject, int, type, getType, setType);\n\n%module_macro(USE_MY_FEATURE) my_ns::MyFeatureObject; // Add this line to let Swig know the generated code for MyFeatureObject needs to be wrapped by USE_MY_FEATURE macro\n%module_macro(USE_MY_FEATURE) my_ns::MyObject::getFeatureObject; // Add this line to let Swig know the generated code for MyObject::getFeatureObject should be wrapped by USE_MY_FEATURE macro\n\n#define USE_MY_FEATURE 1 // Must be 1 to trick Swig that we need to generate binding code\n// even this macro is disabled in C++. NOTE: this line should be after %module_macro\n\n%import \"MyRef.h\"\n%include \"MyObject.h\"\n```\n\n```c++\n// my-module.d.ts\ndeclare namespace my_ns {\nclass MyFeatureObject {\n    foo() : void;\n}\n\nclass MyCoolObject {\n    constructor();\n    constructor(a: number, b: number);\n\n    publicFloatProperty : number;\n    print() : void;\n    coolProperty: number;\n    coolMethod() : void;\n    type: number;\n    getFeatureObject() : MyFeatureObject;\n}\n}\n```\n\n```ts\n// MyComponent.ts\nimport { _decorator, Component } from 'cc';\nconst { ccclass } = _decorator;\n\n@ccclass('MyComponent')\nexport class MyComponent extends Component {\n    start() {\n        const myObj = new my_ns.MyCoolObject();\n        myObj.print();\n        console.log(`==> myObj.publicFloatProperty: ${myObj.publicFloatProperty}`);\n        console.log(`==> old: myObj.coolProperty: ${myObj.coolProperty}`);\n        myObj.coolProperty = 666;\n        console.log(`==> new: myObj.coolProperty: ${myObj.coolProperty}`);\n        myObj.coolMethod();\n        console.log(`==> old: myObj.type: ${myObj.type}`);\n        myObj.type = 888;\n        console.log(`==> new: myObj.type: ${myObj.type}`);\n        const featureObj = myObj.getFeatureObject();\n        console.log(`==> featureObj: ${featureObj}`);\n        if (featureObj) {\n            featureObj.foo();\n        }\n    }\n}\n```\n\nGenerate bindings, look at the binding code\n\n```c++\n#if USE_MY_FEATURE // NOTE THAT, all binding code of MyFeatureObject is wrapped by USE_MY_FEATURE macro\n\nse::Class* __jsb_my_ns_MyFeatureObject_class = nullptr;\nse::Object* __jsb_my_ns_MyFeatureObject_proto = nullptr;\nSE_DECLARE_FINALIZE_FUNC(js_delete_my_ns_MyFeatureObject) \n\nstatic bool js_my_ns_MyFeatureObject_foo(se::State& s)\n{\n// ......\n}\n// ......\nbool js_register_my_ns_MyFeatureObject(se::Object* obj) {\n    auto* cls = se::Class::create(\"MyFeatureObject\", obj, nullptr, _SE(js_new_my_ns_MyFeatureObject)); \n// ......\n}\n\n#endif // USE_MY_FEATURE\n\n// ......\nstatic bool js_my_ns_MyCoolObject_getFeatureObject(se::State& s)\n{\n#if USE_MY_FEATURE // getFeatureObject function is also wrapped by USE_MY_FEATURE\n// ......\n    ok &= nativevalue_to_se(result, s.rval(), s.thisObject() /*ctx*/);\n    SE_PRECONDITION2(ok, false, \"MyCoolObject_getFeatureObject, Error processing arguments\");\n    SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); \n#endif // USE_MY_FEATURE\n    return true;\n}\nSE_BIND_FUNC(js_my_ns_MyCoolObject_getFeatureObject) \n\n// ......\nbool register_all_my_module(se::Object* obj) {\n    // Get the ns\n    se::Value nsVal;\n    if (!obj->getProperty(\"my_ns\", &nsVal, true))\n    {\n        se::HandleObject jsobj(se::Object::createPlainObject());\n        nsVal.setObject(jsobj);\n        obj->setProperty(\"my_ns\", nsVal);\n    }\n    se::Object* ns = nsVal.toObject();\n    /* Register classes */\n#if USE_MY_FEATURE\n    js_register_my_ns_MyFeatureObject(ns); // js_register_my_ns_MyFeatureObject is wrapped by USE_MY_FEATURE\n#endif // USE_MY_FEATURE\n    js_register_my_ns_MyObject(ns); \n    return true;\n}\n```\n\nBuild and run the project, get output as following:\n\n```\n18:32:20 [DEBUG]: D/ JS: ==> featureObj: [object Object] // featureObj is valid if USE_MY_FEATURE macro is enabled\n18:32:20 [DEBUG]: ==> MyFeatureObject::foo // Invoke C++ foo method \n```\n\nWhen we don't need MyFeatureObject, set the macro to 0.\n\n```c++\n// MyObject.h\n#pragma once\n#include \"cocos/cocos.h\"\n#include \"MyRef.h\"\n\n#ifndef USE_MY_FEATURE\n#define USE_MY_FEATURE 0 // Disable USE_MY_FEATURE\n#endif\n```\n\nBuild and run the project\n\n```\n18:54:00 [DEBUG]: D/ JS: ==> featureObj: undefined // getFeatureObject returns undefined if USE_MY_FEATURE is disabled.\n```\n\n### Multiple swig modules configuration\n\nLet's create another header file `MyAnotherObject.h`.\n\n```c++\n// MyAnotherObject.h\n#pragma once\nnamespace my_another_ns {\nstruct MyAnotherObject {\n    float a{135.246};\n    int b{999};\n};\n} // namespace my_another_ns {\n```\n\nUpdate MyObject.h\n\n```c++\n// MyObject.h\n//......\nclass MyObject : public MyRef {\npublic:\n// ......\n    void helloWithAnotherObject(const my_another_ns::MyAnotherObject &obj) {\n        CC_LOG_DEBUG(\"==> helloWithAnotherObject, a: %f, b: %d\", obj.a, obj.b);\n    }\n// ......\n};\n} // namespace my_ns {\n```\n\nCreate `/Users/james/NewProject/tools/swig-config/another-module.i`\n\n```c++\n// another-module.i\n%module(target_namespace=\"another_ns\") another_module\n\n// Insert code at the beginning of generated header file (.h)\n%insert(header_file) %{\n#pragma once\n#include \"bindings/jswrapper/SeApi.h\"\n#include \"bindings/manual/jsb_conversions.h\"\n\n#include \"MyAnotherObject.h\" // Add this line\n%}\n\n// Insert code at the beginning of generated source file (.cpp)\n%{\n#include \"bindings/auto/jsb_another_module_auto.h\"\n%}\n\n%include \"MyAnotherObject.h\"\n```\n\nModify `/Users/james/NewProject/tools/swig-config/swig-config.js`\n\n```c++\n'use strict';\n\nconst path = require('path');\n\nconst configList = [\n    [ 'my-module.i', 'jsb_my_module_auto.cpp' ],\n    [ 'another-module.i', 'jsb_another_module_auto.cpp' ], // Add this line\n];\n\nconst projectRoot = path.resolve(path.join(__dirname, '..', '..'));\nconst interfacesDir = path.join(projectRoot, 'tools', 'swig-config');\nconst bindingsOutDir = path.join(projectRoot, 'native', 'engine', 'common', 'bindings', 'auto');\nconst includeDirs = [\n    path.join(projectRoot, 'native', 'engine', 'common', 'Classes'),\n];\n\nmodule.exports = {\n    interfacesDir,\n    bindingsOutDir,\n    includeDirs,\n    configList\n};\n```\n\nModify `/Users/james/NewProject/native/engine/common/CMakeLists.txt`\n\n```cmake\n# /Users/james/NewProject/native/engine/common/CMakeLists.txt\nlist(APPEND CC_COMMON_SOURCES\n    ${CMAKE_CURRENT_LIST_DIR}/Classes/Game.h\n    ${CMAKE_CURRENT_LIST_DIR}/Classes/Game.cpp\n    ${CMAKE_CURRENT_LIST_DIR}/Classes/MyObject.h\n    ${CMAKE_CURRENT_LIST_DIR}/Classes/MyAnotherObject.h # Add this line\n    ${CMAKE_CURRENT_LIST_DIR}/bindings/auto/jsb_my_module_auto.h\n    ${CMAKE_CURRENT_LIST_DIR}/bindings/auto/jsb_my_module_auto.cpp\n    ${CMAKE_CURRENT_LIST_DIR}/bindings/auto/jsb_another_module_auto.h # Add this line\n    ${CMAKE_CURRENT_LIST_DIR}/bindings/auto/jsb_another_module_auto.cpp # Add this line\n)\n```\n\nGenerate bindings again.\n\nUpdate Game.cpp\n\n```c++\n#include \"Game.h\"\n#include \"bindings/auto/jsb_my_module_auto.h\"\n#include \"bindings/auto/jsb_another_module_auto.h\" // Add this line\n//......\n\nint Game::init() {\n//......\n    se::ScriptEngine::getInstance()->addRegisterCallback(register_all_my_module);\n    se::ScriptEngine::getInstance()->addRegisterCallback(register_all_another_module); // Add this line\n//\n  BaseGame::init();\n  return 0;\n}\n```\n\nBuild and compile, but get an error\n\n![](another-module-compile-error.jpg)\n\nSince MyObject class depends on MyAnotherObject which is defined on another module. We need to update `my-module.i` and add `#include \"bindings/auto/jsb_another_module_auto.h\"`.\n\n```c++\n// my-module.i\n%module(target_namespace=\"my_ns\") my_module\n\n// Insert code at the beginning of generated header file (.h)\n%insert(header_file) %{\n#pragma once\n#include \"bindings/jswrapper/SeApi.h\"\n#include \"bindings/manual/jsb_conversions.h\"\n\n#include \"MyObject.h\"\n%}\n\n// Insert code at the beginning of generated source file (.cpp)\n%{\n#include \"bindings/auto/jsb_my_module_auto.h\"\n#include \"bindings/auto/jsb_another_module_auto.h\" // Add this line\n%}\n\n// ......\n```\n\nCompile project. It should compile ok now. \n\nNext, we update .d.ts\n\n```ts\n// my-module.d.ts\ndeclare namespace my_ns {\nclass MyFeatureObject {\n    foo() : void;\n}\n\nclass MyCoolObject {\n    constructor();\n    constructor(a: number, b: number);\n\n    publicFloatProperty : number;\n    print() : void;\n    coolProperty: number;\n    coolMethod() : void;\n    type: number;\n    getFeatureObject() : MyFeatureObject;\n    helloWithAnotherObject(obj: another_ns.MyAnotherObject) : void; // Add this line\n}\n}\n\n// Add the following lines\ndeclare namespace another_ns {\nclass MyAnotherObject {\n    a: number;\n    b: number;\n}\n}\n```\n\nWe add some more test code of reading the properties of  `MyAnotherObject.`\n\n```ts\n// MyComponent.ts\nimport { _decorator, Component } from 'cc';\nconst { ccclass } = _decorator;\n\n@ccclass('MyComponent')\nexport class MyComponent extends Component {\n    start() {\n        const myObj = new my_ns.MyCoolObject();\n        // ......\n        const anotherObj = new another_ns.MyAnotherObject(); // Add this line \n        myObj.helloWithAnotherObject(anotherObj); // Add this line\n    }\n}\n```\n\nBuild and run project, should get output:\n\n```\n15:05:36 [DEBUG]: ==> helloWithAnotherObject, a: 135.246002, b: 999\n```\n\n<!-- File: native/tools/tojs/gen_d_ts/package-lock.json (Tokens: ~164 | Category: anthropic-skill) -->\n{\n  \"name\": \"gen_d_ts\",\n  \"version\": \"1.0.0\",\n  \"lockfileVersion\": 1,\n  \"requires\": true,\n  \"dependencies\": {\n    \"@types/node\": {\n      \"version\": \"16.10.3\",\n      \"resolved\": \"https://repo.huaweicloud.com/repository/npm/@types/node/-/node-16.10.3.tgz\",\n      \"integrity\": \"sha512-ho3Ruq+fFnBrZhUYI46n/bV2GjwzSkwuT4dTf0GkuNFmnb8nq4ny2z9JEVemFi6bdEJanHLlYfy9c6FN9B9McQ==\"\n    }\n  }\n}\n\n<!-- File: native/tools/tojs/gen_d_ts/package.json (Tokens: ~91 | Category: anthropic-skill) -->\n{\n  \"name\": \"gen_d_ts\",\n  \"version\": \"1.0.0\",\n  \"description\": \"\",\n  \"main\": \"index.js\",\n  \"scripts\": {\n    \"test\": \"echo \\\"Error: no test specified\\\" && exit 1\"\n  },\n  \"author\": \"\",\n  \"license\": \"ISC\",\n  \"dependencies\": {\n    \"@types/node\": \"^16.10.3\"\n  }\n}\n\n<!-- File: native/tools/tojs/gen_d_ts/tsconfig.json (Tokens: ~300 | Category: anthropic-skill) -->\n# Gen_d_ts Skill\n\nPath: `native/tools/tojs/gen_d_ts/tsconfig.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/cocos/cocos-engine/HEAD/native/tools/tojs/gen_d_ts/tsconfig.json)\n\n<!-- File: native/tools/bindings-generator/README.md (Tokens: ~1778 | Category: plugin-manifest) -->\n# What's new\n* Add a prebuilt libclang 12.0 in `libclang/`for linux, mac and windows.\n* If you want use the prebuilt libclang 12.0 work with Android NDK, then `only the NDK r21 can work corrently` with it.\n\n# Requirements\n\n* python 3.x (64-bit)\n* py-yaml version 5.4.1\n* cheetah3\n* libclang binary files\n\n# Usage\n\n    Usage: generator.py [options] {configfile}\n\n    Options:\n      -h, --help   show this help message and exit\n      -s SECTION   sets a specific section to be converted\n      -t TARGET    specifies the target vm. Will search for TARGET.yaml\n\nBasically, you specify a target vm (spidermonkey is the only current target vm) and the section from\nthe `.ini` file you want to generate code for.\n\n### Download libclang binary files\n\n* Download the pre-built binaries according to your platform from [here](https://github.com/llvm/llvm-project/releases/tag/llvmorg-12.0.0).\n* Unzip or install binaries. For example, unzip `clang+llvm-12.0.0-x86_64-apple-darwin.tar.xz` for macOS.\n* Find libclang.dll (windows) or libclang.dylib (macOS)\n* Copy the dynamic library to `bindings-generator/libclang` folder.\n\n## Run the simple test with prebuilt libclang 12.0\n\nIncluded in this repository is a simple test. Use this to confirm the generator is working and that your environment is set up correctly.\n\n#### NOTE\n\n* The test uses the prebuilt 12.0 libclang, so you should use `Android NDK r21` or higher version.\n* The test uses \\<string\\>; and \\<stdint.h\\>; so you need a C++ implementation that provides these\n* Currently, the test script is setup to use the Android NDK's llvm libc++\n\n### Mac OS X\n\n* The OSX 10.9 has a built-in python2.7 and if your os don't have python2.7 then use [Homebrew](http://brew.sh/) to install the python and use pip install the python dependencies.\n  ```bash\n  brew install python\n  ```\n\n* Install python dependices by pip.\n  ```bash\n  sudo easy_install pip3\n  sudo pip3 install PyYAML==5.4.1 Cheetah3\n  ```\n\n* Download NDK r21 from [google](https://developer.android.com/ndk/downloads/index.html)\n* If you are using python installed from other way, copy user.cfg.sample and rename it as `user.cfg` then set the absolute path to  python `PYTHON_BIN` in `user.cfg`\n* Run follow command, it will generate a `userconf.ini`, and check the values in it if it occorus any error.\n  ```bash\n  export NDK_ROOT=/path/to/android-ndk-r21\n  ./test.sh\n  ```\n### Windows 7 64bit\n* Download python3 (`64bit`) from (https://www.python.org).\n* Add the installed path of python (e.g. C:\\Python39) to PATH environment variable, if not already added in the installer.\n* Install python dependices by pip.\n  ```bash\n  python -m pip install PyYAML==5.4.1 Cheetah3\n  ```\n* Download NDK r21 or above from [google](https://developer.android.com/ndk/downloads/index.html)\n* Set the environment variables (`PYTHON_ROOT` and `NDK_ROOT`) or just them in `test.bat`.\n* Run \"test.bat\". The generated codes will be under \"simple_test_bindings\".\n\n### Expected output\n\nUpon running the test you might see some warnings but should not see any errors.\n\nThe test will create a directory named simple_test_bindings that contains 3 files\n\n* A .hpp header file for the bindings class\n* A .cpp file implementing the bindings class\n* A .js file that documents how to call (from JavaScript) the methods the C++ class exposes\n\n# The `.ini` file\n\nThe `.ini` file is a simple text file specifying the settings for the code generator. Here's the\ndefault one, used for cocos2d-x\n\n    [cocos2d-x]\n    prefix = cocos2dx\n    events  = CCNode#onEnter CCNode#onExit\n    extra_arguments = -I../../cocos2dx/include -I../../cocos2dx/platform -I../../cocos2dx/platform/ios -I../../cocos2dx -I../../cocos2dx/kazmath/include -arch i386 -DTARGET_OS_IPHONE -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk -x c++\n    headers = ../../cocos2dx/include/cocos2d.h\n    classes = CCSprite\n    functions = my_free_function\n\n## Required sections\n\n* prefix: the prefix for the project. Must be a valid identifier for the language of the target vm.\n  Most of the time, the name will be intermixed between the class name and the function name, since\n  all generated (probably) will be free functions, we do that in order to avoid name collition. The\n  script will generate ${prefix}.cpp and ${prefix}.hpp as a result.\n* events: a list of identifiers in the form of ClassName#functionName that are events to be called\n  from the native world to the target vm.\n* extra_arguments: extra arguments to pass to the clang interface. Basically you can think of this\n  as the arguments to pass to the \"compiler\", so add as many as you need here. If you're targetting\n  C++, make sure you add \"-x c++\" as the last argument to force C++ mode on a \".h\" file. Otherwise,\n  name your header files as \".hpp\".\n* headers: list of headers to parse. Usually you add a single header that in turn `#include`s the\n  rest of the files.\n* classes: the classes that will be parsed. Right not is just a string, but it will accept regular\n  expressions\n* functions: space-separated list of free functions to be binded. Same as with classes, it will\n  support regular expressions.\n* skip: a space-separated list of `Classes::functions` or just `functions` to not generate any code.\n\n# The templates\n\nThe generator is using [Cheetah templates](http://www.cheetahtemplate.org/) to create a more\nflexible generator. The way it was thought, is that for every target environment, you should provide\nwith a way to generate the same C/C++ functionality. Every template has access to the proper meta\ninformation for the code or generator (function, classes, etc.)\n\nRight now it's separated in the following set of templates:\n\n* prelude.c/.h: The header of the generated files.\n* ifunction.c/.h: The template for an instance function\n* ifunction_overloaded.c: The template for the implementation of an overloaded function. An\n  overloaded function is exactly the same as a function, but it has an array of functions sharing\n  the same name. The current implementation for spidermonkey only works if the overloading is with\n  different number of arguments.\n* sfunction.c/.h: The template for a static function\n* sfunction_overloaded.c: The template for an overloaded static function\n* register.c: Here you should add the constructor/finalizer, the registration function (if needed)\n  and the footer of the header file. This is the last chunk being generated\n\nTemplates are stored in the `templates/${target}` directory and follow the naming specified above.\n\nOne final part of the puzzle is the `${target}.yaml` file, that contains specific type conversion\nsnippets to be used by the templates. For instance, for spidermonkey, this is the place where we\nspecify the conversion routines for the native types (to and from int, float, string, etc.)\n\n# Limitations\n\nCurrently the generator is leveraging clang in order to get information about the C/C++ code, so we\ncan only get as much information as clang give us. Known list of things that won't work:\n\n* variable number of arguments. Solution: write a manual wrapper\n\n<!-- File: native/tools/swig-config/README.md (Tokens: ~887 | Category: plugin-manifest) -->\n## Introduction\n\nFrom Cocos Creator 3.7.0，we switch the approach of generating JS binding code from [bindings-generator](https://github.com/cocos/cocos-engine/tree/d08a11244d2a31da1aac7af7d2aa8f1b6152e30c/native/tools/bindings-generator) to [Swig](https://www.swig.org). Swig has many benefits in generating glue code by parsing  its custom `interface` file (IDL) which is compatible with `C++`. For more about why we switch to Swig, you could refer to [the issue](https://github.com/cocos/cocos-engine/issues/10792) .\n\n## Generate JS Binding Code for Engine\n\nThe engine's binding code is now automatically generated by CMake, eliminating the need to run swig command manually. \n\nNotice: if any \".i\" configuration files are added or removed, please rebuild the project to ensure the changes are incorporated.\n\n## Generate JS Bindings Code for Developer's Project\n\n- Make sure you have installed NodeJS ( `>= v8.9.4` )\n\n- Open Terminal ( macOS / Linux) or Command Line Tool ( Windows )\n\n- Create a directory for generated code, e.g. `/Users/abc/my-project/native/engine/common/Classes/bindings/auto`\n\n- Write a JS configuration file\n  \n  - Create the JS configruation file, e.g.  `/Users/abc/my-project/tools/swig-config/swig-config.js` with the following content\n    \n    ```js\n    'use strict';\n    const path = require('path');\n    \n    // Developer's custom module configuration\n    // configList is required\n    const configList = [\n        [ 'your_module_interface_0.i', 'jsb_your_module_interface_0_auto.cpp' ],\n        [ 'your_module_interface_1.i', 'jsb_your_module_interface_1_auto.cpp' ],\n        // ......\n    ];\n    \n    const projectRoot = path.resolve(path.join(__dirname, '..', '..'));\n    // interfaceDir is optional\n    const interfacesDir = path.join(projectRoot, 'tools', 'swig-config');\n    // bindingsOutDir is optional\n    const bindingsOutDir = path.join(projectRoot, 'native', 'engine', 'common', 'Classes', 'bindings', 'auto');\n    \n    module.exports = {\n        interfacesDir, // optional, if it isn't exported, the items in configList should be absolute or relative to current directory of swig-config.js\n        bindingsOutDir, // optional, if it isn't exported, the items in configList should be absolute or relative to current directory of swig-config.js\n        configList // required\n    };\n    ```\n  \n  - Run the following command\n    \n    ```bash\n    # If current workspace is not in '/Users/abc/my-project/tools/swig-config'\n    $ node < Engine Root Path >/native/tools/swig-config/genbindings.js -c /Users/abc/my-project/tools/swig-config/swig-config.js\n    ```\n    \n    ```bash\n    # If you have already navigate to '/Users/abc/my-project/tools/swig-config' directory, you could run the command without -c argument like:\n    $ cd /Users/abc/my-project/tools/swig-config\n    $ node < Engine Root Path >/native/tools/swig-config/genbindings.js\n    ```\n\n## Swig Interface File\n\n- There is a [swig-interface-template.i](swig-interface-template.i) in `engine/native/tools/swig-config` directory, just copy and rename it to some place in your project. There some comments demonstrate how to configure your module in `.i` file.  You could also reference engine internal `.i` files in `engine/native/tools/swig-config`, for instance, `scene.i` or `assets.i` for a quick start.\n- If you're using `Visual Studio Code`, you could install `SWIG Language` extension which was developed by `Hong-She Liang` for highlight syntax support.\n- For more details of writing `.i` file, please visit [tutorial](#Tutorial) section.\n\n## Tutorial\n\nPlease visit [tutorial/index.md](tutorial/index.md),  which includes binding a new module in engine or user's project step by step.\n</yakaai_skills>"}