mirror of https://github.com/axmolengine/axmol.git
Merge branch 'v3' into v3-winrt-audio
This commit is contained in:
commit
9ee4b4af1e
|
@ -113,6 +113,10 @@ build/build/
|
|||
cocos/scripting/lua-bindings/proj.ios_mac/build/
|
||||
tests/*/runtime/
|
||||
tests/*/publish/
|
||||
tests/*/project/proj.android-studio/app/build.xml
|
||||
tests/*/project/proj.android-studio/app/proguard-project.txt
|
||||
tests/*/proj.android-studio/app/build.xml
|
||||
tests/*/proj.android-studio/app/proguard-project.txt
|
||||
|
||||
# Android
|
||||
project.properties
|
||||
|
|
3
AUTHORS
3
AUTHORS
|
@ -1127,6 +1127,9 @@ Developers:
|
|||
tankorsmash
|
||||
Fixed the bug that ProgressTimer::setSprite() doesn't take effect
|
||||
|
||||
namezero111111
|
||||
ui: TextField add `getTextColor`, `getTextHorizontalAlignment` and `getTextVerticalAlignment` API
|
||||
|
||||
Retired Core Developers:
|
||||
WenSheng Yang
|
||||
Author of windows port, CCTextField,
|
||||
|
|
12
CHANGELOG
12
CHANGELOG
|
@ -1,13 +1,22 @@
|
|||
cocos2d-x-3.7 ??
|
||||
[NEW] 3rd: updated rapidjson to v1.0.2
|
||||
[NEW] 3d: added physics3d support
|
||||
[NEW] console: support build & run Android Studio project
|
||||
[NEW] Audio: added support on WP8.1, now it supports wav format
|
||||
[NEW] C++: added ActionFloat
|
||||
[NEW] C++: support physical keyboard on WinRT
|
||||
[NEW] C++: supported physical keyboard on WinRT
|
||||
[NEW] C++: added Android Studio support
|
||||
[NEW] FileUtils: checked filename case characters on windows
|
||||
[NEW] FileUitls: added supporting loading files that which file path include utf-8 characters
|
||||
[NEW] PhysicsShape: added sensor property
|
||||
[NEW] Scale9Sprite: added Android 9-patch image support
|
||||
[NEW] Sprite: used triangle command
|
||||
[NEW] 3d: add `getFarPlane` and `getNearPlane` in `Camera` class
|
||||
[NEW] ui: button add BMFont title support
|
||||
[NEW] ui: TextField add `getTextColor`, `getTextHorizontalAlignment` and `getTextVerticalAlignment` API
|
||||
|
||||
[FIX] 3d: skybox can't move to other position except origin point in world space
|
||||
[FIX] 3d: terrain can't move to other position except origin point in world space
|
||||
[FIX] 3rd: fix PIE link error on iOS caused by libpng and libtiff
|
||||
[FIX] AssetsManager: crashed issue
|
||||
[FIX] Audio: can not play large ogg files on windows
|
||||
|
@ -20,6 +29,7 @@ cocos2d-x-3.7 ??
|
|||
[FIX] Sprite3D: setGLProgram() does not work
|
||||
[FIX] Sprite3D: transition breaks when there is a Sprite3D in the scene
|
||||
[FIX] Terrain: terrain is on top of particles, particles can not be seen
|
||||
[FIX] TextureCache: unbindImageAsync failed to unbind all asynchronous callback for a specified bound image
|
||||
[FIX] TileMap: crashed if a layer contains nothing
|
||||
[FIX] WebView: memory leak on iOS
|
||||
[FIX] WebView: crashed if url contains illegal characters on Android
|
||||
|
|
|
@ -58,8 +58,8 @@ endif()
|
|||
set(BUILD_CPP_TESTS_DEFAULT ON)
|
||||
set(BUILD_LUA_LIBS_DEFAULT ON)
|
||||
set(BUILD_LUA_TESTS_DEFAULT ON)
|
||||
set(BUILD_JS_LIBS_DEFAULT OFF)
|
||||
set(BUILD_JS_TESTS_DEFAULT OFF)
|
||||
set(BUILD_JS_LIBS_DEFAULT ON)
|
||||
set(BUILD_JS_TESTS_DEFAULT ON)
|
||||
# TODO: fix test samples for MSVC
|
||||
if(MSVC)
|
||||
set(BUILD_CPP_TESTS_DEFAULT OFF)
|
||||
|
|
|
@ -4,12 +4,12 @@
|
|||
|
||||
import sys
|
||||
import os, os.path
|
||||
import shutil
|
||||
from optparse import OptionParser
|
||||
|
||||
CPP_SAMPLES = ['cpp-empty-test', 'cpp-tests', 'game-controller-test']
|
||||
LUA_SAMPLES = ['lua-empty-test', 'lua-tests', 'lua-game-controller-test']
|
||||
ALL_SAMPLES = CPP_SAMPLES + LUA_SAMPLES
|
||||
JS_SAMPLES = ['js-tests']
|
||||
ALL_SAMPLES = CPP_SAMPLES + LUA_SAMPLES + JS_SAMPLES
|
||||
|
||||
def caculate_built_samples(args):
|
||||
''' Compute the sampels to be built
|
||||
|
@ -27,6 +27,9 @@ def caculate_built_samples(args):
|
|||
if 'lua' in args:
|
||||
targets += LUA_SAMPLES
|
||||
args.remove('lua')
|
||||
if 'js' in args:
|
||||
targets += JS_SAMPLES
|
||||
args.remove('js')
|
||||
|
||||
targets += args
|
||||
|
||||
|
@ -36,8 +39,8 @@ def caculate_built_samples(args):
|
|||
return list(targets)
|
||||
|
||||
def do_build(app_android_root, build_mode):
|
||||
|
||||
command = 'cocos compile -p android -s %s --ndk-mode %s' % (app_android_root, build_mode)
|
||||
|
||||
command = 'cocos compile -p android -s %s --ndk-mode %s' % (app_android_root, build_mode)
|
||||
print command
|
||||
|
||||
if os.system(command) != 0:
|
||||
|
@ -49,7 +52,7 @@ def build_samples(target, build_mode):
|
|||
build_mode = 'debug'
|
||||
elif build_mode != 'release':
|
||||
build_mode = 'debug'
|
||||
|
||||
|
||||
build_targets = caculate_built_samples(target)
|
||||
|
||||
app_android_root = ''
|
||||
|
@ -60,7 +63,8 @@ def build_samples(target, build_mode):
|
|||
"cpp-tests": "tests/cpp-tests",
|
||||
"lua-empty-test": "tests/lua-empty-test",
|
||||
"lua-tests": "tests/lua-tests",
|
||||
"lua-game-controller-test": "tests/lua-game-controller-test"
|
||||
"lua-game-controller-test": "tests/lua-game-controller-test",
|
||||
"js-tests": "tests/js-tests"
|
||||
}
|
||||
|
||||
cocos_root = os.path.join(os.path.dirname(os.path.realpath(__file__)), "..")
|
||||
|
@ -81,7 +85,7 @@ if __name__ == '__main__':
|
|||
usage = """
|
||||
This script is mainy used for building tests built-in with cocos2d-x.
|
||||
|
||||
Usage: %prog [options] [cpp-empty-test|cpp-tests|lua-empty-test|lua-tests|cpp|lua|all]
|
||||
Usage: %prog [options] [cpp-empty-test|cpp-tests|lua-empty-test|lua-tests|js-tests|cpp|lua|all]
|
||||
|
||||
If you are new to cocos2d-x, I recommend you start with cpp-empty-test, lua-empty-test.
|
||||
|
||||
|
@ -93,13 +97,15 @@ if __name__ == '__main__':
|
|||
|
||||
parser = OptionParser(usage=usage)
|
||||
parser.add_option("-n", "--ndk", dest="ndk_build_param",
|
||||
help='It is not used anymore, because cocos console does not support it.')
|
||||
help='It is not used anymore, because cocos console does not support it.')
|
||||
parser.add_option("-p", "--platform", dest="android_platform",
|
||||
help='This parameter is not used any more, just keep compatible.')
|
||||
help='This parameter is not used any more, just keep compatible.')
|
||||
parser.add_option("-b", "--build", dest="build_mode",
|
||||
help='The build mode for java project,debug[default] or release. Get more information,please refer to http://developer.android.com/tools/building/building-cmdline.html')
|
||||
help='The build mode for java project,debug[default] or release. \
|
||||
Get more information, \
|
||||
please refer to http://developer.android.com/tools/building/building-cmdline.html')
|
||||
(opts, args) = parser.parse_args()
|
||||
|
||||
|
||||
if len(args) == 0:
|
||||
parser.print_help()
|
||||
sys.exit(1)
|
||||
|
|
|
@ -596,7 +596,7 @@
|
|||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "#!/bin/bash\ncocos_dir=${SRCROOT}/../tests/js-tests/res\nif [ -d \"${cocos_dir}\" ]; then\nrm -rv \"${cocos_dir}\"\nmkdir \"${cocos_dir}\"\nelse\nmkdir \"${cocos_dir}\"\nfi\n\ncp -r \"${SRCROOT}/../tests/cpp-tests/Resources/\" \"${cocos_dir}\"";
|
||||
shellScript = "#!/bin/bash\ncocos_dir=${SRCROOT}/../tests/js-tests/res\nif [ -d \"${cocos_dir}\" ]; then\nrm -rv \"${cocos_dir}\"\nmkdir \"${cocos_dir}\"\nelse\nmkdir \"${cocos_dir}\"\nfi\n\ncp -r \"${SRCROOT}/../tests/cpp-tests/Resources/\" \"${cocos_dir}\"\ncp -r \"${SRCROOT}/../tests/js-tests/resjs/\" \"${cocos_dir}\"";
|
||||
};
|
||||
EDCA13EE1AEA4E7B00F445CA /* ShellScript */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
|
@ -609,7 +609,7 @@
|
|||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "#!/bin/bash\ncocos_dir=${SRCROOT}/../tests/js-tests/res\nif [ -d \"${cocos_dir}\" ]; then\nrm -rv \"${cocos_dir}\"\nmkdir \"${cocos_dir}\"\nelse\nmkdir \"${cocos_dir}\"\nfi\n\ncp -r \"${SRCROOT}/../tests/cpp-tests/Resources/\" \"${cocos_dir}\"";
|
||||
shellScript = "#!/bin/bash\ncocos_dir=${SRCROOT}/../tests/js-tests/res\nif [ -d \"${cocos_dir}\" ]; then\nrm -rv \"${cocos_dir}\"\nmkdir \"${cocos_dir}\"\nelse\nmkdir \"${cocos_dir}\"\nfi\n\ncp -r \"${SRCROOT}/../tests/cpp-tests/Resources/\" \"${cocos_dir}\"\ncp -r \"${SRCROOT}/../tests/js-tests/resjs/\" \"${cocos_dir}\"";
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
|
|
|
@ -0,0 +1,88 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0630"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "A035A5441782290400987F6C"
|
||||
BuildableName = "js-tests Mac.app"
|
||||
BlueprintName = "js-tests Mac"
|
||||
ReferencedContainer = "container:cocos2d_js_tests.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
buildConfiguration = "Debug">
|
||||
<Testables>
|
||||
</Testables>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "A035A5441782290400987F6C"
|
||||
BuildableName = "js-tests Mac.app"
|
||||
BlueprintName = "js-tests Mac"
|
||||
ReferencedContainer = "container:cocos2d_js_tests.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
buildConfiguration = "Debug"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
allowLocationSimulation = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "A035A5441782290400987F6C"
|
||||
BuildableName = "js-tests Mac.app"
|
||||
BlueprintName = "js-tests Mac"
|
||||
ReferencedContainer = "container:cocos2d_js_tests.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
buildConfiguration = "Release"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "A035A5441782290400987F6C"
|
||||
BuildableName = "js-tests Mac.app"
|
||||
BlueprintName = "js-tests Mac"
|
||||
ReferencedContainer = "container:cocos2d_js_tests.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
|
@ -0,0 +1,88 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0630"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "A01E16C01784C06E00B0CA4A"
|
||||
BuildableName = "js-tests iOS.app"
|
||||
BlueprintName = "js-tests iOS"
|
||||
ReferencedContainer = "container:cocos2d_js_tests.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
buildConfiguration = "Debug">
|
||||
<Testables>
|
||||
</Testables>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "A01E16C01784C06E00B0CA4A"
|
||||
BuildableName = "js-tests iOS.app"
|
||||
BlueprintName = "js-tests iOS"
|
||||
ReferencedContainer = "container:cocos2d_js_tests.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
buildConfiguration = "Debug"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
allowLocationSimulation = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "A01E16C01784C06E00B0CA4A"
|
||||
BuildableName = "js-tests iOS.app"
|
||||
BlueprintName = "js-tests iOS"
|
||||
ReferencedContainer = "container:cocos2d_js_tests.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
buildConfiguration = "Release"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "A01E16C01784C06E00B0CA4A"
|
||||
BuildableName = "js-tests iOS.app"
|
||||
BlueprintName = "js-tests iOS"
|
||||
ReferencedContainer = "container:cocos2d_js_tests.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
|
@ -60,6 +60,10 @@
|
|||
15B3709819EE5DBA00ABE682 /* AssetsManagerExTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15B3709619EE5DBA00ABE682 /* AssetsManagerExTest.cpp */; };
|
||||
15B3709919EE5DBA00ABE682 /* AssetsManagerExTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15B3709619EE5DBA00ABE682 /* AssetsManagerExTest.cpp */; };
|
||||
15B3709A19EE5EED00ABE682 /* Manifests in Resources */ = {isa = PBXBuildFile; fileRef = 15B3709219EE5D1000ABE682 /* Manifests */; };
|
||||
15B914481B156A3700C6B95B /* Materials in Resources */ = {isa = PBXBuildFile; fileRef = 5046AB5A1AF2C4180060550B /* Materials */; };
|
||||
15B914491B15721400C6B95B /* Shaders3D in Resources */ = {isa = PBXBuildFile; fileRef = B2507B6A192589AF00FA4972 /* Shaders3D */; };
|
||||
15B9144A1B15A18C00C6B95B /* Materials in Resources */ = {isa = PBXBuildFile; fileRef = 5046AB5A1AF2C4180060550B /* Materials */; };
|
||||
15B9144B1B15A18C00C6B95B /* Shaders3D in Resources */ = {isa = PBXBuildFile; fileRef = B2507B6A192589AF00FA4972 /* Shaders3D */; };
|
||||
15C64825165F3934007D4F18 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 15C64824165F3934007D4F18 /* OpenGL.framework */; };
|
||||
15C64827165F394E007D4F18 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 15C64826165F394E007D4F18 /* QuartzCore.framework */; };
|
||||
15C64829165F396B007D4F18 /* OpenAL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 15C64828165F396B007D4F18 /* OpenAL.framework */; };
|
||||
|
@ -4438,6 +4442,8 @@
|
|||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
15B914491B15721400C6B95B /* Shaders3D in Resources */,
|
||||
15B914481B156A3700C6B95B /* Materials in Resources */,
|
||||
1531B2501AE013DE0075DB94 /* Test.html in Resources */,
|
||||
1502702E1AD3BDC90089CD03 /* TerrainTest in Resources */,
|
||||
157B08EC1A90864100B7BEA4 /* Particle3D in Resources */,
|
||||
|
@ -4485,6 +4491,8 @@
|
|||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
15B9144A1B15A18C00C6B95B /* Materials in Resources */,
|
||||
15B9144B1B15A18C00C6B95B /* Shaders3D in Resources */,
|
||||
1531B2511AE013F00075DB94 /* Test.html in Resources */,
|
||||
1502702D1AD3BDBC0089CD03 /* TerrainTest in Resources */,
|
||||
157B08ED1A90865600B7BEA4 /* Particle3D in Resources */,
|
||||
|
@ -5787,6 +5795,7 @@
|
|||
"$(inherited)",
|
||||
CC_TARGET_OS_MAC,
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
INFOPLIST_FILE = "$(SRCROOT)/../tests/cpp-tests/proj.mac/Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks";
|
||||
USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../cocos/platform/mac $(SRCROOT)/../external/glfw3/include/mac";
|
||||
|
@ -5802,6 +5811,7 @@
|
|||
"$(inherited)",
|
||||
CC_TARGET_OS_MAC,
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
INFOPLIST_FILE = "$(SRCROOT)/../tests/cpp-tests/proj.mac/Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks";
|
||||
USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../cocos/platform/mac $(SRCROOT)/../external/glfw3/include/mac";
|
||||
|
@ -5890,6 +5900,7 @@
|
|||
"$(inherited)",
|
||||
CC_TARGET_OS_IPHONE,
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
INFOPLIST_FILE = "$(SRCROOT)/../tests/cpp-tests/proj.ios/Info.plist";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 5.1.1;
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
|
@ -5913,6 +5924,7 @@
|
|||
"$(inherited)",
|
||||
CC_TARGET_OS_IPHONE,
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
INFOPLIST_FILE = "$(SRCROOT)/../tests/cpp-tests/proj.ios/Info.plist";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 5.1.1;
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
|
|
|
@ -172,6 +172,16 @@ public:
|
|||
*/
|
||||
int getDepth() const { return _depth; }
|
||||
|
||||
/**
|
||||
* Get the frustum's far plane.
|
||||
*/
|
||||
float getFarPlane() const { return _farPlane; }
|
||||
|
||||
/**
|
||||
* Get the frustum's near plane.
|
||||
*/
|
||||
float getNearPlane() const { return _nearPlane; }
|
||||
|
||||
//override
|
||||
virtual void onEnter() override;
|
||||
virtual void onExit() override;
|
||||
|
|
|
@ -598,8 +598,8 @@ void Sprite::draw(Renderer *renderer, const Mat4 &transform, uint32_t flags)
|
|||
if(_insideBounds)
|
||||
#endif
|
||||
{
|
||||
_quadCommand.init(_globalZOrder, _texture->getName(), getGLProgramState(), _blendFunc, &_quad, 1, transform, flags);
|
||||
renderer->addCommand(&_quadCommand);
|
||||
_trianglesCommand.init(_globalZOrder, _texture->getName(), getGLProgramState(), _blendFunc, getRenderedTriangles(), transform, flags);
|
||||
renderer->addCommand(&_trianglesCommand);
|
||||
|
||||
#if CC_SPRITE_DEBUG_DRAW
|
||||
_debugDrawNode->clear();
|
||||
|
@ -614,6 +614,17 @@ void Sprite::draw(Renderer *renderer, const Mat4 &transform, uint32_t flags)
|
|||
}
|
||||
}
|
||||
|
||||
TrianglesCommand::Triangles Sprite::getRenderedTriangles() const
|
||||
{
|
||||
static unsigned short indices[6] = {0, 1, 2, 3, 2, 1};
|
||||
TrianglesCommand::Triangles result;
|
||||
result.indices = indices;
|
||||
result.verts = (V3F_C4B_T2F*)&_quad;
|
||||
result.vertCount = 4;
|
||||
result.indexCount = 6;
|
||||
return result;
|
||||
}
|
||||
|
||||
// MARK: visit, draw, transform
|
||||
|
||||
void Sprite::addChild(Node *child, int zOrder, int tag)
|
||||
|
|
|
@ -33,7 +33,7 @@ THE SOFTWARE.
|
|||
#include "2d/CCDrawNode.h"
|
||||
#include "base/CCProtocols.h"
|
||||
#include "renderer/CCTextureAtlas.h"
|
||||
#include "renderer/CCQuadCommand.h"
|
||||
#include "renderer/CCTrianglesCommand.h"
|
||||
#include "renderer/CCCustomCommand.h"
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
@ -538,7 +538,8 @@ protected:
|
|||
virtual void updateBlendFunc();
|
||||
virtual void setReorderChildDirtyRecursively();
|
||||
virtual void setDirtyRecursively(bool value);
|
||||
|
||||
|
||||
TrianglesCommand::Triangles getRenderedTriangles() const;
|
||||
//
|
||||
// Data used when the sprite is rendered using a SpriteSheet
|
||||
//
|
||||
|
@ -557,7 +558,7 @@ protected:
|
|||
BlendFunc _blendFunc; /// It's required for TextureProtocol inheritance
|
||||
Texture2D* _texture; /// Texture2D object that is used to render the sprite
|
||||
SpriteFrame* _spriteFrame;
|
||||
QuadCommand _quadCommand; /// quad command
|
||||
TrianglesCommand _trianglesCommand; ///
|
||||
#if CC_SPRITE_DEBUG_DRAW
|
||||
DrawNode *_debugDrawNode;
|
||||
#endif //CC_SPRITE_DEBUG_DRAW
|
||||
|
|
|
@ -107,7 +107,7 @@ void SpriteFrameCache::addSpriteFramesWithDictionary(ValueMap& dictionary, Textu
|
|||
auto textureFileName = Director::getInstance()->getTextureCache()->getTextureFilePath(texture);
|
||||
auto image = new Image();
|
||||
image->initWithImageFile(textureFileName);
|
||||
NinePatchImageParser parser(image);
|
||||
NinePatchImageParser parser;
|
||||
for (auto iter = framesDict.begin(); iter != framesDict.end(); ++iter)
|
||||
{
|
||||
ValueMap& frameDict = iter->second.asValueMap();
|
||||
|
@ -199,7 +199,7 @@ void SpriteFrameCache::addSpriteFramesWithDictionary(ValueMap& dictionary, Textu
|
|||
bool flag = NinePatchImageParser::isNinePatchImage(spriteFrameName);
|
||||
if(flag)
|
||||
{
|
||||
parser.setSpriteFrameInfo(spriteFrame->getRectInPixels(), spriteFrame->isRotated());
|
||||
parser.setSpriteFrameInfo(image, spriteFrame->getRectInPixels(), spriteFrame->isRotated());
|
||||
texture->addSpriteFrameCapInset(spriteFrame, parser.parseCapInset());
|
||||
}
|
||||
// add sprite frame
|
||||
|
@ -338,7 +338,7 @@ void SpriteFrameCache::removeUnusedSpriteFrames()
|
|||
if( spriteFrame->getReferenceCount() == 1 )
|
||||
{
|
||||
toRemoveFrames.push_back(iter->first);
|
||||
spriteFrame->getTexture()->removeSpriteFrameCapInset(spriteFrame);
|
||||
spriteFrame->getTexture()->removeSpriteFrameCapInset(spriteFrame);
|
||||
CCLOG("cocos2d: SpriteFrameCache: removing unused frame: %s", iter->first.c_str());
|
||||
removed = true;
|
||||
}
|
||||
|
|
|
@ -1827,6 +1827,7 @@
|
|||
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\audio\winrt\AudioSourceReader.h">
|
||||
<Filter>audioengine</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\base\CCNinePatchImageParser.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\cocos2d.cpp" />
|
||||
|
@ -3477,6 +3478,7 @@
|
|||
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\base\CCUserDefault-winrt.cpp">
|
||||
<Filter>base</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\base\CCNinePatchImageParser.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Filter Include="2d">
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<AdditionalIncludeDirectories>$(EngineRoot)external\$(COCOS2D_PLATFORM)-specific\angle\include;$(EngineRoot)external\freetype2\include\$(COCOS2D_PLATFORM)\freetype2;$(EngineRoot)external\curl\include\$(COCOS2D_PLATFORM);$(EngineRoot)external\websockets\include\$(COCOS2D_PLATFORM);$(EngineRoot)cocos\platform\winrt;$(EngineRoot)cocos\platform;$(EngineRoot)cocos\editor-support;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)external\sqlite3\include;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos;$(EngineRoot)extensions;$(EngineRoot)external;$(EngineRoot)external\edtaa3func;$(EngineRoot)external\unzip;$(EngineRoot)external\tinyxml2;$(EngineRoot);$(EngineRoot)external\ConvertUTF;$(EngineRoot)external\xxhash;$(EngineRoot)external\poly2tri;$(EngineRoot)external\poly2tri\common;$(EngineRoot)external\poly2tri\sweep;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>WINRT;_VARIADIC_MAX=10;NOMINMAX;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WINRT;_VARIADIC_MAX=10;NOMINMAX;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_UNICODE;UNICODE;RAPIDJSON_ENDIAN=RAPIDJSON_LITTLEENDIAN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<CompileAsWinRT>true</CompileAsWinRT>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
|
|
|
@ -230,10 +230,10 @@ void BillBoard::draw(Renderer *renderer, const Mat4 &transform, uint32_t flags)
|
|||
{
|
||||
//FIXME: frustum culling here
|
||||
flags |= Node::FLAGS_RENDER_AS_3D;
|
||||
_quadCommand.init(0, _texture->getName(), getGLProgramState(), _blendFunc, &_quad, 1, _modelViewTransform, flags);
|
||||
_quadCommand.setTransparent(true);
|
||||
_quadCommand.set3D(true);
|
||||
renderer->addCommand(&_quadCommand);
|
||||
_trianglesCommand.init(0, _texture->getName(), getGLProgramState(), _blendFunc, getRenderedTriangles(), _modelViewTransform, flags);
|
||||
_trianglesCommand.setTransparent(true);
|
||||
_trianglesCommand.set3D(true);
|
||||
renderer->addCommand(&_trianglesCommand);
|
||||
}
|
||||
|
||||
void BillBoard::setMode( Mode mode )
|
||||
|
|
|
@ -760,18 +760,27 @@ bool Bundle3D::loadMeshDatasJson(MeshDatas& meshdatas)
|
|||
meshData->subMeshIndices.push_back(indexArray);
|
||||
meshData->numIndex = (int)meshData->subMeshIndices.size();
|
||||
|
||||
//meshData->subMeshAABB.push_back(calculateAABB(meshData->vertex, meshData->getPerVertexSize(), indexArray));
|
||||
const rapidjson::Value& mesh_part_aabb = mesh_part[AABBS];
|
||||
if (mesh_part.HasMember(AABBS) && mesh_part_aabb.Size() == 6)
|
||||
if(mesh_data.HasMember(AABBS))
|
||||
{
|
||||
Vec3 min(mesh_part_aabb[(rapidjson::SizeType)0].GetDouble(), mesh_part_aabb[(rapidjson::SizeType)1].GetDouble(), mesh_part_aabb[(rapidjson::SizeType)2].GetDouble());
|
||||
Vec3 max(mesh_part_aabb[(rapidjson::SizeType)3].GetDouble(), mesh_part_aabb[(rapidjson::SizeType)4].GetDouble(), mesh_part_aabb[(rapidjson::SizeType)5].GetDouble());
|
||||
meshData->subMeshAABB.push_back(AABB(min, max));
|
||||
const rapidjson::Value& mesh_part_aabb = mesh_part[AABBS];
|
||||
if (mesh_part.HasMember(AABBS) && mesh_part_aabb.Size() == 6)
|
||||
{
|
||||
Vec3 min(mesh_part_aabb[(rapidjson::SizeType)0].GetDouble(),
|
||||
mesh_part_aabb[(rapidjson::SizeType)1].GetDouble(), mesh_part_aabb[(rapidjson::SizeType)2].GetDouble());
|
||||
Vec3 max(mesh_part_aabb[(rapidjson::SizeType)3].GetDouble(),
|
||||
mesh_part_aabb[(rapidjson::SizeType)4].GetDouble(), mesh_part_aabb[(rapidjson::SizeType)5].GetDouble());
|
||||
meshData->subMeshAABB.push_back(AABB(min, max));
|
||||
}
|
||||
else
|
||||
{
|
||||
meshData->subMeshAABB.push_back(calculateAABB(meshData->vertex, meshData->getPerVertexSize(), indexArray));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
meshData->subMeshAABB.push_back(calculateAABB(meshData->vertex, meshData->getPerVertexSize(), indexArray));
|
||||
}
|
||||
|
||||
}
|
||||
meshdatas.meshDatas.push_back(meshData);
|
||||
}
|
||||
|
|
|
@ -152,18 +152,32 @@ void Skybox::draw(Renderer* renderer, const Mat4& transform, uint32_t flags)
|
|||
|
||||
void Skybox::onDraw(const Mat4& transform, uint32_t flags)
|
||||
{
|
||||
Mat4 trans(transform);
|
||||
const cocos2d::Vec3 pos(Camera::getVisitingCamera()->getPosition3D());
|
||||
trans.m[12] = pos.x;
|
||||
trans.m[13] = pos.y;
|
||||
trans.m[14] = pos.z;
|
||||
|
||||
auto camera = Camera::getVisitingCamera();
|
||||
|
||||
/*
|
||||
At beginning, we have a regular skybox at origin point.
|
||||
To render the skybox, we should keep camera at the center of skybox.
|
||||
So we need a translate matrix, which can transform origin point to camera pos.
|
||||
Camera's node to word transform matrix don't match our requement,
|
||||
because it maybe contain the scale, rotate, reflact... effects, which isn't need.
|
||||
First, we transform origin point to camera position by camera's node to world matrix.
|
||||
Second, we create a translate matrix with the origin point's world position.
|
||||
*/
|
||||
Vec3 cameraPosInNode(0, 0, 0);
|
||||
Vec3 cameraPosInWorld;
|
||||
Mat4 cameraModelMat = camera->getNodeToWorldTransform();
|
||||
Mat4 trans = Mat4::IDENTITY;
|
||||
cameraModelMat.transformPoint(cameraPosInNode, &cameraPosInWorld);
|
||||
trans.translate(cameraPosInWorld);
|
||||
|
||||
auto state = getGLProgramState();
|
||||
state->apply(trans);
|
||||
|
||||
Vec4 color(_displayedColor.r / 255.f, _displayedColor.g / 255.f, _displayedColor.b / 255.f, 1.f);
|
||||
state->setUniformVec4("u_color", color);
|
||||
|
||||
float scalf = (camera->getFarPlane() + camera->getNearPlane()) / 2;
|
||||
state->setUniformFloat("u_scalef", scalf);
|
||||
|
||||
GLboolean depthFlag = glIsEnabled(GL_DEPTH_TEST);
|
||||
GLint depthFunc;
|
||||
glGetIntegerv(GL_DEPTH_FUNC, &depthFunc);
|
||||
|
|
|
@ -100,6 +100,13 @@ void Terrain::draw(cocos2d::Renderer *renderer, const cocos2d::Mat4 &transform,
|
|||
|
||||
void Terrain::onDraw(const Mat4 &transform, uint32_t flags)
|
||||
{
|
||||
auto modelMatrix = getNodeToWorldTransform();
|
||||
if(memcmp(&modelMatrix,&_terrainModelMatrix,sizeof(Mat4))!=0)
|
||||
{
|
||||
_terrainModelMatrix = modelMatrix;
|
||||
_quadRoot->preCalculateAABB(_terrainModelMatrix);
|
||||
}
|
||||
|
||||
auto glProgram = getGLProgram();
|
||||
glProgram->use();
|
||||
#if (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) || (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_LINUX)
|
||||
|
@ -153,6 +160,8 @@ void Terrain::onDraw(const Mat4 &transform, uint32_t flags)
|
|||
if(_isCameraViewChanged )
|
||||
{
|
||||
auto camPos = camera->getPosition3D();
|
||||
auto camModelMat = camera->getNodeToWorldTransform();
|
||||
camModelMat.transformPoint(&camPos);
|
||||
//set lod
|
||||
setChunksLOD(camPos);
|
||||
}
|
||||
|
|
|
@ -32,23 +32,32 @@ NinePatchImageParser::~NinePatchImageParser()
|
|||
|
||||
}
|
||||
|
||||
NinePatchImageParser::NinePatchImageParser()
|
||||
:_image(nullptr)
|
||||
,_imageFrame(Rect::ZERO)
|
||||
,_isRotated(false)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
NinePatchImageParser::NinePatchImageParser(Image* image)
|
||||
:_image(image)
|
||||
,_imageFrame(Rect::ZERO)
|
||||
,_isRotated(false)
|
||||
{
|
||||
this->_image = image;
|
||||
this->_imageFrame = Rect(0,0,image->getWidth(), image->getHeight());
|
||||
CCASSERT(image->getRenderFormat()==Texture2D::PixelFormat::RGBA8888,
|
||||
"unsupported format, currently only supports rgba8888");
|
||||
this->_isRotated = false;
|
||||
}
|
||||
|
||||
NinePatchImageParser::NinePatchImageParser(Image* image, const Rect& frame, bool rotated)
|
||||
:_image(image)
|
||||
,_imageFrame(frame)
|
||||
,_isRotated(rotated)
|
||||
{
|
||||
this->_image = image;
|
||||
CCASSERT(image->getRenderFormat()==Texture2D::PixelFormat::RGBA8888,
|
||||
"unsupported format, currently only supports rgba8888");
|
||||
this->_imageFrame = frame;
|
||||
this->_isRotated = rotated;
|
||||
}
|
||||
|
||||
int NinePatchImageParser::getFrameHeight()const
|
||||
|
@ -182,8 +191,11 @@ Rect NinePatchImageParser::parseCapInset() const
|
|||
return capInsets;
|
||||
}
|
||||
|
||||
void NinePatchImageParser::setSpriteFrameInfo( const cocos2d::Rect& frameRect, bool rotated )
|
||||
void NinePatchImageParser::setSpriteFrameInfo(Image* image, const cocos2d::Rect& frameRect, bool rotated )
|
||||
{
|
||||
this->_image = image;
|
||||
CCASSERT(image->getRenderFormat()==Texture2D::PixelFormat::RGBA8888,
|
||||
"unsupported format, currently only supports rgba8888");
|
||||
this->_imageFrame = frameRect;
|
||||
this->_isRotated = rotated;
|
||||
}
|
||||
|
|
|
@ -53,6 +53,12 @@ public:
|
|||
*/
|
||||
static bool isNinePatchImage(const std::string& filename);
|
||||
|
||||
/**
|
||||
* Default constructor.
|
||||
*
|
||||
*/
|
||||
NinePatchImageParser();
|
||||
|
||||
/**
|
||||
* Instantiate a NinePatchImageParser with a Image object.
|
||||
*
|
||||
|
@ -60,7 +66,7 @@ public:
|
|||
*
|
||||
* @return A NinePatchImageParser instance.
|
||||
*/
|
||||
NinePatchImageParser(Image* image);
|
||||
explicit NinePatchImageParser(Image* image);
|
||||
|
||||
/**
|
||||
* Instantiate a NinePatchImageParser with a Image object and the spriteFrame info.
|
||||
|
@ -82,7 +88,7 @@ public:
|
|||
* @param frameRect The sprite frame rect in the image atlas.
|
||||
* @param rotated Whether is sprite frame is rotated in the image atlas.
|
||||
*/
|
||||
void setSpriteFrameInfo(const Rect& frameRect, bool rotated);
|
||||
void setSpriteFrameInfo(Image* image, const Rect& frameRect, bool rotated);
|
||||
|
||||
/**
|
||||
* Default destructor.
|
||||
|
|
|
@ -183,7 +183,7 @@ ActionTimeline* ActionTimelineCache::loadAnimationActionWithContent(const std::s
|
|||
doc.Parse<0>(content.c_str());
|
||||
if (doc.HasParseError())
|
||||
{
|
||||
CCLOG("GetParseError %s\n", doc.GetParseError());
|
||||
CCLOG("GetParseError %d\n", doc.GetParseError());
|
||||
}
|
||||
|
||||
const rapidjson::Value& json = DICTOOL->getSubDictionary_json(doc, ACTION);
|
||||
|
|
|
@ -606,20 +606,20 @@ void InnerActionFrame::onEnter(Frame *nextFrame, int currentFrameIndex)
|
|||
|
||||
void InnerActionFrame::setStartFrameIndex(int frameIndex)
|
||||
{
|
||||
CCASSERT(_enterWithName, " cannot setStartFrameIndex when enterWithName is set");
|
||||
CCASSERT(!_enterWithName, " cannot setStartFrameIndex when enterWithName is set");
|
||||
_startFrameIndex = frameIndex;
|
||||
}
|
||||
|
||||
|
||||
void InnerActionFrame::setEndFrameIndex(int frameIndex)
|
||||
{
|
||||
CCASSERT(_enterWithName, " cannot setEndFrameIndex when enterWithName is set");
|
||||
CCASSERT(!_enterWithName, " cannot setEndFrameIndex when enterWithName is set");
|
||||
_endFrameIndex = frameIndex;
|
||||
}
|
||||
|
||||
void InnerActionFrame::setAnimationName(const std::string& animationName)
|
||||
{
|
||||
CCASSERT(!_enterWithName, " cannot set aniamtioname when enter frame with index. setEnterWithName true firstly!");
|
||||
CCASSERT(_enterWithName, " cannot set aniamtioname when enter frame with index. setEnterWithName true firstly!");
|
||||
_animationName = animationName;
|
||||
|
||||
}
|
||||
|
|
|
@ -376,7 +376,7 @@ Node* CSLoader::loadNodeWithContent(const std::string& content)
|
|||
doc.Parse<0>(content.c_str());
|
||||
if (doc.HasParseError())
|
||||
{
|
||||
CCLOG("GetParseError %s\n", doc.GetParseError());
|
||||
CCLOG("GetParseError %d\n", doc.GetParseError());
|
||||
}
|
||||
|
||||
// cocos2dx version mono editor is based on
|
||||
|
@ -724,7 +724,7 @@ Node* CSLoader::loadWidget(const rapidjson::Value& json)
|
|||
customJsonDict.Parse<0>(customProperty);
|
||||
if (customJsonDict.HasParseError())
|
||||
{
|
||||
CCLOG("GetParseError %s\n", customJsonDict.GetParseError());
|
||||
CCLOG("GetParseError %d\n", customJsonDict.GetParseError());
|
||||
}
|
||||
|
||||
widgetPropertiesReader->setPropsForAllCustomWidgetFromJsonDictionary(classname, widget, customJsonDict);
|
||||
|
|
|
@ -1247,7 +1247,7 @@ void DataReaderHelper::addDataFromJsonCache(const std::string& fileContent, Data
|
|||
|
||||
json.ParseStream<0>(stream);
|
||||
if (json.HasParseError()) {
|
||||
CCLOG("GetParseError %s\n",json.GetParseError());
|
||||
CCLOG("GetParseError %d\n",json.GetParseError());
|
||||
}
|
||||
|
||||
dataInfo->contentScale = DICTOOL->getFloatValue_json(json, CONTENT_SCALE, 1.0f);
|
||||
|
|
|
@ -212,7 +212,7 @@ Widget* GUIReader::widgetFromJsonFile(const char *fileName)
|
|||
jsonDict.Parse<0>(contentStr.c_str());
|
||||
if (jsonDict.HasParseError())
|
||||
{
|
||||
CCLOG("GetParseError %s\n",jsonDict.GetParseError());
|
||||
CCLOG("GetParseError %d\n",jsonDict.GetParseError());
|
||||
}
|
||||
Widget* widget = nullptr;
|
||||
const char* fileVersion = DICTOOL->getStringValue_json(jsonDict, "version");
|
||||
|
@ -1373,7 +1373,7 @@ Widget* WidgetPropertiesReader0300::widgetFromBinary(CocoLoader* cocoLoader, st
|
|||
customJsonDict.Parse<0>(customProperty);
|
||||
if (customJsonDict.HasParseError())
|
||||
{
|
||||
CCLOG("GetParseError %s\n", customJsonDict.GetParseError());
|
||||
CCLOG("GetParseError %d\n", customJsonDict.GetParseError());
|
||||
}
|
||||
setPropsForAllCustomWidgetFromJsonDictionary(classname, widget, customJsonDict);
|
||||
}else{
|
||||
|
@ -1474,7 +1474,7 @@ Widget* WidgetPropertiesReader0300::widgetFromJsonDictionary(const rapidjson::Va
|
|||
customJsonDict.Parse<0>(customProperty);
|
||||
if (customJsonDict.HasParseError())
|
||||
{
|
||||
CCLOG("GetParseError %s\n", customJsonDict.GetParseError());
|
||||
CCLOG("GetParseError %d\n", customJsonDict.GetParseError());
|
||||
}
|
||||
setPropsForAllCustomWidgetFromJsonDictionary(classname, widget, customJsonDict);
|
||||
}else{
|
||||
|
|
|
@ -72,6 +72,7 @@ int DictionaryHelper::getIntValue_json(const rapidjson::Value& root, const char*
|
|||
int nRet = def;
|
||||
do {
|
||||
CC_BREAK_IF(root.IsNull());
|
||||
CC_BREAK_IF(!root.HasMember(key));
|
||||
CC_BREAK_IF(root[key].IsNull());
|
||||
nRet = root[key].GetInt();
|
||||
} while (0);
|
||||
|
@ -85,6 +86,7 @@ float DictionaryHelper::getFloatValue_json(const rapidjson::Value& root,const ch
|
|||
float fRet = def;
|
||||
do {
|
||||
CC_BREAK_IF(root.IsNull());
|
||||
CC_BREAK_IF(!root.HasMember(key));
|
||||
CC_BREAK_IF(root[key].IsNull());
|
||||
fRet = (float)root[key].GetDouble();
|
||||
} while (0);
|
||||
|
@ -97,6 +99,7 @@ bool DictionaryHelper::getBooleanValue_json(const rapidjson::Value& root,const c
|
|||
bool bRet = def;
|
||||
do {
|
||||
CC_BREAK_IF(root.IsNull());
|
||||
CC_BREAK_IF(!root.HasMember(key));
|
||||
CC_BREAK_IF(root[key].IsNull());
|
||||
bRet = root[key].GetBool();
|
||||
} while (0);
|
||||
|
@ -109,6 +112,7 @@ const char* DictionaryHelper::getStringValue_json(const rapidjson::Value& root,c
|
|||
const char* sRet = def;
|
||||
do {
|
||||
CC_BREAK_IF(root.IsNull());
|
||||
CC_BREAK_IF(!root.HasMember(key));
|
||||
CC_BREAK_IF(root[key].IsNull());
|
||||
sRet = root[key].GetString();
|
||||
} while (0);
|
||||
|
@ -123,6 +127,7 @@ int DictionaryHelper::getArrayCount_json(const rapidjson::Value& root, const cha
|
|||
int nRet = def;
|
||||
do {
|
||||
CC_BREAK_IF(root.IsNull());
|
||||
CC_BREAK_IF(!root.HasMember(key));
|
||||
CC_BREAK_IF(root[key].IsNull());
|
||||
nRet = (int)(root[key].Size());
|
||||
} while (0);
|
||||
|
@ -136,6 +141,7 @@ int DictionaryHelper::getIntValueFromArray_json(const rapidjson::Value& root,con
|
|||
int nRet = def;
|
||||
do {
|
||||
CC_BREAK_IF(root.IsNull());
|
||||
CC_BREAK_IF(!root.HasMember(arrayKey));
|
||||
CC_BREAK_IF(root[arrayKey].IsNull());
|
||||
CC_BREAK_IF(root[arrayKey][idx].IsNull());
|
||||
nRet = root[arrayKey][idx].GetInt();
|
||||
|
|
|
@ -236,7 +236,7 @@ void TriggerMng::buildJson(rapidjson::Document &document, cocostudio::CocoLoader
|
|||
{
|
||||
if (str2 != nullptr)
|
||||
{
|
||||
action.AddMember("classname", str2, allocator);
|
||||
action.AddMember("classname", rapidjson::Value(str2,allocator), allocator);
|
||||
}
|
||||
}
|
||||
else if (key2.compare("dataitems") == 0)
|
||||
|
@ -257,7 +257,7 @@ void TriggerMng::buildJson(rapidjson::Document &document, cocostudio::CocoLoader
|
|||
{
|
||||
if (str3 != nullptr)
|
||||
{
|
||||
dataitem.AddMember("key", str3, allocator);
|
||||
dataitem.AddMember("key", rapidjson::Value(str3,allocator), allocator);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -265,7 +265,7 @@ void TriggerMng::buildJson(rapidjson::Document &document, cocostudio::CocoLoader
|
|||
rapidjson::Type type = pDataItemArray[i5].GetType(pCocoLoader);
|
||||
if (type == rapidjson::kStringType)
|
||||
{
|
||||
dataitem.AddMember("value", str3, allocator);
|
||||
dataitem.AddMember("value", rapidjson::Value(str3,allocator), allocator);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -312,7 +312,7 @@ void TriggerMng::buildJson(rapidjson::Document &document, cocostudio::CocoLoader
|
|||
{
|
||||
if (str4 != nullptr)
|
||||
{
|
||||
cond.AddMember("classname", str4, allocator);
|
||||
cond.AddMember("classname", rapidjson::Value(str4,allocator), allocator);
|
||||
}
|
||||
}
|
||||
else if (key4.compare("dataitems") == 0)
|
||||
|
@ -333,7 +333,7 @@ void TriggerMng::buildJson(rapidjson::Document &document, cocostudio::CocoLoader
|
|||
{
|
||||
if (str5 != nullptr)
|
||||
{
|
||||
dataitem.AddMember("key", str5, allocator);
|
||||
dataitem.AddMember("key", rapidjson::Value(str5,allocator), allocator);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -341,7 +341,7 @@ void TriggerMng::buildJson(rapidjson::Document &document, cocostudio::CocoLoader
|
|||
rapidjson::Type type = pDataItemArray[i9].GetType(pCocoLoader);
|
||||
if (type == rapidjson::kStringType)
|
||||
{
|
||||
dataitem.AddMember("value", str5, allocator);
|
||||
dataitem.AddMember("value", rapidjson::Value(str5,allocator), allocator);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -190,12 +190,21 @@ namespace cocostudio
|
|||
|
||||
/* adapt screen gui */
|
||||
float w = 0, h = 0;
|
||||
bool adaptScrenn = DICTOOL->getBooleanValue_json(options, P_AdaptScreen);
|
||||
if (adaptScrenn)
|
||||
bool adaptScrennExsit = DICTOOL->checkObjectExist_json(options, P_AdaptScreen);
|
||||
if (adaptScrennExsit)
|
||||
{
|
||||
Size screenSize = CCDirector::getInstance()->getWinSize();
|
||||
w = screenSize.width;
|
||||
h = screenSize.height;
|
||||
bool adaptScrenn = DICTOOL->getBooleanValue_json(options, P_AdaptScreen);
|
||||
if (adaptScrenn)
|
||||
{
|
||||
Size screenSize = Director::getInstance()->getWinSize();
|
||||
w = screenSize.width;
|
||||
h = screenSize.height;
|
||||
}
|
||||
else
|
||||
{
|
||||
w = DICTOOL->getFloatValue_json(options, P_Width);
|
||||
h = DICTOOL->getFloatValue_json(options, P_Height);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -300,7 +309,11 @@ namespace cocostudio
|
|||
panel->setBackGroundImageCapInsets(Rect(cx, cy, cw, ch));
|
||||
}
|
||||
|
||||
panel->setLayoutType((Layout::Type)DICTOOL->getIntValue_json(options, P_LayoutType));
|
||||
bool layoutTypeExsit = DICTOOL->checkObjectExist_json(options, P_LayoutType);
|
||||
if (layoutTypeExsit)
|
||||
{
|
||||
panel->setLayoutType((Layout::Type)DICTOOL->getIntValue_json(options, P_LayoutType));
|
||||
}
|
||||
|
||||
int bgimgcr = DICTOOL->getIntValue_json(options, P_ColorR,255);
|
||||
int bgimgcg = DICTOOL->getIntValue_json(options, P_ColorG,255);
|
||||
|
|
|
@ -160,12 +160,22 @@ namespace cocostudio
|
|||
|
||||
/* adapt screen */
|
||||
float w = 0, h = 0;
|
||||
bool adaptScrenn = DICTOOL->getBooleanValue_json(options, P_AdaptScreen);
|
||||
if (adaptScrenn)
|
||||
bool adaptScrennExsit = DICTOOL->checkObjectExist_json(options, P_AdaptScreen);
|
||||
if (adaptScrennExsit)
|
||||
{
|
||||
Size screenSize = CCDirector::getInstance()->getWinSize();
|
||||
w = screenSize.width;
|
||||
h = screenSize.height;
|
||||
bool adaptScrenn = DICTOOL->getBooleanValue_json(options, P_AdaptScreen);
|
||||
if (adaptScrenn)
|
||||
{
|
||||
Size screenSize = Director::getInstance()->getWinSize();
|
||||
w = screenSize.width;
|
||||
h = screenSize.height;
|
||||
}
|
||||
else
|
||||
{
|
||||
w = DICTOOL->getFloatValue_json(options, P_Width);
|
||||
h = DICTOOL->getFloatValue_json(options, P_Height);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -941,23 +941,6 @@ std::string FileUtils::getFullPathForDirectoryAndFilename(const std::string& dir
|
|||
return ret;
|
||||
}
|
||||
|
||||
std::string FileUtils::searchFullPathForFilename(const std::string& filename) const
|
||||
{
|
||||
if (isAbsolutePath(filename))
|
||||
{
|
||||
return filename;
|
||||
}
|
||||
std::string path = fullPathForFilename(filename);
|
||||
if (0 == path.compare(filename))
|
||||
{
|
||||
return "";
|
||||
}
|
||||
else
|
||||
{
|
||||
return path;
|
||||
}
|
||||
}
|
||||
|
||||
bool FileUtils::isFileExist(const std::string& filename) const
|
||||
{
|
||||
if (isAbsolutePath(filename))
|
||||
|
@ -966,7 +949,7 @@ bool FileUtils::isFileExist(const std::string& filename) const
|
|||
}
|
||||
else
|
||||
{
|
||||
std::string fullpath = searchFullPathForFilename(filename);
|
||||
std::string fullpath = fullPathForFilename(filename);
|
||||
if (fullpath.empty())
|
||||
return false;
|
||||
else
|
||||
|
@ -1327,7 +1310,7 @@ long FileUtils::getFileSize(const std::string &filepath)
|
|||
std::string fullpath = filepath;
|
||||
if (!isAbsolutePath(filepath))
|
||||
{
|
||||
fullpath = searchFullPathForFilename(filepath);
|
||||
fullpath = fullPathForFilename(filepath);
|
||||
if (fullpath.empty())
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -478,16 +478,6 @@ protected:
|
|||
*/
|
||||
virtual std::string getFullPathForDirectoryAndFilename(const std::string& directory, const std::string& filename) const;
|
||||
|
||||
/**
|
||||
* Returns the fullpath for a given filename.
|
||||
* This is an alternative for fullPathForFilename
|
||||
* It returns empty string instead of the original filename when no file found for the given name.
|
||||
* @param filename The file name to look up for
|
||||
* @return The full path for the file, if not found, the return value will be an empty string
|
||||
*/
|
||||
virtual std::string searchFullPathForFilename(const std::string& filename) const;
|
||||
|
||||
|
||||
/** Dictionary used to lookup filenames based on a key.
|
||||
* It is used internally by the following methods:
|
||||
*
|
||||
|
|
|
@ -115,8 +115,8 @@ void TextureCache::addImageAsync(const std::string &path, const std::function<vo
|
|||
// lazy init
|
||||
if (_asyncStructQueue == nullptr)
|
||||
{
|
||||
_asyncStructQueue = new queue<AsyncStruct*>();
|
||||
_imageInfoQueue = new deque<ImageInfo*>();
|
||||
_asyncStructQueue = new (std::nothrow) deque<AsyncStruct*>();
|
||||
_imageInfoQueue = new (std::nothrow) deque<ImageInfo*>();
|
||||
|
||||
// create a new thread to load images
|
||||
_loadingThread = new std::thread(&TextureCache::loadImage, this);
|
||||
|
@ -135,36 +135,62 @@ void TextureCache::addImageAsync(const std::string &path, const std::function<vo
|
|||
AsyncStruct *data = new (std::nothrow) AsyncStruct(fullpath, callback);
|
||||
|
||||
// add async struct into queue
|
||||
_asyncStructQueueMutex.lock();
|
||||
_asyncStructQueue->push(data);
|
||||
_asyncStructQueueMutex.unlock();
|
||||
_asyncMutex.lock();
|
||||
_asyncStructQueue->push_back(data);
|
||||
_asyncMutex.unlock();
|
||||
|
||||
_sleepCondition.notify_one();
|
||||
}
|
||||
|
||||
void TextureCache::unbindImageAsync(const std::string& filename)
|
||||
{
|
||||
_imageInfoMutex.lock();
|
||||
if (_imageInfoQueue && !_imageInfoQueue->empty())
|
||||
std::string fullpath = FileUtils::getInstance()->fullPathForFilename(filename);
|
||||
|
||||
_asyncMutex.lock();
|
||||
|
||||
if (_asyncStructQueue && !_asyncStructQueue->empty())
|
||||
{
|
||||
std::string fullpath = FileUtils::getInstance()->fullPathForFilename(filename);
|
||||
auto found = std::find_if(_imageInfoQueue->begin(), _imageInfoQueue->end(), [&fullpath](ImageInfo* ptr)->bool{ return ptr->asyncStruct->filename == fullpath; });
|
||||
if (found != _imageInfoQueue->end())
|
||||
for (auto it = _asyncStructQueue->begin(); it != _asyncStructQueue->end(); ++it)
|
||||
{
|
||||
(*found)->asyncStruct->callback = nullptr;
|
||||
if ((*it)->filename == fullpath)
|
||||
{
|
||||
(*it)->callback = nullptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
_imageInfoMutex.unlock();
|
||||
|
||||
if (_imageInfoQueue && !_imageInfoQueue->empty())
|
||||
{
|
||||
for (auto it = _imageInfoQueue->begin(); it != _imageInfoQueue->end(); ++it)
|
||||
{
|
||||
if ((*it)->asyncStruct->filename == fullpath)
|
||||
{
|
||||
(*it)->asyncStruct->callback = nullptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
_asyncMutex.unlock();
|
||||
}
|
||||
|
||||
void TextureCache::unbindAllImageAsync()
|
||||
{
|
||||
_imageInfoMutex.lock();
|
||||
_asyncMutex.lock();
|
||||
if (_asyncStructQueue && !_asyncStructQueue->empty())
|
||||
{
|
||||
for (auto it = _asyncStructQueue->begin(); it != _asyncStructQueue->end(); ++it)
|
||||
{
|
||||
(*it)->callback = nullptr;
|
||||
}
|
||||
}
|
||||
if (_imageInfoQueue && !_imageInfoQueue->empty())
|
||||
{
|
||||
std::for_each(_imageInfoQueue->begin(), _imageInfoQueue->end(), [](ImageInfo* ptr) { ptr->asyncStruct->callback = nullptr; });
|
||||
for (auto it = _imageInfoQueue->begin(); it != _imageInfoQueue->end(); ++it)
|
||||
{
|
||||
(*it)->asyncStruct->callback = nullptr;
|
||||
}
|
||||
}
|
||||
_imageInfoMutex.unlock();
|
||||
_asyncMutex.unlock();
|
||||
}
|
||||
|
||||
void TextureCache::loadImage()
|
||||
|
@ -173,11 +199,10 @@ void TextureCache::loadImage()
|
|||
|
||||
while (true)
|
||||
{
|
||||
std::queue<AsyncStruct*> *pQueue = _asyncStructQueue;
|
||||
_asyncStructQueueMutex.lock();
|
||||
if (pQueue->empty())
|
||||
_asyncMutex.lock();
|
||||
if (_asyncStructQueue->empty())
|
||||
{
|
||||
_asyncStructQueueMutex.unlock();
|
||||
_asyncMutex.unlock();
|
||||
if (_needQuit) {
|
||||
break;
|
||||
}
|
||||
|
@ -189,9 +214,8 @@ void TextureCache::loadImage()
|
|||
}
|
||||
else
|
||||
{
|
||||
asyncStruct = pQueue->front();
|
||||
pQueue->pop();
|
||||
_asyncStructQueueMutex.unlock();
|
||||
asyncStruct = _asyncStructQueue->front();
|
||||
_asyncMutex.unlock();
|
||||
}
|
||||
|
||||
Image *image = nullptr;
|
||||
|
@ -200,9 +224,9 @@ void TextureCache::loadImage()
|
|||
auto it = _textures.find(asyncStruct->filename);
|
||||
if( it == _textures.end() )
|
||||
{
|
||||
_imageInfoMutex.lock();
|
||||
ImageInfo *imageInfo;
|
||||
size_t pos = 0;
|
||||
_asyncMutex.lock();
|
||||
size_t infoSize = _imageInfoQueue->size();
|
||||
for (; pos < infoSize; pos++)
|
||||
{
|
||||
|
@ -210,7 +234,7 @@ void TextureCache::loadImage()
|
|||
if(imageInfo->asyncStruct->filename.compare(asyncStruct->filename) == 0)
|
||||
break;
|
||||
}
|
||||
_imageInfoMutex.unlock();
|
||||
_asyncMutex.unlock();
|
||||
if(infoSize == 0 || pos == infoSize)
|
||||
generateImage = true;
|
||||
}
|
||||
|
@ -224,6 +248,9 @@ void TextureCache::loadImage()
|
|||
{
|
||||
CC_SAFE_RELEASE(image);
|
||||
CCLOG("can not load %s", filename.c_str());
|
||||
_asyncMutex.lock();
|
||||
_asyncStructQueue->pop_front();
|
||||
_asyncMutex.unlock();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
@ -234,9 +261,10 @@ void TextureCache::loadImage()
|
|||
imageInfo->image = image;
|
||||
|
||||
// put the image info into the queue
|
||||
_imageInfoMutex.lock();
|
||||
_asyncMutex.lock();
|
||||
_asyncStructQueue->pop_front();
|
||||
_imageInfoQueue->push_back(imageInfo);
|
||||
_imageInfoMutex.unlock();
|
||||
_asyncMutex.unlock();
|
||||
}
|
||||
|
||||
if(_asyncStructQueue != nullptr)
|
||||
|
@ -253,16 +281,16 @@ void TextureCache::addImageAsyncCallBack(float dt)
|
|||
// the image is generated in loading thread
|
||||
std::deque<ImageInfo*> *imagesQueue = _imageInfoQueue;
|
||||
|
||||
_imageInfoMutex.lock();
|
||||
_asyncMutex.lock();
|
||||
if (imagesQueue->empty())
|
||||
{
|
||||
_imageInfoMutex.unlock();
|
||||
_asyncMutex.unlock();
|
||||
}
|
||||
else
|
||||
{
|
||||
ImageInfo *imageInfo = imagesQueue->front();
|
||||
imagesQueue->pop_front();
|
||||
_imageInfoMutex.unlock();
|
||||
_asyncMutex.unlock();
|
||||
|
||||
AsyncStruct *asyncStruct = imageInfo->asyncStruct;
|
||||
Image *image = imageInfo->image;
|
||||
|
|
|
@ -227,11 +227,10 @@ protected:
|
|||
|
||||
std::thread* _loadingThread;
|
||||
|
||||
std::queue<AsyncStruct*>* _asyncStructQueue;
|
||||
std::deque<AsyncStruct*>* _asyncStructQueue;
|
||||
std::deque<ImageInfo*>* _imageInfoQueue;
|
||||
|
||||
std::mutex _asyncStructQueueMutex;
|
||||
std::mutex _imageInfoMutex;
|
||||
std::mutex _asyncMutex;
|
||||
|
||||
std::mutex _sleepMutex;
|
||||
std::condition_variable _sleepCondition;
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
const char* cc3D_Skybox_vert = STRINGIFY(
|
||||
|
||||
uniform float u_scalef;
|
||||
attribute vec3 a_position;
|
||||
varying vec3 v_reflect;
|
||||
|
||||
void main(void)
|
||||
{
|
||||
v_reflect = normalize(CC_NormalMatrix * a_position);
|
||||
gl_Position = CC_MVPMatrix * vec4(a_position, 1.0);
|
||||
v_reflect = a_position;
|
||||
gl_Position = CC_MVPMatrix * vec4(u_scalef * a_position, 1.0);
|
||||
}
|
||||
);
|
|
@ -18440,41 +18440,13 @@ TransitionProgressOutIn : function (
|
|||
cc.Camera = {
|
||||
|
||||
/**
|
||||
* @method setScene
|
||||
* @param {cc.Scene} arg0
|
||||
* @method getDepth
|
||||
* @return {int}
|
||||
*/
|
||||
setScene : function (
|
||||
scene
|
||||
getDepth : function (
|
||||
)
|
||||
{
|
||||
},
|
||||
|
||||
/**
|
||||
* @method initPerspective
|
||||
* @param {float} arg0
|
||||
* @param {float} arg1
|
||||
* @param {float} arg2
|
||||
* @param {float} arg3
|
||||
* @return {bool}
|
||||
*/
|
||||
initPerspective : function (
|
||||
float,
|
||||
float,
|
||||
float,
|
||||
float
|
||||
)
|
||||
{
|
||||
return false;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method getProjectionMatrix
|
||||
* @return {mat4_object}
|
||||
*/
|
||||
getProjectionMatrix : function (
|
||||
)
|
||||
{
|
||||
return cc.Mat4;
|
||||
return 0;
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -18488,15 +18460,77 @@ getViewProjectionMatrix : function (
|
|||
},
|
||||
|
||||
/**
|
||||
* @method getViewMatrix
|
||||
* @method lookAt
|
||||
* @param {vec3_object} arg0
|
||||
* @param {vec3_object} arg1
|
||||
*/
|
||||
lookAt : function (
|
||||
vec3,
|
||||
vec3
|
||||
)
|
||||
{
|
||||
},
|
||||
|
||||
/**
|
||||
* @method getProjectionMatrix
|
||||
* @return {mat4_object}
|
||||
*/
|
||||
getViewMatrix : function (
|
||||
getProjectionMatrix : function (
|
||||
)
|
||||
{
|
||||
return cc.Mat4;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method getDepthInView
|
||||
* @param {mat4_object} arg0
|
||||
* @return {float}
|
||||
*/
|
||||
getDepthInView : function (
|
||||
mat4
|
||||
)
|
||||
{
|
||||
return 0;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method initOrthographic
|
||||
* @param {float} arg0
|
||||
* @param {float} arg1
|
||||
* @param {float} arg2
|
||||
* @param {float} arg3
|
||||
* @return {bool}
|
||||
*/
|
||||
initOrthographic : function (
|
||||
float,
|
||||
float,
|
||||
float,
|
||||
float
|
||||
)
|
||||
{
|
||||
return false;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method setDepth
|
||||
* @param {int} arg0
|
||||
*/
|
||||
setDepth : function (
|
||||
int
|
||||
)
|
||||
{
|
||||
},
|
||||
|
||||
/**
|
||||
* @method initDefault
|
||||
* @return {bool}
|
||||
*/
|
||||
initDefault : function (
|
||||
)
|
||||
{
|
||||
return false;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method getCameraFlag
|
||||
* @return {cc.CameraFlag}
|
||||
|
@ -18517,80 +18551,6 @@ getType : function (
|
|||
return 0;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method initDefault
|
||||
* @return {bool}
|
||||
*/
|
||||
initDefault : function (
|
||||
)
|
||||
{
|
||||
return false;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method project
|
||||
* @param {vec3_object} arg0
|
||||
* @return {vec2_object}
|
||||
*/
|
||||
project : function (
|
||||
vec3
|
||||
)
|
||||
{
|
||||
return cc.Vec2;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method initOrthographic
|
||||
* @param {float} arg0
|
||||
* @param {float} arg1
|
||||
* @param {float} arg2
|
||||
* @param {float} arg3
|
||||
* @return {bool}
|
||||
*/
|
||||
initOrthographic : function (
|
||||
float,
|
||||
float,
|
||||
float,
|
||||
float
|
||||
)
|
||||
{
|
||||
return false;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method getDepthInView
|
||||
* @param {mat4_object} arg0
|
||||
* @return {float}
|
||||
*/
|
||||
getDepthInView : function (
|
||||
mat4
|
||||
)
|
||||
{
|
||||
return 0;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method lookAt
|
||||
* @param {vec3_object} arg0
|
||||
* @param {vec3_object} arg1
|
||||
*/
|
||||
lookAt : function (
|
||||
vec3,
|
||||
vec3
|
||||
)
|
||||
{
|
||||
},
|
||||
|
||||
/**
|
||||
* @method setCameraFlag
|
||||
* @param {cc.CameraFlag} arg0
|
||||
*/
|
||||
setCameraFlag : function (
|
||||
cameraflag
|
||||
)
|
||||
{
|
||||
},
|
||||
|
||||
/**
|
||||
* @method clearBackground
|
||||
* @param {float} arg0
|
||||
|
@ -18612,23 +18572,83 @@ mat4
|
|||
},
|
||||
|
||||
/**
|
||||
* @method getDepth
|
||||
* @return {int}
|
||||
* @method setScene
|
||||
* @param {cc.Scene} arg0
|
||||
*/
|
||||
getDepth : function (
|
||||
setScene : function (
|
||||
scene
|
||||
)
|
||||
{
|
||||
},
|
||||
|
||||
/**
|
||||
* @method getViewMatrix
|
||||
* @return {mat4_object}
|
||||
*/
|
||||
getViewMatrix : function (
|
||||
)
|
||||
{
|
||||
return cc.Mat4;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method getNearPlane
|
||||
* @return {float}
|
||||
*/
|
||||
getNearPlane : function (
|
||||
)
|
||||
{
|
||||
return 0;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method setDepth
|
||||
* @param {int} arg0
|
||||
* @method project
|
||||
* @param {vec3_object} arg0
|
||||
* @return {vec2_object}
|
||||
*/
|
||||
setDepth : function (
|
||||
int
|
||||
project : function (
|
||||
vec3
|
||||
)
|
||||
{
|
||||
return cc.Vec2;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method setCameraFlag
|
||||
* @param {cc.CameraFlag} arg0
|
||||
*/
|
||||
setCameraFlag : function (
|
||||
cameraflag
|
||||
)
|
||||
{
|
||||
},
|
||||
|
||||
/**
|
||||
* @method getFarPlane
|
||||
* @return {float}
|
||||
*/
|
||||
getFarPlane : function (
|
||||
)
|
||||
{
|
||||
return 0;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method initPerspective
|
||||
* @param {float} arg0
|
||||
* @param {float} arg1
|
||||
* @param {float} arg2
|
||||
* @param {float} arg3
|
||||
* @return {bool}
|
||||
*/
|
||||
initPerspective : function (
|
||||
float,
|
||||
float,
|
||||
float,
|
||||
float
|
||||
)
|
||||
{
|
||||
return false;
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
@ -1496,6 +1496,18 @@ getCapInsetsNormalRenderer : function (
|
|||
return cc.Rect;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method setTitleAlignment
|
||||
* @param {cc.TextHAlignment|cc.TextHAlignment} texthalignment
|
||||
* @param {cc.TextVAlignment} textvalignment
|
||||
*/
|
||||
setTitleAlignment : function(
|
||||
texthalignment,
|
||||
textvalignment
|
||||
)
|
||||
{
|
||||
},
|
||||
|
||||
/**
|
||||
* @method getCapInsetsPressedRenderer
|
||||
* @return {rect_object}
|
||||
|
@ -3618,6 +3630,16 @@ getDeleteBackward : function (
|
|||
return false;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method getTextColor
|
||||
* @return {color4b_object}
|
||||
*/
|
||||
getTextColor : function (
|
||||
)
|
||||
{
|
||||
return cc.Color4B;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method getPlaceHolder
|
||||
* @return {String}
|
||||
|
@ -3814,6 +3836,16 @@ bool
|
|||
{
|
||||
},
|
||||
|
||||
/**
|
||||
* @method getTextHorizontalAlignment
|
||||
* @return {cc.TextHAlignment}
|
||||
*/
|
||||
getTextHorizontalAlignment : function (
|
||||
)
|
||||
{
|
||||
return 0;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method setFontSize
|
||||
* @param {int} arg0
|
||||
|
@ -3894,6 +3926,16 @@ bool
|
|||
{
|
||||
},
|
||||
|
||||
/**
|
||||
* @method getTextVerticalAlignment
|
||||
* @return {cc.TextVAlignment}
|
||||
*/
|
||||
getTextVerticalAlignment : function (
|
||||
)
|
||||
{
|
||||
return 0;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method setTouchAreaEnabled
|
||||
* @param {bool} arg0
|
||||
|
|
|
@ -57243,77 +57243,22 @@ void js_register_cocos2dx_TransitionProgressOutIn(JSContext *cx, JS::HandleObjec
|
|||
JSClass *jsb_cocos2d_Camera_class;
|
||||
JSObject *jsb_cocos2d_Camera_prototype;
|
||||
|
||||
bool js_cocos2dx_Camera_setScene(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
bool ok = true;
|
||||
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
|
||||
js_proxy_t *proxy = jsb_get_js_proxy(obj);
|
||||
cocos2d::Camera* cobj = (cocos2d::Camera *)(proxy ? proxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_setScene : Invalid Native Object");
|
||||
if (argc == 1) {
|
||||
cocos2d::Scene* arg0;
|
||||
do {
|
||||
if (!args.get(0).isObject()) { ok = false; break; }
|
||||
js_proxy_t *jsProxy;
|
||||
JSObject *tmpObj = args.get(0).toObjectOrNull();
|
||||
jsProxy = jsb_get_js_proxy(tmpObj);
|
||||
arg0 = (cocos2d::Scene*)(jsProxy ? jsProxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object");
|
||||
} while (0);
|
||||
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Camera_setScene : Error processing arguments");
|
||||
cobj->setScene(arg0);
|
||||
args.rval().setUndefined();
|
||||
return true;
|
||||
}
|
||||
|
||||
JS_ReportError(cx, "js_cocos2dx_Camera_setScene : wrong number of arguments: %d, was expecting %d", argc, 1);
|
||||
return false;
|
||||
}
|
||||
bool js_cocos2dx_Camera_initPerspective(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
bool ok = true;
|
||||
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
|
||||
js_proxy_t *proxy = jsb_get_js_proxy(obj);
|
||||
cocos2d::Camera* cobj = (cocos2d::Camera *)(proxy ? proxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_initPerspective : Invalid Native Object");
|
||||
if (argc == 4) {
|
||||
double arg0;
|
||||
double arg1;
|
||||
double arg2;
|
||||
double arg3;
|
||||
ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0);
|
||||
ok &= JS::ToNumber( cx, args.get(1), &arg1) && !isnan(arg1);
|
||||
ok &= JS::ToNumber( cx, args.get(2), &arg2) && !isnan(arg2);
|
||||
ok &= JS::ToNumber( cx, args.get(3), &arg3) && !isnan(arg3);
|
||||
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Camera_initPerspective : Error processing arguments");
|
||||
bool ret = cobj->initPerspective(arg0, arg1, arg2, arg3);
|
||||
jsval jsret = JSVAL_NULL;
|
||||
jsret = BOOLEAN_TO_JSVAL(ret);
|
||||
args.rval().set(jsret);
|
||||
return true;
|
||||
}
|
||||
|
||||
JS_ReportError(cx, "js_cocos2dx_Camera_initPerspective : wrong number of arguments: %d, was expecting %d", argc, 4);
|
||||
return false;
|
||||
}
|
||||
bool js_cocos2dx_Camera_getProjectionMatrix(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
bool js_cocos2dx_Camera_getDepth(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
|
||||
js_proxy_t *proxy = jsb_get_js_proxy(obj);
|
||||
cocos2d::Camera* cobj = (cocos2d::Camera *)(proxy ? proxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_getProjectionMatrix : Invalid Native Object");
|
||||
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_getDepth : Invalid Native Object");
|
||||
if (argc == 0) {
|
||||
const cocos2d::Mat4& ret = cobj->getProjectionMatrix();
|
||||
int ret = cobj->getDepth();
|
||||
jsval jsret = JSVAL_NULL;
|
||||
jsret = matrix_to_jsval(cx, ret);
|
||||
jsret = int32_to_jsval(cx, ret);
|
||||
args.rval().set(jsret);
|
||||
return true;
|
||||
}
|
||||
|
||||
JS_ReportError(cx, "js_cocos2dx_Camera_getProjectionMatrix : wrong number of arguments: %d, was expecting %d", argc, 0);
|
||||
JS_ReportError(cx, "js_cocos2dx_Camera_getDepth : wrong number of arguments: %d, was expecting %d", argc, 0);
|
||||
return false;
|
||||
}
|
||||
bool js_cocos2dx_Camera_getViewProjectionMatrix(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
|
@ -57334,22 +57279,140 @@ bool js_cocos2dx_Camera_getViewProjectionMatrix(JSContext *cx, uint32_t argc, js
|
|||
JS_ReportError(cx, "js_cocos2dx_Camera_getViewProjectionMatrix : wrong number of arguments: %d, was expecting %d", argc, 0);
|
||||
return false;
|
||||
}
|
||||
bool js_cocos2dx_Camera_getViewMatrix(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
bool js_cocos2dx_Camera_lookAt(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
bool ok = true;
|
||||
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
|
||||
js_proxy_t *proxy = jsb_get_js_proxy(obj);
|
||||
cocos2d::Camera* cobj = (cocos2d::Camera *)(proxy ? proxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_lookAt : Invalid Native Object");
|
||||
if (argc == 1) {
|
||||
cocos2d::Vec3 arg0;
|
||||
ok &= jsval_to_vector3(cx, args.get(0), &arg0);
|
||||
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Camera_lookAt : Error processing arguments");
|
||||
cobj->lookAt(arg0);
|
||||
args.rval().setUndefined();
|
||||
return true;
|
||||
}
|
||||
if (argc == 2) {
|
||||
cocos2d::Vec3 arg0;
|
||||
cocos2d::Vec3 arg1;
|
||||
ok &= jsval_to_vector3(cx, args.get(0), &arg0);
|
||||
ok &= jsval_to_vector3(cx, args.get(1), &arg1);
|
||||
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Camera_lookAt : Error processing arguments");
|
||||
cobj->lookAt(arg0, arg1);
|
||||
args.rval().setUndefined();
|
||||
return true;
|
||||
}
|
||||
|
||||
JS_ReportError(cx, "js_cocos2dx_Camera_lookAt : wrong number of arguments: %d, was expecting %d", argc, 1);
|
||||
return false;
|
||||
}
|
||||
bool js_cocos2dx_Camera_getProjectionMatrix(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
|
||||
js_proxy_t *proxy = jsb_get_js_proxy(obj);
|
||||
cocos2d::Camera* cobj = (cocos2d::Camera *)(proxy ? proxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_getViewMatrix : Invalid Native Object");
|
||||
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_getProjectionMatrix : Invalid Native Object");
|
||||
if (argc == 0) {
|
||||
const cocos2d::Mat4& ret = cobj->getViewMatrix();
|
||||
const cocos2d::Mat4& ret = cobj->getProjectionMatrix();
|
||||
jsval jsret = JSVAL_NULL;
|
||||
jsret = matrix_to_jsval(cx, ret);
|
||||
args.rval().set(jsret);
|
||||
return true;
|
||||
}
|
||||
|
||||
JS_ReportError(cx, "js_cocos2dx_Camera_getViewMatrix : wrong number of arguments: %d, was expecting %d", argc, 0);
|
||||
JS_ReportError(cx, "js_cocos2dx_Camera_getProjectionMatrix : wrong number of arguments: %d, was expecting %d", argc, 0);
|
||||
return false;
|
||||
}
|
||||
bool js_cocos2dx_Camera_getDepthInView(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
bool ok = true;
|
||||
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
|
||||
js_proxy_t *proxy = jsb_get_js_proxy(obj);
|
||||
cocos2d::Camera* cobj = (cocos2d::Camera *)(proxy ? proxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_getDepthInView : Invalid Native Object");
|
||||
if (argc == 1) {
|
||||
cocos2d::Mat4 arg0;
|
||||
ok &= jsval_to_matrix(cx, args.get(0), &arg0);
|
||||
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Camera_getDepthInView : Error processing arguments");
|
||||
double ret = cobj->getDepthInView(arg0);
|
||||
jsval jsret = JSVAL_NULL;
|
||||
jsret = DOUBLE_TO_JSVAL(ret);
|
||||
args.rval().set(jsret);
|
||||
return true;
|
||||
}
|
||||
|
||||
JS_ReportError(cx, "js_cocos2dx_Camera_getDepthInView : wrong number of arguments: %d, was expecting %d", argc, 1);
|
||||
return false;
|
||||
}
|
||||
bool js_cocos2dx_Camera_initOrthographic(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
bool ok = true;
|
||||
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
|
||||
js_proxy_t *proxy = jsb_get_js_proxy(obj);
|
||||
cocos2d::Camera* cobj = (cocos2d::Camera *)(proxy ? proxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_initOrthographic : Invalid Native Object");
|
||||
if (argc == 4) {
|
||||
double arg0;
|
||||
double arg1;
|
||||
double arg2;
|
||||
double arg3;
|
||||
ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0);
|
||||
ok &= JS::ToNumber( cx, args.get(1), &arg1) && !isnan(arg1);
|
||||
ok &= JS::ToNumber( cx, args.get(2), &arg2) && !isnan(arg2);
|
||||
ok &= JS::ToNumber( cx, args.get(3), &arg3) && !isnan(arg3);
|
||||
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Camera_initOrthographic : Error processing arguments");
|
||||
bool ret = cobj->initOrthographic(arg0, arg1, arg2, arg3);
|
||||
jsval jsret = JSVAL_NULL;
|
||||
jsret = BOOLEAN_TO_JSVAL(ret);
|
||||
args.rval().set(jsret);
|
||||
return true;
|
||||
}
|
||||
|
||||
JS_ReportError(cx, "js_cocos2dx_Camera_initOrthographic : wrong number of arguments: %d, was expecting %d", argc, 4);
|
||||
return false;
|
||||
}
|
||||
bool js_cocos2dx_Camera_setDepth(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
bool ok = true;
|
||||
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
|
||||
js_proxy_t *proxy = jsb_get_js_proxy(obj);
|
||||
cocos2d::Camera* cobj = (cocos2d::Camera *)(proxy ? proxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_setDepth : Invalid Native Object");
|
||||
if (argc == 1) {
|
||||
int arg0;
|
||||
ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0);
|
||||
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Camera_setDepth : Error processing arguments");
|
||||
cobj->setDepth(arg0);
|
||||
args.rval().setUndefined();
|
||||
return true;
|
||||
}
|
||||
|
||||
JS_ReportError(cx, "js_cocos2dx_Camera_setDepth : wrong number of arguments: %d, was expecting %d", argc, 1);
|
||||
return false;
|
||||
}
|
||||
bool js_cocos2dx_Camera_initDefault(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
|
||||
js_proxy_t *proxy = jsb_get_js_proxy(obj);
|
||||
cocos2d::Camera* cobj = (cocos2d::Camera *)(proxy ? proxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_initDefault : Invalid Native Object");
|
||||
if (argc == 0) {
|
||||
bool ret = cobj->initDefault();
|
||||
jsval jsret = JSVAL_NULL;
|
||||
jsret = BOOLEAN_TO_JSVAL(ret);
|
||||
args.rval().set(jsret);
|
||||
return true;
|
||||
}
|
||||
|
||||
JS_ReportError(cx, "js_cocos2dx_Camera_initDefault : wrong number of arguments: %d, was expecting %d", argc, 0);
|
||||
return false;
|
||||
}
|
||||
bool js_cocos2dx_Camera_getCameraFlag(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
|
@ -57388,146 +57451,6 @@ bool js_cocos2dx_Camera_getType(JSContext *cx, uint32_t argc, jsval *vp)
|
|||
JS_ReportError(cx, "js_cocos2dx_Camera_getType : wrong number of arguments: %d, was expecting %d", argc, 0);
|
||||
return false;
|
||||
}
|
||||
bool js_cocos2dx_Camera_initDefault(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
|
||||
js_proxy_t *proxy = jsb_get_js_proxy(obj);
|
||||
cocos2d::Camera* cobj = (cocos2d::Camera *)(proxy ? proxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_initDefault : Invalid Native Object");
|
||||
if (argc == 0) {
|
||||
bool ret = cobj->initDefault();
|
||||
jsval jsret = JSVAL_NULL;
|
||||
jsret = BOOLEAN_TO_JSVAL(ret);
|
||||
args.rval().set(jsret);
|
||||
return true;
|
||||
}
|
||||
|
||||
JS_ReportError(cx, "js_cocos2dx_Camera_initDefault : wrong number of arguments: %d, was expecting %d", argc, 0);
|
||||
return false;
|
||||
}
|
||||
bool js_cocos2dx_Camera_project(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
bool ok = true;
|
||||
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
|
||||
js_proxy_t *proxy = jsb_get_js_proxy(obj);
|
||||
cocos2d::Camera* cobj = (cocos2d::Camera *)(proxy ? proxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_project : Invalid Native Object");
|
||||
if (argc == 1) {
|
||||
cocos2d::Vec3 arg0;
|
||||
ok &= jsval_to_vector3(cx, args.get(0), &arg0);
|
||||
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Camera_project : Error processing arguments");
|
||||
cocos2d::Vec2 ret = cobj->project(arg0);
|
||||
jsval jsret = JSVAL_NULL;
|
||||
jsret = vector2_to_jsval(cx, ret);
|
||||
args.rval().set(jsret);
|
||||
return true;
|
||||
}
|
||||
|
||||
JS_ReportError(cx, "js_cocos2dx_Camera_project : wrong number of arguments: %d, was expecting %d", argc, 1);
|
||||
return false;
|
||||
}
|
||||
bool js_cocos2dx_Camera_initOrthographic(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
bool ok = true;
|
||||
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
|
||||
js_proxy_t *proxy = jsb_get_js_proxy(obj);
|
||||
cocos2d::Camera* cobj = (cocos2d::Camera *)(proxy ? proxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_initOrthographic : Invalid Native Object");
|
||||
if (argc == 4) {
|
||||
double arg0;
|
||||
double arg1;
|
||||
double arg2;
|
||||
double arg3;
|
||||
ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0);
|
||||
ok &= JS::ToNumber( cx, args.get(1), &arg1) && !isnan(arg1);
|
||||
ok &= JS::ToNumber( cx, args.get(2), &arg2) && !isnan(arg2);
|
||||
ok &= JS::ToNumber( cx, args.get(3), &arg3) && !isnan(arg3);
|
||||
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Camera_initOrthographic : Error processing arguments");
|
||||
bool ret = cobj->initOrthographic(arg0, arg1, arg2, arg3);
|
||||
jsval jsret = JSVAL_NULL;
|
||||
jsret = BOOLEAN_TO_JSVAL(ret);
|
||||
args.rval().set(jsret);
|
||||
return true;
|
||||
}
|
||||
|
||||
JS_ReportError(cx, "js_cocos2dx_Camera_initOrthographic : wrong number of arguments: %d, was expecting %d", argc, 4);
|
||||
return false;
|
||||
}
|
||||
bool js_cocos2dx_Camera_getDepthInView(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
bool ok = true;
|
||||
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
|
||||
js_proxy_t *proxy = jsb_get_js_proxy(obj);
|
||||
cocos2d::Camera* cobj = (cocos2d::Camera *)(proxy ? proxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_getDepthInView : Invalid Native Object");
|
||||
if (argc == 1) {
|
||||
cocos2d::Mat4 arg0;
|
||||
ok &= jsval_to_matrix(cx, args.get(0), &arg0);
|
||||
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Camera_getDepthInView : Error processing arguments");
|
||||
double ret = cobj->getDepthInView(arg0);
|
||||
jsval jsret = JSVAL_NULL;
|
||||
jsret = DOUBLE_TO_JSVAL(ret);
|
||||
args.rval().set(jsret);
|
||||
return true;
|
||||
}
|
||||
|
||||
JS_ReportError(cx, "js_cocos2dx_Camera_getDepthInView : wrong number of arguments: %d, was expecting %d", argc, 1);
|
||||
return false;
|
||||
}
|
||||
bool js_cocos2dx_Camera_lookAt(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
bool ok = true;
|
||||
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
|
||||
js_proxy_t *proxy = jsb_get_js_proxy(obj);
|
||||
cocos2d::Camera* cobj = (cocos2d::Camera *)(proxy ? proxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_lookAt : Invalid Native Object");
|
||||
if (argc == 1) {
|
||||
cocos2d::Vec3 arg0;
|
||||
ok &= jsval_to_vector3(cx, args.get(0), &arg0);
|
||||
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Camera_lookAt : Error processing arguments");
|
||||
cobj->lookAt(arg0);
|
||||
args.rval().setUndefined();
|
||||
return true;
|
||||
}
|
||||
if (argc == 2) {
|
||||
cocos2d::Vec3 arg0;
|
||||
cocos2d::Vec3 arg1;
|
||||
ok &= jsval_to_vector3(cx, args.get(0), &arg0);
|
||||
ok &= jsval_to_vector3(cx, args.get(1), &arg1);
|
||||
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Camera_lookAt : Error processing arguments");
|
||||
cobj->lookAt(arg0, arg1);
|
||||
args.rval().setUndefined();
|
||||
return true;
|
||||
}
|
||||
|
||||
JS_ReportError(cx, "js_cocos2dx_Camera_lookAt : wrong number of arguments: %d, was expecting %d", argc, 1);
|
||||
return false;
|
||||
}
|
||||
bool js_cocos2dx_Camera_setCameraFlag(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
bool ok = true;
|
||||
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
|
||||
js_proxy_t *proxy = jsb_get_js_proxy(obj);
|
||||
cocos2d::Camera* cobj = (cocos2d::Camera *)(proxy ? proxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_setCameraFlag : Invalid Native Object");
|
||||
if (argc == 1) {
|
||||
cocos2d::CameraFlag arg0;
|
||||
ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0);
|
||||
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Camera_setCameraFlag : Error processing arguments");
|
||||
cobj->setCameraFlag(arg0);
|
||||
args.rval().setUndefined();
|
||||
return true;
|
||||
}
|
||||
|
||||
JS_ReportError(cx, "js_cocos2dx_Camera_setCameraFlag : wrong number of arguments: %d, was expecting %d", argc, 1);
|
||||
return false;
|
||||
}
|
||||
bool js_cocos2dx_Camera_clearBackground(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
|
@ -57568,42 +57491,155 @@ bool js_cocos2dx_Camera_setAdditionalProjection(JSContext *cx, uint32_t argc, js
|
|||
JS_ReportError(cx, "js_cocos2dx_Camera_setAdditionalProjection : wrong number of arguments: %d, was expecting %d", argc, 1);
|
||||
return false;
|
||||
}
|
||||
bool js_cocos2dx_Camera_getDepth(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
|
||||
js_proxy_t *proxy = jsb_get_js_proxy(obj);
|
||||
cocos2d::Camera* cobj = (cocos2d::Camera *)(proxy ? proxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_getDepth : Invalid Native Object");
|
||||
if (argc == 0) {
|
||||
int ret = cobj->getDepth();
|
||||
jsval jsret = JSVAL_NULL;
|
||||
jsret = int32_to_jsval(cx, ret);
|
||||
args.rval().set(jsret);
|
||||
return true;
|
||||
}
|
||||
|
||||
JS_ReportError(cx, "js_cocos2dx_Camera_getDepth : wrong number of arguments: %d, was expecting %d", argc, 0);
|
||||
return false;
|
||||
}
|
||||
bool js_cocos2dx_Camera_setDepth(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
bool js_cocos2dx_Camera_setScene(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
bool ok = true;
|
||||
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
|
||||
js_proxy_t *proxy = jsb_get_js_proxy(obj);
|
||||
cocos2d::Camera* cobj = (cocos2d::Camera *)(proxy ? proxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_setDepth : Invalid Native Object");
|
||||
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_setScene : Invalid Native Object");
|
||||
if (argc == 1) {
|
||||
int arg0;
|
||||
ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0);
|
||||
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Camera_setDepth : Error processing arguments");
|
||||
cobj->setDepth(arg0);
|
||||
cocos2d::Scene* arg0;
|
||||
do {
|
||||
if (!args.get(0).isObject()) { ok = false; break; }
|
||||
js_proxy_t *jsProxy;
|
||||
JSObject *tmpObj = args.get(0).toObjectOrNull();
|
||||
jsProxy = jsb_get_js_proxy(tmpObj);
|
||||
arg0 = (cocos2d::Scene*)(jsProxy ? jsProxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object");
|
||||
} while (0);
|
||||
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Camera_setScene : Error processing arguments");
|
||||
cobj->setScene(arg0);
|
||||
args.rval().setUndefined();
|
||||
return true;
|
||||
}
|
||||
|
||||
JS_ReportError(cx, "js_cocos2dx_Camera_setDepth : wrong number of arguments: %d, was expecting %d", argc, 1);
|
||||
JS_ReportError(cx, "js_cocos2dx_Camera_setScene : wrong number of arguments: %d, was expecting %d", argc, 1);
|
||||
return false;
|
||||
}
|
||||
bool js_cocos2dx_Camera_getViewMatrix(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
|
||||
js_proxy_t *proxy = jsb_get_js_proxy(obj);
|
||||
cocos2d::Camera* cobj = (cocos2d::Camera *)(proxy ? proxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_getViewMatrix : Invalid Native Object");
|
||||
if (argc == 0) {
|
||||
const cocos2d::Mat4& ret = cobj->getViewMatrix();
|
||||
jsval jsret = JSVAL_NULL;
|
||||
jsret = matrix_to_jsval(cx, ret);
|
||||
args.rval().set(jsret);
|
||||
return true;
|
||||
}
|
||||
|
||||
JS_ReportError(cx, "js_cocos2dx_Camera_getViewMatrix : wrong number of arguments: %d, was expecting %d", argc, 0);
|
||||
return false;
|
||||
}
|
||||
bool js_cocos2dx_Camera_getNearPlane(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
|
||||
js_proxy_t *proxy = jsb_get_js_proxy(obj);
|
||||
cocos2d::Camera* cobj = (cocos2d::Camera *)(proxy ? proxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_getNearPlane : Invalid Native Object");
|
||||
if (argc == 0) {
|
||||
double ret = cobj->getNearPlane();
|
||||
jsval jsret = JSVAL_NULL;
|
||||
jsret = DOUBLE_TO_JSVAL(ret);
|
||||
args.rval().set(jsret);
|
||||
return true;
|
||||
}
|
||||
|
||||
JS_ReportError(cx, "js_cocos2dx_Camera_getNearPlane : wrong number of arguments: %d, was expecting %d", argc, 0);
|
||||
return false;
|
||||
}
|
||||
bool js_cocos2dx_Camera_project(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
bool ok = true;
|
||||
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
|
||||
js_proxy_t *proxy = jsb_get_js_proxy(obj);
|
||||
cocos2d::Camera* cobj = (cocos2d::Camera *)(proxy ? proxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_project : Invalid Native Object");
|
||||
if (argc == 1) {
|
||||
cocos2d::Vec3 arg0;
|
||||
ok &= jsval_to_vector3(cx, args.get(0), &arg0);
|
||||
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Camera_project : Error processing arguments");
|
||||
cocos2d::Vec2 ret = cobj->project(arg0);
|
||||
jsval jsret = JSVAL_NULL;
|
||||
jsret = vector2_to_jsval(cx, ret);
|
||||
args.rval().set(jsret);
|
||||
return true;
|
||||
}
|
||||
|
||||
JS_ReportError(cx, "js_cocos2dx_Camera_project : wrong number of arguments: %d, was expecting %d", argc, 1);
|
||||
return false;
|
||||
}
|
||||
bool js_cocos2dx_Camera_setCameraFlag(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
bool ok = true;
|
||||
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
|
||||
js_proxy_t *proxy = jsb_get_js_proxy(obj);
|
||||
cocos2d::Camera* cobj = (cocos2d::Camera *)(proxy ? proxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_setCameraFlag : Invalid Native Object");
|
||||
if (argc == 1) {
|
||||
cocos2d::CameraFlag arg0;
|
||||
ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0);
|
||||
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Camera_setCameraFlag : Error processing arguments");
|
||||
cobj->setCameraFlag(arg0);
|
||||
args.rval().setUndefined();
|
||||
return true;
|
||||
}
|
||||
|
||||
JS_ReportError(cx, "js_cocos2dx_Camera_setCameraFlag : wrong number of arguments: %d, was expecting %d", argc, 1);
|
||||
return false;
|
||||
}
|
||||
bool js_cocos2dx_Camera_getFarPlane(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
|
||||
js_proxy_t *proxy = jsb_get_js_proxy(obj);
|
||||
cocos2d::Camera* cobj = (cocos2d::Camera *)(proxy ? proxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_getFarPlane : Invalid Native Object");
|
||||
if (argc == 0) {
|
||||
double ret = cobj->getFarPlane();
|
||||
jsval jsret = JSVAL_NULL;
|
||||
jsret = DOUBLE_TO_JSVAL(ret);
|
||||
args.rval().set(jsret);
|
||||
return true;
|
||||
}
|
||||
|
||||
JS_ReportError(cx, "js_cocos2dx_Camera_getFarPlane : wrong number of arguments: %d, was expecting %d", argc, 0);
|
||||
return false;
|
||||
}
|
||||
bool js_cocos2dx_Camera_initPerspective(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
bool ok = true;
|
||||
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
|
||||
js_proxy_t *proxy = jsb_get_js_proxy(obj);
|
||||
cocos2d::Camera* cobj = (cocos2d::Camera *)(proxy ? proxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_initPerspective : Invalid Native Object");
|
||||
if (argc == 4) {
|
||||
double arg0;
|
||||
double arg1;
|
||||
double arg2;
|
||||
double arg3;
|
||||
ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0);
|
||||
ok &= JS::ToNumber( cx, args.get(1), &arg1) && !isnan(arg1);
|
||||
ok &= JS::ToNumber( cx, args.get(2), &arg2) && !isnan(arg2);
|
||||
ok &= JS::ToNumber( cx, args.get(3), &arg3) && !isnan(arg3);
|
||||
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Camera_initPerspective : Error processing arguments");
|
||||
bool ret = cobj->initPerspective(arg0, arg1, arg2, arg3);
|
||||
jsval jsret = JSVAL_NULL;
|
||||
jsret = BOOLEAN_TO_JSVAL(ret);
|
||||
args.rval().set(jsret);
|
||||
return true;
|
||||
}
|
||||
|
||||
JS_ReportError(cx, "js_cocos2dx_Camera_initPerspective : wrong number of arguments: %d, was expecting %d", argc, 4);
|
||||
return false;
|
||||
}
|
||||
bool js_cocos2dx_Camera_create(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
|
@ -57786,23 +57822,25 @@ void js_register_cocos2dx_Camera(JSContext *cx, JS::HandleObject global) {
|
|||
};
|
||||
|
||||
static JSFunctionSpec funcs[] = {
|
||||
JS_FN("setScene", js_cocos2dx_Camera_setScene, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("initPerspective", js_cocos2dx_Camera_initPerspective, 4, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("getProjectionMatrix", js_cocos2dx_Camera_getProjectionMatrix, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("getDepth", js_cocos2dx_Camera_getDepth, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("getViewProjectionMatrix", js_cocos2dx_Camera_getViewProjectionMatrix, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("getViewMatrix", js_cocos2dx_Camera_getViewMatrix, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("lookAt", js_cocos2dx_Camera_lookAt, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("getProjectionMatrix", js_cocos2dx_Camera_getProjectionMatrix, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("getDepthInView", js_cocos2dx_Camera_getDepthInView, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("initOrthographic", js_cocos2dx_Camera_initOrthographic, 4, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("setDepth", js_cocos2dx_Camera_setDepth, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("initDefault", js_cocos2dx_Camera_initDefault, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("getCameraFlag", js_cocos2dx_Camera_getCameraFlag, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("getType", js_cocos2dx_Camera_getType, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("initDefault", js_cocos2dx_Camera_initDefault, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("project", js_cocos2dx_Camera_project, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("initOrthographic", js_cocos2dx_Camera_initOrthographic, 4, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("getDepthInView", js_cocos2dx_Camera_getDepthInView, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("lookAt", js_cocos2dx_Camera_lookAt, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("setCameraFlag", js_cocos2dx_Camera_setCameraFlag, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("clearBackground", js_cocos2dx_Camera_clearBackground, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("setAdditionalProjection", js_cocos2dx_Camera_setAdditionalProjection, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("getDepth", js_cocos2dx_Camera_getDepth, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("setDepth", js_cocos2dx_Camera_setDepth, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("setScene", js_cocos2dx_Camera_setScene, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("getViewMatrix", js_cocos2dx_Camera_getViewMatrix, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("getNearPlane", js_cocos2dx_Camera_getNearPlane, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("project", js_cocos2dx_Camera_project, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("setCameraFlag", js_cocos2dx_Camera_setCameraFlag, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("getFarPlane", js_cocos2dx_Camera_getFarPlane, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("initPerspective", js_cocos2dx_Camera_initPerspective, 4, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FS_END
|
||||
};
|
||||
|
||||
|
|
|
@ -3353,23 +3353,25 @@ bool js_cocos2dx_Camera_constructor(JSContext *cx, uint32_t argc, jsval *vp);
|
|||
void js_cocos2dx_Camera_finalize(JSContext *cx, JSObject *obj);
|
||||
void js_register_cocos2dx_Camera(JSContext *cx, JS::HandleObject global);
|
||||
void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj);
|
||||
bool js_cocos2dx_Camera_setScene(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Camera_initPerspective(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Camera_getProjectionMatrix(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Camera_getDepth(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Camera_getViewProjectionMatrix(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Camera_getViewMatrix(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Camera_lookAt(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Camera_getProjectionMatrix(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Camera_getDepthInView(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Camera_initOrthographic(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Camera_setDepth(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Camera_initDefault(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Camera_getCameraFlag(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Camera_getType(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Camera_initDefault(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Camera_project(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Camera_initOrthographic(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Camera_getDepthInView(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Camera_lookAt(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Camera_setCameraFlag(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Camera_clearBackground(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Camera_setAdditionalProjection(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Camera_getDepth(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Camera_setDepth(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Camera_setScene(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Camera_getViewMatrix(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Camera_getNearPlane(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Camera_project(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Camera_setCameraFlag(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Camera_getFarPlane(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Camera_initPerspective(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Camera_create(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Camera_createPerspective(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Camera_createOrthographic(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
|
|
|
@ -3595,6 +3595,45 @@ bool js_cocos2dx_ui_Button_getCapInsetsNormalRenderer(JSContext *cx, uint32_t ar
|
|||
JS_ReportError(cx, "js_cocos2dx_ui_Button_getCapInsetsNormalRenderer : wrong number of arguments: %d, was expecting %d", argc, 0);
|
||||
return false;
|
||||
}
|
||||
bool js_cocos2dx_ui_Button_setTitleAlignment(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
bool ok = true;
|
||||
|
||||
JS::RootedObject obj(cx);
|
||||
cocos2d::ui::Button* cobj = NULL;
|
||||
obj = args.thisv().toObjectOrNull();
|
||||
js_proxy_t *proxy = jsb_get_js_proxy(obj);
|
||||
cobj = (cocos2d::ui::Button *)(proxy ? proxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Button_setTitleAlignment : Invalid Native Object");
|
||||
do {
|
||||
if (argc == 2) {
|
||||
cocos2d::TextHAlignment arg0;
|
||||
ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0);
|
||||
if (!ok) { ok = true; break; }
|
||||
cocos2d::TextVAlignment arg1;
|
||||
ok &= jsval_to_int32(cx, args.get(1), (int32_t *)&arg1);
|
||||
if (!ok) { ok = true; break; }
|
||||
cobj->setTitleAlignment(arg0, arg1);
|
||||
args.rval().setUndefined();
|
||||
return true;
|
||||
}
|
||||
} while(0);
|
||||
|
||||
do {
|
||||
if (argc == 1) {
|
||||
cocos2d::TextHAlignment arg0;
|
||||
ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0);
|
||||
if (!ok) { ok = true; break; }
|
||||
cobj->setTitleAlignment(arg0);
|
||||
args.rval().setUndefined();
|
||||
return true;
|
||||
}
|
||||
} while(0);
|
||||
|
||||
JS_ReportError(cx, "js_cocos2dx_ui_Button_setTitleAlignment : wrong number of arguments");
|
||||
return false;
|
||||
}
|
||||
bool js_cocos2dx_ui_Button_getCapInsetsPressedRenderer(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
|
@ -4051,6 +4090,7 @@ void js_register_cocos2dx_ui_Button(JSContext *cx, JS::HandleObject global) {
|
|||
JS_FN("loadTexturePressed", js_cocos2dx_ui_Button_loadTexturePressed, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("setTitleFontName", js_cocos2dx_ui_Button_setTitleFontName, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("getCapInsetsNormalRenderer", js_cocos2dx_ui_Button_getCapInsetsNormalRenderer, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("setTitleAlignment", js_cocos2dx_ui_Button_setTitleAlignment, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("getCapInsetsPressedRenderer", js_cocos2dx_ui_Button_getCapInsetsPressedRenderer, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("loadTextures", js_cocos2dx_ui_Button_loadTextures, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("isScale9Enabled", js_cocos2dx_ui_Button_isScale9Enabled, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
|
@ -9264,6 +9304,24 @@ bool js_cocos2dx_ui_TextField_getDeleteBackward(JSContext *cx, uint32_t argc, js
|
|||
JS_ReportError(cx, "js_cocos2dx_ui_TextField_getDeleteBackward : wrong number of arguments: %d, was expecting %d", argc, 0);
|
||||
return false;
|
||||
}
|
||||
bool js_cocos2dx_ui_TextField_getTextColor(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
|
||||
js_proxy_t *proxy = jsb_get_js_proxy(obj);
|
||||
cocos2d::ui::TextField* cobj = (cocos2d::ui::TextField *)(proxy ? proxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_TextField_getTextColor : Invalid Native Object");
|
||||
if (argc == 0) {
|
||||
const cocos2d::Color4B& ret = cobj->getTextColor();
|
||||
jsval jsret = JSVAL_NULL;
|
||||
jsret = cccolor4b_to_jsval(cx, ret);
|
||||
args.rval().set(jsret);
|
||||
return true;
|
||||
}
|
||||
|
||||
JS_ReportError(cx, "js_cocos2dx_ui_TextField_getTextColor : wrong number of arguments: %d, was expecting %d", argc, 0);
|
||||
return false;
|
||||
}
|
||||
bool js_cocos2dx_ui_TextField_getPlaceHolder(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
|
@ -9636,6 +9694,24 @@ bool js_cocos2dx_ui_TextField_setDeleteBackward(JSContext *cx, uint32_t argc, js
|
|||
JS_ReportError(cx, "js_cocos2dx_ui_TextField_setDeleteBackward : wrong number of arguments: %d, was expecting %d", argc, 1);
|
||||
return false;
|
||||
}
|
||||
bool js_cocos2dx_ui_TextField_getTextHorizontalAlignment(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
|
||||
js_proxy_t *proxy = jsb_get_js_proxy(obj);
|
||||
cocos2d::ui::TextField* cobj = (cocos2d::ui::TextField *)(proxy ? proxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_TextField_getTextHorizontalAlignment : Invalid Native Object");
|
||||
if (argc == 0) {
|
||||
int ret = (int)cobj->getTextHorizontalAlignment();
|
||||
jsval jsret = JSVAL_NULL;
|
||||
jsret = int32_to_jsval(cx, ret);
|
||||
args.rval().set(jsret);
|
||||
return true;
|
||||
}
|
||||
|
||||
JS_ReportError(cx, "js_cocos2dx_ui_TextField_getTextHorizontalAlignment : wrong number of arguments: %d, was expecting %d", argc, 0);
|
||||
return false;
|
||||
}
|
||||
bool js_cocos2dx_ui_TextField_setFontSize(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
|
@ -9808,6 +9884,24 @@ bool js_cocos2dx_ui_TextField_setDetachWithIME(JSContext *cx, uint32_t argc, jsv
|
|||
JS_ReportError(cx, "js_cocos2dx_ui_TextField_setDetachWithIME : wrong number of arguments: %d, was expecting %d", argc, 1);
|
||||
return false;
|
||||
}
|
||||
bool js_cocos2dx_ui_TextField_getTextVerticalAlignment(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
|
||||
js_proxy_t *proxy = jsb_get_js_proxy(obj);
|
||||
cocos2d::ui::TextField* cobj = (cocos2d::ui::TextField *)(proxy ? proxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_TextField_getTextVerticalAlignment : Invalid Native Object");
|
||||
if (argc == 0) {
|
||||
int ret = (int)cobj->getTextVerticalAlignment();
|
||||
jsval jsret = JSVAL_NULL;
|
||||
jsret = int32_to_jsval(cx, ret);
|
||||
args.rval().set(jsret);
|
||||
return true;
|
||||
}
|
||||
|
||||
JS_ReportError(cx, "js_cocos2dx_ui_TextField_getTextVerticalAlignment : wrong number of arguments: %d, was expecting %d", argc, 0);
|
||||
return false;
|
||||
}
|
||||
bool js_cocos2dx_ui_TextField_setTouchAreaEnabled(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
|
@ -10033,6 +10127,7 @@ void js_register_cocos2dx_ui_TextField(JSContext *cx, JS::HandleObject global) {
|
|||
JS_FN("getString", js_cocos2dx_ui_TextField_getString, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("setPasswordStyleText", js_cocos2dx_ui_TextField_setPasswordStyleText, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("getDeleteBackward", js_cocos2dx_ui_TextField_getDeleteBackward, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("getTextColor", js_cocos2dx_ui_TextField_getTextColor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("getPlaceHolder", js_cocos2dx_ui_TextField_getPlaceHolder, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("getAttachWithIME", js_cocos2dx_ui_TextField_getAttachWithIME, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("setFontName", js_cocos2dx_ui_TextField_setFontName, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
|
@ -10053,6 +10148,7 @@ void js_register_cocos2dx_ui_TextField(JSContext *cx, JS::HandleObject global) {
|
|||
JS_FN("setMaxLengthEnabled", js_cocos2dx_ui_TextField_setMaxLengthEnabled, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("isPasswordEnabled", js_cocos2dx_ui_TextField_isPasswordEnabled, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("setDeleteBackward", js_cocos2dx_ui_TextField_setDeleteBackward, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("getTextHorizontalAlignment", js_cocos2dx_ui_TextField_getTextHorizontalAlignment, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("setFontSize", js_cocos2dx_ui_TextField_setFontSize, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("setPlaceHolder", js_cocos2dx_ui_TextField_setPlaceHolder, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("setPlaceHolderColor", js_cocos2dx_ui_TextField_setPlaceHolderColor, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
|
@ -10061,6 +10157,7 @@ void js_register_cocos2dx_ui_TextField(JSContext *cx, JS::HandleObject global) {
|
|||
JS_FN("getMaxLength", js_cocos2dx_ui_TextField_getMaxLength, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("isMaxLengthEnabled", js_cocos2dx_ui_TextField_isMaxLengthEnabled, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("setDetachWithIME", js_cocos2dx_ui_TextField_setDetachWithIME, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("getTextVerticalAlignment", js_cocos2dx_ui_TextField_getTextVerticalAlignment, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("setTouchAreaEnabled", js_cocos2dx_ui_TextField_setTouchAreaEnabled, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("setMaxLength", js_cocos2dx_ui_TextField_setMaxLength, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("setTouchSize", js_cocos2dx_ui_TextField_setTouchSize, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
|
|
|
@ -195,6 +195,7 @@ bool js_cocos2dx_ui_Button_setCapInsetsNormalRenderer(JSContext *cx, uint32_t ar
|
|||
bool js_cocos2dx_ui_Button_loadTexturePressed(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_ui_Button_setTitleFontName(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_ui_Button_getCapInsetsNormalRenderer(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_ui_Button_setTitleAlignment(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_ui_Button_getCapInsetsPressedRenderer(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_ui_Button_loadTextures(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_ui_Button_isScale9Enabled(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
|
@ -466,6 +467,7 @@ bool js_cocos2dx_ui_TextField_getFontSize(JSContext *cx, uint32_t argc, jsval *v
|
|||
bool js_cocos2dx_ui_TextField_getString(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_ui_TextField_setPasswordStyleText(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_ui_TextField_getDeleteBackward(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_ui_TextField_getTextColor(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_ui_TextField_getPlaceHolder(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_ui_TextField_getAttachWithIME(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_ui_TextField_setFontName(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
|
@ -486,6 +488,7 @@ bool js_cocos2dx_ui_TextField_getPasswordStyleText(JSContext *cx, uint32_t argc,
|
|||
bool js_cocos2dx_ui_TextField_setMaxLengthEnabled(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_ui_TextField_isPasswordEnabled(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_ui_TextField_setDeleteBackward(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_ui_TextField_getTextHorizontalAlignment(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_ui_TextField_setFontSize(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_ui_TextField_setPlaceHolder(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_ui_TextField_setPlaceHolderColor(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
|
@ -494,6 +497,7 @@ bool js_cocos2dx_ui_TextField_setTextColor(JSContext *cx, uint32_t argc, jsval *
|
|||
bool js_cocos2dx_ui_TextField_getMaxLength(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_ui_TextField_isMaxLengthEnabled(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_ui_TextField_setDetachWithIME(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_ui_TextField_getTextVerticalAlignment(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_ui_TextField_setTouchAreaEnabled(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_ui_TextField_setMaxLength(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_ui_TextField_setTouchSize(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
|
|
|
@ -303,7 +303,7 @@ static bool js_cocos2dx_studio_ActionManagerEx_initWithDictionaryEx(JSContext *c
|
|||
rapidjson::Document arg1Jsondoc;
|
||||
arg1Jsondoc.Parse<0>(arg1);
|
||||
if (arg1Jsondoc.HasParseError()) {
|
||||
CCLOG("GetParseError %s\n",arg1Jsondoc.GetParseError());
|
||||
CCLOG("GetParseError %d\n",arg1Jsondoc.GetParseError());
|
||||
}
|
||||
do {
|
||||
if (!args.get(2).isObject()) { ok = false; break; }
|
||||
|
|
|
@ -1094,7 +1094,7 @@ cc.Color = function (r, g, b, a) {
|
|||
this.r = r || 0;
|
||||
this.g = g || 0;
|
||||
this.b = b || 0;
|
||||
this.a = a || 255;
|
||||
this.a = (a === undefined) ? 255 : a;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -1124,8 +1124,8 @@ cc.color = function (r, g, b, a) {
|
|||
if (typeof r === "string")
|
||||
return cc.hexToColor(r);
|
||||
if (typeof r === "object")
|
||||
return {r: r.r, g: r.g, b: r.b, a: r.a || 255};
|
||||
return {r: r, g: g, b: b, a: a || 255};
|
||||
return {r: r.r, g: r.g, b: r.b, a: (r.a === undefined) ? 255 : r.a};
|
||||
return {r: r, g: g, b: b, a: (a === undefined ? 255 : a)};
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -18,6 +18,7 @@ include_directories(
|
|||
${cocos_root}/cocos/editor-support
|
||||
${cocos_root}/cocos/platform
|
||||
${cocos_root}/cocos/audio/include
|
||||
${cocos_root}/cocos/physics3d
|
||||
manual
|
||||
manual/extension
|
||||
manual/cocostudio
|
||||
|
@ -108,6 +109,7 @@ set(lua_bindings_manual_files
|
|||
manual/ui/lua_cocos2dx_ui_manual.cpp
|
||||
manual/video/lua_cocos2dx_experimental_video_manual.cpp
|
||||
manual/audioengine/lua_cocos2dx_audioengine_manual.cpp
|
||||
manual/physics3d/lua_cocos2dx_physics3d_manual.cpp
|
||||
)
|
||||
|
||||
set(lua_bindings_auto_files
|
||||
|
@ -125,6 +127,7 @@ set(lua_bindings_auto_files
|
|||
auto/lua_cocos2dx_csloader_auto.cpp
|
||||
auto/lua_cocos2dx_ui_auto.cpp
|
||||
auto/lua_cocos2dx_audioengine_auto.cpp
|
||||
auto/lua_cocos2dx_physics3d_auto.cpp
|
||||
)
|
||||
|
||||
if(MACOSX)
|
||||
|
|
|
@ -0,0 +1,83 @@
|
|||
|
||||
--------------------------------
|
||||
-- @module Bundle3D
|
||||
-- @parent_module cc
|
||||
|
||||
--------------------------------
|
||||
-- load a file. You must load a file first, then call loadMeshData, loadSkinData, and so on<br>
|
||||
-- param path File to be loaded<br>
|
||||
-- return result of load
|
||||
-- @function [parent=#Bundle3D] load
|
||||
-- @param self
|
||||
-- @param #string path
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
-- load skin data from bundle<br>
|
||||
-- param id The ID of the skin, load the first Skin in the bundle if it is empty
|
||||
-- @function [parent=#Bundle3D] loadSkinData
|
||||
-- @param self
|
||||
-- @param #string id
|
||||
-- @param #cc.SkinData skindata
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Bundle3D] clear
|
||||
-- @param self
|
||||
-- @return Bundle3D#Bundle3D self (return value: cc.Bundle3D)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Bundle3D] loadMaterials
|
||||
-- @param self
|
||||
-- @param #cc.MaterialDatas materialdatas
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Bundle3D] loadNodes
|
||||
-- @param self
|
||||
-- @param #cc.NodeDatas nodedatas
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
-- load material data from bundle<br>
|
||||
-- param id The ID of the animation, load the first animation in the bundle if it is empty
|
||||
-- @function [parent=#Bundle3D] loadAnimationData
|
||||
-- @param self
|
||||
-- @param #string id
|
||||
-- @param #cc.Animation3DData animationdata
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
-- create a new bundle, destroy it when finish using it
|
||||
-- @function [parent=#Bundle3D] createBundle
|
||||
-- @param self
|
||||
-- @return Bundle3D#Bundle3D ret (return value: cc.Bundle3D)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Bundle3D] destroyBundle
|
||||
-- @param self
|
||||
-- @param #cc.Bundle3D bundle
|
||||
-- @return Bundle3D#Bundle3D self (return value: cc.Bundle3D)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Bundle3D] loadObj
|
||||
-- @param self
|
||||
-- @param #cc.MeshDatas meshdatas
|
||||
-- @param #cc.MaterialDatas materialdatas
|
||||
-- @param #cc.NodeDatas nodedatas
|
||||
-- @param #string fullPath
|
||||
-- @param #char mtl_basepath
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Bundle3D] Bundle3D
|
||||
-- @param self
|
||||
-- @return Bundle3D#Bundle3D self (return value: cc.Bundle3D)
|
||||
|
||||
return nil
|
|
@ -142,6 +142,15 @@
|
|||
-- @param self
|
||||
-- @return rect_table#rect_table ret (return value: rect_table)
|
||||
|
||||
--------------------------------
|
||||
-- @overload self, int, int
|
||||
-- @overload self, int
|
||||
-- @function [parent=#Button] setTitleAlignment
|
||||
-- @param self
|
||||
-- @param #int hAlignment
|
||||
-- @param #int vAlignment
|
||||
-- @return Button#Button self (return value: ccui.Button)
|
||||
|
||||
--------------------------------
|
||||
-- Return the capInsets of pressed state scale9sprite.<br>
|
||||
-- return The pressed scale9 renderer capInsets.
|
||||
|
|
|
@ -5,21 +5,26 @@
|
|||
-- @parent_module cc
|
||||
|
||||
--------------------------------
|
||||
-- Set the scene,this method shall not be invoke manually
|
||||
-- @function [parent=#Camera] setScene
|
||||
-- get depth, camera with larger depth is drawn on top of camera with smaller depth, the depth of camera with CameraFlag::DEFAULT is 0, user defined camera is -1 by default
|
||||
-- @function [parent=#Camera] getDepth
|
||||
-- @param self
|
||||
-- @param #cc.Scene scene
|
||||
-- @return Camera#Camera self (return value: cc.Camera)
|
||||
-- @return int#int ret (return value: int)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Camera] initPerspective
|
||||
-- get view projection matrix
|
||||
-- @function [parent=#Camera] getViewProjectionMatrix
|
||||
-- @param self
|
||||
-- @param #float fieldOfView
|
||||
-- @param #float aspectRatio
|
||||
-- @param #float nearPlane
|
||||
-- @param #float farPlane
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
-- @return mat4_table#mat4_table ret (return value: mat4_table)
|
||||
|
||||
--------------------------------
|
||||
-- Make Camera looks at target<br>
|
||||
-- param target The target camera is point at<br>
|
||||
-- param up The up vector, usually it's Y axis
|
||||
-- @function [parent=#Camera] lookAt
|
||||
-- @param self
|
||||
-- @param #vec3_table target
|
||||
-- @param #vec3_table up
|
||||
-- @return Camera#Camera self (return value: cc.Camera)
|
||||
|
||||
--------------------------------
|
||||
-- Gets the camera's projection matrix.<br>
|
||||
|
@ -29,17 +34,34 @@
|
|||
-- @return mat4_table#mat4_table ret (return value: mat4_table)
|
||||
|
||||
--------------------------------
|
||||
-- get view projection matrix
|
||||
-- @function [parent=#Camera] getViewProjectionMatrix
|
||||
-- Get object depth towards camera
|
||||
-- @function [parent=#Camera] getDepthInView
|
||||
-- @param self
|
||||
-- @return mat4_table#mat4_table ret (return value: mat4_table)
|
||||
-- @param #mat4_table transform
|
||||
-- @return float#float ret (return value: float)
|
||||
|
||||
--------------------------------
|
||||
-- Gets the camera's view matrix.<br>
|
||||
-- return The camera view matrix.
|
||||
-- @function [parent=#Camera] getViewMatrix
|
||||
--
|
||||
-- @function [parent=#Camera] initOrthographic
|
||||
-- @param self
|
||||
-- @return mat4_table#mat4_table ret (return value: mat4_table)
|
||||
-- @param #float zoomX
|
||||
-- @param #float zoomY
|
||||
-- @param #float nearPlane
|
||||
-- @param #float farPlane
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
-- set depth, camera with larger depth is drawn on top of camera with smaller depth, the depth of camera with CameraFlag::DEFAULT is 0, user defined camera is -1 by default
|
||||
-- @function [parent=#Camera] setDepth
|
||||
-- @param self
|
||||
-- @param #int depth
|
||||
-- @return Camera#Camera self (return value: cc.Camera)
|
||||
|
||||
--------------------------------
|
||||
-- init camera
|
||||
-- @function [parent=#Camera] initDefault
|
||||
-- @param self
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
-- get & set Camera flag
|
||||
|
@ -54,44 +76,11 @@
|
|||
-- @param self
|
||||
-- @return int#int ret (return value: int)
|
||||
|
||||
--------------------------------
|
||||
-- init camera
|
||||
-- @function [parent=#Camera] initDefault
|
||||
-- @param self
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Camera] project
|
||||
-- @function [parent=#Camera] clearBackground
|
||||
-- @param self
|
||||
-- @param #vec3_table src
|
||||
-- @return vec2_table#vec2_table ret (return value: vec2_table)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Camera] initOrthographic
|
||||
-- @param self
|
||||
-- @param #float zoomX
|
||||
-- @param #float zoomY
|
||||
-- @param #float nearPlane
|
||||
-- @param #float farPlane
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
-- Get object depth towards camera
|
||||
-- @function [parent=#Camera] getDepthInView
|
||||
-- @param self
|
||||
-- @param #mat4_table transform
|
||||
-- @return float#float ret (return value: float)
|
||||
|
||||
--------------------------------
|
||||
-- Make Camera looks at target<br>
|
||||
-- param target The target camera is point at<br>
|
||||
-- param up The up vector, usually it's Y axis
|
||||
-- @function [parent=#Camera] lookAt
|
||||
-- @param self
|
||||
-- @param #vec3_table target
|
||||
-- @param #vec3_table up
|
||||
-- @param #float depth
|
||||
-- @return Camera#Camera self (return value: cc.Camera)
|
||||
|
||||
--------------------------------
|
||||
|
@ -101,20 +90,6 @@
|
|||
-- @param #cc.AABB aabb
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Camera] setCameraFlag
|
||||
-- @param self
|
||||
-- @param #int flag
|
||||
-- @return Camera#Camera self (return value: cc.Camera)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Camera] clearBackground
|
||||
-- @param self
|
||||
-- @param #float depth
|
||||
-- @return Camera#Camera self (return value: cc.Camera)
|
||||
|
||||
--------------------------------
|
||||
-- set additional matrix for the projection matrix, it multiplys mat to projection matrix when called, used by WP8
|
||||
-- @function [parent=#Camera] setAdditionalProjection
|
||||
|
@ -123,18 +98,55 @@
|
|||
-- @return Camera#Camera self (return value: cc.Camera)
|
||||
|
||||
--------------------------------
|
||||
-- get depth, camera with larger depth is drawn on top of camera with smaller depth, the depth of camera with CameraFlag::DEFAULT is 0, user defined camera is -1 by default
|
||||
-- @function [parent=#Camera] getDepth
|
||||
-- Set the scene,this method shall not be invoke manually
|
||||
-- @function [parent=#Camera] setScene
|
||||
-- @param self
|
||||
-- @return int#int ret (return value: int)
|
||||
-- @param #cc.Scene scene
|
||||
-- @return Camera#Camera self (return value: cc.Camera)
|
||||
|
||||
--------------------------------
|
||||
-- set depth, camera with larger depth is drawn on top of camera with smaller depth, the depth of camera with CameraFlag::DEFAULT is 0, user defined camera is -1 by default
|
||||
-- @function [parent=#Camera] setDepth
|
||||
-- Gets the camera's view matrix.<br>
|
||||
-- return The camera view matrix.
|
||||
-- @function [parent=#Camera] getViewMatrix
|
||||
-- @param self
|
||||
-- @param #int depth
|
||||
-- @return mat4_table#mat4_table ret (return value: mat4_table)
|
||||
|
||||
--------------------------------
|
||||
-- Get the frustum's near plane.
|
||||
-- @function [parent=#Camera] getNearPlane
|
||||
-- @param self
|
||||
-- @return float#float ret (return value: float)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Camera] project
|
||||
-- @param self
|
||||
-- @param #vec3_table src
|
||||
-- @return vec2_table#vec2_table ret (return value: vec2_table)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Camera] setCameraFlag
|
||||
-- @param self
|
||||
-- @param #int flag
|
||||
-- @return Camera#Camera self (return value: cc.Camera)
|
||||
|
||||
--------------------------------
|
||||
-- Get the frustum's far plane.
|
||||
-- @function [parent=#Camera] getFarPlane
|
||||
-- @param self
|
||||
-- @return float#float ret (return value: float)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Camera] initPerspective
|
||||
-- @param self
|
||||
-- @param #float fieldOfView
|
||||
-- @param #float aspectRatio
|
||||
-- @param #float nearPlane
|
||||
-- @param #float farPlane
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
-- create default camera, the camera type depends on Director::getProjection, the depth of the default camera is 0
|
||||
-- @function [parent=#Camera] create
|
||||
|
|
|
@ -0,0 +1,104 @@
|
|||
|
||||
--------------------------------
|
||||
-- @module Material
|
||||
-- @extend RenderState
|
||||
-- @parent_module cc
|
||||
|
||||
--------------------------------
|
||||
-- returns a clone (deep-copy) of the material
|
||||
-- @function [parent=#Material] clone
|
||||
-- @param self
|
||||
-- @return Material#Material ret (return value: cc.Material)
|
||||
|
||||
--------------------------------
|
||||
-- Returns the number of Techniques in the Material.
|
||||
-- @function [parent=#Material] getTechniqueCount
|
||||
-- @param self
|
||||
-- @return long#long ret (return value: long)
|
||||
|
||||
--------------------------------
|
||||
-- / sets the material name
|
||||
-- @function [parent=#Material] setName
|
||||
-- @param self
|
||||
-- @param #string name
|
||||
-- @return Material#Material self (return value: cc.Material)
|
||||
|
||||
--------------------------------
|
||||
-- Returns a Technique by index. <br>
|
||||
-- returns `nullptr` if the index is invalid.
|
||||
-- @function [parent=#Material] getTechniqueByIndex
|
||||
-- @param self
|
||||
-- @param #long index
|
||||
-- @return Technique#Technique ret (return value: cc.Technique)
|
||||
|
||||
--------------------------------
|
||||
-- / returns the material name
|
||||
-- @function [parent=#Material] getName
|
||||
-- @param self
|
||||
-- @return string#string ret (return value: string)
|
||||
|
||||
--------------------------------
|
||||
-- Returns the list of Techniques
|
||||
-- @function [parent=#Material] getTechniques
|
||||
-- @param self
|
||||
-- @return array_table#array_table ret (return value: array_table)
|
||||
|
||||
--------------------------------
|
||||
-- Sets the current technique
|
||||
-- @function [parent=#Material] setTechnique
|
||||
-- @param self
|
||||
-- @param #string techniqueName
|
||||
-- @return Material#Material self (return value: cc.Material)
|
||||
|
||||
--------------------------------
|
||||
-- Returns a Technique by its name.<br>
|
||||
-- returns `nullptr` if the Technique can't be found.
|
||||
-- @function [parent=#Material] getTechniqueByName
|
||||
-- @param self
|
||||
-- @param #string name
|
||||
-- @return Technique#Technique ret (return value: cc.Technique)
|
||||
|
||||
--------------------------------
|
||||
-- Adds a Technique into the Material
|
||||
-- @function [parent=#Material] addTechnique
|
||||
-- @param self
|
||||
-- @param #cc.Technique technique
|
||||
-- @return Material#Material self (return value: cc.Material)
|
||||
|
||||
--------------------------------
|
||||
-- Returns the Technique used by the Material
|
||||
-- @function [parent=#Material] getTechnique
|
||||
-- @param self
|
||||
-- @return Technique#Technique ret (return value: cc.Technique)
|
||||
|
||||
--------------------------------
|
||||
-- Creates a Material using the data from the Properties object defined at the specified URL,<br>
|
||||
-- where the URL is of the format "<file-path>.<extension>#<namespace-id>/<namespace-id>/.../<namespace-id>"<br>
|
||||
-- (and "#<namespace-id>/<namespace-id>/.../<namespace-id>" is optional).<br>
|
||||
-- param url The URL pointing to the Properties object defining the material.<br>
|
||||
-- return A new Material or NULL if there was an error.
|
||||
-- @function [parent=#Material] createWithFilename
|
||||
-- @param self
|
||||
-- @param #string path
|
||||
-- @return Material#Material ret (return value: cc.Material)
|
||||
|
||||
--------------------------------
|
||||
-- Creates a Material with a GLProgramState.<br>
|
||||
-- It will only contain one Technique and one Pass.<br>
|
||||
-- Added in order to support legacy code.
|
||||
-- @function [parent=#Material] createWithGLStateProgram
|
||||
-- @param self
|
||||
-- @param #cc.GLProgramState programState
|
||||
-- @return Material#Material ret (return value: cc.Material)
|
||||
|
||||
--------------------------------
|
||||
-- Creates a material from the specified properties object.<br>
|
||||
-- param materialProperties The properties object defining the<br>
|
||||
-- material (must have namespace equal to 'material').<br>
|
||||
-- return A new Material.
|
||||
-- @function [parent=#Material] createWithProperties
|
||||
-- @param self
|
||||
-- @param #cc.Properties materialProperties
|
||||
-- @return Material#Material ret (return value: cc.Material)
|
||||
|
||||
return nil
|
|
@ -0,0 +1,73 @@
|
|||
|
||||
--------------------------------
|
||||
-- @module Pass
|
||||
-- @extend RenderState
|
||||
-- @parent_module cc
|
||||
|
||||
--------------------------------
|
||||
-- Unbinds the Pass.<br>
|
||||
-- This method must be called AFTER calling the actuall draw call
|
||||
-- @function [parent=#Pass] unbind
|
||||
-- @param self
|
||||
-- @return Pass#Pass self (return value: cc.Pass)
|
||||
|
||||
--------------------------------
|
||||
-- @overload self, mat4_table, bool
|
||||
-- @overload self, mat4_table
|
||||
-- @function [parent=#Pass] bind
|
||||
-- @param self
|
||||
-- @param #mat4_table modelView
|
||||
-- @param #bool bindAttributes
|
||||
-- @return Pass#Pass self (return value: cc.Pass)
|
||||
|
||||
--------------------------------
|
||||
-- Returns a clone (deep-copy) of this instance
|
||||
-- @function [parent=#Pass] clone
|
||||
-- @param self
|
||||
-- @return Pass#Pass ret (return value: cc.Pass)
|
||||
|
||||
--------------------------------
|
||||
-- Returns the GLProgramState
|
||||
-- @function [parent=#Pass] getGLProgramState
|
||||
-- @param self
|
||||
-- @return GLProgramState#GLProgramState ret (return value: cc.GLProgramState)
|
||||
|
||||
--------------------------------
|
||||
-- Returns the vertex attribute binding for this pass.<br>
|
||||
-- return The vertex attribute binding for this pass.
|
||||
-- @function [parent=#Pass] getVertexAttributeBinding
|
||||
-- @param self
|
||||
-- @return VertexAttribBinding#VertexAttribBinding ret (return value: cc.VertexAttribBinding)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Pass] getHash
|
||||
-- @param self
|
||||
-- @return unsigned int#unsigned int ret (return value: unsigned int)
|
||||
|
||||
--------------------------------
|
||||
-- Sets a vertex attribute binding for this pass.<br>
|
||||
-- When a mesh binding is set, the VertexAttribBinding will be automatically<br>
|
||||
-- bound when the bind() method is called for the pass.<br>
|
||||
-- param binding The VertexAttribBinding to set (or NULL to remove an existing binding).
|
||||
-- @function [parent=#Pass] setVertexAttribBinding
|
||||
-- @param self
|
||||
-- @param #cc.VertexAttribBinding binding
|
||||
-- @return Pass#Pass self (return value: cc.Pass)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Pass] create
|
||||
-- @param self
|
||||
-- @param #cc.Technique parent
|
||||
-- @return Pass#Pass ret (return value: cc.Pass)
|
||||
|
||||
--------------------------------
|
||||
-- Creates a Pass with a GLProgramState.
|
||||
-- @function [parent=#Pass] createWithGLProgramState
|
||||
-- @param self
|
||||
-- @param #cc.Technique parent
|
||||
-- @param #cc.GLProgramState programState
|
||||
-- @return Pass#Pass ret (return value: cc.Pass)
|
||||
|
||||
return nil
|
|
@ -0,0 +1,98 @@
|
|||
|
||||
--------------------------------
|
||||
-- @module Physics3D6DofConstraint
|
||||
-- @extend Physics3DConstraint
|
||||
-- @parent_module cc
|
||||
|
||||
--------------------------------
|
||||
-- set linear lower limit
|
||||
-- @function [parent=#Physics3D6DofConstraint] setLinearLowerLimit
|
||||
-- @param self
|
||||
-- @param #vec3_table linearLower
|
||||
-- @return Physics3D6DofConstraint#Physics3D6DofConstraint self (return value: cc.Physics3D6DofConstraint)
|
||||
|
||||
--------------------------------
|
||||
-- get linear lower limit
|
||||
-- @function [parent=#Physics3D6DofConstraint] getLinearLowerLimit
|
||||
-- @param self
|
||||
-- @return vec3_table#vec3_table ret (return value: vec3_table)
|
||||
|
||||
--------------------------------
|
||||
-- get angular upper limit
|
||||
-- @function [parent=#Physics3D6DofConstraint] getAngularUpperLimit
|
||||
-- @param self
|
||||
-- @return vec3_table#vec3_table ret (return value: vec3_table)
|
||||
|
||||
--------------------------------
|
||||
-- access for UseFrameOffset
|
||||
-- @function [parent=#Physics3D6DofConstraint] getUseFrameOffset
|
||||
-- @param self
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
-- get linear upper limit
|
||||
-- @function [parent=#Physics3D6DofConstraint] getLinearUpperLimit
|
||||
-- @param self
|
||||
-- @return vec3_table#vec3_table ret (return value: vec3_table)
|
||||
|
||||
--------------------------------
|
||||
-- set angular lower limit
|
||||
-- @function [parent=#Physics3D6DofConstraint] setAngularLowerLimit
|
||||
-- @param self
|
||||
-- @param #vec3_table angularLower
|
||||
-- @return Physics3D6DofConstraint#Physics3D6DofConstraint self (return value: cc.Physics3D6DofConstraint)
|
||||
|
||||
--------------------------------
|
||||
-- is limited?<br>
|
||||
-- param limitIndex first 3 are linear, next 3 are angular
|
||||
-- @function [parent=#Physics3D6DofConstraint] isLimited
|
||||
-- @param self
|
||||
-- @param #int limitIndex
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
-- set use frame offset
|
||||
-- @function [parent=#Physics3D6DofConstraint] setUseFrameOffset
|
||||
-- @param self
|
||||
-- @param #bool frameOffsetOnOff
|
||||
-- @return Physics3D6DofConstraint#Physics3D6DofConstraint self (return value: cc.Physics3D6DofConstraint)
|
||||
|
||||
--------------------------------
|
||||
-- set linear upper limit
|
||||
-- @function [parent=#Physics3D6DofConstraint] setLinearUpperLimit
|
||||
-- @param self
|
||||
-- @param #vec3_table linearUpper
|
||||
-- @return Physics3D6DofConstraint#Physics3D6DofConstraint self (return value: cc.Physics3D6DofConstraint)
|
||||
|
||||
--------------------------------
|
||||
-- get angular lower limit
|
||||
-- @function [parent=#Physics3D6DofConstraint] getAngularLowerLimit
|
||||
-- @param self
|
||||
-- @return vec3_table#vec3_table ret (return value: vec3_table)
|
||||
|
||||
--------------------------------
|
||||
-- set angular upper limit
|
||||
-- @function [parent=#Physics3D6DofConstraint] setAngularUpperLimit
|
||||
-- @param self
|
||||
-- @param #vec3_table angularUpper
|
||||
-- @return Physics3D6DofConstraint#Physics3D6DofConstraint self (return value: cc.Physics3D6DofConstraint)
|
||||
|
||||
--------------------------------
|
||||
-- @overload self, cc.Physics3DRigidBody, mat4_table, bool
|
||||
-- @overload self, cc.Physics3DRigidBody, cc.Physics3DRigidBody, mat4_table, mat4_table, bool
|
||||
-- @function [parent=#Physics3D6DofConstraint] create
|
||||
-- @param self
|
||||
-- @param #cc.Physics3DRigidBody rbA
|
||||
-- @param #cc.Physics3DRigidBody rbB
|
||||
-- @param #mat4_table frameInA
|
||||
-- @param #mat4_table frameInB
|
||||
-- @param #bool useLinearReferenceFrameA
|
||||
-- @return Physics3D6DofConstraint#Physics3D6DofConstraint ret (return value: cc.Physics3D6DofConstraint)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Physics3D6DofConstraint] Physics3D6DofConstraint
|
||||
-- @param self
|
||||
-- @return Physics3D6DofConstraint#Physics3D6DofConstraint self (return value: cc.Physics3D6DofConstraint)
|
||||
|
||||
return nil
|
|
@ -0,0 +1,83 @@
|
|||
|
||||
--------------------------------
|
||||
-- @module Physics3DComponent
|
||||
-- @extend Component
|
||||
-- @parent_module cc
|
||||
|
||||
--------------------------------
|
||||
-- add this component to physics world, called by scene
|
||||
-- @function [parent=#Physics3DComponent] addToPhysicsWorld
|
||||
-- @param self
|
||||
-- @param #cc.Physics3DWorld world
|
||||
-- @return Physics3DComponent#Physics3DComponent self (return value: cc.Physics3DComponent)
|
||||
|
||||
--------------------------------
|
||||
-- align node and physics according to physics object
|
||||
-- @function [parent=#Physics3DComponent] syncToPhysics
|
||||
-- @param self
|
||||
-- @return Physics3DComponent#Physics3DComponent self (return value: cc.Physics3DComponent)
|
||||
|
||||
--------------------------------
|
||||
-- align node and physics according to node
|
||||
-- @function [parent=#Physics3DComponent] syncToNode
|
||||
-- @param self
|
||||
-- @return Physics3DComponent#Physics3DComponent self (return value: cc.Physics3DComponent)
|
||||
|
||||
--------------------------------
|
||||
-- get physics object
|
||||
-- @function [parent=#Physics3DComponent] getPhysics3DObject
|
||||
-- @param self
|
||||
-- @return Physics3DObject#Physics3DObject ret (return value: cc.Physics3DObject)
|
||||
|
||||
--------------------------------
|
||||
-- set Physics object to the component
|
||||
-- @function [parent=#Physics3DComponent] setPhysics3DObject
|
||||
-- @param self
|
||||
-- @param #cc.Physics3DObject physicsObj
|
||||
-- @return Physics3DComponent#Physics3DComponent self (return value: cc.Physics3DComponent)
|
||||
|
||||
--------------------------------
|
||||
-- synchronization between node and physics is time consuming, you can skip some synchronization using this function
|
||||
-- @function [parent=#Physics3DComponent] setSyncFlag
|
||||
-- @param self
|
||||
-- @param #int syncFlag
|
||||
-- @return Physics3DComponent#Physics3DComponent self (return value: cc.Physics3DComponent)
|
||||
|
||||
--------------------------------
|
||||
-- get the component name, it is used to find whether it is Physics3DComponent
|
||||
-- @function [parent=#Physics3DComponent] getPhysics3DComponentName
|
||||
-- @param self
|
||||
-- @return string#string ret (return value: string)
|
||||
|
||||
--------------------------------
|
||||
-- set it enable or not
|
||||
-- @function [parent=#Physics3DComponent] setEnabled
|
||||
-- @param self
|
||||
-- @param #bool b
|
||||
-- @return Physics3DComponent#Physics3DComponent self (return value: cc.Physics3DComponent)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Physics3DComponent] init
|
||||
-- @param self
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Physics3DComponent] onEnter
|
||||
-- @param self
|
||||
-- @return Physics3DComponent#Physics3DComponent self (return value: cc.Physics3DComponent)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Physics3DComponent] onExit
|
||||
-- @param self
|
||||
-- @return Physics3DComponent#Physics3DComponent self (return value: cc.Physics3DComponent)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Physics3DComponent] Physics3DComponent
|
||||
-- @param self
|
||||
-- @return Physics3DComponent#Physics3DComponent self (return value: cc.Physics3DComponent)
|
||||
|
||||
return nil
|
|
@ -0,0 +1,147 @@
|
|||
|
||||
--------------------------------
|
||||
-- @module Physics3DConeTwistConstraint
|
||||
-- @extend Physics3DConstraint
|
||||
-- @parent_module cc
|
||||
|
||||
--------------------------------
|
||||
-- get B's frame
|
||||
-- @function [parent=#Physics3DConeTwistConstraint] getBFrame
|
||||
-- @param self
|
||||
-- @return mat4_table#mat4_table ret (return value: mat4_table)
|
||||
|
||||
--------------------------------
|
||||
-- set fix thresh
|
||||
-- @function [parent=#Physics3DConeTwistConstraint] setFixThresh
|
||||
-- @param self
|
||||
-- @param #float fixThresh
|
||||
-- @return Physics3DConeTwistConstraint#Physics3DConeTwistConstraint self (return value: cc.Physics3DConeTwistConstraint)
|
||||
|
||||
--------------------------------
|
||||
-- get B's frame offset
|
||||
-- @function [parent=#Physics3DConeTwistConstraint] getFrameOffsetB
|
||||
-- @param self
|
||||
-- @return mat4_table#mat4_table ret (return value: mat4_table)
|
||||
|
||||
--------------------------------
|
||||
-- get A's frame offset
|
||||
-- @function [parent=#Physics3DConeTwistConstraint] getFrameOffsetA
|
||||
-- @param self
|
||||
-- @return mat4_table#mat4_table ret (return value: mat4_table)
|
||||
|
||||
--------------------------------
|
||||
-- get fix thresh
|
||||
-- @function [parent=#Physics3DConeTwistConstraint] getFixThresh
|
||||
-- @param self
|
||||
-- @return float#float ret (return value: float)
|
||||
|
||||
--------------------------------
|
||||
-- get swing span2
|
||||
-- @function [parent=#Physics3DConeTwistConstraint] getSwingSpan2
|
||||
-- @param self
|
||||
-- @return float#float ret (return value: float)
|
||||
|
||||
--------------------------------
|
||||
-- get swing span1
|
||||
-- @function [parent=#Physics3DConeTwistConstraint] getSwingSpan1
|
||||
-- @param self
|
||||
-- @return float#float ret (return value: float)
|
||||
|
||||
--------------------------------
|
||||
-- set max motor impulse
|
||||
-- @function [parent=#Physics3DConeTwistConstraint] setMaxMotorImpulse
|
||||
-- @param self
|
||||
-- @param #float maxMotorImpulse
|
||||
-- @return Physics3DConeTwistConstraint#Physics3DConeTwistConstraint self (return value: cc.Physics3DConeTwistConstraint)
|
||||
|
||||
--------------------------------
|
||||
-- set A and B's frame
|
||||
-- @function [parent=#Physics3DConeTwistConstraint] setFrames
|
||||
-- @param self
|
||||
-- @param #mat4_table frameA
|
||||
-- @param #mat4_table frameB
|
||||
-- @return Physics3DConeTwistConstraint#Physics3DConeTwistConstraint self (return value: cc.Physics3DConeTwistConstraint)
|
||||
|
||||
--------------------------------
|
||||
-- get twist angle
|
||||
-- @function [parent=#Physics3DConeTwistConstraint] getTwistAngle
|
||||
-- @param self
|
||||
-- @return float#float ret (return value: float)
|
||||
|
||||
--------------------------------
|
||||
-- get point for angle
|
||||
-- @function [parent=#Physics3DConeTwistConstraint] GetPointForAngle
|
||||
-- @param self
|
||||
-- @param #float fAngleInRadians
|
||||
-- @param #float fLength
|
||||
-- @return vec3_table#vec3_table ret (return value: vec3_table)
|
||||
|
||||
--------------------------------
|
||||
-- set max motor impulse normalize
|
||||
-- @function [parent=#Physics3DConeTwistConstraint] setMaxMotorImpulseNormalized
|
||||
-- @param self
|
||||
-- @param #float maxMotorImpulse
|
||||
-- @return Physics3DConeTwistConstraint#Physics3DConeTwistConstraint self (return value: cc.Physics3DConeTwistConstraint)
|
||||
|
||||
--------------------------------
|
||||
-- get twist span
|
||||
-- @function [parent=#Physics3DConeTwistConstraint] getTwistSpan
|
||||
-- @param self
|
||||
-- @return float#float ret (return value: float)
|
||||
|
||||
--------------------------------
|
||||
-- set damping
|
||||
-- @function [parent=#Physics3DConeTwistConstraint] setDamping
|
||||
-- @param self
|
||||
-- @param #float damping
|
||||
-- @return Physics3DConeTwistConstraint#Physics3DConeTwistConstraint self (return value: cc.Physics3DConeTwistConstraint)
|
||||
|
||||
--------------------------------
|
||||
-- set limits<br>
|
||||
-- param swingSpan1 swing span1<br>
|
||||
-- param swingSpan2 swing span2<br>
|
||||
-- param twistSpan twist span<br>
|
||||
-- param softness 0->1, recommend ~0.8->1. Describes % of limits where movement is free. Beyond this softness %, the limit is gradually enforced until the "hard" (1.0) limit is reached.<br>
|
||||
-- param biasFactor 0->1?, recommend 0.3 +/-0.3 or so. Strength with which constraint resists zeroth order (angular, not angular velocity) limit violation.<br>
|
||||
-- param relaxationFactor 0->1, recommend to stay near 1. the lower the value, the less the constraint will fight velocities which violate the angular limits.
|
||||
-- @function [parent=#Physics3DConeTwistConstraint] setLimit
|
||||
-- @param self
|
||||
-- @param #float swingSpan1
|
||||
-- @param #float swingSpan2
|
||||
-- @param #float twistSpan
|
||||
-- @param #float softness
|
||||
-- @param #float biasFactor
|
||||
-- @param #float relaxationFactor
|
||||
-- @return Physics3DConeTwistConstraint#Physics3DConeTwistConstraint self (return value: cc.Physics3DConeTwistConstraint)
|
||||
|
||||
--------------------------------
|
||||
-- get A's frame
|
||||
-- @function [parent=#Physics3DConeTwistConstraint] getAFrame
|
||||
-- @param self
|
||||
-- @return mat4_table#mat4_table ret (return value: mat4_table)
|
||||
|
||||
--------------------------------
|
||||
-- enable motor
|
||||
-- @function [parent=#Physics3DConeTwistConstraint] enableMotor
|
||||
-- @param self
|
||||
-- @param #bool b
|
||||
-- @return Physics3DConeTwistConstraint#Physics3DConeTwistConstraint self (return value: cc.Physics3DConeTwistConstraint)
|
||||
|
||||
--------------------------------
|
||||
-- @overload self, cc.Physics3DRigidBody, cc.Physics3DRigidBody, mat4_table, mat4_table
|
||||
-- @overload self, cc.Physics3DRigidBody, mat4_table
|
||||
-- @function [parent=#Physics3DConeTwistConstraint] create
|
||||
-- @param self
|
||||
-- @param #cc.Physics3DRigidBody rbA
|
||||
-- @param #cc.Physics3DRigidBody rbB
|
||||
-- @param #mat4_table frameA
|
||||
-- @param #mat4_table frameB
|
||||
-- @return Physics3DConeTwistConstraint#Physics3DConeTwistConstraint ret (return value: cc.Physics3DConeTwistConstraint)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Physics3DConeTwistConstraint] Physics3DConeTwistConstraint
|
||||
-- @param self
|
||||
-- @return Physics3DConeTwistConstraint#Physics3DConeTwistConstraint self (return value: cc.Physics3DConeTwistConstraint)
|
||||
|
||||
return nil
|
|
@ -0,0 +1,83 @@
|
|||
|
||||
--------------------------------
|
||||
-- @module Physics3DConstraint
|
||||
-- @extend Ref
|
||||
-- @parent_module cc
|
||||
|
||||
--------------------------------
|
||||
-- set enable or not
|
||||
-- @function [parent=#Physics3DConstraint] setEnabled
|
||||
-- @param self
|
||||
-- @param #bool enabled
|
||||
-- @return Physics3DConstraint#Physics3DConstraint self (return value: cc.Physics3DConstraint)
|
||||
|
||||
--------------------------------
|
||||
-- set the impulse that break the constraint
|
||||
-- @function [parent=#Physics3DConstraint] setBreakingImpulse
|
||||
-- @param self
|
||||
-- @param #float impulse
|
||||
-- @return Physics3DConstraint#Physics3DConstraint self (return value: cc.Physics3DConstraint)
|
||||
|
||||
--------------------------------
|
||||
-- get user data
|
||||
-- @function [parent=#Physics3DConstraint] getUserData
|
||||
-- @param self
|
||||
-- @return void#void ret (return value: void)
|
||||
|
||||
--------------------------------
|
||||
-- get the impulse that break the constraint
|
||||
-- @function [parent=#Physics3DConstraint] getBreakingImpulse
|
||||
-- @param self
|
||||
-- @return float#float ret (return value: float)
|
||||
|
||||
--------------------------------
|
||||
-- get rigid body a
|
||||
-- @function [parent=#Physics3DConstraint] getBodyA
|
||||
-- @param self
|
||||
-- @return Physics3DRigidBody#Physics3DRigidBody ret (return value: cc.Physics3DRigidBody)
|
||||
|
||||
--------------------------------
|
||||
-- is it enabled
|
||||
-- @function [parent=#Physics3DConstraint] isEnabled
|
||||
-- @param self
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
-- get override number of solver iterations
|
||||
-- @function [parent=#Physics3DConstraint] getOverrideNumSolverIterations
|
||||
-- @param self
|
||||
-- @return int#int ret (return value: int)
|
||||
|
||||
--------------------------------
|
||||
-- get rigid body b
|
||||
-- @function [parent=#Physics3DConstraint] getBodyB
|
||||
-- @param self
|
||||
-- @return Physics3DRigidBody#Physics3DRigidBody ret (return value: cc.Physics3DRigidBody)
|
||||
|
||||
--------------------------------
|
||||
-- override the number of constraint solver iterations used to solve this constraint, -1 will use the default number of iterations, as specified in SolverInfo.m_numIterations
|
||||
-- @function [parent=#Physics3DConstraint] setOverrideNumSolverIterations
|
||||
-- @param self
|
||||
-- @param #int overideNumIterations
|
||||
-- @return Physics3DConstraint#Physics3DConstraint self (return value: cc.Physics3DConstraint)
|
||||
|
||||
--------------------------------
|
||||
-- get constraint type
|
||||
-- @function [parent=#Physics3DConstraint] getConstraintType
|
||||
-- @param self
|
||||
-- @return int#int ret (return value: int)
|
||||
|
||||
--------------------------------
|
||||
-- get user data
|
||||
-- @function [parent=#Physics3DConstraint] setUserData
|
||||
-- @param self
|
||||
-- @param #void userData
|
||||
-- @return Physics3DConstraint#Physics3DConstraint self (return value: cc.Physics3DConstraint)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Physics3DConstraint] getbtContraint
|
||||
-- @param self
|
||||
-- @return btTypedConstraint#btTypedConstraint ret (return value: btTypedConstraint)
|
||||
|
||||
return nil
|
|
@ -0,0 +1,167 @@
|
|||
|
||||
--------------------------------
|
||||
-- @module Physics3DHingeConstraint
|
||||
-- @extend Physics3DConstraint
|
||||
-- @parent_module cc
|
||||
|
||||
--------------------------------
|
||||
-- @overload self, mat4_table, mat4_table
|
||||
-- @overload self
|
||||
-- @function [parent=#Physics3DHingeConstraint] getHingeAngle
|
||||
-- @param self
|
||||
-- @param #mat4_table transA
|
||||
-- @param #mat4_table transB
|
||||
-- @return float#float ret (return value: float)
|
||||
|
||||
--------------------------------
|
||||
-- get motor target velosity
|
||||
-- @function [parent=#Physics3DHingeConstraint] getMotorTargetVelosity
|
||||
-- @param self
|
||||
-- @return float#float ret (return value: float)
|
||||
|
||||
--------------------------------
|
||||
-- get rigid body A's frame offset
|
||||
-- @function [parent=#Physics3DHingeConstraint] getFrameOffsetA
|
||||
-- @param self
|
||||
-- @return mat4_table#mat4_table ret (return value: mat4_table)
|
||||
|
||||
--------------------------------
|
||||
-- get rigid body B's frame offset
|
||||
-- @function [parent=#Physics3DHingeConstraint] getFrameOffsetB
|
||||
-- @param self
|
||||
-- @return mat4_table#mat4_table ret (return value: mat4_table)
|
||||
|
||||
--------------------------------
|
||||
-- set max motor impulse
|
||||
-- @function [parent=#Physics3DHingeConstraint] setMaxMotorImpulse
|
||||
-- @param self
|
||||
-- @param #float maxMotorImpulse
|
||||
-- @return Physics3DHingeConstraint#Physics3DHingeConstraint self (return value: cc.Physics3DHingeConstraint)
|
||||
|
||||
--------------------------------
|
||||
-- enable angular motor
|
||||
-- @function [parent=#Physics3DHingeConstraint] enableAngularMotor
|
||||
-- @param self
|
||||
-- @param #bool enableMotor
|
||||
-- @param #float targetVelocity
|
||||
-- @param #float maxMotorImpulse
|
||||
-- @return Physics3DHingeConstraint#Physics3DHingeConstraint self (return value: cc.Physics3DHingeConstraint)
|
||||
|
||||
--------------------------------
|
||||
-- get upper limit
|
||||
-- @function [parent=#Physics3DHingeConstraint] getUpperLimit
|
||||
-- @param self
|
||||
-- @return float#float ret (return value: float)
|
||||
|
||||
--------------------------------
|
||||
-- get max motor impulse
|
||||
-- @function [parent=#Physics3DHingeConstraint] getMaxMotorImpulse
|
||||
-- @param self
|
||||
-- @return float#float ret (return value: float)
|
||||
|
||||
--------------------------------
|
||||
-- get lower limit
|
||||
-- @function [parent=#Physics3DHingeConstraint] getLowerLimit
|
||||
-- @param self
|
||||
-- @return float#float ret (return value: float)
|
||||
|
||||
--------------------------------
|
||||
-- set use frame offset
|
||||
-- @function [parent=#Physics3DHingeConstraint] setUseFrameOffset
|
||||
-- @param self
|
||||
-- @param #bool frameOffsetOnOff
|
||||
-- @return Physics3DHingeConstraint#Physics3DHingeConstraint self (return value: cc.Physics3DHingeConstraint)
|
||||
|
||||
--------------------------------
|
||||
-- get enable angular motor
|
||||
-- @function [parent=#Physics3DHingeConstraint] getEnableAngularMotor
|
||||
-- @param self
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Physics3DHingeConstraint] enableMotor
|
||||
-- @param self
|
||||
-- @param #bool enableMotor
|
||||
-- @return Physics3DHingeConstraint#Physics3DHingeConstraint self (return value: cc.Physics3DHingeConstraint)
|
||||
|
||||
--------------------------------
|
||||
-- get B's frame
|
||||
-- @function [parent=#Physics3DHingeConstraint] getBFrame
|
||||
-- @param self
|
||||
-- @return mat4_table#mat4_table ret (return value: mat4_table)
|
||||
|
||||
--------------------------------
|
||||
-- set frames for rigid body A and B
|
||||
-- @function [parent=#Physics3DHingeConstraint] setFrames
|
||||
-- @param self
|
||||
-- @param #mat4_table frameA
|
||||
-- @param #mat4_table frameB
|
||||
-- @return Physics3DHingeConstraint#Physics3DHingeConstraint self (return value: cc.Physics3DHingeConstraint)
|
||||
|
||||
--------------------------------
|
||||
-- access for UseFrameOffset
|
||||
-- @function [parent=#Physics3DHingeConstraint] getUseFrameOffset
|
||||
-- @param self
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
-- set angular only
|
||||
-- @function [parent=#Physics3DHingeConstraint] setAngularOnly
|
||||
-- @param self
|
||||
-- @param #bool angularOnly
|
||||
-- @return Physics3DHingeConstraint#Physics3DHingeConstraint self (return value: cc.Physics3DHingeConstraint)
|
||||
|
||||
--------------------------------
|
||||
-- set limit
|
||||
-- @function [parent=#Physics3DHingeConstraint] setLimit
|
||||
-- @param self
|
||||
-- @param #float low
|
||||
-- @param #float high
|
||||
-- @param #float _softness
|
||||
-- @param #float _biasFactor
|
||||
-- @param #float _relaxationFactor
|
||||
-- @return Physics3DHingeConstraint#Physics3DHingeConstraint self (return value: cc.Physics3DHingeConstraint)
|
||||
|
||||
--------------------------------
|
||||
-- get angular only
|
||||
-- @function [parent=#Physics3DHingeConstraint] getAngularOnly
|
||||
-- @param self
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
-- set axis
|
||||
-- @function [parent=#Physics3DHingeConstraint] setAxis
|
||||
-- @param self
|
||||
-- @param #vec3_table axisInA
|
||||
-- @return Physics3DHingeConstraint#Physics3DHingeConstraint self (return value: cc.Physics3DHingeConstraint)
|
||||
|
||||
--------------------------------
|
||||
-- get A's frame
|
||||
-- @function [parent=#Physics3DHingeConstraint] getAFrame
|
||||
-- @param self
|
||||
-- @return mat4_table#mat4_table ret (return value: mat4_table)
|
||||
|
||||
--------------------------------
|
||||
-- @overload self, cc.Physics3DRigidBody, vec3_table, vec3_table, bool
|
||||
-- @overload self, cc.Physics3DRigidBody, mat4_table, bool
|
||||
-- @overload self, cc.Physics3DRigidBody, cc.Physics3DRigidBody, vec3_table, vec3_table, vec3_table, vec3_table, bool
|
||||
-- @overload self, cc.Physics3DRigidBody, cc.Physics3DRigidBody, mat4_table, mat4_table, bool
|
||||
-- @function [parent=#Physics3DHingeConstraint] create
|
||||
-- @param self
|
||||
-- @param #cc.Physics3DRigidBody rbA
|
||||
-- @param #cc.Physics3DRigidBody rbB
|
||||
-- @param #vec3_table pivotInA
|
||||
-- @param #vec3_table pivotInB
|
||||
-- @param #vec3_table axisInA
|
||||
-- @param #vec3_table axisInB
|
||||
-- @param #bool useReferenceFrameA
|
||||
-- @return Physics3DHingeConstraint#Physics3DHingeConstraint ret (return value: cc.Physics3DHingeConstraint)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Physics3DHingeConstraint] Physics3DHingeConstraint
|
||||
-- @param self
|
||||
-- @return Physics3DHingeConstraint#Physics3DHingeConstraint self (return value: cc.Physics3DHingeConstraint)
|
||||
|
||||
return nil
|
|
@ -0,0 +1,70 @@
|
|||
|
||||
--------------------------------
|
||||
-- @module Physics3DObject
|
||||
-- @extend Ref
|
||||
-- @parent_module cc
|
||||
|
||||
--------------------------------
|
||||
-- Set the user data.
|
||||
-- @function [parent=#Physics3DObject] setUserData
|
||||
-- @param self
|
||||
-- @param #void userData
|
||||
-- @return Physics3DObject#Physics3DObject self (return value: cc.Physics3DObject)
|
||||
|
||||
--------------------------------
|
||||
-- Get the user data.
|
||||
-- @function [parent=#Physics3DObject] getUserData
|
||||
-- @param self
|
||||
-- @return void#void ret (return value: void)
|
||||
|
||||
--------------------------------
|
||||
-- Get the Physics3DObject Type.
|
||||
-- @function [parent=#Physics3DObject] getObjType
|
||||
-- @param self
|
||||
-- @return int#int ret (return value: int)
|
||||
|
||||
--------------------------------
|
||||
-- Internal method. Set the pointer of Physics3DWorld.
|
||||
-- @function [parent=#Physics3DObject] setPhysicsWorld
|
||||
-- @param self
|
||||
-- @param #cc.Physics3DWorld world
|
||||
-- @return Physics3DObject#Physics3DObject self (return value: cc.Physics3DObject)
|
||||
|
||||
--------------------------------
|
||||
-- Get the world matrix of Physics3DObject.
|
||||
-- @function [parent=#Physics3DObject] getWorldTransform
|
||||
-- @param self
|
||||
-- @return mat4_table#mat4_table ret (return value: mat4_table)
|
||||
|
||||
--------------------------------
|
||||
-- Get the pointer of Physics3DWorld.
|
||||
-- @function [parent=#Physics3DObject] getPhysicsWorld
|
||||
-- @param self
|
||||
-- @return Physics3DWorld#Physics3DWorld ret (return value: cc.Physics3DWorld)
|
||||
|
||||
--------------------------------
|
||||
-- Set the mask of Physics3DObject.
|
||||
-- @function [parent=#Physics3DObject] setMask
|
||||
-- @param self
|
||||
-- @param #unsigned int mask
|
||||
-- @return Physics3DObject#Physics3DObject self (return value: cc.Physics3DObject)
|
||||
|
||||
--------------------------------
|
||||
-- Get the collision callback function.
|
||||
-- @function [parent=#Physics3DObject] getCollisionCallback
|
||||
-- @param self
|
||||
-- @return function#function ret (return value: function)
|
||||
|
||||
--------------------------------
|
||||
-- Get the mask of Physics3DObject.
|
||||
-- @function [parent=#Physics3DObject] getMask
|
||||
-- @param self
|
||||
-- @return unsigned int#unsigned int ret (return value: unsigned int)
|
||||
|
||||
--------------------------------
|
||||
-- Check has collision callback function.
|
||||
-- @function [parent=#Physics3DObject] needCollisionCallback
|
||||
-- @param self
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
return nil
|
|
@ -0,0 +1,50 @@
|
|||
|
||||
--------------------------------
|
||||
-- @module Physics3DPointToPointConstraint
|
||||
-- @extend Physics3DConstraint
|
||||
-- @parent_module cc
|
||||
|
||||
--------------------------------
|
||||
-- get pivot point in A's local space
|
||||
-- @function [parent=#Physics3DPointToPointConstraint] getPivotPointInA
|
||||
-- @param self
|
||||
-- @return vec3_table#vec3_table ret (return value: vec3_table)
|
||||
|
||||
--------------------------------
|
||||
-- get pivot point in B's local space
|
||||
-- @function [parent=#Physics3DPointToPointConstraint] getPivotPointInB
|
||||
-- @param self
|
||||
-- @return vec3_table#vec3_table ret (return value: vec3_table)
|
||||
|
||||
--------------------------------
|
||||
-- set pivot point in A's local space
|
||||
-- @function [parent=#Physics3DPointToPointConstraint] setPivotPointInA
|
||||
-- @param self
|
||||
-- @param #vec3_table pivotA
|
||||
-- @return Physics3DPointToPointConstraint#Physics3DPointToPointConstraint self (return value: cc.Physics3DPointToPointConstraint)
|
||||
|
||||
--------------------------------
|
||||
-- set pivot point in B's local space
|
||||
-- @function [parent=#Physics3DPointToPointConstraint] setPivotPointInB
|
||||
-- @param self
|
||||
-- @param #vec3_table pivotB
|
||||
-- @return Physics3DPointToPointConstraint#Physics3DPointToPointConstraint self (return value: cc.Physics3DPointToPointConstraint)
|
||||
|
||||
--------------------------------
|
||||
-- @overload self, cc.Physics3DRigidBody, cc.Physics3DRigidBody, vec3_table, vec3_table
|
||||
-- @overload self, cc.Physics3DRigidBody, vec3_table
|
||||
-- @function [parent=#Physics3DPointToPointConstraint] create
|
||||
-- @param self
|
||||
-- @param #cc.Physics3DRigidBody rbA
|
||||
-- @param #cc.Physics3DRigidBody rbB
|
||||
-- @param #vec3_table pivotPointInA
|
||||
-- @param #vec3_table pivotPointInB
|
||||
-- @return Physics3DPointToPointConstraint#Physics3DPointToPointConstraint ret (return value: cc.Physics3DPointToPointConstraint)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Physics3DPointToPointConstraint] Physics3DPointToPointConstraint
|
||||
-- @param self
|
||||
-- @return Physics3DPointToPointConstraint#Physics3DPointToPointConstraint self (return value: cc.Physics3DPointToPointConstraint)
|
||||
|
||||
return nil
|
|
@ -0,0 +1,355 @@
|
|||
|
||||
--------------------------------
|
||||
-- @module Physics3DRigidBody
|
||||
-- @extend Physics3DObject
|
||||
-- @parent_module cc
|
||||
|
||||
--------------------------------
|
||||
-- Set the acceleration.
|
||||
-- @function [parent=#Physics3DRigidBody] setGravity
|
||||
-- @param self
|
||||
-- @param #vec3_table acceleration
|
||||
-- @return Physics3DRigidBody#Physics3DRigidBody self (return value: cc.Physics3DRigidBody)
|
||||
|
||||
--------------------------------
|
||||
-- Get friction.
|
||||
-- @function [parent=#Physics3DRigidBody] getFriction
|
||||
-- @param self
|
||||
-- @return float#float ret (return value: float)
|
||||
|
||||
--------------------------------
|
||||
-- @overload self, float
|
||||
-- @overload self, vec3_table
|
||||
-- @function [parent=#Physics3DRigidBody] setAngularFactor
|
||||
-- @param self
|
||||
-- @param #vec3_table angFac
|
||||
-- @return Physics3DRigidBody#Physics3DRigidBody self (return value: cc.Physics3DRigidBody)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Physics3DRigidBody] addConstraint
|
||||
-- @param self
|
||||
-- @param #cc.Physics3DConstraint constraint
|
||||
-- @return Physics3DRigidBody#Physics3DRigidBody self (return value: cc.Physics3DRigidBody)
|
||||
|
||||
--------------------------------
|
||||
-- Get the pointer of btRigidBody.
|
||||
-- @function [parent=#Physics3DRigidBody] getRigidBody
|
||||
-- @param self
|
||||
-- @return btRigidBody#btRigidBody ret (return value: btRigidBody)
|
||||
|
||||
--------------------------------
|
||||
-- Get total force.
|
||||
-- @function [parent=#Physics3DRigidBody] getTotalForce
|
||||
-- @param self
|
||||
-- @return vec3_table#vec3_table ret (return value: vec3_table)
|
||||
|
||||
--------------------------------
|
||||
-- Get the total number of constraints.
|
||||
-- @function [parent=#Physics3DRigidBody] getConstraintCount
|
||||
-- @param self
|
||||
-- @return unsigned int#unsigned int ret (return value: unsigned int)
|
||||
|
||||
--------------------------------
|
||||
-- Apply a central force.<br>
|
||||
-- param force the value of the force
|
||||
-- @function [parent=#Physics3DRigidBody] applyCentralForce
|
||||
-- @param self
|
||||
-- @param #vec3_table force
|
||||
-- @return Physics3DRigidBody#Physics3DRigidBody self (return value: cc.Physics3DRigidBody)
|
||||
|
||||
--------------------------------
|
||||
-- Set mass and inertia.
|
||||
-- @function [parent=#Physics3DRigidBody] setMassProps
|
||||
-- @param self
|
||||
-- @param #float mass
|
||||
-- @param #vec3_table inertia
|
||||
-- @return Physics3DRigidBody#Physics3DRigidBody self (return value: cc.Physics3DRigidBody)
|
||||
|
||||
--------------------------------
|
||||
-- Set friction.
|
||||
-- @function [parent=#Physics3DRigidBody] setFriction
|
||||
-- @param self
|
||||
-- @param #float frict
|
||||
-- @return Physics3DRigidBody#Physics3DRigidBody self (return value: cc.Physics3DRigidBody)
|
||||
|
||||
--------------------------------
|
||||
-- Set kinematic object.
|
||||
-- @function [parent=#Physics3DRigidBody] setKinematic
|
||||
-- @param self
|
||||
-- @param #bool kinematic
|
||||
-- @return Physics3DRigidBody#Physics3DRigidBody self (return value: cc.Physics3DRigidBody)
|
||||
|
||||
--------------------------------
|
||||
-- Set linear damping and angular damping.
|
||||
-- @function [parent=#Physics3DRigidBody] setDamping
|
||||
-- @param self
|
||||
-- @param #float lin_damping
|
||||
-- @param #float ang_damping
|
||||
-- @return Physics3DRigidBody#Physics3DRigidBody self (return value: cc.Physics3DRigidBody)
|
||||
|
||||
--------------------------------
|
||||
-- Apply a impulse.<br>
|
||||
-- param impulse the value of the impulse<br>
|
||||
-- param rel_pos the position of the impulse
|
||||
-- @function [parent=#Physics3DRigidBody] applyImpulse
|
||||
-- @param self
|
||||
-- @param #vec3_table impulse
|
||||
-- @param #vec3_table rel_pos
|
||||
-- @return Physics3DRigidBody#Physics3DRigidBody self (return value: cc.Physics3DRigidBody)
|
||||
|
||||
--------------------------------
|
||||
-- Check rigid body is kinematic object.
|
||||
-- @function [parent=#Physics3DRigidBody] isKinematic
|
||||
-- @param self
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
-- Apply a torque.<br>
|
||||
-- param torque the value of the torque
|
||||
-- @function [parent=#Physics3DRigidBody] applyTorque
|
||||
-- @param self
|
||||
-- @param #vec3_table torque
|
||||
-- @return Physics3DRigidBody#Physics3DRigidBody self (return value: cc.Physics3DRigidBody)
|
||||
|
||||
--------------------------------
|
||||
-- Set motion threshold, don't do continuous collision detection if the motion (in one step) is less then ccdMotionThreshold
|
||||
-- @function [parent=#Physics3DRigidBody] setCcdMotionThreshold
|
||||
-- @param self
|
||||
-- @param #float ccdMotionThreshold
|
||||
-- @return Physics3DRigidBody#Physics3DRigidBody self (return value: cc.Physics3DRigidBody)
|
||||
|
||||
--------------------------------
|
||||
-- Set rolling friction.
|
||||
-- @function [parent=#Physics3DRigidBody] setRollingFriction
|
||||
-- @param self
|
||||
-- @param #float frict
|
||||
-- @return Physics3DRigidBody#Physics3DRigidBody self (return value: cc.Physics3DRigidBody)
|
||||
|
||||
--------------------------------
|
||||
-- Get motion threshold.
|
||||
-- @function [parent=#Physics3DRigidBody] getCcdMotionThreshold
|
||||
-- @param self
|
||||
-- @return float#float ret (return value: float)
|
||||
|
||||
--------------------------------
|
||||
-- Get the linear factor.
|
||||
-- @function [parent=#Physics3DRigidBody] getLinearFactor
|
||||
-- @param self
|
||||
-- @return vec3_table#vec3_table ret (return value: vec3_table)
|
||||
|
||||
--------------------------------
|
||||
-- Damps the velocity, using the given linearDamping and angularDamping.
|
||||
-- @function [parent=#Physics3DRigidBody] applyDamping
|
||||
-- @param self
|
||||
-- @param #float timeStep
|
||||
-- @return Physics3DRigidBody#Physics3DRigidBody self (return value: cc.Physics3DRigidBody)
|
||||
|
||||
--------------------------------
|
||||
-- Get the angular velocity.
|
||||
-- @function [parent=#Physics3DRigidBody] getAngularVelocity
|
||||
-- @param self
|
||||
-- @return vec3_table#vec3_table ret (return value: vec3_table)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Physics3DRigidBody] init
|
||||
-- @param self
|
||||
-- @param #cc.Physics3DRigidBodyDes info
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
-- Apply a torque impulse.<br>
|
||||
-- param torque the value of the torque
|
||||
-- @function [parent=#Physics3DRigidBody] applyTorqueImpulse
|
||||
-- @param self
|
||||
-- @param #vec3_table torque
|
||||
-- @return Physics3DRigidBody#Physics3DRigidBody self (return value: cc.Physics3DRigidBody)
|
||||
|
||||
--------------------------------
|
||||
-- Active or inactive.
|
||||
-- @function [parent=#Physics3DRigidBody] setActive
|
||||
-- @param self
|
||||
-- @param #bool active
|
||||
-- @return Physics3DRigidBody#Physics3DRigidBody self (return value: cc.Physics3DRigidBody)
|
||||
|
||||
--------------------------------
|
||||
-- Set the linear factor.
|
||||
-- @function [parent=#Physics3DRigidBody] setLinearFactor
|
||||
-- @param self
|
||||
-- @param #vec3_table linearFactor
|
||||
-- @return Physics3DRigidBody#Physics3DRigidBody self (return value: cc.Physics3DRigidBody)
|
||||
|
||||
--------------------------------
|
||||
-- Set the linear velocity.
|
||||
-- @function [parent=#Physics3DRigidBody] setLinearVelocity
|
||||
-- @param self
|
||||
-- @param #vec3_table lin_vel
|
||||
-- @return Physics3DRigidBody#Physics3DRigidBody self (return value: cc.Physics3DRigidBody)
|
||||
|
||||
--------------------------------
|
||||
-- Get the linear velocity.
|
||||
-- @function [parent=#Physics3DRigidBody] getLinearVelocity
|
||||
-- @param self
|
||||
-- @return vec3_table#vec3_table ret (return value: vec3_table)
|
||||
|
||||
--------------------------------
|
||||
-- Set swept sphere radius.
|
||||
-- @function [parent=#Physics3DRigidBody] setCcdSweptSphereRadius
|
||||
-- @param self
|
||||
-- @param #float radius
|
||||
-- @return Physics3DRigidBody#Physics3DRigidBody self (return value: cc.Physics3DRigidBody)
|
||||
|
||||
--------------------------------
|
||||
-- Apply a force.<br>
|
||||
-- param force the value of the force<br>
|
||||
-- param rel_pos the position of the force
|
||||
-- @function [parent=#Physics3DRigidBody] applyForce
|
||||
-- @param self
|
||||
-- @param #vec3_table force
|
||||
-- @param #vec3_table rel_pos
|
||||
-- @return Physics3DRigidBody#Physics3DRigidBody self (return value: cc.Physics3DRigidBody)
|
||||
|
||||
--------------------------------
|
||||
-- Set the angular velocity.
|
||||
-- @function [parent=#Physics3DRigidBody] setAngularVelocity
|
||||
-- @param self
|
||||
-- @param #vec3_table ang_vel
|
||||
-- @return Physics3DRigidBody#Physics3DRigidBody self (return value: cc.Physics3DRigidBody)
|
||||
|
||||
--------------------------------
|
||||
-- Apply a central impulse.<br>
|
||||
-- param impulse the value of the impulse
|
||||
-- @function [parent=#Physics3DRigidBody] applyCentralImpulse
|
||||
-- @param self
|
||||
-- @param #vec3_table impulse
|
||||
-- @return Physics3DRigidBody#Physics3DRigidBody self (return value: cc.Physics3DRigidBody)
|
||||
|
||||
--------------------------------
|
||||
-- Get the acceleration.
|
||||
-- @function [parent=#Physics3DRigidBody] getGravity
|
||||
-- @param self
|
||||
-- @return vec3_table#vec3_table ret (return value: vec3_table)
|
||||
|
||||
--------------------------------
|
||||
-- Get rolling friction.
|
||||
-- @function [parent=#Physics3DRigidBody] getRollingFriction
|
||||
-- @param self
|
||||
-- @return float#float ret (return value: float)
|
||||
|
||||
--------------------------------
|
||||
-- Set the center of mass.
|
||||
-- @function [parent=#Physics3DRigidBody] setCenterOfMassTransform
|
||||
-- @param self
|
||||
-- @param #mat4_table xform
|
||||
-- @return Physics3DRigidBody#Physics3DRigidBody self (return value: cc.Physics3DRigidBody)
|
||||
|
||||
--------------------------------
|
||||
-- Set the inverse of local inertia.
|
||||
-- @function [parent=#Physics3DRigidBody] setInvInertiaDiagLocal
|
||||
-- @param self
|
||||
-- @param #vec3_table diagInvInertia
|
||||
-- @return Physics3DRigidBody#Physics3DRigidBody self (return value: cc.Physics3DRigidBody)
|
||||
|
||||
--------------------------------
|
||||
-- @overload self, unsigned int
|
||||
-- @overload self, cc.Physics3DConstraint
|
||||
-- @function [parent=#Physics3DRigidBody] removeConstraint
|
||||
-- @param self
|
||||
-- @param #cc.Physics3DConstraint constraint
|
||||
-- @return Physics3DRigidBody#Physics3DRigidBody self (return value: cc.Physics3DRigidBody)
|
||||
|
||||
--------------------------------
|
||||
-- Get total torque.
|
||||
-- @function [parent=#Physics3DRigidBody] getTotalTorque
|
||||
-- @param self
|
||||
-- @return vec3_table#vec3_table ret (return value: vec3_table)
|
||||
|
||||
--------------------------------
|
||||
-- Get inverse of mass.
|
||||
-- @function [parent=#Physics3DRigidBody] getInvMass
|
||||
-- @param self
|
||||
-- @return float#float ret (return value: float)
|
||||
|
||||
--------------------------------
|
||||
-- Get constraint by index.
|
||||
-- @function [parent=#Physics3DRigidBody] getConstraint
|
||||
-- @param self
|
||||
-- @param #unsigned int idx
|
||||
-- @return Physics3DConstraint#Physics3DConstraint ret (return value: cc.Physics3DConstraint)
|
||||
|
||||
--------------------------------
|
||||
-- Get restitution.
|
||||
-- @function [parent=#Physics3DRigidBody] getRestitution
|
||||
-- @param self
|
||||
-- @return float#float ret (return value: float)
|
||||
|
||||
--------------------------------
|
||||
-- Get swept sphere radius.
|
||||
-- @function [parent=#Physics3DRigidBody] getCcdSweptSphereRadius
|
||||
-- @param self
|
||||
-- @return float#float ret (return value: float)
|
||||
|
||||
--------------------------------
|
||||
-- Get hit friction.
|
||||
-- @function [parent=#Physics3DRigidBody] getHitFraction
|
||||
-- @param self
|
||||
-- @return float#float ret (return value: float)
|
||||
|
||||
--------------------------------
|
||||
-- Get angular damping.
|
||||
-- @function [parent=#Physics3DRigidBody] getAngularDamping
|
||||
-- @param self
|
||||
-- @return float#float ret (return value: float)
|
||||
|
||||
--------------------------------
|
||||
-- Get the inverse of local inertia.
|
||||
-- @function [parent=#Physics3DRigidBody] getInvInertiaDiagLocal
|
||||
-- @param self
|
||||
-- @return vec3_table#vec3_table ret (return value: vec3_table)
|
||||
|
||||
--------------------------------
|
||||
-- Get the center of mass.
|
||||
-- @function [parent=#Physics3DRigidBody] getCenterOfMassTransform
|
||||
-- @param self
|
||||
-- @return mat4_table#mat4_table ret (return value: mat4_table)
|
||||
|
||||
--------------------------------
|
||||
-- Get the angular factor.
|
||||
-- @function [parent=#Physics3DRigidBody] getAngularFactor
|
||||
-- @param self
|
||||
-- @return vec3_table#vec3_table ret (return value: vec3_table)
|
||||
|
||||
--------------------------------
|
||||
-- Set restitution.
|
||||
-- @function [parent=#Physics3DRigidBody] setRestitution
|
||||
-- @param self
|
||||
-- @param #float rest
|
||||
-- @return Physics3DRigidBody#Physics3DRigidBody self (return value: cc.Physics3DRigidBody)
|
||||
|
||||
--------------------------------
|
||||
-- Set hit friction.
|
||||
-- @function [parent=#Physics3DRigidBody] setHitFraction
|
||||
-- @param self
|
||||
-- @param #float hitFraction
|
||||
-- @return Physics3DRigidBody#Physics3DRigidBody self (return value: cc.Physics3DRigidBody)
|
||||
|
||||
--------------------------------
|
||||
-- Get linear damping.
|
||||
-- @function [parent=#Physics3DRigidBody] getLinearDamping
|
||||
-- @param self
|
||||
-- @return float#float ret (return value: float)
|
||||
|
||||
--------------------------------
|
||||
-- override.
|
||||
-- @function [parent=#Physics3DRigidBody] getWorldTransform
|
||||
-- @param self
|
||||
-- @return mat4_table#mat4_table ret (return value: mat4_table)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Physics3DRigidBody] Physics3DRigidBody
|
||||
-- @param self
|
||||
-- @return Physics3DRigidBody#Physics3DRigidBody self (return value: cc.Physics3DRigidBody)
|
||||
|
||||
return nil
|
|
@ -0,0 +1,65 @@
|
|||
|
||||
--------------------------------
|
||||
-- @module Physics3DShape
|
||||
-- @extend Ref
|
||||
-- @parent_module cc
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Physics3DShape] getbtShape
|
||||
-- @param self
|
||||
-- @return btCollisionShape#btCollisionShape ret (return value: btCollisionShape)
|
||||
|
||||
--------------------------------
|
||||
-- get shape type
|
||||
-- @function [parent=#Physics3DShape] getShapeType
|
||||
-- @param self
|
||||
-- @return int#int ret (return value: int)
|
||||
|
||||
--------------------------------
|
||||
-- create box shape<br>
|
||||
-- param extent The extent of sphere.
|
||||
-- @function [parent=#Physics3DShape] createBox
|
||||
-- @param self
|
||||
-- @param #vec3_table extent
|
||||
-- @return Physics3DShape#Physics3DShape ret (return value: cc.Physics3DShape)
|
||||
|
||||
--------------------------------
|
||||
-- create cylinder shape<br>
|
||||
-- param radius The radius of cylinder.<br>
|
||||
-- param height The height.
|
||||
-- @function [parent=#Physics3DShape] createCylinder
|
||||
-- @param self
|
||||
-- @param #float radius
|
||||
-- @param #float height
|
||||
-- @return Physics3DShape#Physics3DShape ret (return value: cc.Physics3DShape)
|
||||
|
||||
--------------------------------
|
||||
-- create convex hull<br>
|
||||
-- param points The vertices of convex hull<br>
|
||||
-- param numPoints The number of vertices.
|
||||
-- @function [parent=#Physics3DShape] createConvexHull
|
||||
-- @param self
|
||||
-- @param #vec3_table points
|
||||
-- @param #int numPoints
|
||||
-- @return Physics3DShape#Physics3DShape ret (return value: cc.Physics3DShape)
|
||||
|
||||
--------------------------------
|
||||
-- create capsule shape<br>
|
||||
-- param radius The radius of casule.<br>
|
||||
-- param height The height (cylinder part).
|
||||
-- @function [parent=#Physics3DShape] createCapsule
|
||||
-- @param self
|
||||
-- @param #float radius
|
||||
-- @param #float height
|
||||
-- @return Physics3DShape#Physics3DShape ret (return value: cc.Physics3DShape)
|
||||
|
||||
--------------------------------
|
||||
-- create sphere shape<br>
|
||||
-- param radius The radius of sphere.
|
||||
-- @function [parent=#Physics3DShape] createSphere
|
||||
-- @param self
|
||||
-- @param #float radius
|
||||
-- @return Physics3DShape#Physics3DShape ret (return value: cc.Physics3DShape)
|
||||
|
||||
return nil
|
|
@ -0,0 +1,444 @@
|
|||
|
||||
--------------------------------
|
||||
-- @module Physics3DSliderConstraint
|
||||
-- @extend Physics3DConstraint
|
||||
-- @parent_module cc
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Physics3DSliderConstraint] setPoweredAngMotor
|
||||
-- @param self
|
||||
-- @param #bool onOff
|
||||
-- @return Physics3DSliderConstraint#Physics3DSliderConstraint self (return value: cc.Physics3DSliderConstraint)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Physics3DSliderConstraint] getDampingLimAng
|
||||
-- @param self
|
||||
-- @return float#float ret (return value: float)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Physics3DSliderConstraint] setRestitutionOrthoLin
|
||||
-- @param self
|
||||
-- @param #float restitutionOrthoLin
|
||||
-- @return Physics3DSliderConstraint#Physics3DSliderConstraint self (return value: cc.Physics3DSliderConstraint)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Physics3DSliderConstraint] setRestitutionDirLin
|
||||
-- @param self
|
||||
-- @param #float restitutionDirLin
|
||||
-- @return Physics3DSliderConstraint#Physics3DSliderConstraint self (return value: cc.Physics3DSliderConstraint)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Physics3DSliderConstraint] getLinearPos
|
||||
-- @param self
|
||||
-- @return float#float ret (return value: float)
|
||||
|
||||
--------------------------------
|
||||
-- get A's frame offset
|
||||
-- @function [parent=#Physics3DSliderConstraint] getFrameOffsetA
|
||||
-- @param self
|
||||
-- @return mat4_table#mat4_table ret (return value: mat4_table)
|
||||
|
||||
--------------------------------
|
||||
-- get B's frame offset
|
||||
-- @function [parent=#Physics3DSliderConstraint] getFrameOffsetB
|
||||
-- @param self
|
||||
-- @return mat4_table#mat4_table ret (return value: mat4_table)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Physics3DSliderConstraint] setPoweredLinMotor
|
||||
-- @param self
|
||||
-- @param #bool onOff
|
||||
-- @return Physics3DSliderConstraint#Physics3DSliderConstraint self (return value: cc.Physics3DSliderConstraint)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Physics3DSliderConstraint] getDampingDirAng
|
||||
-- @param self
|
||||
-- @return float#float ret (return value: float)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Physics3DSliderConstraint] getRestitutionLimLin
|
||||
-- @param self
|
||||
-- @return float#float ret (return value: float)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Physics3DSliderConstraint] getSoftnessOrthoAng
|
||||
-- @param self
|
||||
-- @return float#float ret (return value: float)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Physics3DSliderConstraint] setSoftnessOrthoLin
|
||||
-- @param self
|
||||
-- @param #float softnessOrthoLin
|
||||
-- @return Physics3DSliderConstraint#Physics3DSliderConstraint self (return value: cc.Physics3DSliderConstraint)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Physics3DSliderConstraint] setSoftnessLimLin
|
||||
-- @param self
|
||||
-- @param #float softnessLimLin
|
||||
-- @return Physics3DSliderConstraint#Physics3DSliderConstraint self (return value: cc.Physics3DSliderConstraint)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Physics3DSliderConstraint] getAngularPos
|
||||
-- @param self
|
||||
-- @return float#float ret (return value: float)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Physics3DSliderConstraint] setRestitutionLimAng
|
||||
-- @param self
|
||||
-- @param #float restitutionLimAng
|
||||
-- @return Physics3DSliderConstraint#Physics3DSliderConstraint self (return value: cc.Physics3DSliderConstraint)
|
||||
|
||||
--------------------------------
|
||||
-- set upper linear limit
|
||||
-- @function [parent=#Physics3DSliderConstraint] setUpperLinLimit
|
||||
-- @param self
|
||||
-- @param #float upperLimit
|
||||
-- @return Physics3DSliderConstraint#Physics3DSliderConstraint self (return value: cc.Physics3DSliderConstraint)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Physics3DSliderConstraint] setDampingDirLin
|
||||
-- @param self
|
||||
-- @param #float dampingDirLin
|
||||
-- @return Physics3DSliderConstraint#Physics3DSliderConstraint self (return value: cc.Physics3DSliderConstraint)
|
||||
|
||||
--------------------------------
|
||||
-- get upper anglular limit
|
||||
-- @function [parent=#Physics3DSliderConstraint] getUpperAngLimit
|
||||
-- @param self
|
||||
-- @return float#float ret (return value: float)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Physics3DSliderConstraint] getDampingDirLin
|
||||
-- @param self
|
||||
-- @return float#float ret (return value: float)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Physics3DSliderConstraint] getSoftnessDirAng
|
||||
-- @param self
|
||||
-- @return float#float ret (return value: float)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Physics3DSliderConstraint] getPoweredAngMotor
|
||||
-- @param self
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
-- set lower angualr limit
|
||||
-- @function [parent=#Physics3DSliderConstraint] setLowerAngLimit
|
||||
-- @param self
|
||||
-- @param #float lowerLimit
|
||||
-- @return Physics3DSliderConstraint#Physics3DSliderConstraint self (return value: cc.Physics3DSliderConstraint)
|
||||
|
||||
--------------------------------
|
||||
-- set upper anglular limit
|
||||
-- @function [parent=#Physics3DSliderConstraint] setUpperAngLimit
|
||||
-- @param self
|
||||
-- @param #float upperLimit
|
||||
-- @return Physics3DSliderConstraint#Physics3DSliderConstraint self (return value: cc.Physics3DSliderConstraint)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Physics3DSliderConstraint] setTargetLinMotorVelocity
|
||||
-- @param self
|
||||
-- @param #float targetLinMotorVelocity
|
||||
-- @return Physics3DSliderConstraint#Physics3DSliderConstraint self (return value: cc.Physics3DSliderConstraint)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Physics3DSliderConstraint] setDampingLimAng
|
||||
-- @param self
|
||||
-- @param #float dampingLimAng
|
||||
-- @return Physics3DSliderConstraint#Physics3DSliderConstraint self (return value: cc.Physics3DSliderConstraint)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Physics3DSliderConstraint] getRestitutionLimAng
|
||||
-- @param self
|
||||
-- @return float#float ret (return value: float)
|
||||
|
||||
--------------------------------
|
||||
-- access for UseFrameOffset
|
||||
-- @function [parent=#Physics3DSliderConstraint] getUseFrameOffset
|
||||
-- @param self
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Physics3DSliderConstraint] getSoftnessOrthoLin
|
||||
-- @param self
|
||||
-- @return float#float ret (return value: float)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Physics3DSliderConstraint] getDampingOrthoAng
|
||||
-- @param self
|
||||
-- @return float#float ret (return value: float)
|
||||
|
||||
--------------------------------
|
||||
-- set use frame offset
|
||||
-- @function [parent=#Physics3DSliderConstraint] setUseFrameOffset
|
||||
-- @param self
|
||||
-- @param #bool frameOffsetOnOff
|
||||
-- @return Physics3DSliderConstraint#Physics3DSliderConstraint self (return value: cc.Physics3DSliderConstraint)
|
||||
|
||||
--------------------------------
|
||||
-- set lower linear limit
|
||||
-- @function [parent=#Physics3DSliderConstraint] setLowerLinLimit
|
||||
-- @param self
|
||||
-- @param #float lowerLimit
|
||||
-- @return Physics3DSliderConstraint#Physics3DSliderConstraint self (return value: cc.Physics3DSliderConstraint)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Physics3DSliderConstraint] getRestitutionDirLin
|
||||
-- @param self
|
||||
-- @return float#float ret (return value: float)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Physics3DSliderConstraint] getTargetLinMotorVelocity
|
||||
-- @param self
|
||||
-- @return float#float ret (return value: float)
|
||||
|
||||
--------------------------------
|
||||
-- get lower linear limit
|
||||
-- @function [parent=#Physics3DSliderConstraint] getLowerLinLimit
|
||||
-- @param self
|
||||
-- @return float#float ret (return value: float)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Physics3DSliderConstraint] getSoftnessLimLin
|
||||
-- @param self
|
||||
-- @return float#float ret (return value: float)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Physics3DSliderConstraint] setDampingOrthoAng
|
||||
-- @param self
|
||||
-- @param #float dampingOrthoAng
|
||||
-- @return Physics3DSliderConstraint#Physics3DSliderConstraint self (return value: cc.Physics3DSliderConstraint)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Physics3DSliderConstraint] setSoftnessDirAng
|
||||
-- @param self
|
||||
-- @param #float softnessDirAng
|
||||
-- @return Physics3DSliderConstraint#Physics3DSliderConstraint self (return value: cc.Physics3DSliderConstraint)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Physics3DSliderConstraint] getPoweredLinMotor
|
||||
-- @param self
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Physics3DSliderConstraint] setRestitutionOrthoAng
|
||||
-- @param self
|
||||
-- @param #float restitutionOrthoAng
|
||||
-- @return Physics3DSliderConstraint#Physics3DSliderConstraint self (return value: cc.Physics3DSliderConstraint)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Physics3DSliderConstraint] setDampingDirAng
|
||||
-- @param self
|
||||
-- @param #float dampingDirAng
|
||||
-- @return Physics3DSliderConstraint#Physics3DSliderConstraint self (return value: cc.Physics3DSliderConstraint)
|
||||
|
||||
--------------------------------
|
||||
-- set frames for rigid body A and B
|
||||
-- @function [parent=#Physics3DSliderConstraint] setFrames
|
||||
-- @param self
|
||||
-- @param #mat4_table frameA
|
||||
-- @param #mat4_table frameB
|
||||
-- @return Physics3DSliderConstraint#Physics3DSliderConstraint self (return value: cc.Physics3DSliderConstraint)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Physics3DSliderConstraint] getRestitutionOrthoAng
|
||||
-- @param self
|
||||
-- @return float#float ret (return value: float)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Physics3DSliderConstraint] getMaxAngMotorForce
|
||||
-- @param self
|
||||
-- @return float#float ret (return value: float)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Physics3DSliderConstraint] getDampingOrthoLin
|
||||
-- @param self
|
||||
-- @return float#float ret (return value: float)
|
||||
|
||||
--------------------------------
|
||||
-- get upper linear limit
|
||||
-- @function [parent=#Physics3DSliderConstraint] getUpperLinLimit
|
||||
-- @param self
|
||||
-- @return float#float ret (return value: float)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Physics3DSliderConstraint] setMaxLinMotorForce
|
||||
-- @param self
|
||||
-- @param #float maxLinMotorForce
|
||||
-- @return Physics3DSliderConstraint#Physics3DSliderConstraint self (return value: cc.Physics3DSliderConstraint)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Physics3DSliderConstraint] getRestitutionOrthoLin
|
||||
-- @param self
|
||||
-- @return float#float ret (return value: float)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Physics3DSliderConstraint] setTargetAngMotorVelocity
|
||||
-- @param self
|
||||
-- @param #float targetAngMotorVelocity
|
||||
-- @return Physics3DSliderConstraint#Physics3DSliderConstraint self (return value: cc.Physics3DSliderConstraint)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Physics3DSliderConstraint] getSoftnessLimAng
|
||||
-- @param self
|
||||
-- @return float#float ret (return value: float)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Physics3DSliderConstraint] setRestitutionDirAng
|
||||
-- @param self
|
||||
-- @param #float restitutionDirAng
|
||||
-- @return Physics3DSliderConstraint#Physics3DSliderConstraint self (return value: cc.Physics3DSliderConstraint)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Physics3DSliderConstraint] getDampingLimLin
|
||||
-- @param self
|
||||
-- @return float#float ret (return value: float)
|
||||
|
||||
--------------------------------
|
||||
-- get lower angular limit
|
||||
-- @function [parent=#Physics3DSliderConstraint] getLowerAngLimit
|
||||
-- @param self
|
||||
-- @return float#float ret (return value: float)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Physics3DSliderConstraint] getRestitutionDirAng
|
||||
-- @param self
|
||||
-- @return float#float ret (return value: float)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Physics3DSliderConstraint] getTargetAngMotorVelocity
|
||||
-- @param self
|
||||
-- @return float#float ret (return value: float)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Physics3DSliderConstraint] setRestitutionLimLin
|
||||
-- @param self
|
||||
-- @param #float restitutionLimLin
|
||||
-- @return Physics3DSliderConstraint#Physics3DSliderConstraint self (return value: cc.Physics3DSliderConstraint)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Physics3DSliderConstraint] getMaxLinMotorForce
|
||||
-- @param self
|
||||
-- @return float#float ret (return value: float)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Physics3DSliderConstraint] setDampingOrthoLin
|
||||
-- @param self
|
||||
-- @param #float dampingOrthoLin
|
||||
-- @return Physics3DSliderConstraint#Physics3DSliderConstraint self (return value: cc.Physics3DSliderConstraint)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Physics3DSliderConstraint] setSoftnessOrthoAng
|
||||
-- @param self
|
||||
-- @param #float softnessOrthoAng
|
||||
-- @return Physics3DSliderConstraint#Physics3DSliderConstraint self (return value: cc.Physics3DSliderConstraint)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Physics3DSliderConstraint] setDampingLimLin
|
||||
-- @param self
|
||||
-- @param #float dampingLimLin
|
||||
-- @return Physics3DSliderConstraint#Physics3DSliderConstraint self (return value: cc.Physics3DSliderConstraint)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Physics3DSliderConstraint] setSoftnessDirLin
|
||||
-- @param self
|
||||
-- @param #float softnessDirLin
|
||||
-- @return Physics3DSliderConstraint#Physics3DSliderConstraint self (return value: cc.Physics3DSliderConstraint)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Physics3DSliderConstraint] setMaxAngMotorForce
|
||||
-- @param self
|
||||
-- @param #float maxAngMotorForce
|
||||
-- @return Physics3DSliderConstraint#Physics3DSliderConstraint self (return value: cc.Physics3DSliderConstraint)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Physics3DSliderConstraint] getSoftnessDirLin
|
||||
-- @param self
|
||||
-- @return float#float ret (return value: float)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Physics3DSliderConstraint] setSoftnessLimAng
|
||||
-- @param self
|
||||
-- @param #float softnessLimAng
|
||||
-- @return Physics3DSliderConstraint#Physics3DSliderConstraint self (return value: cc.Physics3DSliderConstraint)
|
||||
|
||||
--------------------------------
|
||||
-- use A's frame as linear refference
|
||||
-- @function [parent=#Physics3DSliderConstraint] getUseLinearReferenceFrameA
|
||||
-- @param self
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
-- create slider constraint<br>
|
||||
-- param rbA rigid body A<br>
|
||||
-- param rbB rigid body B<br>
|
||||
-- param frameInA frame in A's local space<br>
|
||||
-- param frameInB frame in B's local space<br>
|
||||
-- param useLinearReferenceFrameA use fixed frame A for linear limits
|
||||
-- @function [parent=#Physics3DSliderConstraint] create
|
||||
-- @param self
|
||||
-- @param #cc.Physics3DRigidBody rbA
|
||||
-- @param #cc.Physics3DRigidBody rbB
|
||||
-- @param #mat4_table frameInA
|
||||
-- @param #mat4_table frameInB
|
||||
-- @param #bool useLinearReferenceFrameA
|
||||
-- @return Physics3DSliderConstraint#Physics3DSliderConstraint ret (return value: cc.Physics3DSliderConstraint)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Physics3DSliderConstraint] Physics3DSliderConstraint
|
||||
-- @param self
|
||||
-- @return Physics3DSliderConstraint#Physics3DSliderConstraint self (return value: cc.Physics3DSliderConstraint)
|
||||
|
||||
return nil
|
|
@ -0,0 +1,93 @@
|
|||
|
||||
--------------------------------
|
||||
-- @module Physics3DWorld
|
||||
-- @extend Ref
|
||||
-- @parent_module cc
|
||||
|
||||
--------------------------------
|
||||
-- Simulate one frame.
|
||||
-- @function [parent=#Physics3DWorld] stepSimulate
|
||||
-- @param self
|
||||
-- @param #float dt
|
||||
-- @return Physics3DWorld#Physics3DWorld self (return value: cc.Physics3DWorld)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Physics3DWorld] needCollisionChecking
|
||||
-- @param self
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Physics3DWorld] collisionChecking
|
||||
-- @param self
|
||||
-- @return Physics3DWorld#Physics3DWorld self (return value: cc.Physics3DWorld)
|
||||
|
||||
--------------------------------
|
||||
-- Remove a Physics3DConstraint.
|
||||
-- @function [parent=#Physics3DWorld] removePhysics3DConstraint
|
||||
-- @param self
|
||||
-- @param #cc.Physics3DConstraint constraint
|
||||
-- @return Physics3DWorld#Physics3DWorld self (return value: cc.Physics3DWorld)
|
||||
|
||||
--------------------------------
|
||||
-- Check debug drawing is enabled.
|
||||
-- @function [parent=#Physics3DWorld] isDebugDrawEnabled
|
||||
-- @param self
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
-- Remove all Physics3DConstraint.
|
||||
-- @function [parent=#Physics3DWorld] removeAllPhysics3DConstraints
|
||||
-- @param self
|
||||
-- @return Physics3DWorld#Physics3DWorld self (return value: cc.Physics3DWorld)
|
||||
|
||||
--------------------------------
|
||||
-- Remove all Physics3DObjects.
|
||||
-- @function [parent=#Physics3DWorld] removeAllPhysics3DObjects
|
||||
-- @param self
|
||||
-- @return Physics3DWorld#Physics3DWorld self (return value: cc.Physics3DWorld)
|
||||
|
||||
--------------------------------
|
||||
-- Add a Physics3DObject.
|
||||
-- @function [parent=#Physics3DWorld] addPhysics3DObject
|
||||
-- @param self
|
||||
-- @param #cc.Physics3DObject physicsObj
|
||||
-- @return Physics3DWorld#Physics3DWorld self (return value: cc.Physics3DWorld)
|
||||
|
||||
--------------------------------
|
||||
-- Enable or disable debug drawing.
|
||||
-- @function [parent=#Physics3DWorld] setDebugDrawEnable
|
||||
-- @param self
|
||||
-- @param #bool enableDebugDraw
|
||||
-- @return Physics3DWorld#Physics3DWorld self (return value: cc.Physics3DWorld)
|
||||
|
||||
--------------------------------
|
||||
-- Remove a Physics3DObject.
|
||||
-- @function [parent=#Physics3DWorld] removePhysics3DObject
|
||||
-- @param self
|
||||
-- @param #cc.Physics3DObject physicsObj
|
||||
-- @return Physics3DWorld#Physics3DWorld self (return value: cc.Physics3DWorld)
|
||||
|
||||
--------------------------------
|
||||
-- Add a Physics3DConstraint.
|
||||
-- @function [parent=#Physics3DWorld] addPhysics3DConstraint
|
||||
-- @param self
|
||||
-- @param #cc.Physics3DConstraint constraint
|
||||
-- @param #bool disableCollisionsBetweenLinkedObjs
|
||||
-- @return Physics3DWorld#Physics3DWorld self (return value: cc.Physics3DWorld)
|
||||
|
||||
--------------------------------
|
||||
-- Internal method, the updater of debug drawing, need called each frame.
|
||||
-- @function [parent=#Physics3DWorld] debugDraw
|
||||
-- @param self
|
||||
-- @param #cc.Renderer renderer
|
||||
-- @return Physics3DWorld#Physics3DWorld self (return value: cc.Physics3DWorld)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Physics3DWorld] Physics3DWorld
|
||||
-- @param self
|
||||
-- @return Physics3DWorld#Physics3DWorld self (return value: cc.Physics3DWorld)
|
||||
|
||||
return nil
|
|
@ -0,0 +1,38 @@
|
|||
|
||||
--------------------------------
|
||||
-- @module PhysicsSprite3D
|
||||
-- @extend Sprite3D
|
||||
-- @parent_module cc
|
||||
|
||||
--------------------------------
|
||||
-- Physics synchronize rendering.
|
||||
-- @function [parent=#PhysicsSprite3D] syncToPhysics
|
||||
-- @param self
|
||||
-- @return PhysicsSprite3D#PhysicsSprite3D self (return value: cc.PhysicsSprite3D)
|
||||
|
||||
--------------------------------
|
||||
-- Rendering synchronize physics.
|
||||
-- @function [parent=#PhysicsSprite3D] syncToNode
|
||||
-- @param self
|
||||
-- @return PhysicsSprite3D#PhysicsSprite3D self (return value: cc.PhysicsSprite3D)
|
||||
|
||||
--------------------------------
|
||||
-- Get the Physics3DObject.
|
||||
-- @function [parent=#PhysicsSprite3D] getPhysicsObj
|
||||
-- @param self
|
||||
-- @return Physics3DObject#Physics3DObject ret (return value: cc.Physics3DObject)
|
||||
|
||||
--------------------------------
|
||||
-- Set synchronization flag, see Physics3DComponent.
|
||||
-- @function [parent=#PhysicsSprite3D] setSyncFlag
|
||||
-- @param self
|
||||
-- @param #int syncFlag
|
||||
-- @return PhysicsSprite3D#PhysicsSprite3D self (return value: cc.PhysicsSprite3D)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#PhysicsSprite3D] PhysicsSprite3D
|
||||
-- @param self
|
||||
-- @return PhysicsSprite3D#PhysicsSprite3D self (return value: cc.PhysicsSprite3D)
|
||||
|
||||
return nil
|
|
@ -0,0 +1,307 @@
|
|||
|
||||
--------------------------------
|
||||
-- @module Properties
|
||||
-- @parent_module cc
|
||||
|
||||
--------------------------------
|
||||
-- Returns the value of a variable that is set in this Properties object.<br>
|
||||
-- Variables take on the format ${name} and are inherited from parent Property objects.<br>
|
||||
-- param name Name of the variable to get.<br>
|
||||
-- param defaultValue Value to return if the variable is not found.<br>
|
||||
-- return The value of the specified variable, or defaultValue if not found.
|
||||
-- @function [parent=#Properties] getVariable
|
||||
-- @param self
|
||||
-- @param #char name
|
||||
-- @param #char defaultValue
|
||||
-- @return char#char ret (return value: char)
|
||||
|
||||
--------------------------------
|
||||
-- Get the value of the given property as a string. This can always be retrieved,<br>
|
||||
-- whatever the intended type of the property.<br>
|
||||
-- param name The name of the property to interpret, or NULL to return the current property's value.<br>
|
||||
-- param defaultValue The default value to return if the specified property does not exist.<br>
|
||||
-- return The value of the given property as a string, or the empty string if no property with that name exists.
|
||||
-- @function [parent=#Properties] getString
|
||||
-- @param self
|
||||
-- @return char#char ret (return value: char)
|
||||
|
||||
--------------------------------
|
||||
-- Interpret the value of the given property as a long integer.<br>
|
||||
-- If the property does not exist, zero will be returned.<br>
|
||||
-- If the property exists but could not be scanned, an error will be logged and zero will be returned.<br>
|
||||
-- param name The name of the property to interpret, or NULL to return the current property's value.<br>
|
||||
-- return The value of the given property interpreted as a long.<br>
|
||||
-- Zero if the property does not exist or could not be scanned.
|
||||
-- @function [parent=#Properties] getLong
|
||||
-- @param self
|
||||
-- @return long#long ret (return value: long)
|
||||
|
||||
--------------------------------
|
||||
-- @overload self
|
||||
-- @overload self, char, bool, bool
|
||||
-- @function [parent=#Properties] getNamespace
|
||||
-- @param self
|
||||
-- @param #char id
|
||||
-- @param #bool searchNames
|
||||
-- @param #bool recurse
|
||||
-- @return Properties#Properties ret (return value: cc.Properties)
|
||||
|
||||
--------------------------------
|
||||
-- Gets the file path for the given property if the file exists.<br>
|
||||
-- This method will first search for the file relative to the working directory.<br>
|
||||
-- If the file is not found then it will search relative to the directory the bundle file is in.<br>
|
||||
-- param name The name of the property.<br>
|
||||
-- param path The string to copy the path to if the file exists.<br>
|
||||
-- return True if the property exists and the file exists, false otherwise.<br>
|
||||
-- script{ignore}
|
||||
-- @function [parent=#Properties] getPath
|
||||
-- @param self
|
||||
-- @param #char name
|
||||
-- @param #string path
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
-- Interpret the value of the given property as a Matrix.<br>
|
||||
-- If the property does not exist, out will be set to the identity matrix.<br>
|
||||
-- If the property exists but could not be scanned, an error will be logged and out will be set<br>
|
||||
-- to the identity matrix.<br>
|
||||
-- param name The name of the property to interpret, or NULL to return the current property's value.<br>
|
||||
-- param out The matrix to set to this property's interpreted value.<br>
|
||||
-- return True on success, false if the property does not exist or could not be scanned.
|
||||
-- @function [parent=#Properties] getMat4
|
||||
-- @param self
|
||||
-- @param #char name
|
||||
-- @param #mat4_table out
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
-- Check if a property with the given name is specified in this Properties object.<br>
|
||||
-- param name The name of the property to query.<br>
|
||||
-- return True if the property exists, false otherwise.
|
||||
-- @function [parent=#Properties] exists
|
||||
-- @param self
|
||||
-- @param #char name
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
-- Sets the value of the property with the specified name.<br>
|
||||
-- If there is no property in this namespace with the current name,<br>
|
||||
-- one is added. Otherwise, the value of the first property with the<br>
|
||||
-- specified name is updated.<br>
|
||||
-- If name is NULL, the value current property (see getNextProperty) is<br>
|
||||
-- set, unless there is no current property, in which case false<br>
|
||||
-- is returned.<br>
|
||||
-- param name The name of the property to set.<br>
|
||||
-- param value The property value.<br>
|
||||
-- return True if the property was set, false otherwise.
|
||||
-- @function [parent=#Properties] setString
|
||||
-- @param self
|
||||
-- @param #char name
|
||||
-- @param #char value
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
-- Get the ID of this Property's namespace. The ID should be a unique identifier,<br>
|
||||
-- but its uniqueness is not enforced.<br>
|
||||
-- return The ID of this Property's namespace.
|
||||
-- @function [parent=#Properties] getId
|
||||
-- @param self
|
||||
-- @return char#char ret (return value: char)
|
||||
|
||||
--------------------------------
|
||||
-- Rewind the getNextProperty() and getNextNamespace() iterators<br>
|
||||
-- to the beginning of the file.
|
||||
-- @function [parent=#Properties] rewind
|
||||
-- @param self
|
||||
-- @return Properties#Properties self (return value: cc.Properties)
|
||||
|
||||
--------------------------------
|
||||
-- Sets the value of the specified variable.<br>
|
||||
-- param name Name of the variable to set.<br>
|
||||
-- param value The value to set.
|
||||
-- @function [parent=#Properties] setVariable
|
||||
-- @param self
|
||||
-- @param #char name
|
||||
-- @param #char value
|
||||
-- @return Properties#Properties self (return value: cc.Properties)
|
||||
|
||||
--------------------------------
|
||||
-- Interpret the value of the given property as a boolean.<br>
|
||||
-- param name The name of the property to interpret, or NULL to return the current property's value.<br>
|
||||
-- param defaultValue the default value to return if the specified property does not exist within the properties file.<br>
|
||||
-- return true if the property exists and its value is "true", otherwise false.
|
||||
-- @function [parent=#Properties] getBool
|
||||
-- @param self
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
-- @overload self, char, vec4_table
|
||||
-- @overload self, char, vec3_table
|
||||
-- @function [parent=#Properties] getColor
|
||||
-- @param self
|
||||
-- @param #char name
|
||||
-- @param #vec3_table out
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
-- Returns the type of a property.<br>
|
||||
-- param name The name of the property to interpret, or NULL to return the current property's type.<br>
|
||||
-- return The type of the property.
|
||||
-- @function [parent=#Properties] getType
|
||||
-- @param self
|
||||
-- @return int#int ret (return value: int)
|
||||
|
||||
--------------------------------
|
||||
-- Get the next namespace.
|
||||
-- @function [parent=#Properties] getNextNamespace
|
||||
-- @param self
|
||||
-- @return Properties#Properties ret (return value: cc.Properties)
|
||||
|
||||
--------------------------------
|
||||
-- Interpret the value of the given property as an integer.<br>
|
||||
-- If the property does not exist, zero will be returned.<br>
|
||||
-- If the property exists but could not be scanned, an error will be logged and zero will be returned.<br>
|
||||
-- param name The name of the property to interpret, or NULL to return the current property's value.<br>
|
||||
-- return The value of the given property interpreted as an integer.<br>
|
||||
-- Zero if the property does not exist or could not be scanned.
|
||||
-- @function [parent=#Properties] getInt
|
||||
-- @param self
|
||||
-- @return int#int ret (return value: int)
|
||||
|
||||
--------------------------------
|
||||
-- Interpret the value of the given property as a Vector3.<br>
|
||||
-- If the property does not exist, out will be set to Vector3(0.0f, 0.0f, 0.0f).<br>
|
||||
-- If the property exists but could not be scanned, an error will be logged and out will be set<br>
|
||||
-- to Vector3(0.0f, 0.0f, 0.0f).<br>
|
||||
-- param name The name of the property to interpret, or NULL to return the current property's value.<br>
|
||||
-- param out The vector to set to this property's interpreted value.<br>
|
||||
-- return True on success, false if the property does not exist or could not be scanned.
|
||||
-- @function [parent=#Properties] getVec3
|
||||
-- @param self
|
||||
-- @param #char name
|
||||
-- @param #vec3_table out
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
-- Interpret the value of the given property as a Vector2.<br>
|
||||
-- If the property does not exist, out will be set to Vector2(0.0f, 0.0f).<br>
|
||||
-- If the property exists but could not be scanned, an error will be logged and out will be set<br>
|
||||
-- to Vector2(0.0f, 0.0f).<br>
|
||||
-- param name The name of the property to interpret, or NULL to return the current property's value.<br>
|
||||
-- param out The vector to set to this property's interpreted value.<br>
|
||||
-- return True on success, false if the property does not exist or could not be scanned.
|
||||
-- @function [parent=#Properties] getVec2
|
||||
-- @param self
|
||||
-- @param #char name
|
||||
-- @param #vec2_table out
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
-- Interpret the value of the given property as a Vector4.<br>
|
||||
-- If the property does not exist, out will be set to Vector4(0.0f, 0.0f, 0.0f, 0.0f).<br>
|
||||
-- If the property exists but could not be scanned, an error will be logged and out will be set<br>
|
||||
-- to Vector4(0.0f, 0.0f, 0.0f, 0.0f).<br>
|
||||
-- param name The name of the property to interpret, or NULL to return the current property's value.<br>
|
||||
-- param out The vector to set to this property's interpreted value.<br>
|
||||
-- return True on success, false if the property does not exist or could not be scanned.
|
||||
-- @function [parent=#Properties] getVec4
|
||||
-- @param self
|
||||
-- @param #char name
|
||||
-- @param #vec4_table out
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
-- Get the name of the next property.<br>
|
||||
-- If a valid next property is returned, the value of the property can be<br>
|
||||
-- retrieved using any of the get methods in this class, passing NULL for the property name.<br>
|
||||
-- return The name of the next property, or NULL if there are no properties remaining.
|
||||
-- @function [parent=#Properties] getNextProperty
|
||||
-- @param self
|
||||
-- @return char#char ret (return value: char)
|
||||
|
||||
--------------------------------
|
||||
-- Interpret the value of the given property as a floating-point number.<br>
|
||||
-- If the property does not exist, zero will be returned.<br>
|
||||
-- If the property exists but could not be scanned, an error will be logged and zero will be returned.<br>
|
||||
-- param name The name of the property to interpret, or NULL to return the current property's value.<br>
|
||||
-- return The value of the given property interpreted as a float.<br>
|
||||
-- Zero if the property does not exist or could not be scanned.
|
||||
-- @function [parent=#Properties] getFloat
|
||||
-- @param self
|
||||
-- @return float#float ret (return value: float)
|
||||
|
||||
--------------------------------
|
||||
-- Interpret the value of the given property as a Quaternion specified as an axis angle.<br>
|
||||
-- If the property does not exist, out will be set to Quaternion().<br>
|
||||
-- If the property exists but could not be scanned, an error will be logged and out will be set<br>
|
||||
-- to Quaternion().<br>
|
||||
-- param name The name of the property to interpret, or NULL to return the current property's value.<br>
|
||||
-- param out The quaternion to set to this property's interpreted value.<br>
|
||||
-- return True on success, false if the property does not exist or could not be scanned.
|
||||
-- @function [parent=#Properties] getQuaternionFromAxisAngle
|
||||
-- @param self
|
||||
-- @param #char name
|
||||
-- @param #cc.Quaternion out
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
-- @overload self, char, vec4_table
|
||||
-- @overload self, char, vec3_table
|
||||
-- @function [parent=#Properties] parseColor
|
||||
-- @param self
|
||||
-- @param #char str
|
||||
-- @param #vec3_table out
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
-- Attempts to parse the specified string as a Vector3 value.<br>
|
||||
-- On error, false is returned and the output is set to all zero values.<br>
|
||||
-- param str The string to parse.<br>
|
||||
-- param out The value to populate if successful.<br>
|
||||
-- return True if a valid Vector3 was parsed, false otherwise.
|
||||
-- @function [parent=#Properties] parseVec3
|
||||
-- @param self
|
||||
-- @param #char str
|
||||
-- @param #vec3_table out
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
-- Attempts to parse the specified string as an axis-angle value.<br>
|
||||
-- The specified string is expected to contain four comma-separated<br>
|
||||
-- values, where the first three values represents the axis and the<br>
|
||||
-- fourth value represents the angle, in degrees.<br>
|
||||
-- On error, false is returned and the output is set to all zero values.<br>
|
||||
-- param str The string to parse.<br>
|
||||
-- param out A Quaternion populated with the orientation of the axis-angle, if successful.<br>
|
||||
-- return True if a valid axis-angle was parsed, false otherwise.
|
||||
-- @function [parent=#Properties] parseAxisAngle
|
||||
-- @param self
|
||||
-- @param #char str
|
||||
-- @param #cc.Quaternion out
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
-- Attempts to parse the specified string as a Vector2 value.<br>
|
||||
-- On error, false is returned and the output is set to all zero values.<br>
|
||||
-- param str The string to parse.<br>
|
||||
-- param out The value to populate if successful.<br>
|
||||
-- return True if a valid Vector2 was parsed, false otherwise.
|
||||
-- @function [parent=#Properties] parseVec2
|
||||
-- @param self
|
||||
-- @param #char str
|
||||
-- @param #vec2_table out
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
-- Attempts to parse the specified string as a Vector4 value.<br>
|
||||
-- On error, false is returned and the output is set to all zero values.<br>
|
||||
-- param str The string to parse.<br>
|
||||
-- param out The value to populate if successful.<br>
|
||||
-- return True if a valid Vector4 was parsed, false otherwise.
|
||||
-- @function [parent=#Properties] parseVec4
|
||||
-- @param self
|
||||
-- @param #char str
|
||||
-- @param #vec4_table out
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
return nil
|
|
@ -0,0 +1,61 @@
|
|||
|
||||
--------------------------------
|
||||
-- @module RenderState
|
||||
-- @extend Ref
|
||||
-- @parent_module cc
|
||||
|
||||
--------------------------------
|
||||
-- Replaces the texture that is at the front of _textures array.<br>
|
||||
-- Added to be backwards compatible.
|
||||
-- @function [parent=#RenderState] setTexture
|
||||
-- @param self
|
||||
-- @param #cc.Texture2D texture
|
||||
-- @return RenderState#RenderState self (return value: cc.RenderState)
|
||||
|
||||
--------------------------------
|
||||
-- Returns the topmost RenderState in the hierarchy below the given RenderState.
|
||||
-- @function [parent=#RenderState] getTopmost
|
||||
-- @param self
|
||||
-- @param #cc.RenderState below
|
||||
-- @return RenderState#RenderState ret (return value: cc.RenderState)
|
||||
|
||||
--------------------------------
|
||||
-- Returns the texture that is at the front of the _textures array.<br>
|
||||
-- Added to be backwards compatible.
|
||||
-- @function [parent=#RenderState] getTexture
|
||||
-- @param self
|
||||
-- @return Texture2D#Texture2D ret (return value: cc.Texture2D)
|
||||
|
||||
--------------------------------
|
||||
-- Binds the render state for this RenderState and any of its parents, top-down,<br>
|
||||
-- for the given pass.
|
||||
-- @function [parent=#RenderState] bind
|
||||
-- @param self
|
||||
-- @param #cc.Pass pass
|
||||
-- @return RenderState#RenderState self (return value: cc.RenderState)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#RenderState] getName
|
||||
-- @param self
|
||||
-- @return string#string ret (return value: string)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#RenderState] getStateBlock
|
||||
-- @param self
|
||||
-- @return RenderState::StateBlock#RenderState::StateBlock ret (return value: cc.RenderState::StateBlock)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#RenderState] getTextures
|
||||
-- @param self
|
||||
-- @return array_table#array_table ret (return value: array_table)
|
||||
|
||||
--------------------------------
|
||||
-- Static initializer that is called during game startup.
|
||||
-- @function [parent=#RenderState] initialize
|
||||
-- @param self
|
||||
-- @return RenderState#RenderState self (return value: cc.RenderState)
|
||||
|
||||
return nil
|
|
@ -0,0 +1,62 @@
|
|||
|
||||
--------------------------------
|
||||
-- @module Technique
|
||||
-- @extend RenderState
|
||||
-- @parent_module cc
|
||||
|
||||
--------------------------------
|
||||
-- Returns the number of Passes in the Technique
|
||||
-- @function [parent=#Technique] getPassCount
|
||||
-- @param self
|
||||
-- @return long#long ret (return value: long)
|
||||
|
||||
--------------------------------
|
||||
-- Returns a new clone of the Technique
|
||||
-- @function [parent=#Technique] clone
|
||||
-- @param self
|
||||
-- @return Technique#Technique ret (return value: cc.Technique)
|
||||
|
||||
--------------------------------
|
||||
-- Adds a new pass to the Technique.<br>
|
||||
-- Order matters. First added, first rendered
|
||||
-- @function [parent=#Technique] addPass
|
||||
-- @param self
|
||||
-- @param #cc.Pass pass
|
||||
-- @return Technique#Technique self (return value: cc.Technique)
|
||||
|
||||
--------------------------------
|
||||
-- Returns the list of passes
|
||||
-- @function [parent=#Technique] getPasses
|
||||
-- @param self
|
||||
-- @return array_table#array_table ret (return value: array_table)
|
||||
|
||||
--------------------------------
|
||||
-- Returns the name of the Technique
|
||||
-- @function [parent=#Technique] getName
|
||||
-- @param self
|
||||
-- @return string#string ret (return value: string)
|
||||
|
||||
--------------------------------
|
||||
-- Returns the Pass at given index
|
||||
-- @function [parent=#Technique] getPassByIndex
|
||||
-- @param self
|
||||
-- @param #long index
|
||||
-- @return Pass#Pass ret (return value: cc.Pass)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Technique] create
|
||||
-- @param self
|
||||
-- @param #cc.Material parent
|
||||
-- @return Technique#Technique ret (return value: cc.Technique)
|
||||
|
||||
--------------------------------
|
||||
-- Creates a new Technique with a GLProgramState.<br>
|
||||
-- Method added to support legacy code
|
||||
-- @function [parent=#Technique] createWithGLProgramState
|
||||
-- @param self
|
||||
-- @param #cc.Material parent
|
||||
-- @param #cc.GLProgramState state
|
||||
-- @return Technique#Technique ret (return value: cc.Technique)
|
||||
|
||||
return nil
|
|
@ -34,6 +34,12 @@
|
|||
-- @param #bool boolValue
|
||||
-- @return Terrain#Terrain self (return value: cc.Terrain)
|
||||
|
||||
--------------------------------
|
||||
-- get the terrain's height data
|
||||
-- @function [parent=#Terrain] getHeightData
|
||||
-- @param self
|
||||
-- @return array_table#array_table ret (return value: array_table)
|
||||
|
||||
--------------------------------
|
||||
-- set the Detail Map
|
||||
-- @function [parent=#Terrain] setDetailMap
|
||||
|
|
|
@ -41,6 +41,13 @@
|
|||
-- @param self
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
-- brief Query the text string color.<br>
|
||||
-- return The color of the text.
|
||||
-- @function [parent=#TextField] getTextColor
|
||||
-- @param self
|
||||
-- @return color4b_table#color4b_table ret (return value: color4b_table)
|
||||
|
||||
--------------------------------
|
||||
-- brief Get the placeholder of TextField.<br>
|
||||
-- return A placeholder string.
|
||||
|
@ -195,6 +202,13 @@
|
|||
-- @param #bool deleteBackward
|
||||
-- @return TextField#TextField self (return value: ccui.TextField)
|
||||
|
||||
--------------------------------
|
||||
-- brief Inquire the horizontal alignment<br>
|
||||
-- return The horizontal alignment
|
||||
-- @function [parent=#TextField] getTextHorizontalAlignment
|
||||
-- @param self
|
||||
-- @return int#int ret (return value: int)
|
||||
|
||||
--------------------------------
|
||||
-- brief Change font size of TextField.<br>
|
||||
-- param size The integer font size.
|
||||
|
@ -257,6 +271,13 @@
|
|||
-- @param #bool detach
|
||||
-- @return TextField#TextField self (return value: ccui.TextField)
|
||||
|
||||
--------------------------------
|
||||
-- brief Inquire the horizontal alignment<br>
|
||||
-- return The horizontal alignment
|
||||
-- @function [parent=#TextField] getTextVerticalAlignment
|
||||
-- @param self
|
||||
-- @return int#int ret (return value: int)
|
||||
|
||||
--------------------------------
|
||||
-- brief Toggle enable touch area.<br>
|
||||
-- param enable True if enable touch area, false otherwise.
|
||||
|
|
|
@ -56,4 +56,9 @@
|
|||
-- @field [parent=#cc] TextureCube#TextureCube TextureCube preloaded module
|
||||
|
||||
|
||||
--------------------------------------------------------
|
||||
-- the cc Bundle3D
|
||||
-- @field [parent=#cc] Bundle3D#Bundle3D Bundle3D preloaded module
|
||||
|
||||
|
||||
return nil
|
||||
|
|
|
@ -241,6 +241,11 @@
|
|||
-- @field [parent=#cc] ActionFloat#ActionFloat ActionFloat preloaded module
|
||||
|
||||
|
||||
--------------------------------------------------------
|
||||
-- the cc Properties
|
||||
-- @field [parent=#cc] Properties#Properties Properties preloaded module
|
||||
|
||||
|
||||
--------------------------------------------------------
|
||||
-- the cc UserDefault
|
||||
-- @field [parent=#cc] UserDefault#UserDefault UserDefault preloaded module
|
||||
|
@ -1181,6 +1186,26 @@
|
|||
-- @field [parent=#cc] GLProgramCache#GLProgramCache GLProgramCache preloaded module
|
||||
|
||||
|
||||
--------------------------------------------------------
|
||||
-- the cc RenderState
|
||||
-- @field [parent=#cc] RenderState#RenderState RenderState preloaded module
|
||||
|
||||
|
||||
--------------------------------------------------------
|
||||
-- the cc Pass
|
||||
-- @field [parent=#cc] Pass#Pass Pass preloaded module
|
||||
|
||||
|
||||
--------------------------------------------------------
|
||||
-- the cc Technique
|
||||
-- @field [parent=#cc] Technique#Technique Technique preloaded module
|
||||
|
||||
|
||||
--------------------------------------------------------
|
||||
-- the cc Material
|
||||
-- @field [parent=#cc] Material#Material Material preloaded module
|
||||
|
||||
|
||||
--------------------------------------------------------
|
||||
-- the cc TextureCache
|
||||
-- @field [parent=#cc] TextureCache#TextureCache TextureCache preloaded module
|
||||
|
|
|
@ -0,0 +1,64 @@
|
|||
--------------------------------
|
||||
-- @module cc
|
||||
|
||||
--------------------------------------------------------
|
||||
-- the cc Physics3DShape
|
||||
-- @field [parent=#cc] Physics3DShape#Physics3DShape Physics3DShape preloaded module
|
||||
|
||||
|
||||
--------------------------------------------------------
|
||||
-- the cc Physics3DObject
|
||||
-- @field [parent=#cc] Physics3DObject#Physics3DObject Physics3DObject preloaded module
|
||||
|
||||
|
||||
--------------------------------------------------------
|
||||
-- the cc Physics3DRigidBody
|
||||
-- @field [parent=#cc] Physics3DRigidBody#Physics3DRigidBody Physics3DRigidBody preloaded module
|
||||
|
||||
|
||||
--------------------------------------------------------
|
||||
-- the cc Physics3DComponent
|
||||
-- @field [parent=#cc] Physics3DComponent#Physics3DComponent Physics3DComponent preloaded module
|
||||
|
||||
|
||||
--------------------------------------------------------
|
||||
-- the cc PhysicsSprite3D
|
||||
-- @field [parent=#cc] PhysicsSprite3D#PhysicsSprite3D PhysicsSprite3D preloaded module
|
||||
|
||||
|
||||
--------------------------------------------------------
|
||||
-- the cc Physics3DWorld
|
||||
-- @field [parent=#cc] Physics3DWorld#Physics3DWorld Physics3DWorld preloaded module
|
||||
|
||||
|
||||
--------------------------------------------------------
|
||||
-- the cc Physics3DConstraint
|
||||
-- @field [parent=#cc] Physics3DConstraint#Physics3DConstraint Physics3DConstraint preloaded module
|
||||
|
||||
|
||||
--------------------------------------------------------
|
||||
-- the cc Physics3DPointToPointConstraint
|
||||
-- @field [parent=#cc] Physics3DPointToPointConstraint#Physics3DPointToPointConstraint Physics3DPointToPointConstraint preloaded module
|
||||
|
||||
|
||||
--------------------------------------------------------
|
||||
-- the cc Physics3DHingeConstraint
|
||||
-- @field [parent=#cc] Physics3DHingeConstraint#Physics3DHingeConstraint Physics3DHingeConstraint preloaded module
|
||||
|
||||
|
||||
--------------------------------------------------------
|
||||
-- the cc Physics3DSliderConstraint
|
||||
-- @field [parent=#cc] Physics3DSliderConstraint#Physics3DSliderConstraint Physics3DSliderConstraint preloaded module
|
||||
|
||||
|
||||
--------------------------------------------------------
|
||||
-- the cc Physics3DConeTwistConstraint
|
||||
-- @field [parent=#cc] Physics3DConeTwistConstraint#Physics3DConeTwistConstraint Physics3DConeTwistConstraint preloaded module
|
||||
|
||||
|
||||
--------------------------------------------------------
|
||||
-- the cc Physics3D6DofConstraint
|
||||
-- @field [parent=#cc] Physics3D6DofConstraint#Physics3D6DofConstraint Physics3D6DofConstraint preloaded module
|
||||
|
||||
|
||||
return nil
|
|
@ -1,5 +1,6 @@
|
|||
#include "lua_cocos2dx_3d_auto.hpp"
|
||||
#include "cocos2d.h"
|
||||
#include "CCBundle3D.h"
|
||||
#include "tolua_fix.h"
|
||||
#include "LuaBasicConversions.h"
|
||||
|
||||
|
@ -4726,6 +4727,53 @@ int lua_cocos2dx_3d_Terrain_setIsEnableFrustumCull(lua_State* tolua_S)
|
|||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_3d_Terrain_getHeightData(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::Terrain* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"cc.Terrain",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::Terrain*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_getHeightData'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Terrain_getHeightData'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
std::vector<float, std::allocator<float> > ret = cobj->getHeightData();
|
||||
ccvector_float_to_luaval(tolua_S, ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:getHeightData",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_getHeightData'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_3d_Terrain_setDetailMap(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
|
@ -5440,6 +5488,7 @@ int lua_register_cocos2dx_3d_Terrain(lua_State* tolua_S)
|
|||
tolua_function(tolua_S,"setMaxDetailMapAmount",lua_cocos2dx_3d_Terrain_setMaxDetailMapAmount);
|
||||
tolua_function(tolua_S,"setDrawWire",lua_cocos2dx_3d_Terrain_setDrawWire);
|
||||
tolua_function(tolua_S,"setIsEnableFrustumCull",lua_cocos2dx_3d_Terrain_setIsEnableFrustumCull);
|
||||
tolua_function(tolua_S,"getHeightData",lua_cocos2dx_3d_Terrain_getHeightData);
|
||||
tolua_function(tolua_S,"setDetailMap",lua_cocos2dx_3d_Terrain_setDetailMap);
|
||||
tolua_function(tolua_S,"resetHeightMap",lua_cocos2dx_3d_Terrain_resetHeightMap);
|
||||
tolua_function(tolua_S,"setAlphaMap",lua_cocos2dx_3d_Terrain_setAlphaMap);
|
||||
|
@ -5663,6 +5712,516 @@ int lua_register_cocos2dx_3d_TextureCube(lua_State* tolua_S)
|
|||
g_typeCast["TextureCube"] = "cc.TextureCube";
|
||||
return 1;
|
||||
}
|
||||
|
||||
int lua_cocos2dx_3d_Bundle3D_load(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::Bundle3D* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"cc.Bundle3D",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::Bundle3D*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Bundle3D_load'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 1)
|
||||
{
|
||||
std::string arg0;
|
||||
|
||||
ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Bundle3D:load");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Bundle3D_load'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
bool ret = cobj->load(arg0);
|
||||
tolua_pushboolean(tolua_S,(bool)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Bundle3D:load",argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Bundle3D_load'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_3d_Bundle3D_loadSkinData(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::Bundle3D* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"cc.Bundle3D",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::Bundle3D*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Bundle3D_loadSkinData'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 2)
|
||||
{
|
||||
std::string arg0;
|
||||
cocos2d::SkinData* arg1;
|
||||
|
||||
ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Bundle3D:loadSkinData");
|
||||
|
||||
#pragma warning NO CONVERSION TO NATIVE FOR SkinData*
|
||||
ok = false;
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Bundle3D_loadSkinData'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
bool ret = cobj->loadSkinData(arg0, arg1);
|
||||
tolua_pushboolean(tolua_S,(bool)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Bundle3D:loadSkinData",argc, 2);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Bundle3D_loadSkinData'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_3d_Bundle3D_clear(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::Bundle3D* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"cc.Bundle3D",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::Bundle3D*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Bundle3D_clear'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Bundle3D_clear'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->clear();
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Bundle3D:clear",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Bundle3D_clear'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_3d_Bundle3D_loadMaterials(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::Bundle3D* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"cc.Bundle3D",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::Bundle3D*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Bundle3D_loadMaterials'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 1)
|
||||
{
|
||||
cocos2d::MaterialDatas arg0;
|
||||
|
||||
#pragma warning NO CONVERSION TO NATIVE FOR MaterialDatas
|
||||
ok = false;
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Bundle3D_loadMaterials'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
bool ret = cobj->loadMaterials(arg0);
|
||||
tolua_pushboolean(tolua_S,(bool)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Bundle3D:loadMaterials",argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Bundle3D_loadMaterials'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_3d_Bundle3D_loadNodes(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::Bundle3D* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"cc.Bundle3D",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::Bundle3D*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Bundle3D_loadNodes'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 1)
|
||||
{
|
||||
cocos2d::NodeDatas arg0;
|
||||
|
||||
#pragma warning NO CONVERSION TO NATIVE FOR NodeDatas
|
||||
ok = false;
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Bundle3D_loadNodes'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
bool ret = cobj->loadNodes(arg0);
|
||||
tolua_pushboolean(tolua_S,(bool)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Bundle3D:loadNodes",argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Bundle3D_loadNodes'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_3d_Bundle3D_loadAnimationData(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::Bundle3D* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"cc.Bundle3D",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::Bundle3D*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Bundle3D_loadAnimationData'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 2)
|
||||
{
|
||||
std::string arg0;
|
||||
cocos2d::Animation3DData* arg1;
|
||||
|
||||
ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Bundle3D:loadAnimationData");
|
||||
|
||||
#pragma warning NO CONVERSION TO NATIVE FOR Animation3DData*
|
||||
ok = false;
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Bundle3D_loadAnimationData'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
bool ret = cobj->loadAnimationData(arg0, arg1);
|
||||
tolua_pushboolean(tolua_S,(bool)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Bundle3D:loadAnimationData",argc, 2);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Bundle3D_loadAnimationData'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_3d_Bundle3D_createBundle(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertable(tolua_S,1,"cc.Bundle3D",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S) - 1;
|
||||
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Bundle3D_createBundle'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cocos2d::Bundle3D* ret = cocos2d::Bundle3D::createBundle();
|
||||
object_to_luaval<cocos2d::Bundle3D>(tolua_S, "cc.Bundle3D",(cocos2d::Bundle3D*)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Bundle3D:createBundle",argc, 0);
|
||||
return 0;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Bundle3D_createBundle'.",&tolua_err);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_3d_Bundle3D_destroyBundle(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertable(tolua_S,1,"cc.Bundle3D",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S) - 1;
|
||||
|
||||
if (argc == 1)
|
||||
{
|
||||
cocos2d::Bundle3D* arg0;
|
||||
ok &= luaval_to_object<cocos2d::Bundle3D>(tolua_S, 2, "cc.Bundle3D",&arg0, "cc.Bundle3D:destroyBundle");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Bundle3D_destroyBundle'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cocos2d::Bundle3D::destroyBundle(arg0);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Bundle3D:destroyBundle",argc, 1);
|
||||
return 0;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Bundle3D_destroyBundle'.",&tolua_err);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_3d_Bundle3D_loadObj(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertable(tolua_S,1,"cc.Bundle3D",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S) - 1;
|
||||
|
||||
if (argc == 4)
|
||||
{
|
||||
cocos2d::MeshDatas arg0;
|
||||
cocos2d::MaterialDatas arg1;
|
||||
cocos2d::NodeDatas arg2;
|
||||
std::string arg3;
|
||||
#pragma warning NO CONVERSION TO NATIVE FOR MeshDatas
|
||||
ok = false;
|
||||
#pragma warning NO CONVERSION TO NATIVE FOR MaterialDatas
|
||||
ok = false;
|
||||
#pragma warning NO CONVERSION TO NATIVE FOR NodeDatas
|
||||
ok = false;
|
||||
ok &= luaval_to_std_string(tolua_S, 5,&arg3, "cc.Bundle3D:loadObj");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Bundle3D_loadObj'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
bool ret = cocos2d::Bundle3D::loadObj(arg0, arg1, arg2, arg3);
|
||||
tolua_pushboolean(tolua_S,(bool)ret);
|
||||
return 1;
|
||||
}
|
||||
if (argc == 5)
|
||||
{
|
||||
cocos2d::MeshDatas arg0;
|
||||
cocos2d::MaterialDatas arg1;
|
||||
cocos2d::NodeDatas arg2;
|
||||
std::string arg3;
|
||||
const char* arg4;
|
||||
#pragma warning NO CONVERSION TO NATIVE FOR MeshDatas
|
||||
ok = false;
|
||||
#pragma warning NO CONVERSION TO NATIVE FOR MaterialDatas
|
||||
ok = false;
|
||||
#pragma warning NO CONVERSION TO NATIVE FOR NodeDatas
|
||||
ok = false;
|
||||
ok &= luaval_to_std_string(tolua_S, 5,&arg3, "cc.Bundle3D:loadObj");
|
||||
std::string arg4_tmp; ok &= luaval_to_std_string(tolua_S, 6, &arg4_tmp, "cc.Bundle3D:loadObj"); arg4 = arg4_tmp.c_str();
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Bundle3D_loadObj'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
bool ret = cocos2d::Bundle3D::loadObj(arg0, arg1, arg2, arg3, arg4);
|
||||
tolua_pushboolean(tolua_S,(bool)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Bundle3D:loadObj",argc, 4);
|
||||
return 0;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Bundle3D_loadObj'.",&tolua_err);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_3d_Bundle3D_constructor(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::Bundle3D* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Bundle3D_constructor'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj = new cocos2d::Bundle3D();
|
||||
tolua_pushusertype(tolua_S,(void*)cobj,"cc.Bundle3D");
|
||||
tolua_register_gc(tolua_S,lua_gettop(tolua_S));
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Bundle3D:Bundle3D",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Bundle3D_constructor'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int lua_cocos2dx_3d_Bundle3D_finalize(lua_State* tolua_S)
|
||||
{
|
||||
printf("luabindings: finalizing LUA object (Bundle3D)");
|
||||
return 0;
|
||||
}
|
||||
|
||||
int lua_register_cocos2dx_3d_Bundle3D(lua_State* tolua_S)
|
||||
{
|
||||
tolua_usertype(tolua_S,"cc.Bundle3D");
|
||||
tolua_cclass(tolua_S,"Bundle3D","cc.Bundle3D","",nullptr);
|
||||
|
||||
tolua_beginmodule(tolua_S,"Bundle3D");
|
||||
tolua_function(tolua_S,"new",lua_cocos2dx_3d_Bundle3D_constructor);
|
||||
tolua_function(tolua_S,"load",lua_cocos2dx_3d_Bundle3D_load);
|
||||
tolua_function(tolua_S,"loadSkinData",lua_cocos2dx_3d_Bundle3D_loadSkinData);
|
||||
tolua_function(tolua_S,"clear",lua_cocos2dx_3d_Bundle3D_clear);
|
||||
tolua_function(tolua_S,"loadMaterials",lua_cocos2dx_3d_Bundle3D_loadMaterials);
|
||||
tolua_function(tolua_S,"loadNodes",lua_cocos2dx_3d_Bundle3D_loadNodes);
|
||||
tolua_function(tolua_S,"loadAnimationData",lua_cocos2dx_3d_Bundle3D_loadAnimationData);
|
||||
tolua_function(tolua_S,"createBundle", lua_cocos2dx_3d_Bundle3D_createBundle);
|
||||
tolua_function(tolua_S,"destroyBundle", lua_cocos2dx_3d_Bundle3D_destroyBundle);
|
||||
tolua_function(tolua_S,"loadObj", lua_cocos2dx_3d_Bundle3D_loadObj);
|
||||
tolua_endmodule(tolua_S);
|
||||
std::string typeName = typeid(cocos2d::Bundle3D).name();
|
||||
g_luaType[typeName] = "cc.Bundle3D";
|
||||
g_typeCast["Bundle3D"] = "cc.Bundle3D";
|
||||
return 1;
|
||||
}
|
||||
TOLUA_API int register_all_cocos2dx_3d(lua_State* tolua_S)
|
||||
{
|
||||
tolua_open(tolua_S);
|
||||
|
@ -5677,6 +6236,7 @@ TOLUA_API int register_all_cocos2dx_3d(lua_State* tolua_S)
|
|||
lua_register_cocos2dx_3d_Sprite3DCache(tolua_S);
|
||||
lua_register_cocos2dx_3d_Terrain(tolua_S);
|
||||
lua_register_cocos2dx_3d_Skybox(tolua_S);
|
||||
lua_register_cocos2dx_3d_Bundle3D(tolua_S);
|
||||
lua_register_cocos2dx_3d_Skeleton3D(tolua_S);
|
||||
lua_register_cocos2dx_3d_BillBoard(tolua_S);
|
||||
lua_register_cocos2dx_3d_Animation3D(tolua_S);
|
||||
|
|
|
@ -119,6 +119,18 @@ int register_all_cocos2dx_3d(lua_State* tolua_S);
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1954,6 +1954,78 @@ int register_all_cocos2dx(lua_State* tolua_S);
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,260 @@
|
|||
#include "base/ccConfig.h"
|
||||
#if CC_USE_3D_PHYSICS && CC_ENABLE_BULLET_INTEGRATION
|
||||
#ifndef __cocos2dx_physics3d_h__
|
||||
#define __cocos2dx_physics3d_h__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#include "tolua++.h"
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
int register_all_cocos2dx_physics3d(lua_State* tolua_S);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // __cocos2dx_physics3d_h__
|
||||
#endif //#if CC_USE_3D_PHYSICS && CC_ENABLE_BULLET_INTEGRATION
|
|
@ -6986,6 +6986,65 @@ int lua_cocos2dx_ui_Button_getCapInsetsNormalRenderer(lua_State* tolua_S)
|
|||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_ui_Button_setTitleAlignment(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::ui::Button* cobj = nullptr;
|
||||
bool ok = true;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccui.Button",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
cobj = (cocos2d::ui::Button*)tolua_tousertype(tolua_S,1,0);
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_Button_setTitleAlignment'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
do{
|
||||
if (argc == 2) {
|
||||
cocos2d::TextHAlignment arg0;
|
||||
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "ccui.Button:setTitleAlignment");
|
||||
|
||||
if (!ok) { break; }
|
||||
cocos2d::TextVAlignment arg1;
|
||||
ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "ccui.Button:setTitleAlignment");
|
||||
|
||||
if (!ok) { break; }
|
||||
cobj->setTitleAlignment(arg0, arg1);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
}while(0);
|
||||
ok = true;
|
||||
do{
|
||||
if (argc == 1) {
|
||||
cocos2d::TextHAlignment arg0;
|
||||
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "ccui.Button:setTitleAlignment");
|
||||
|
||||
if (!ok) { break; }
|
||||
cobj->setTitleAlignment(arg0);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
}while(0);
|
||||
ok = true;
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.Button:setTitleAlignment",argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_Button_setTitleAlignment'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_ui_Button_getCapInsetsPressedRenderer(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
|
@ -7737,6 +7796,7 @@ int lua_register_cocos2dx_ui_Button(lua_State* tolua_S)
|
|||
tolua_function(tolua_S,"loadTexturePressed",lua_cocos2dx_ui_Button_loadTexturePressed);
|
||||
tolua_function(tolua_S,"setTitleFontName",lua_cocos2dx_ui_Button_setTitleFontName);
|
||||
tolua_function(tolua_S,"getCapInsetsNormalRenderer",lua_cocos2dx_ui_Button_getCapInsetsNormalRenderer);
|
||||
tolua_function(tolua_S,"setTitleAlignment",lua_cocos2dx_ui_Button_setTitleAlignment);
|
||||
tolua_function(tolua_S,"getCapInsetsPressedRenderer",lua_cocos2dx_ui_Button_getCapInsetsPressedRenderer);
|
||||
tolua_function(tolua_S,"loadTextures",lua_cocos2dx_ui_Button_loadTextures);
|
||||
tolua_function(tolua_S,"isScale9Enabled",lua_cocos2dx_ui_Button_isScale9Enabled);
|
||||
|
@ -16048,6 +16108,53 @@ int lua_cocos2dx_ui_TextField_getDeleteBackward(lua_State* tolua_S)
|
|||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_ui_TextField_getTextColor(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::ui::TextField* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccui.TextField",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::ui::TextField*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_TextField_getTextColor'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_TextField_getTextColor'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
const cocos2d::Color4B& ret = cobj->getTextColor();
|
||||
color4b_to_luaval(tolua_S, ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.TextField:getTextColor",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_TextField_getTextColor'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_ui_TextField_getPlaceHolder(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
|
@ -17066,6 +17173,53 @@ int lua_cocos2dx_ui_TextField_setDeleteBackward(lua_State* tolua_S)
|
|||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_ui_TextField_getTextHorizontalAlignment(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::ui::TextField* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccui.TextField",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::ui::TextField*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_TextField_getTextHorizontalAlignment'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_TextField_getTextHorizontalAlignment'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
int ret = (int)cobj->getTextHorizontalAlignment();
|
||||
tolua_pushnumber(tolua_S,(lua_Number)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.TextField:getTextHorizontalAlignment",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_TextField_getTextHorizontalAlignment'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_ui_TextField_setFontSize(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
|
@ -17465,6 +17619,53 @@ int lua_cocos2dx_ui_TextField_setDetachWithIME(lua_State* tolua_S)
|
|||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_ui_TextField_getTextVerticalAlignment(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::ui::TextField* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccui.TextField",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::ui::TextField*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_TextField_getTextVerticalAlignment'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_TextField_getTextVerticalAlignment'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
int ret = (int)cobj->getTextVerticalAlignment();
|
||||
tolua_pushnumber(tolua_S,(lua_Number)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.TextField:getTextVerticalAlignment",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_TextField_getTextVerticalAlignment'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_ui_TextField_setTouchAreaEnabled(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
|
@ -17802,6 +18003,7 @@ int lua_register_cocos2dx_ui_TextField(lua_State* tolua_S)
|
|||
tolua_function(tolua_S,"getString",lua_cocos2dx_ui_TextField_getString);
|
||||
tolua_function(tolua_S,"setPasswordStyleText",lua_cocos2dx_ui_TextField_setPasswordStyleText);
|
||||
tolua_function(tolua_S,"getDeleteBackward",lua_cocos2dx_ui_TextField_getDeleteBackward);
|
||||
tolua_function(tolua_S,"getTextColor",lua_cocos2dx_ui_TextField_getTextColor);
|
||||
tolua_function(tolua_S,"getPlaceHolder",lua_cocos2dx_ui_TextField_getPlaceHolder);
|
||||
tolua_function(tolua_S,"getAttachWithIME",lua_cocos2dx_ui_TextField_getAttachWithIME);
|
||||
tolua_function(tolua_S,"setFontName",lua_cocos2dx_ui_TextField_setFontName);
|
||||
|
@ -17823,6 +18025,7 @@ int lua_register_cocos2dx_ui_TextField(lua_State* tolua_S)
|
|||
tolua_function(tolua_S,"setMaxLengthEnabled",lua_cocos2dx_ui_TextField_setMaxLengthEnabled);
|
||||
tolua_function(tolua_S,"isPasswordEnabled",lua_cocos2dx_ui_TextField_isPasswordEnabled);
|
||||
tolua_function(tolua_S,"setDeleteBackward",lua_cocos2dx_ui_TextField_setDeleteBackward);
|
||||
tolua_function(tolua_S,"getTextHorizontalAlignment",lua_cocos2dx_ui_TextField_getTextHorizontalAlignment);
|
||||
tolua_function(tolua_S,"setFontSize",lua_cocos2dx_ui_TextField_setFontSize);
|
||||
tolua_function(tolua_S,"setPlaceHolder",lua_cocos2dx_ui_TextField_setPlaceHolder);
|
||||
tolua_function(tolua_S,"setPlaceHolderColor",lua_cocos2dx_ui_TextField_setPlaceHolderColor);
|
||||
|
@ -17831,6 +18034,7 @@ int lua_register_cocos2dx_ui_TextField(lua_State* tolua_S)
|
|||
tolua_function(tolua_S,"getMaxLength",lua_cocos2dx_ui_TextField_getMaxLength);
|
||||
tolua_function(tolua_S,"isMaxLengthEnabled",lua_cocos2dx_ui_TextField_isMaxLengthEnabled);
|
||||
tolua_function(tolua_S,"setDetachWithIME",lua_cocos2dx_ui_TextField_setDetachWithIME);
|
||||
tolua_function(tolua_S,"getTextVerticalAlignment",lua_cocos2dx_ui_TextField_getTextVerticalAlignment);
|
||||
tolua_function(tolua_S,"setTouchAreaEnabled",lua_cocos2dx_ui_TextField_setTouchAreaEnabled);
|
||||
tolua_function(tolua_S,"setMaxLength",lua_cocos2dx_ui_TextField_setMaxLength);
|
||||
tolua_function(tolua_S,"setTouchSize",lua_cocos2dx_ui_TextField_setTouchSize);
|
||||
|
|
|
@ -555,6 +555,10 @@ int register_all_cocos2dx_ui(lua_State* tolua_S);
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include "lua_cocos2dx_3d_auto.hpp"
|
||||
#include "LuaBasicConversions.h"
|
||||
#include "CCLuaEngine.h"
|
||||
#include "3d/CCBundle3D.h"
|
||||
|
||||
extern int lua_cocos2dx_3d_Sprite3D_setBlendFunc(lua_State* L);
|
||||
|
||||
|
@ -231,9 +232,9 @@ bool luaval_to_terraindata(lua_State* L, int lo, cocos2d::Terrain::TerrainData*
|
|||
{
|
||||
lua_pushstring(L, "_chunkSize");
|
||||
lua_gettable(L,lo);
|
||||
if (!lua_isnil(L, -1))
|
||||
if (!lua_isnil(L, lua_gettop(L)))
|
||||
{
|
||||
luaval_to_size(L, -1, &(outValue->_chunkSize));
|
||||
luaval_to_size(L, lua_gettop(L), &(outValue->_chunkSize));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -526,6 +527,56 @@ static void extendTerrain(lua_State* L)
|
|||
lua_pop(L, 1);
|
||||
}
|
||||
|
||||
int lua_cocos2dx_3d_Bundle3D_getTrianglesList(lua_State* L)
|
||||
{
|
||||
int argc = 0;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertable(L,1,"cc.Bundle3D",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(L) - 1;
|
||||
|
||||
if (argc == 1)
|
||||
{
|
||||
std::string arg0;
|
||||
ok &= luaval_to_std_string(L, 2,&arg0, "cc.Bundle3D:getTrianglesList");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(L,"invalid arguments in function 'lua_cocos2dx_3d_Bundle3D_getTrianglesList'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::vector<cocos2d::Vec3> ret = cocos2d::Bundle3D::getTrianglesList(arg0);
|
||||
std_vector_vec3_to_luaval(L,ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(L, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Bundle3D:getTrianglesList",argc, 1);
|
||||
return 0;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(L,"#ferror in function 'lua_cocos2dx_3d_Bundle3D_getTrianglesList'.",&tolua_err);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
void extendBundle3D(lua_State* L)
|
||||
{
|
||||
lua_pushstring(L, "cc.Bundle3D");
|
||||
lua_rawget(L, LUA_REGISTRYINDEX);
|
||||
if (lua_istable(L,-1))
|
||||
{
|
||||
tolua_function(L, "getTrianglesList", lua_cocos2dx_3d_Bundle3D_getTrianglesList);
|
||||
}
|
||||
lua_pop(L, 1);
|
||||
}
|
||||
|
||||
|
||||
static int register_all_cocos2dx_3d_manual(lua_State* L)
|
||||
{
|
||||
if (nullptr == L)
|
||||
|
@ -533,6 +584,7 @@ static int register_all_cocos2dx_3d_manual(lua_State* L)
|
|||
|
||||
extendSprite3D(L);
|
||||
extendTerrain(L);
|
||||
extendBundle3D(L);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -2243,6 +2243,49 @@ bool luaval_to_std_vector_vec2(lua_State* L, int lo, std::vector<cocos2d::Vec2>*
|
|||
return ok;
|
||||
}
|
||||
|
||||
bool luaval_to_std_vector_vec3(lua_State* L, int lo, std::vector<cocos2d::Vec3>* ret, const char* funcName)
|
||||
{
|
||||
if (nullptr == L || nullptr == ret || lua_gettop(L) < lo)
|
||||
return false;
|
||||
|
||||
tolua_Error tolua_err;
|
||||
bool ok = true;
|
||||
|
||||
if (!tolua_istable(L, lo, 0, &tolua_err))
|
||||
{
|
||||
#if COCOS2D_DEBUG >=1
|
||||
luaval_to_native_err(L,"#ferror:",&tolua_err,funcName);
|
||||
#endif
|
||||
ok = false;
|
||||
}
|
||||
|
||||
if (ok)
|
||||
{
|
||||
size_t len = lua_objlen(L, lo);
|
||||
cocos2d::Vec3 value;
|
||||
for (size_t i = 0; i < len; i++)
|
||||
{
|
||||
lua_pushnumber(L, i + 1);
|
||||
lua_gettable(L,lo);
|
||||
if (lua_istable(L, lua_gettop(L)))
|
||||
{
|
||||
ok &= luaval_to_vec3(L, lua_gettop(L), &value);
|
||||
if (ok)
|
||||
{
|
||||
ret->push_back(value);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
CCASSERT(false, "vec3 type is needed");
|
||||
}
|
||||
lua_pop(L, 1);
|
||||
}
|
||||
}
|
||||
|
||||
return ok;
|
||||
}
|
||||
|
||||
bool luaval_to_std_vector_v3f_c4b_t2f(lua_State* L, int lo, std::vector<cocos2d::V3F_C4B_T2F>* ret, const char* funcName)
|
||||
{
|
||||
if (nullptr == L || nullptr == ret || lua_gettop(L) < lo)
|
||||
|
@ -3270,3 +3313,20 @@ void texParams_to_luaval(lua_State* L, const cocos2d::Texture2D::TexParams& inVa
|
|||
lua_pushnumber(L, (lua_Number) inValue.wrapT); /* L: table key value*/
|
||||
lua_rawset(L, -3);
|
||||
}
|
||||
|
||||
void std_vector_vec3_to_luaval(lua_State* L, const std::vector<cocos2d::Vec3>& inValue)
|
||||
{
|
||||
if (nullptr == L)
|
||||
return;
|
||||
|
||||
lua_newtable(L);
|
||||
|
||||
int index = 1;
|
||||
for (const cocos2d::Vec3& value : inValue)
|
||||
{
|
||||
lua_pushnumber(L, (lua_Number)index);
|
||||
vec3_to_luaval(L, value);
|
||||
lua_rawset(L, -3);
|
||||
++index;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -818,6 +818,17 @@ extern bool luaval_to_std_vector_v3f_c4b_t2f(lua_State* L, int lo, std::vector<c
|
|||
*/
|
||||
extern bool luaval_to_std_vector_vec2(lua_State* L, int lo, std::vector<cocos2d::Vec2>* ret, const char* funcName = "");
|
||||
|
||||
/**
|
||||
* Get a pointer points to a std::vector<cocos2d::Vec3> from a Lua array table in the stack.
|
||||
*
|
||||
* @param L the current lua_State.
|
||||
* @param lo the given accpetable index of stack.
|
||||
* @param ret a pointer points to a std::vector<cocos2d::Vec3>.
|
||||
* @param funcName the name of calling function, it is used for error output in the debug model.
|
||||
* @return Return true if the value at the given accpetable index of stack is a table, otherwise return false.
|
||||
*/
|
||||
extern bool luaval_to_std_vector_vec3(lua_State* L, int lo, std::vector<cocos2d::Vec3>* ret, const char* funcName = "");
|
||||
|
||||
/**@}**/
|
||||
|
||||
// from native
|
||||
|
@ -1263,6 +1274,14 @@ void quaternion_to_luaval(lua_State* L,const cocos2d::Quaternion& inValue);
|
|||
*/
|
||||
void texParams_to_luaval(lua_State* L, const cocos2d::Texture2D::TexParams& inValue);
|
||||
|
||||
/**
|
||||
* Push a Lua array table converted from a std::vector<cocos2d::Vec3> into the Lua stack.
|
||||
* The format of table as follows: {vec3Value1, vec3Value2, ..., vec3ValueSize}
|
||||
*
|
||||
* @param L the current lua_State.
|
||||
* @param inValue a std::vector<cocos2d::Vec3> vaule.
|
||||
*/
|
||||
void std_vector_vec3_to_luaval(lua_State* L, const std::vector<cocos2d::Vec3>& inValue);
|
||||
// end group
|
||||
/// @}
|
||||
#endif //__COCOS2DX_SCRIPTING_LUA_COCOS2DXSUPPORT_LUABAISCCONVERSIONS_H__
|
||||
|
|
|
@ -4657,6 +4657,106 @@ tolua_lerror:
|
|||
|
||||
#endif //CC_USE_PHYSICS
|
||||
|
||||
#if CC_USE_3D_PHYSICS && CC_ENABLE_BULLET_INTEGRATION
|
||||
#include "physics3d/CCPhysics3DWorld.h"
|
||||
int lua_cocos2dx_Scene_getPhysics3DWorld(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::Scene* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"cc.Scene",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::Scene*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Scene_getPhysics3DWorld'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Scene_getPhysics3DWorld'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cocos2d::Physics3DWorld* ret = cobj->getPhysics3DWorld();
|
||||
object_to_luaval<cocos2d::Physics3DWorld>(tolua_S, "cc.Physics3DWorld",(cocos2d::Physics3DWorld*)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Scene:getPhysics3DWorld",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Scene_getPhysics3DWorld'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int lua_cocos2dx_Scene_setPhysics3DDebugCamera(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::Scene* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"cc.Scene",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::Scene*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Scene_setPhysics3DDebugCamera'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 1)
|
||||
{
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S, 2, "cc.Camera", 0, &tolua_err)) {
|
||||
goto tolua_lerror;
|
||||
}
|
||||
#endif
|
||||
|
||||
cocos2d::Camera* camera = (cocos2d::Camera*)tolua_tousertype(tolua_S,2,0);
|
||||
cobj->setPhysics3DDebugCamera(camera);
|
||||
return 0;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Scene:setPhysics3DDebugCamera",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Scene_setPhysics3DDebugCamera'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void extendScene(lua_State* tolua_S)
|
||||
{
|
||||
lua_pushstring(tolua_S, "cc.Scene");
|
||||
|
@ -4664,12 +4764,12 @@ static void extendScene(lua_State* tolua_S)
|
|||
if (lua_istable(tolua_S,-1))
|
||||
{
|
||||
#if CC_USE_PHYSICS
|
||||
lua_pushstring(tolua_S, "getPhysicsWorld");
|
||||
lua_pushcfunction(tolua_S, lua_cocos2dx_Scene_getPhysicsWorld);
|
||||
lua_rawset(tolua_S, -3);
|
||||
lua_pushstring(tolua_S, "createWithPhysics");
|
||||
lua_pushcfunction(tolua_S, lua_cocos2dx_Scene_createWithPhysics);
|
||||
lua_rawset(tolua_S, -3);
|
||||
tolua_function(tolua_S, "getPhysicsWorld", lua_cocos2dx_Scene_getPhysicsWorld);
|
||||
tolua_function(tolua_S, "createWithPhysics", lua_cocos2dx_Scene_createWithPhysics);
|
||||
#endif
|
||||
#if CC_USE_3D_PHYSICS && CC_ENABLE_BULLET_INTEGRATION
|
||||
tolua_function(tolua_S, "getPhysics3DWorld", lua_cocos2dx_Scene_getPhysics3DWorld);
|
||||
tolua_function(tolua_S, "setPhysics3DDebugCamera", lua_cocos2dx_Scene_setPhysics3DDebugCamera);
|
||||
#endif
|
||||
}
|
||||
lua_pop(tolua_S, 1);
|
||||
|
@ -7411,6 +7511,69 @@ static void extendCamera(lua_State* tolua_S)
|
|||
lua_pop(tolua_S, 1);
|
||||
}
|
||||
|
||||
int lua_cocos2dx_Properties_createNonRefCounted(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertable(tolua_S,1,"cc.Properties",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S) - 1;
|
||||
|
||||
if (argc == 1)
|
||||
{
|
||||
std::string arg0;
|
||||
ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Properties:createNonRefCounted");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Properties_createNonRefCounted'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cocos2d::Properties* ret = cocos2d::Properties::createNonRefCounted(arg0);
|
||||
object_to_luaval<cocos2d::Properties>(tolua_S, "cc.Properties",(cocos2d::Properties*)ret);
|
||||
tolua_register_gc(tolua_S,lua_gettop(tolua_S));
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Properties:createNonRefCounted",argc, 1);
|
||||
return 0;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Properties_createNonRefCounted'.",&tolua_err);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int lua_collect_Properties (lua_State* tolua_S)
|
||||
{
|
||||
cocos2d::Properties* self = (cocos2d::Properties*) tolua_tousertype(tolua_S,1,0);
|
||||
CC_SAFE_DELETE(self);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void extendProperties(lua_State* tolua_S)
|
||||
{
|
||||
lua_pushstring(tolua_S, "cc.Properties");
|
||||
lua_rawget(tolua_S, LUA_REGISTRYINDEX);
|
||||
if (lua_istable(tolua_S,-1))
|
||||
{
|
||||
tolua_function(tolua_S, "createNonRefCounted", lua_cocos2dx_Properties_createNonRefCounted);
|
||||
}
|
||||
lua_pop(tolua_S, 1);
|
||||
|
||||
luaL_getmetatable(tolua_S, "cc.Properties");
|
||||
if (lua_istable(tolua_S, -1))
|
||||
{
|
||||
tolua_function(tolua_S, ".collector", lua_collect_Properties);
|
||||
}
|
||||
lua_pop(tolua_S, 1);
|
||||
}
|
||||
|
||||
int register_all_cocos2dx_manual(lua_State* tolua_S)
|
||||
{
|
||||
if (NULL == tolua_S)
|
||||
|
@ -7467,6 +7630,7 @@ int register_all_cocos2dx_manual(lua_State* tolua_S)
|
|||
extendTextureCache(tolua_S);
|
||||
extendGLView(tolua_S);
|
||||
extendCamera(tolua_S);
|
||||
extendProperties(tolua_S);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -8008,6 +8172,253 @@ tolua_lerror:
|
|||
#endif
|
||||
}
|
||||
|
||||
int tolua_cocos2d_Mat4_translate(lua_State* tolua_S)
|
||||
{
|
||||
bool ok = true;
|
||||
int argc = lua_gettop(tolua_S);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
if (argc == 1)
|
||||
{
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
|
||||
if (!tolua_istable(tolua_S, 1, 0, &tolua_err) ||
|
||||
!tolua_istable(tolua_S, 2, 0, &tolua_err))
|
||||
goto tolua_lerror;
|
||||
else
|
||||
#endif
|
||||
{
|
||||
cocos2d::Mat4 mat;
|
||||
cocos2d::Vec3 vec3;
|
||||
ok &= luaval_to_mat4(tolua_S, 1, &mat);
|
||||
if (!ok)
|
||||
return 0;
|
||||
|
||||
ok &= luaval_to_vec3(tolua_S, 2, &vec3);
|
||||
if (!ok)
|
||||
return 0;
|
||||
|
||||
mat.translate(vec3);
|
||||
mat4_to_luaval(tolua_S, mat);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'tolua_cocos2d_Mat4_translate'.",&tolua_err);
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
int tolua_cocos2d_Mat4_createRotationZ(lua_State* tolua_S)
|
||||
{
|
||||
bool ok = true;
|
||||
int argc = lua_gettop(tolua_S);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
if (argc == 2)
|
||||
{
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
|
||||
if (!tolua_istable(tolua_S, 1, 0, &tolua_err) ||
|
||||
!tolua_isnumber(tolua_S, 2, 0, &tolua_err))
|
||||
goto tolua_lerror;
|
||||
else
|
||||
#endif
|
||||
{
|
||||
cocos2d::Mat4 mat;
|
||||
float angle;
|
||||
ok &= luaval_to_mat4(tolua_S, 1, &mat);
|
||||
if (!ok)
|
||||
return 0;
|
||||
angle = lua_tonumber(tolua_S, 2);
|
||||
cocos2d::Mat4::createRotationZ(angle, &mat);
|
||||
mat4_to_luaval(tolua_S, mat);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'tolua_cocos2d_Mat4_createRotationZ'.",&tolua_err);
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
int tolua_cocos2d_Mat4_setIdentity(lua_State* tolua_S)
|
||||
{
|
||||
bool ok = true;
|
||||
int argc = lua_gettop(tolua_S);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
if (argc == 1)
|
||||
{
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
|
||||
if (!tolua_istable(tolua_S, 1, 0, &tolua_err))
|
||||
goto tolua_lerror;
|
||||
else
|
||||
#endif
|
||||
{
|
||||
cocos2d::Mat4 mat;
|
||||
ok &= luaval_to_mat4(tolua_S, 1, &mat);
|
||||
if (!ok)
|
||||
return 0;
|
||||
mat.setIdentity();
|
||||
mat4_to_luaval(tolua_S, mat);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'tolua_cocos2d_Mat4_setIdentity'.",&tolua_err);
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
int tolua_cocos2d_Mat4_createTranslation(lua_State* tolua_S)
|
||||
{
|
||||
bool ok = true;
|
||||
int argc = lua_gettop(tolua_S);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
if (argc == 4)
|
||||
{
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
|
||||
if ( !tolua_isnumber(tolua_S, 1, 0, &tolua_err) ||
|
||||
!tolua_isnumber(tolua_S, 2, 0, &tolua_err) ||
|
||||
!tolua_isnumber(tolua_S, 3, 0, &tolua_err) ||
|
||||
!tolua_istable(tolua_S, 4, 0, &tolua_err))
|
||||
goto tolua_lerror;
|
||||
else
|
||||
#endif
|
||||
{
|
||||
cocos2d::Mat4 dst;
|
||||
ok &= luaval_to_mat4(tolua_S, 4, &dst, "cc.Mat4.createTranslation");
|
||||
if (!ok)
|
||||
return 0;
|
||||
|
||||
float xTranslation = (float)lua_tonumber(tolua_S, 1);
|
||||
float yTranslation = (float)lua_tonumber(tolua_S, 2);
|
||||
float zTranslation = (float)lua_tonumber(tolua_S, 3);
|
||||
|
||||
cocos2d::Mat4::createTranslation(xTranslation, yTranslation, zTranslation, &dst);
|
||||
mat4_to_luaval(tolua_S, dst);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
else if (argc == 2)
|
||||
{
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
|
||||
if ( !tolua_istable(tolua_S, 1, 0, &tolua_err) ||
|
||||
!tolua_istable(tolua_S, 2, 0, &tolua_err))
|
||||
goto tolua_lerror;
|
||||
else
|
||||
#endif
|
||||
{
|
||||
cocos2d::Vec3 translation;
|
||||
cocos2d::Mat4 dst;
|
||||
|
||||
ok &= luaval_to_vec3(tolua_S, 1, &translation, "cc.Mat4.createTranslation");
|
||||
ok &= luaval_to_mat4(tolua_S, 2, &dst, "cc.Mat4.createTranslation");
|
||||
if (!ok)
|
||||
return 0;
|
||||
|
||||
cocos2d::Mat4::createTranslation(translation, &dst);
|
||||
mat4_to_luaval(tolua_S, dst);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'tolua_cocos2d_Mat4_createTranslation'.",&tolua_err);
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
int tolua_cocos2d_Mat4_createRotation(lua_State* tolua_S)
|
||||
{
|
||||
bool ok = true;
|
||||
int argc = lua_gettop(tolua_S);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
if (argc == 2)
|
||||
{
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
|
||||
if ( !tolua_istable(tolua_S, 1, 0, &tolua_err) ||
|
||||
!tolua_istable(tolua_S, 2, 0, &tolua_err))
|
||||
goto tolua_lerror;
|
||||
else
|
||||
#endif
|
||||
{
|
||||
cocos2d::Quaternion quat;
|
||||
cocos2d::Mat4 dst;
|
||||
|
||||
ok &= luaval_to_quaternion(tolua_S, 1, &quat, "cc.Mat4.createRotation");
|
||||
ok &= luaval_to_mat4(tolua_S, 2, &dst, "cc.Mat4.createRotation");
|
||||
if (!ok)
|
||||
return 0;
|
||||
|
||||
cocos2d::Mat4::createRotation(quat, &dst);
|
||||
mat4_to_luaval(tolua_S, dst);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
else if (argc == 3)
|
||||
{
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
|
||||
if ( !tolua_istable(tolua_S, 1, 0, &tolua_err) ||
|
||||
!tolua_isnumber(tolua_S, 2, 0, &tolua_err) ||
|
||||
!tolua_istable(tolua_S, 3, 0, &tolua_err))
|
||||
goto tolua_lerror;
|
||||
else
|
||||
#endif
|
||||
{
|
||||
cocos2d::Vec3 axis;
|
||||
cocos2d::Mat4 dst;
|
||||
|
||||
ok &= luaval_to_vec3(tolua_S, 1, &axis, "cc.Mat4.createRotation");
|
||||
ok &= luaval_to_mat4(tolua_S, 3, &dst, "cc.Mat4.createRotation");
|
||||
if (!ok)
|
||||
return 0;
|
||||
|
||||
float angle = (float)tolua_tonumber(tolua_S, 2, 0);
|
||||
|
||||
cocos2d::Mat4::createRotation(axis, angle, &dst);
|
||||
mat4_to_luaval(tolua_S, dst);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'tolua_cocos2d_Mat4_createRotation'.",&tolua_err);
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
int register_all_cocos2dx_math_manual(lua_State* tolua_S)
|
||||
{
|
||||
if (nullptr == tolua_S)
|
||||
|
@ -8020,6 +8431,11 @@ int register_all_cocos2dx_math_manual(lua_State* tolua_S)
|
|||
tolua_function(tolua_S, "mat4_transformVector", tolua_cocos2d_Mat4_transformVector);
|
||||
tolua_function(tolua_S, "mat4_decompose", tolua_cocos2d_Mat4_decompose);
|
||||
tolua_function(tolua_S, "mat4_multiply", tolua_cocos2d_Mat4_multiply);
|
||||
tolua_function(tolua_S, "mat4_translate", tolua_cocos2d_Mat4_translate);
|
||||
tolua_function(tolua_S, "mat4_createRotationZ", tolua_cocos2d_Mat4_createRotationZ);
|
||||
tolua_function(tolua_S, "mat4_setIdentity", tolua_cocos2d_Mat4_setIdentity);
|
||||
tolua_function(tolua_S, "mat4_createTranslation", tolua_cocos2d_Mat4_createTranslation);
|
||||
tolua_function(tolua_S, "mat4_createRotation", tolua_cocos2d_Mat4_createRotation);
|
||||
tolua_function(tolua_S, "vec3_cross", tolua_cocos2d_Vec3_cross);
|
||||
tolua_endmodule(tolua_S);
|
||||
return 0;
|
||||
|
|
|
@ -76,9 +76,9 @@ namespace cocostudio
|
|||
customOptions.Accept(writer);
|
||||
|
||||
auto stack = LuaEngine::getInstance()->getLuaStack();
|
||||
stack->pushString(classType.c_str(), classType.size());
|
||||
stack->pushString(classType.c_str(), static_cast<int>(classType.size()));
|
||||
stack->pushObject(widget, "cc.Ref");
|
||||
stack->pushString(buffer.GetString(), buffer.Size());
|
||||
stack->pushString(buffer.GetString(), static_cast<int>(buffer.GetSize()));
|
||||
stack->executeFunctionByHandler(_setPropsFunc, 3);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,826 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2014 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
#include "platform/CCPlatformConfig.h"
|
||||
#include "base/ccConfig.h"
|
||||
#if CC_USE_3D_PHYSICS && CC_ENABLE_BULLET_INTEGRATION
|
||||
#include "lua_cocos2dx_physics3d_manual.h"
|
||||
#include "lua_cocos2dx_physics3d_auto.hpp"
|
||||
#include "tolua_fix.h"
|
||||
#include "LuaBasicConversions.h"
|
||||
#include "CCLuaEngine.h"
|
||||
#include "physics3d/CCPhysics3D.h"
|
||||
|
||||
bool luaval_to_Physics3DRigidBodyDes(lua_State* L,int lo,cocos2d::Physics3DRigidBodyDes* outValue, const char* funcName)
|
||||
{
|
||||
if (nullptr == L || nullptr == outValue)
|
||||
return false;
|
||||
|
||||
bool ok = true;
|
||||
|
||||
tolua_Error tolua_err;
|
||||
if (!tolua_istable(L, lo, 0, &tolua_err) )
|
||||
{
|
||||
#if COCOS2D_DEBUG >=1
|
||||
luaval_to_native_err(L,"#ferror:",&tolua_err,funcName);
|
||||
#endif
|
||||
ok = false;
|
||||
}
|
||||
|
||||
if (ok)
|
||||
{
|
||||
lua_pushstring(L, "mass");
|
||||
lua_gettable(L, lo);
|
||||
outValue->mass = lua_isnil(L, -1) ? 0 : lua_tonumber(L, -1);
|
||||
lua_pop(L, 1);
|
||||
|
||||
lua_pushstring(L, "localInertia");
|
||||
lua_gettable(L, lo);
|
||||
if (!lua_istable(L, -1))
|
||||
{
|
||||
outValue->localInertia = cocos2d::Vec3(0.0, 0.0, 0.0);
|
||||
}
|
||||
else
|
||||
{
|
||||
luaval_to_vec3(L, lua_gettop(L), &outValue->localInertia);
|
||||
}
|
||||
lua_pop(L, 1);
|
||||
|
||||
lua_pushstring(L, "shape");
|
||||
lua_gettable(L, lo);
|
||||
if (!tolua_isusertype(L, -1, "cc.Physics3DShape", 0, &tolua_err))
|
||||
{
|
||||
outValue->shape = nullptr;
|
||||
}
|
||||
else
|
||||
{
|
||||
outValue->shape = static_cast<cocos2d::Physics3DShape*>(tolua_tousertype(L, lua_gettop(L), nullptr));
|
||||
}
|
||||
lua_pop(L, 1);
|
||||
|
||||
lua_pushstring(L, "originalTransform");
|
||||
lua_gettable(L, lo);
|
||||
if (!lua_istable(L, -1))
|
||||
{
|
||||
outValue->originalTransform = cocos2d::Mat4();
|
||||
}
|
||||
else
|
||||
{
|
||||
luaval_to_mat4(L, lua_gettop(L), &outValue->originalTransform);
|
||||
}
|
||||
lua_pop(L, 1);
|
||||
|
||||
lua_pushstring(L, "disableSleep");
|
||||
lua_gettable(L, lo);
|
||||
outValue->disableSleep = lua_isnil(L, -1) ? false : lua_toboolean(L, -1);
|
||||
lua_pop(L, 1);
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
bool luaval_to_Physics3DWorld_HitResult(lua_State* L,int lo, cocos2d::Physics3DWorld::HitResult* outValue, const char* funcName)
|
||||
{
|
||||
if (nullptr == L || nullptr == outValue)
|
||||
return false;
|
||||
|
||||
bool ok = true;
|
||||
|
||||
tolua_Error tolua_err;
|
||||
if (!tolua_istable(L, lo, 0, &tolua_err) )
|
||||
{
|
||||
#if COCOS2D_DEBUG >=1
|
||||
luaval_to_native_err(L,"#ferror:",&tolua_err,funcName);
|
||||
#endif
|
||||
ok = false;
|
||||
}
|
||||
|
||||
if (ok)
|
||||
{
|
||||
lua_pushstring(L, "hitPosition");
|
||||
lua_gettable(L, lo);
|
||||
if (!lua_istable(L, -1))
|
||||
{
|
||||
outValue->hitPosition = cocos2d::Vec3();
|
||||
}
|
||||
else
|
||||
{
|
||||
luaval_to_vec3(L, lua_gettop(L), &(outValue->hitPosition));
|
||||
}
|
||||
lua_pop(L, 1);
|
||||
|
||||
lua_pushstring(L, "hitNormal");
|
||||
lua_gettable(L, lo);
|
||||
if (!lua_istable(L, -1))
|
||||
{
|
||||
outValue->hitNormal = cocos2d::Vec3();
|
||||
}
|
||||
else
|
||||
{
|
||||
luaval_to_vec3(L, lua_gettop(L), &(outValue->hitNormal));
|
||||
}
|
||||
lua_pop(L, 1);
|
||||
|
||||
lua_pushstring(L, "hitObj");
|
||||
lua_gettable(L, lo);
|
||||
if (!tolua_isusertype(L, -1, "cc.Physics3DObject", 0, &tolua_err))
|
||||
{
|
||||
outValue->hitObj = nullptr;
|
||||
}
|
||||
else
|
||||
{
|
||||
outValue->hitObj = static_cast<cocos2d::Physics3DObject*>(tolua_tousertype(L, lua_gettop(L), nullptr));
|
||||
}
|
||||
lua_pop(L, 1);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void Physics3DWorld_HitResult_to_luaval(lua_State* L, const cocos2d::Physics3DWorld::HitResult& hitResult)
|
||||
{
|
||||
if (nullptr == L)
|
||||
return;
|
||||
|
||||
lua_newtable(L);
|
||||
lua_pushstring(L, "hitPosition");
|
||||
vec3_to_luaval(L, hitResult.hitPosition);
|
||||
lua_rawset(L, -3);
|
||||
lua_pushstring(L, "hitNormal");
|
||||
vec3_to_luaval(L, hitResult.hitNormal);
|
||||
lua_rawset(L, -3);
|
||||
lua_pushstring(L, "hitObj");
|
||||
if (nullptr == hitResult.hitObj)
|
||||
{
|
||||
lua_pushnil(L);
|
||||
}
|
||||
else
|
||||
{
|
||||
object_to_luaval<cocos2d::Physics3DObject>(L, "cc.Physics3DObject",hitResult.hitObj);
|
||||
}
|
||||
lua_rawset(L, -3);
|
||||
}
|
||||
|
||||
int lua_cocos2dx_physics3d_PhysicsSprite3D_create(lua_State* L)
|
||||
{
|
||||
int argc = 0;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertable(L,1,"cc.PhysicsSprite3D",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(L) - 1;
|
||||
|
||||
if (argc == 2)
|
||||
{
|
||||
std::string arg0;
|
||||
cocos2d::Physics3DRigidBodyDes arg1;
|
||||
ok &= luaval_to_std_string(L, 2,&arg0, "cc.PhysicsSprite3D:create");
|
||||
ok &= luaval_to_Physics3DRigidBodyDes(L, 3, &arg1, "cc.PhysicsSprite3D:create");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(L,"invalid arguments in function 'lua_cocos2dx_physics3d_PhysicsSprite3D_create'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cocos2d::PhysicsSprite3D* ret = cocos2d::PhysicsSprite3D::create(arg0, &arg1);
|
||||
object_to_luaval<cocos2d::PhysicsSprite3D>(L, "cc.PhysicsSprite3D",(cocos2d::PhysicsSprite3D*)ret);
|
||||
return 1;
|
||||
}
|
||||
if (argc == 3)
|
||||
{
|
||||
std::string arg0;
|
||||
cocos2d::Physics3DRigidBodyDes arg1;
|
||||
cocos2d::Vec3 arg2;
|
||||
ok &= luaval_to_std_string(L, 2,&arg0, "cc.PhysicsSprite3D:create");
|
||||
ok &= luaval_to_Physics3DRigidBodyDes(L, 3, &arg1, "cc.PhysicsSprite3D:create");
|
||||
ok &= luaval_to_vec3(L, 4, &arg2, "cc.PhysicsSprite3D:create");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(L,"invalid arguments in function 'lua_cocos2dx_physics3d_PhysicsSprite3D_create'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cocos2d::PhysicsSprite3D* ret = cocos2d::PhysicsSprite3D::create(arg0, &arg1, arg2);
|
||||
object_to_luaval<cocos2d::PhysicsSprite3D>(L, "cc.PhysicsSprite3D",(cocos2d::PhysicsSprite3D*)ret);
|
||||
return 1;
|
||||
}
|
||||
if (argc == 4)
|
||||
{
|
||||
std::string arg0;
|
||||
cocos2d::Physics3DRigidBodyDes arg1;
|
||||
cocos2d::Vec3 arg2;
|
||||
cocos2d::Quaternion arg3;
|
||||
ok &= luaval_to_std_string(L, 2,&arg0, "cc.PhysicsSprite3D:create");
|
||||
ok &= luaval_to_Physics3DRigidBodyDes(L, 3, &arg1, "cc.PhysicsSprite3D:create");
|
||||
ok &= luaval_to_vec3(L, 4, &arg2, "cc.PhysicsSprite3D:create");
|
||||
ok &= luaval_to_quaternion(L, 5, &arg3);
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(L,"invalid arguments in function 'lua_cocos2dx_physics3d_PhysicsSprite3D_create'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cocos2d::PhysicsSprite3D* ret = cocos2d::PhysicsSprite3D::create(arg0, &arg1, arg2, arg3);
|
||||
object_to_luaval<cocos2d::PhysicsSprite3D>(L, "cc.PhysicsSprite3D",(cocos2d::PhysicsSprite3D*)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(L, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.PhysicsSprite3D:create",argc, 2);
|
||||
return 0;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(L,"#ferror in function 'lua_cocos2dx_physics3d_PhysicsSprite3D_create'.",&tolua_err);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
void extendPhysicsSprite3D(lua_State* L)
|
||||
{
|
||||
lua_pushstring(L, "cc.PhysicsSprite3D");
|
||||
lua_rawget(L, LUA_REGISTRYINDEX);
|
||||
if (lua_istable(L,-1))
|
||||
{
|
||||
tolua_function(L, "create", lua_cocos2dx_physics3d_PhysicsSprite3D_create);
|
||||
}
|
||||
lua_pop(L, 1);
|
||||
}
|
||||
|
||||
int lua_cocos2dx_physics3d_Physics3DRigidBody_create(lua_State* L)
|
||||
{
|
||||
int argc = 0;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertable(L,1,"cc.Physics3DRigidBody",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(L) - 1;
|
||||
|
||||
if (argc == 1)
|
||||
{
|
||||
cocos2d::Physics3DRigidBodyDes arg0;
|
||||
ok &= luaval_to_Physics3DRigidBodyDes(L, 2, &arg0, "cc.Physics3DRigidBody:create");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(L,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_create'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cocos2d::Physics3DRigidBody* ret = cocos2d::Physics3DRigidBody::create(&arg0);
|
||||
object_to_luaval<cocos2d::Physics3DRigidBody>(L, "cc.Physics3DRigidBody",(cocos2d::Physics3DRigidBody*)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(L, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Physics3DRigidBody:create",argc, 1);
|
||||
return 0;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(L,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_create'.",&tolua_err);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
void extendPhysics3DRigidBody(lua_State* L)
|
||||
{
|
||||
lua_pushstring(L, "cc.Physics3DRigidBody");
|
||||
lua_rawget(L, LUA_REGISTRYINDEX);
|
||||
if (lua_istable(L,-1))
|
||||
{
|
||||
tolua_function(L, "create", lua_cocos2dx_physics3d_Physics3DRigidBody_create);
|
||||
}
|
||||
lua_pop(L, 1);
|
||||
}
|
||||
|
||||
int lua_cocos2dx_physics3d_Physics3DComponent_create(lua_State* L)
|
||||
{
|
||||
int argc = 0;
|
||||
bool ok = true;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertable(L,1,"cc.Physics3DComponent",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(L)-1;
|
||||
|
||||
do
|
||||
{
|
||||
if (argc == 1)
|
||||
{
|
||||
cocos2d::Physics3DObject* arg0;
|
||||
ok &= luaval_to_object<cocos2d::Physics3DObject>(L, 2, "cc.Physics3DObject",&arg0);
|
||||
if (!ok) { break; }
|
||||
cocos2d::Physics3DComponent* ret = cocos2d::Physics3DComponent::create(arg0);
|
||||
object_to_luaval<cocos2d::Physics3DComponent>(L, "cc.Physics3DComponent",(cocos2d::Physics3DComponent*)ret);
|
||||
return 1;
|
||||
}
|
||||
} while (0);
|
||||
ok = true;
|
||||
do
|
||||
{
|
||||
if (argc == 2)
|
||||
{
|
||||
cocos2d::Physics3DObject* arg0;
|
||||
ok &= luaval_to_object<cocos2d::Physics3DObject>(L, 2, "cc.Physics3DObject",&arg0);
|
||||
if (!ok) { break; }
|
||||
cocos2d::Vec3 arg1;
|
||||
ok &= luaval_to_vec3(L, 3, &arg1, "cc.Physics3DComponent:create");
|
||||
if (!ok) { break; }
|
||||
cocos2d::Physics3DComponent* ret = cocos2d::Physics3DComponent::create(arg0, arg1);
|
||||
object_to_luaval<cocos2d::Physics3DComponent>(L, "cc.Physics3DComponent",(cocos2d::Physics3DComponent*)ret);
|
||||
return 1;
|
||||
}
|
||||
} while (0);
|
||||
ok = true;
|
||||
do
|
||||
{
|
||||
if (argc == 3)
|
||||
{
|
||||
cocos2d::Physics3DObject* arg0;
|
||||
ok &= luaval_to_object<cocos2d::Physics3DObject>(L, 2, "cc.Physics3DObject",&arg0);
|
||||
if (!ok) { break; }
|
||||
cocos2d::Vec3 arg1;
|
||||
ok &= luaval_to_vec3(L, 3, &arg1, "cc.Physics3DComponent:create");
|
||||
if (!ok) { break; }
|
||||
cocos2d::Quaternion arg2;
|
||||
ok &= luaval_to_quaternion(L, 4, &arg2);
|
||||
if (!ok) { break; }
|
||||
cocos2d::Physics3DComponent* ret = cocos2d::Physics3DComponent::create(arg0, arg1, arg2);
|
||||
object_to_luaval<cocos2d::Physics3DComponent>(L, "cc.Physics3DComponent",(cocos2d::Physics3DComponent*)ret);
|
||||
return 1;
|
||||
}
|
||||
} while (0);
|
||||
ok = true;
|
||||
do
|
||||
{
|
||||
if (argc == 0)
|
||||
{
|
||||
cocos2d::Physics3DComponent* ret = cocos2d::Physics3DComponent::create();
|
||||
object_to_luaval<cocos2d::Physics3DComponent>(L, "cc.Physics3DComponent",(cocos2d::Physics3DComponent*)ret);
|
||||
return 1;
|
||||
}
|
||||
} while (0);
|
||||
ok = true;
|
||||
luaL_error(L, "%s has wrong number of arguments: %d, was expecting %d", "cc.Physics3DComponent:create",argc, 0);
|
||||
return 0;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(L,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DComponent_create'.",&tolua_err);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
void extendPhysics3DComponent(lua_State* L)
|
||||
{
|
||||
lua_pushstring(L, "cc.Physics3DComponent");
|
||||
lua_rawget(L, LUA_REGISTRYINDEX);
|
||||
if (lua_istable(L,-1))
|
||||
{
|
||||
tolua_function(L, "create", lua_cocos2dx_physics3d_Physics3DComponent_create);
|
||||
}
|
||||
lua_pop(L, 1);
|
||||
}
|
||||
|
||||
int lua_cocos2dx_physics3d_Physics3DWorld_rayCast(lua_State* L)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::Physics3DWorld* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(L,1,"cc.Physics3DWorld",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::Physics3DWorld*)tolua_tousertype(L,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(L,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DWorld_rayCast'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(L)-1;
|
||||
if (argc == 3)
|
||||
{
|
||||
cocos2d::Vec3 arg0;
|
||||
cocos2d::Vec3 arg1;
|
||||
cocos2d::Physics3DWorld::HitResult arg2;
|
||||
|
||||
ok &= luaval_to_vec3(L, 2, &arg0, "cc.Physics3DWorld:rayCast");
|
||||
|
||||
ok &= luaval_to_vec3(L, 3, &arg1, "cc.Physics3DWorld:rayCast");
|
||||
|
||||
ok &= luaval_to_Physics3DWorld_HitResult(L, 4, &arg2, "cc.Physics3DWorld:rayCast");
|
||||
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(L,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DWorld_rayCast'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
bool ret = cobj->rayCast(arg0, arg1, &arg2);
|
||||
tolua_pushboolean(L,(bool)ret);
|
||||
Physics3DWorld_HitResult_to_luaval(L, arg2);
|
||||
return 2;
|
||||
}
|
||||
luaL_error(L, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DWorld:rayCast",argc, 3);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(L,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DWorld_rayCast'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void extendPhysics3DWorld(lua_State* L)
|
||||
{
|
||||
lua_pushstring(L, "cc.Physics3DWorld");
|
||||
lua_rawget(L, LUA_REGISTRYINDEX);
|
||||
if (lua_istable(L,-1))
|
||||
{
|
||||
tolua_function(L, "rayCast", lua_cocos2dx_physics3d_Physics3DWorld_rayCast);
|
||||
}
|
||||
lua_pop(L, 1);
|
||||
}
|
||||
|
||||
int lua_cocos2dx_physics3d_Physics3DShape_createMesh(lua_State* L)
|
||||
{
|
||||
int argc = 0;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertable(L,1,"cc.Physics3DShape",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(L) - 1;
|
||||
|
||||
if (argc == 2)
|
||||
{
|
||||
std::vector<Vec3> arg0;
|
||||
int arg1;
|
||||
ok &= luaval_to_std_vector_vec3(L, 2, &arg0, "cc.Physics3DShape:createMesh");
|
||||
ok &= luaval_to_int32(L, 3,(int *)&arg1, "cc.Physics3DShape:createMesh");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(L,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DShape_createMesh'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cocos2d::Physics3DShape* ret = cocos2d::Physics3DShape::createMesh(&arg0[0], arg1);
|
||||
object_to_luaval<cocos2d::Physics3DShape>(L, "cc.Physics3DShape",(cocos2d::Physics3DShape*)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(L, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Physics3DShape:createMesh",argc, 2);
|
||||
return 0;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(L,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DShape_createMesh'.",&tolua_err);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
int lua_cocos2dx_physics3d_Physics3DShape_createHeightfield(lua_State* L)
|
||||
{
|
||||
int argc = 0;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertable(L,1,"cc.Physics3DShape",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(L) - 1;
|
||||
|
||||
if (argc == 8)
|
||||
{
|
||||
int arg0;
|
||||
int arg1;
|
||||
std::vector<float> arg2;
|
||||
double arg3;
|
||||
double arg4;
|
||||
double arg5;
|
||||
bool arg6;
|
||||
bool arg7;
|
||||
ok &= luaval_to_int32(L, 2,(int *)&arg0, "cc.Physics3DShape:createHeightfield");
|
||||
ok &= luaval_to_int32(L, 3,(int *)&arg1, "cc.Physics3DShape:createHeightfield");
|
||||
ok &= luaval_to_std_vector_float(L, 4, &arg2,"cc.Physics3DShape:createHeightfield");
|
||||
ok &= luaval_to_number(L, 5,&arg3, "cc.Physics3DShape:createHeightfield");
|
||||
ok &= luaval_to_number(L, 6,&arg4, "cc.Physics3DShape:createHeightfield");
|
||||
ok &= luaval_to_number(L, 7,&arg5, "cc.Physics3DShape:createHeightfield");
|
||||
ok &= luaval_to_boolean(L, 8,&arg6, "cc.Physics3DShape:createHeightfield");
|
||||
ok &= luaval_to_boolean(L, 9,&arg7, "cc.Physics3DShape:createHeightfield");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(L,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DShape_createHeightfield'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cocos2d::Physics3DShape* ret = cocos2d::Physics3DShape::createHeightfield(arg0, arg1, &arg2[0], arg3, arg4, arg5, arg6, arg7);
|
||||
object_to_luaval<cocos2d::Physics3DShape>(L, "cc.Physics3DShape",(cocos2d::Physics3DShape*)ret);
|
||||
return 1;
|
||||
}
|
||||
if (argc == 9)
|
||||
{
|
||||
int arg0;
|
||||
int arg1;
|
||||
std::vector<float> arg2;
|
||||
double arg3;
|
||||
double arg4;
|
||||
double arg5;
|
||||
bool arg6;
|
||||
bool arg7;
|
||||
bool arg8;
|
||||
ok &= luaval_to_int32(L, 2,(int *)&arg0, "cc.Physics3DShape:createHeightfield");
|
||||
ok &= luaval_to_int32(L, 3,(int *)&arg1, "cc.Physics3DShape:createHeightfield");
|
||||
ok &= luaval_to_std_vector_float(L, 4, &arg2,"cc.Physics3DShape:createHeightfield");
|
||||
ok &= luaval_to_number(L, 5,&arg3, "cc.Physics3DShape:createHeightfield");
|
||||
ok &= luaval_to_number(L, 6,&arg4, "cc.Physics3DShape:createHeightfield");
|
||||
ok &= luaval_to_number(L, 7,&arg5, "cc.Physics3DShape:createHeightfield");
|
||||
ok &= luaval_to_boolean(L, 8,&arg6, "cc.Physics3DShape:createHeightfield");
|
||||
ok &= luaval_to_boolean(L, 9,&arg7, "cc.Physics3DShape:createHeightfield");
|
||||
ok &= luaval_to_boolean(L, 10,&arg8, "cc.Physics3DShape:createHeightfield");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(L,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DShape_createHeightfield'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cocos2d::Physics3DShape* ret = cocos2d::Physics3DShape::createHeightfield(arg0, arg1, &arg2[0], arg3, arg4, arg5, arg6, arg7, arg8);
|
||||
object_to_luaval<cocos2d::Physics3DShape>(L, "cc.Physics3DShape",(cocos2d::Physics3DShape*)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(L, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Physics3DShape:createHeightfield",argc, 8);
|
||||
return 0;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(L,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DShape_createHeightfield'.",&tolua_err);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
int lua_cocos2dx_physics3d_Physics3DShape_createCompoundShape(lua_State* L)
|
||||
{
|
||||
int argc = 0;
|
||||
bool ok = true;
|
||||
|
||||
tolua_Error tolua_err;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertable(L,1,"cc.Physics3DShape",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(L) - 1;
|
||||
|
||||
if (argc == 1)
|
||||
{
|
||||
|
||||
std::vector<std::pair<cocos2d::Physics3DShape *, cocos2d::Mat4>> shapes;
|
||||
if (!tolua_istable(L, 2, 0, &tolua_err) )
|
||||
{
|
||||
#if COCOS2D_DEBUG >=1
|
||||
luaval_to_native_err(L,"#ferror:",&tolua_err,"cc.Physics3DShape:createCompoundShape");
|
||||
#endif
|
||||
ok = false;
|
||||
}
|
||||
|
||||
if (ok)
|
||||
{
|
||||
size_t len = lua_objlen(L, 2);
|
||||
cocos2d::Physics3DShape* shape = nullptr;
|
||||
cocos2d::Mat4 mat;
|
||||
for (size_t i = 0; i < len; i++)
|
||||
{
|
||||
lua_pushnumber(L,i + 1);
|
||||
lua_gettable(L,2);
|
||||
if (lua_istable(L, -1))
|
||||
{
|
||||
lua_pushnumber(L, 1);
|
||||
lua_gettable(L, -2);
|
||||
luaval_to_object(L, lua_gettop(L), "cc.Physics3DShape", &shape);
|
||||
lua_pop(L,1);
|
||||
|
||||
lua_pushnumber(L, 2);
|
||||
lua_gettable(L, -2);
|
||||
luaval_to_mat4(L, lua_gettop(L), &mat);
|
||||
lua_pop(L,1);
|
||||
|
||||
shapes.push_back(std::make_pair(shape, mat));
|
||||
}
|
||||
lua_pop(L, 1);
|
||||
}
|
||||
}
|
||||
|
||||
cocos2d::Physics3DShape* ret = cocos2d::Physics3DShape::createCompoundShape(shapes);
|
||||
object_to_luaval<cocos2d::Physics3DShape>(L, "cc.Physics3DShape",(cocos2d::Physics3DShape*)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(L, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Physics3DShape:createCompoundShape",argc, 1);
|
||||
return 0;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(L,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DShape_createCompoundShape'.",&tolua_err);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
void extendPhysics3DShape(lua_State* L)
|
||||
{
|
||||
lua_pushstring(L, "cc.Physics3DShape");
|
||||
lua_rawget(L, LUA_REGISTRYINDEX);
|
||||
if (lua_istable(L,-1))
|
||||
{
|
||||
tolua_function(L, "createMesh", lua_cocos2dx_physics3d_Physics3DShape_createMesh);
|
||||
tolua_function(L, "createHeightfield", lua_cocos2dx_physics3d_Physics3DShape_createHeightfield);
|
||||
tolua_function(L, "createCompoundShape", lua_cocos2dx_physics3d_Physics3DShape_createCompoundShape);
|
||||
}
|
||||
lua_pop(L, 1);
|
||||
}
|
||||
|
||||
void CollisionPoint_to_luaval(lua_State* L,const cocos2d::Physics3DCollisionInfo::CollisionPoint& collisionPoint)
|
||||
{
|
||||
if (nullptr == L)
|
||||
return;
|
||||
|
||||
lua_newtable(L);
|
||||
lua_pushstring(L, "localPositionOnA");
|
||||
vec3_to_luaval(L, collisionPoint.localPositionOnA);
|
||||
lua_rawset(L, -3);
|
||||
lua_pushstring(L, "worldPositionOnA");
|
||||
vec3_to_luaval(L, collisionPoint.worldPositionOnA);
|
||||
lua_rawset(L, -3);
|
||||
lua_pushstring(L, "localPositionOnB");
|
||||
vec3_to_luaval(L, collisionPoint.localPositionOnB);
|
||||
lua_rawset(L, -3);
|
||||
lua_pushstring(L, "worldPositionOnB");
|
||||
vec3_to_luaval(L, collisionPoint.worldPositionOnB);
|
||||
lua_rawset(L, -3);
|
||||
lua_pushstring(L, "worldNormalOnB");
|
||||
vec3_to_luaval(L, collisionPoint.worldNormalOnB);
|
||||
lua_rawset(L, -3);
|
||||
}
|
||||
|
||||
int lua_cocos2dx_physics3d_Physics3DObject_setCollisionCallback(lua_State* L)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::Physics3DObject* cobj = nullptr;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(L,1,"cc.Physics3DObject",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::Physics3DObject*)tolua_tousertype(L,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(L,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DObject_setCollisionCallback'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(L)-1;
|
||||
if (argc == 1)
|
||||
{
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!toluafix_isfunction(L,2,"LUA_FUNCTION",0,&tolua_err)) {
|
||||
goto tolua_lerror;
|
||||
}
|
||||
#endif
|
||||
LUA_FUNCTION handler = toluafix_ref_function(L,2,0);
|
||||
cobj->setCollisionCallback([=](const cocos2d::Physics3DCollisionInfo& ci){
|
||||
lua_newtable(L);
|
||||
lua_pushstring(L, "objA");
|
||||
if (nullptr == ci.objA)
|
||||
{
|
||||
lua_pushnil(L);
|
||||
}
|
||||
else
|
||||
{
|
||||
object_to_luaval(L, "cc.Physics3DObject", ci.objA);
|
||||
}
|
||||
lua_rawset(L, -3);
|
||||
lua_pushstring(L, "objB");
|
||||
if (nullptr == ci.objB)
|
||||
{
|
||||
lua_pushnil(L);
|
||||
}
|
||||
else
|
||||
{
|
||||
object_to_luaval(L, "cc.Physics3DObject", ci.objB);
|
||||
}
|
||||
lua_rawset(L, -3);
|
||||
lua_pushstring(L, "collisionPointList");
|
||||
if (ci.collisionPointList.empty())
|
||||
{
|
||||
lua_pushnil(L);
|
||||
}
|
||||
else
|
||||
{
|
||||
int vecIndex = 1;
|
||||
lua_newtable(L);
|
||||
for (auto value : ci.collisionPointList)
|
||||
{
|
||||
lua_pushnumber(L, vecIndex);
|
||||
CollisionPoint_to_luaval(L, value);
|
||||
lua_rawset(L, -3);
|
||||
++vecIndex;
|
||||
}
|
||||
}
|
||||
lua_rawset(L, -3);
|
||||
LuaEngine::getInstance()->getLuaStack()->executeFunctionByHandler(handler, 1);
|
||||
});
|
||||
|
||||
ScriptHandlerMgr::getInstance()->addCustomHandler((void*)cobj, handler);
|
||||
return 0;
|
||||
}
|
||||
luaL_error(L, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DObject:setCollisionCallback",argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(L,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DObject_setCollisionCallback'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void extendPhysics3DObject(lua_State* L)
|
||||
{
|
||||
lua_pushstring(L, "cc.Physics3DObject");
|
||||
lua_rawget(L, LUA_REGISTRYINDEX);
|
||||
if (lua_istable(L,-1))
|
||||
{
|
||||
tolua_function(L, "setCollisionCallback", lua_cocos2dx_physics3d_Physics3DObject_setCollisionCallback);
|
||||
}
|
||||
lua_pop(L, 1);
|
||||
}
|
||||
|
||||
int register_all_physics3d_manual(lua_State* L)
|
||||
{
|
||||
if (nullptr == L)
|
||||
return 0;
|
||||
|
||||
extendPhysicsSprite3D(L);
|
||||
extendPhysics3DRigidBody(L);
|
||||
extendPhysics3DComponent(L);
|
||||
extendPhysics3DWorld(L);
|
||||
extendPhysics3DShape(L);
|
||||
extendPhysics3DObject(L);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int register_physics3d_module(lua_State* L)
|
||||
{
|
||||
lua_getglobal(L, "_G");
|
||||
if (lua_istable(L,-1))//stack:...,_G,
|
||||
{
|
||||
register_all_cocos2dx_physics3d(L);
|
||||
register_all_physics3d_manual(L);
|
||||
}
|
||||
lua_pop(L, 1);
|
||||
return 1;
|
||||
}
|
||||
|
||||
#endif
|
|
@ -0,0 +1,57 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2014 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
#ifndef COCOS_SCRIPTING_LUA_BINDINGS_MANUAL_PHYSICS3D_LUA_COCOS2DX_PHYSICS3D_MANUAL_H__
|
||||
#define COCOS_SCRIPTING_LUA_BINDINGS_MANUAL_PHYSICS3D_LUA_COCOS2DX_PHYSICS3D_MANUAL_H__
|
||||
|
||||
#if CC_USE_3D_PHYSICS && CC_ENABLE_BULLET_INTEGRATION
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#include "tolua++.h"
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* @addtogroup lua
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* Call this function can import the lua bindings for the physics3d module.
|
||||
* After registering, we could call the related physics3d code conveniently in the lua.
|
||||
* If you don't want to use the physics3d module in the lua, you only don't call this registering function.
|
||||
* If you don't register the physics3d module, the package size would become smaller .
|
||||
* The current mechanism,this function is called in the lua_module_register.h
|
||||
*/
|
||||
|
||||
TOLUA_API int register_physics3d_module(lua_State* L);
|
||||
|
||||
// end group
|
||||
/// @}
|
||||
|
||||
#endif // #if CC_USE_3D_PHYSICS && CC_ENABLE_BULLET_INTEGRATION
|
||||
#endif // #ifndef COCOS_SCRIPTING_LUA_BINDINGS_MANUAL_PHYSICS3D_LUA_COCOS2DX_PHYSICS3D_MANUAL_H__
|
|
@ -116,6 +116,10 @@ LOCAL_SRC_FILES += ../manual/ui/lua_cocos2dx_experimental_webview_manual.cpp \
|
|||
LOCAL_SRC_FILES += ../manual/extension/lua_cocos2dx_extension_manual.cpp \
|
||||
../auto/lua_cocos2dx_extension_auto.cpp \
|
||||
|
||||
#physics3d
|
||||
LOCAL_SRC_FILES += ../manual/physics3d/lua_cocos2dx_physics3d_manual.cpp \
|
||||
../auto/lua_cocos2dx_physics3d_auto.cpp \
|
||||
|
||||
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../../../external/lua/tolua \
|
||||
$(LOCAL_PATH)/../../../../external/lua/luajit/include \
|
||||
$(LOCAL_PATH)/../../../2d \
|
||||
|
@ -126,6 +130,7 @@ LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../../../external/lua/tolua \
|
|||
$(LOCAL_PATH)/../../../editor-support/cocostudio/ActionTimeline \
|
||||
$(LOCAL_PATH)/../../../editor-support/spine \
|
||||
$(LOCAL_PATH)/../../../ui \
|
||||
$(LOCAL_PATH)/../../../physics3d \
|
||||
$(LOCAL_PATH)/../../../../extensions \
|
||||
$(LOCAL_PATH)/../auto \
|
||||
$(LOCAL_PATH)/../manual \
|
||||
|
|
|
@ -151,6 +151,14 @@
|
|||
159552411A25E4B8001E9FC9 /* lua_cocos2dx_csloader_manual.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1595523E1A25E4B8001E9FC9 /* lua_cocos2dx_csloader_manual.cpp */; };
|
||||
159552421A25E4B8001E9FC9 /* lua_cocos2dx_csloader_manual.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 1595523F1A25E4B8001E9FC9 /* lua_cocos2dx_csloader_manual.hpp */; };
|
||||
159552431A25E4B8001E9FC9 /* lua_cocos2dx_csloader_manual.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 1595523F1A25E4B8001E9FC9 /* lua_cocos2dx_csloader_manual.hpp */; };
|
||||
15A561E51B00A09A005D4720 /* lua_cocos2dx_physics3d_auto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15A561E31B00A09A005D4720 /* lua_cocos2dx_physics3d_auto.cpp */; };
|
||||
15A561E61B00A09A005D4720 /* lua_cocos2dx_physics3d_auto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15A561E31B00A09A005D4720 /* lua_cocos2dx_physics3d_auto.cpp */; };
|
||||
15A561E71B00A09A005D4720 /* lua_cocos2dx_physics3d_auto.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 15A561E41B00A09A005D4720 /* lua_cocos2dx_physics3d_auto.hpp */; };
|
||||
15A561E81B00A09A005D4720 /* lua_cocos2dx_physics3d_auto.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 15A561E41B00A09A005D4720 /* lua_cocos2dx_physics3d_auto.hpp */; };
|
||||
15A561EC1B00A3F1005D4720 /* lua_cocos2dx_physics3d_manual.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15A561EA1B00A3F1005D4720 /* lua_cocos2dx_physics3d_manual.cpp */; };
|
||||
15A561ED1B00A3F1005D4720 /* lua_cocos2dx_physics3d_manual.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15A561EA1B00A3F1005D4720 /* lua_cocos2dx_physics3d_manual.cpp */; };
|
||||
15A561EE1B00A3F1005D4720 /* lua_cocos2dx_physics3d_manual.h in Headers */ = {isa = PBXBuildFile; fileRef = 15A561EB1B00A3F1005D4720 /* lua_cocos2dx_physics3d_manual.h */; };
|
||||
15A561EF1B00A3F1005D4720 /* lua_cocos2dx_physics3d_manual.h in Headers */ = {isa = PBXBuildFile; fileRef = 15A561EB1B00A3F1005D4720 /* lua_cocos2dx_physics3d_manual.h */; };
|
||||
15AC69D519876E9300D17520 /* lua_cocos2dx_physics_auto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AACE75218BC45C200215002 /* lua_cocos2dx_physics_auto.cpp */; };
|
||||
15AC69D619876EA200D17520 /* lua_cocos2dx_physics_auto.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 1AACE75318BC45C200215002 /* lua_cocos2dx_physics_auto.hpp */; };
|
||||
15AC69D91987710400D17520 /* tolua_event.c in Sources */ = {isa = PBXBuildFile; fileRef = 1ABCA1F918CD8F6E0087CE3A /* tolua_event.c */; };
|
||||
|
@ -316,6 +324,10 @@
|
|||
159552391A25E1C5001E9FC9 /* lua_cocos2dx_csloader_auto.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = lua_cocos2dx_csloader_auto.hpp; sourceTree = "<group>"; };
|
||||
1595523E1A25E4B8001E9FC9 /* lua_cocos2dx_csloader_manual.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = lua_cocos2dx_csloader_manual.cpp; sourceTree = "<group>"; };
|
||||
1595523F1A25E4B8001E9FC9 /* lua_cocos2dx_csloader_manual.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = lua_cocos2dx_csloader_manual.hpp; sourceTree = "<group>"; };
|
||||
15A561E31B00A09A005D4720 /* lua_cocos2dx_physics3d_auto.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = lua_cocos2dx_physics3d_auto.cpp; sourceTree = "<group>"; };
|
||||
15A561E41B00A09A005D4720 /* lua_cocos2dx_physics3d_auto.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = lua_cocos2dx_physics3d_auto.hpp; sourceTree = "<group>"; };
|
||||
15A561EA1B00A3F1005D4720 /* lua_cocos2dx_physics3d_manual.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = lua_cocos2dx_physics3d_manual.cpp; path = physics3d/lua_cocos2dx_physics3d_manual.cpp; sourceTree = "<group>"; };
|
||||
15A561EB1B00A3F1005D4720 /* lua_cocos2dx_physics3d_manual.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = lua_cocos2dx_physics3d_manual.h; path = physics3d/lua_cocos2dx_physics3d_manual.h; sourceTree = "<group>"; };
|
||||
15B5754D1A6F4D1500041C20 /* lua-cocos-studio-conversions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "lua-cocos-studio-conversions.cpp"; sourceTree = "<group>"; };
|
||||
15B5754E1A6F4D1500041C20 /* lua-cocos-studio-conversions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "lua-cocos-studio-conversions.h"; sourceTree = "<group>"; };
|
||||
15C1BCC019864D8700A46ACC /* lua_cocos2dx_cocosbuilder_auto.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = lua_cocos2dx_cocosbuilder_auto.cpp; sourceTree = "<group>"; };
|
||||
|
@ -476,6 +488,15 @@
|
|||
path = 3d;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
15A561E91B00A3D0005D4720 /* physics3d */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
15A561EA1B00A3F1005D4720 /* lua_cocos2dx_physics3d_manual.cpp */,
|
||||
15A561EB1B00A3F1005D4720 /* lua_cocos2dx_physics3d_manual.h */,
|
||||
);
|
||||
name = physics3d;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
15C1BCD21986525900A46ACC /* cocos2d */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
|
@ -572,6 +593,8 @@
|
|||
1AACE74818BC45C200215002 /* auto */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
15A561E31B00A09A005D4720 /* lua_cocos2dx_physics3d_auto.cpp */,
|
||||
15A561E41B00A09A005D4720 /* lua_cocos2dx_physics3d_auto.hpp */,
|
||||
15C9A10C1AE4972500C15443 /* lua_cocos2dx_experimental_webview_auto.cpp */,
|
||||
15C9A10D1AE4972500C15443 /* lua_cocos2dx_experimental_webview_auto.hpp */,
|
||||
159552381A25E1C5001E9FC9 /* lua_cocos2dx_csloader_auto.cpp */,
|
||||
|
@ -608,6 +631,7 @@
|
|||
1AACE75B18BC45C200215002 /* manual */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
15A561E91B00A3D0005D4720 /* physics3d */,
|
||||
3E2BDB0719C5E6100055CDCD /* audioengine */,
|
||||
158C128419A0FA1300781A76 /* 3d */,
|
||||
15427D41198F73F700DC375D /* cocosdenshion */,
|
||||
|
@ -779,6 +803,7 @@
|
|||
15EFA1F71989E582000C57D3 /* lua_cocos2dx_experimental_auto.hpp in Headers */,
|
||||
15415AA719A71A53004F1E71 /* auxiliar.h in Headers */,
|
||||
155C7E1019A71C9D00F08B25 /* lua_extensions.h in Headers */,
|
||||
15A561E71B00A09A005D4720 /* lua_cocos2dx_physics3d_auto.hpp in Headers */,
|
||||
15415ABF19A71A53004F1E71 /* mime.h in Headers */,
|
||||
15AC69E21987712500D17520 /* tolua_event.h in Headers */,
|
||||
15415AD719A71A53004F1E71 /* udp.h in Headers */,
|
||||
|
@ -820,6 +845,7 @@
|
|||
15C1C2DC19874B4400A46ACC /* xxtea.h in Headers */,
|
||||
15415AD319A71A53004F1E71 /* timeout.h in Headers */,
|
||||
15C1C2D5198749BC00A46ACC /* LuaOpengl.h in Headers */,
|
||||
15A561EE1B00A3F1005D4720 /* lua_cocos2dx_physics3d_manual.h in Headers */,
|
||||
155C7E2819A71CE600F08B25 /* lua_cocos2dx_ui_manual.hpp in Headers */,
|
||||
15C1C2D6198749BC00A46ACC /* lua_cocos2dx_deprecated.h in Headers */,
|
||||
15C1C2D7198749BC00A46ACC /* lua_cocos2dx_experimental_manual.hpp in Headers */,
|
||||
|
@ -860,6 +886,7 @@
|
|||
15EFA650198B3342000C57D3 /* lualib.h in Headers */,
|
||||
155C7E1519A71CAA00F08B25 /* Lua_web_socket.h in Headers */,
|
||||
15EFA64B198B3320000C57D3 /* tolua_event.h in Headers */,
|
||||
15A561EF1B00A3F1005D4720 /* lua_cocos2dx_physics3d_manual.h in Headers */,
|
||||
15EFA64C198B3320000C57D3 /* tolua++.h in Headers */,
|
||||
155C7DF919A71C4500F08B25 /* lua_cocos2dx_cocosdenshion_manual.h in Headers */,
|
||||
15415AB019A71A53004F1E71 /* except.h in Headers */,
|
||||
|
@ -900,6 +927,7 @@
|
|||
15EFA622198B2E74000C57D3 /* lua_cocos2dx_experimental_auto.hpp in Headers */,
|
||||
15EFA623198B2E74000C57D3 /* lua_cocos2dx_auto.hpp in Headers */,
|
||||
155C7E0119A71C6300F08B25 /* CCBProxy.h in Headers */,
|
||||
15A561E81B00A09A005D4720 /* lua_cocos2dx_physics3d_auto.hpp in Headers */,
|
||||
15415AC819A71A53004F1E71 /* select.h in Headers */,
|
||||
155C7E1D19A71CC300F08B25 /* lua_cocos2dx_spine_manual.hpp in Headers */,
|
||||
15EFA624198B2E74000C57D3 /* lua_cocos2dx_physics_auto.hpp in Headers */,
|
||||
|
@ -984,6 +1012,7 @@
|
|||
15B5754F1A6F4D1500041C20 /* lua-cocos-studio-conversions.cpp in Sources */,
|
||||
15415A7619A718FB004F1E71 /* lua_cocos2dx_ui_auto.cpp in Sources */,
|
||||
15415A7719A718FB004F1E71 /* lua_cocos2dx_spine_auto.cpp in Sources */,
|
||||
15A561E51B00A09A005D4720 /* lua_cocos2dx_physics3d_auto.cpp in Sources */,
|
||||
15415A7819A718FB004F1E71 /* lua_cocos2dx_studio_auto.cpp in Sources */,
|
||||
155C7DEC19A71BF200F08B25 /* lua_cocos2dx_cocosdenshion_auto.cpp in Sources */,
|
||||
15AC69D91987710400D17520 /* tolua_event.c in Sources */,
|
||||
|
@ -1035,6 +1064,7 @@
|
|||
155C7DF619A71C3E00F08B25 /* lua_cocos2dx_cocosdenshion_manual.cpp in Sources */,
|
||||
15415AA519A71A53004F1E71 /* auxiliar.c in Sources */,
|
||||
155C7E1A19A71CBC00F08B25 /* lua_cocos2dx_spine_manual.cpp in Sources */,
|
||||
15A561EC1B00A3F1005D4720 /* lua_cocos2dx_physics3d_manual.cpp in Sources */,
|
||||
15C1C2D01987498B00A46ACC /* lua_cocos2dx_experimental_manual.cpp in Sources */,
|
||||
15C1C2D11987498B00A46ACC /* lua_cocos2dx_manual.cpp in Sources */,
|
||||
15C1C2D21987498B00A46ACC /* lua_cocos2dx_physics_manual.cpp in Sources */,
|
||||
|
@ -1052,6 +1082,7 @@
|
|||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
15415AC619A71A53004F1E71 /* select.c in Sources */,
|
||||
15A561ED1B00A3F1005D4720 /* lua_cocos2dx_physics3d_manual.cpp in Sources */,
|
||||
15EFA646198B3311000C57D3 /* tolua_event.c in Sources */,
|
||||
3E2BDB0A19C5E6100055CDCD /* lua_cocos2dx_audioengine_manual.cpp in Sources */,
|
||||
15415AA619A71A53004F1E71 /* auxiliar.c in Sources */,
|
||||
|
@ -1076,6 +1107,7 @@
|
|||
15415AD219A71A53004F1E71 /* timeout.c in Sources */,
|
||||
F4FE0D5819ECD00100B8B12B /* luasocket_scripts.c in Sources */,
|
||||
15EFA639198B328B000C57D3 /* tolua_fix.cpp in Sources */,
|
||||
15A561E61B00A09A005D4720 /* lua_cocos2dx_physics3d_auto.cpp in Sources */,
|
||||
155C7DFF19A71C5C00F08B25 /* CCBProxy.cpp in Sources */,
|
||||
1595523B1A25E1C5001E9FC9 /* lua_cocos2dx_csloader_auto.cpp in Sources */,
|
||||
15C9A1121AE4973400C15443 /* lua_cocos2dx_experimental_webview_manual.cpp in Sources */,
|
||||
|
@ -1142,6 +1174,7 @@
|
|||
"COCOS2D_DEBUG=1",
|
||||
USE_FILE32API,
|
||||
"CC_ENABLE_CHIPMUNK_INTEGRATION=1",
|
||||
"CC_ENABLE_BULLET_INTEGRATION=1",
|
||||
);
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = YES;
|
||||
GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES;
|
||||
|
@ -1159,7 +1192,7 @@
|
|||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = macosx;
|
||||
SKIP_INSTALL = YES;
|
||||
USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/../../../.. $(SRCROOT)/../../.. $(SRCROOT)/../../../base $(SRCROOT)/../../../3d $(SRCROOT)/../../../2d $(SRCROOT)/../../../deprecated $(SRCROOT)/../../../physics $(SRCROOT)/../../../math/kazmath $(SRCROOT)/../../../2d/platform $(SRCROOT)/../../../audio/include $(SRCROOT)/../../../editor-support $(SRCROOT)/../../../editor-support/spine $(SRCROOT)/../../../editor-support/cocostudio $(SRCROOT)/../../../editor-support/cocosbuilder $(SRCROOT)/../../../ui $(SRCROOT)/../../../storage $(SRCROOT)/../../../../extensions $(SRCROOT)/../../../../external $(SRCROOT)/../../../../external/chipmunk/include/chipmunk $(SRCROOT)/../../../../external/lua $(SRCROOT)/../../../../external/lua/luajit/include $(SRCROOT)/../../../../external/lua/tolua $(SRCROOT)/../../../editor-support/cocostudio/ActionTimeline";
|
||||
USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/../../../.. $(SRCROOT)/../../.. $(SRCROOT)/../../../base $(SRCROOT)/../../../3d $(SRCROOT)/../../../2d $(SRCROOT)/../../../deprecated $(SRCROOT)/../../../physics $(SRCROOT)/../../../math/kazmath $(SRCROOT)/../../../2d/platform $(SRCROOT)/../../../audio/include $(SRCROOT)/../../../editor-support $(SRCROOT)/../../../editor-support/spine $(SRCROOT)/../../../editor-support/cocostudio $(SRCROOT)/../../../editor-support/cocosbuilder $(SRCROOT)/../../../ui $(SRCROOT)/../../../storage $(SRCROOT)/../../../../extensions $(SRCROOT)/../../../../external $(SRCROOT)/../../../../external/chipmunk/include/chipmunk $(SRCROOT)/../../../../external/lua $(SRCROOT)/../../../../external/lua/luajit/include $(SRCROOT)/../../../../external/lua/tolua $(SRCROOT)/../../../editor-support/cocostudio/ActionTimeline $(SRCROOT)/../../../physics3d";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
|
@ -1176,6 +1209,7 @@
|
|||
"CC_ENABLE_CHIPMUNK_INTEGRATION=1",
|
||||
NDEBUG,
|
||||
USE_FILE32API,
|
||||
"CC_ENABLE_BULLET_INTEGRATION=1",
|
||||
);
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = YES;
|
||||
GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES;
|
||||
|
@ -1192,7 +1226,7 @@
|
|||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = macosx;
|
||||
SKIP_INSTALL = YES;
|
||||
USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/../../../.. $(SRCROOT)/../../.. $(SRCROOT)/../../../base $(SRCROOT)/../../../3d $(SRCROOT)/../../../2d $(SRCROOT)/../../../deprecated $(SRCROOT)/../../../physics $(SRCROOT)/../../../math/kazmath $(SRCROOT)/../../../2d/platform $(SRCROOT)/../../../audio/include $(SRCROOT)/../../../editor-support $(SRCROOT)/../../../editor-support/spine $(SRCROOT)/../../../editor-support/cocostudio $(SRCROOT)/../../../editor-support/cocosbuilder $(SRCROOT)/../../../ui $(SRCROOT)/../../../storage $(SRCROOT)/../../../../extensions $(SRCROOT)/../../../../external $(SRCROOT)/../../../../external/chipmunk/include/chipmunk $(SRCROOT)/../../../../external/lua $(SRCROOT)/../../../../external/lua/luajit/include $(SRCROOT)/../../../../external/lua/tolua $(SRCROOT)/../../../editor-support/cocostudio/ActionTimeline";
|
||||
USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/../../../.. $(SRCROOT)/../../.. $(SRCROOT)/../../../base $(SRCROOT)/../../../3d $(SRCROOT)/../../../2d $(SRCROOT)/../../../deprecated $(SRCROOT)/../../../physics $(SRCROOT)/../../../math/kazmath $(SRCROOT)/../../../2d/platform $(SRCROOT)/../../../audio/include $(SRCROOT)/../../../editor-support $(SRCROOT)/../../../editor-support/spine $(SRCROOT)/../../../editor-support/cocostudio $(SRCROOT)/../../../editor-support/cocosbuilder $(SRCROOT)/../../../ui $(SRCROOT)/../../../storage $(SRCROOT)/../../../../extensions $(SRCROOT)/../../../../external $(SRCROOT)/../../../../external/chipmunk/include/chipmunk $(SRCROOT)/../../../../external/lua $(SRCROOT)/../../../../external/lua/luajit/include $(SRCROOT)/../../../../external/lua/tolua $(SRCROOT)/../../../editor-support/cocostudio/ActionTimeline $(SRCROOT)/../../../physics3d";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
name = Release;
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
<ClCompile Include="..\auto\lua_cocos2dx_experimental_video_auto.cpp" />
|
||||
<ClCompile Include="..\auto\lua_cocos2dx_experimental_webview_auto.cpp" />
|
||||
<ClCompile Include="..\auto\lua_cocos2dx_extension_auto.cpp" />
|
||||
<ClCompile Include="..\auto\lua_cocos2dx_physics3d_auto.cpp" />
|
||||
<ClCompile Include="..\auto\lua_cocos2dx_physics_auto.cpp" />
|
||||
<ClCompile Include="..\auto\lua_cocos2dx_spine_auto.cpp" />
|
||||
<ClCompile Include="..\auto\lua_cocos2dx_studio_auto.cpp" />
|
||||
|
@ -71,6 +72,7 @@
|
|||
<ClCompile Include="..\manual\network\lua_extensions.c" />
|
||||
<ClCompile Include="..\manual\network\Lua_web_socket.cpp" />
|
||||
<ClCompile Include="..\manual\network\lua_xml_http_request.cpp" />
|
||||
<ClCompile Include="..\manual\physics3d\lua_cocos2dx_physics3d_manual.cpp" />
|
||||
<ClCompile Include="..\manual\spine\LuaSkeletonAnimation.cpp" />
|
||||
<ClCompile Include="..\manual\spine\lua_cocos2dx_spine_manual.cpp" />
|
||||
<ClCompile Include="..\manual\tolua_fix.cpp" />
|
||||
|
@ -111,6 +113,7 @@
|
|||
<ClInclude Include="..\auto\lua_cocos2dx_experimental_video_auto.hpp" />
|
||||
<ClInclude Include="..\auto\lua_cocos2dx_experimental_webview_auto.hpp" />
|
||||
<ClInclude Include="..\auto\lua_cocos2dx_extension_auto.hpp" />
|
||||
<ClInclude Include="..\auto\lua_cocos2dx_physics3d_auto.hpp" />
|
||||
<ClInclude Include="..\auto\lua_cocos2dx_physics_auto.hpp" />
|
||||
<ClInclude Include="..\auto\lua_cocos2dx_spine_auto.hpp" />
|
||||
<ClInclude Include="..\auto\lua_cocos2dx_studio_auto.hpp" />
|
||||
|
@ -141,6 +144,7 @@
|
|||
<ClInclude Include="..\manual\network\lua_extensions.h" />
|
||||
<ClInclude Include="..\manual\network\Lua_web_socket.h" />
|
||||
<ClInclude Include="..\manual\network\lua_xml_http_request.h" />
|
||||
<ClInclude Include="..\manual\physics3d\lua_cocos2dx_physics3d_manual.h" />
|
||||
<ClInclude Include="..\manual\spine\LuaSkeletonAnimation.h" />
|
||||
<ClInclude Include="..\manual\spine\lua_cocos2dx_spine_manual.hpp" />
|
||||
<ClInclude Include="..\manual\tolua_fix.h" />
|
||||
|
@ -269,8 +273,8 @@
|
|||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>$(EngineRoot);$(EngineRoot)cocos\2d;$(EngineRoot)cocos\base;$(EngineRoot)cocos\3d;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\ui;$(EngineRoot)external;$(EngineRoot)external\lua;$(EngineRoot)external\lua\tolua;$(EngineRoot)external\lua\luajit\include;$(EngineRoot)external\libwebsockets\win32\include;$(EngineRoot)extensions;$(EngineRoot)cocos\editor-support;$(EngineRoot)cocos\editor-support\cocostudio;$(EngineRoot)cocos\editor-support\cocostudio\ActionTimeline;$(EngineRoot)cocos\editor-support\spine;$(EngineRoot)cocos\editor-support\cocosbuilder;$(EngineRoot)cocos\scripting\lua-bindings\manual;$(EngineRoot)cocos\scripting\lua-bindings\auto;$(EngineRoot)cocos\scripting\lua-bindings\manual\extension;$(EngineRoot)cocos\scripting\lua-bindings\manual\cocostudio;$(EngineRoot)cocos\scripting\lua-bindings\manual\ui;$(EngineRoot)cocos\scripting\lua-bindings\manual\cocos2d;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_WINDOWS;_DEBUG;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(EngineRoot);$(EngineRoot)cocos\2d;$(EngineRoot)cocos\base;$(EngineRoot)cocos\3d;$(EngineRoot)cocos\physics3d;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\ui;$(EngineRoot)external;$(EngineRoot)external\lua;$(EngineRoot)external\lua\tolua;$(EngineRoot)external\lua\luajit\include;$(EngineRoot)external\libwebsockets\win32\include;$(EngineRoot)extensions;$(EngineRoot)cocos\editor-support;$(EngineRoot)cocos\editor-support\cocostudio;$(EngineRoot)cocos\editor-support\cocostudio\ActionTimeline;$(EngineRoot)cocos\editor-support\spine;$(EngineRoot)cocos\editor-support\cocosbuilder;$(EngineRoot)cocos\scripting\lua-bindings\manual;$(EngineRoot)cocos\scripting\lua-bindings\auto;$(EngineRoot)cocos\scripting\lua-bindings\manual\extension;$(EngineRoot)cocos\scripting\lua-bindings\manual\cocostudio;$(EngineRoot)cocos\scripting\lua-bindings\manual\ui;$(EngineRoot)cocos\scripting\lua-bindings\manual\cocos2d;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_WINDOWS;_DEBUG;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;CC_ENABLE_BULLET_INTEGRATION=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
|
@ -301,8 +305,8 @@ xcopy /Y /Q "$(ProjectDir)..\..\..\..\external\lua\luajit\prebuilt\win32\*.*" "$
|
|||
<ClCompile>
|
||||
<Optimization>MinSpace</Optimization>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<AdditionalIncludeDirectories>$(EngineRoot);$(EngineRoot)cocos\base;$(EngineRoot)cocos;$(EngineRoot)external\lua\tolua;$(EngineRoot)external\lua\luajit\include;$(EngineRoot)external\lua;$(EngineRoot)cocos\scripting\lua-bindings\auto;$(EngineRoot)cocos\scripting\lua-bindings\manual;$(EngineRoot)cocos\2d;$(EngineRoot)cocos\3d;$(EngineRoot)cocos\scripting\lua-bindings\manual\extension;$(EngineRoot)cocos\scripting\lua-bindings\manual\cocostudio;$(EngineRoot)cocos\scripting\lua-bindings\manual\ui;$(EngineRoot)cocos\scripting\lua-bindings\manual\cocos2d;$(EngineRoot)extensions;$(EngineRoot)cocos\editor-support;$(EngineRoot)cocos\editor-support\cocostudio;$(EngineRoot)cocos\editor-support\cocostudio\ActionTimeline;$(EngineRoot)cocos\editor-support\spine;$(EngineRoot)cocos\editor-support\cocosbuilder;$(EngineRoot)cocos\audio\include;$(EngineRoot)external\libwebsockets\win32\include;$(EngineRoot)cocos\ui;$(EngineRoot)external;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;LIBLUA_EXPORTS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(EngineRoot);$(EngineRoot)cocos\base;$(EngineRoot)cocos;$(EngineRoot)external\lua\tolua;$(EngineRoot)external\lua\luajit\include;$(EngineRoot)external\lua;$(EngineRoot)cocos\scripting\lua-bindings\auto;$(EngineRoot)cocos\scripting\lua-bindings\manual;$(EngineRoot)cocos\2d;$(EngineRoot)cocos\3d;$(EngineRoot)cocos\scripting\lua-bindings\manual\extension;$(EngineRoot)cocos\scripting\lua-bindings\manual\cocostudio;$(EngineRoot)cocos\scripting\lua-bindings\manual\ui;$(EngineRoot)cocos\scripting\lua-bindings\manual\cocos2d;$(EngineRoot)extensions;$(EngineRoot)cocos\editor-support;$(EngineRoot)cocos\editor-support\cocostudio;$(EngineRoot)cocos\editor-support\cocostudio\ActionTimeline;$(EngineRoot)cocos\editor-support\spine;$(EngineRoot)cocos\editor-support\cocosbuilder;$(EngineRoot)cocos\audio\include;$(EngineRoot)external\libwebsockets\win32\include;$(EngineRoot)cocos\ui;$(EngineRoot)cocos\physics3d;$(EngineRoot)external;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;LIBLUA_EXPORTS;_CRT_SECURE_NO_WARNINGS;CC_ENABLE_BULLET_INTEGRATION=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeader>
|
||||
|
|
|
@ -73,6 +73,9 @@
|
|||
<Filter Include="manual\audioengine">
|
||||
<UniqueIdentifier>{08e7d51a-6f8a-4e54-8abe-a86101be8dad}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="manual\physics3d">
|
||||
<UniqueIdentifier>{3934b26e-18b0-465a-a89e-69a3417d107e}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\auto\lua_cocos2dx_auto.cpp">
|
||||
|
@ -273,6 +276,12 @@
|
|||
<ClCompile Include="..\manual\ui\lua_cocos2dx_experimental_webview_manual.cpp">
|
||||
<Filter>manual\ui</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\auto\lua_cocos2dx_physics3d_auto.cpp">
|
||||
<Filter>auto</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\manual\physics3d\lua_cocos2dx_physics3d_manual.cpp">
|
||||
<Filter>manual\physics3d</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\auto\lua_cocos2dx_auto.hpp">
|
||||
|
@ -479,6 +488,12 @@
|
|||
<ClInclude Include="..\manual\ui\lua_cocos2dx_experimental_webview_manual.hpp">
|
||||
<Filter>manual\ui</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\auto\lua_cocos2dx_physics3d_auto.hpp">
|
||||
<Filter>auto</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\manual\physics3d\lua_cocos2dx_physics3d_manual.h">
|
||||
<Filter>manual\physics3d</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\script\CCBReaderLoad.lua">
|
||||
|
|
|
@ -558,3 +558,23 @@ function cc.mat4.createRotation(q, dst)
|
|||
|
||||
return dst
|
||||
end
|
||||
|
||||
function cc.mat4.translate(self,vec3)
|
||||
return mat4_translate(self,vec3)
|
||||
end
|
||||
|
||||
function cc.mat4.createRotationZ(self,angle)
|
||||
return mat4_createRotationZ(self,angle)
|
||||
end
|
||||
|
||||
function cc.mat4.setIdentity(self)
|
||||
return mat4_setIdentity(self)
|
||||
end
|
||||
|
||||
function cc.mat4.createTranslation(...)
|
||||
return mat4_createTranslation(...)
|
||||
end
|
||||
|
||||
function cc.mat4.createRotation(...)
|
||||
return mat4_createRotation(...)
|
||||
end
|
|
@ -101,6 +101,9 @@ end
|
|||
-- cocosbuilder
|
||||
require "cocos.cocosbuilder.CCBReaderLoad"
|
||||
|
||||
-- physics3d
|
||||
require "cocos.physics3d.physics3d-constants"
|
||||
|
||||
if CC_USE_FRAMEWORK then
|
||||
require "cocos.framework.init"
|
||||
end
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
if nil == cc.Physics3DComponent then
|
||||
return
|
||||
end
|
||||
|
||||
cc.Physics3DComponent.PhysicsSyncFlag =
|
||||
{
|
||||
NONE = 0,
|
||||
NODE_TO_PHYSICS = 1,
|
||||
PHYSICS_TO_NODE = 2,
|
||||
NODE_AND_NODE = 3,
|
||||
}
|
||||
|
||||
cc.Physics3DObject.PhysicsObjType =
|
||||
{
|
||||
UNKNOWN = 0,
|
||||
RIGID_BODY = 1,
|
||||
}
|
|
@ -29,6 +29,7 @@ THE SOFTWARE.
|
|||
#include "2d/CCActionInterval.h"
|
||||
#include "platform/CCFileUtils.h"
|
||||
#include "ui/UIHelper.h"
|
||||
#include <algorithm>
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
||||
|
@ -590,7 +591,7 @@ Size Button::getVirtualRendererSize() const
|
|||
return this->getNormalSize();
|
||||
}
|
||||
|
||||
if(nullptr != _titleRenderer)
|
||||
if (nullptr != _titleRenderer)
|
||||
{
|
||||
Size titleSize = _titleRenderer->getContentSize();
|
||||
if (!_normalTextureLoaded && _titleRenderer->getString().size() > 0)
|
||||
|
@ -737,6 +738,24 @@ void Button::setPressedActionEnabled(bool enabled)
|
|||
_pressedActionEnabled = enabled;
|
||||
}
|
||||
|
||||
void Button::setTitleAlignment(TextHAlignment hAlignment)
|
||||
{
|
||||
if (nullptr == _titleRenderer)
|
||||
{
|
||||
this->createTitleRenderer();
|
||||
}
|
||||
_titleRenderer->setAlignment(hAlignment);
|
||||
}
|
||||
|
||||
void Button::setTitleAlignment(TextHAlignment hAlignment, TextVAlignment vAlignment)
|
||||
{
|
||||
if (nullptr == _titleRenderer)
|
||||
{
|
||||
this->createTitleRenderer();
|
||||
}
|
||||
_titleRenderer->setAlignment(hAlignment, vAlignment);
|
||||
}
|
||||
|
||||
void Button::setTitleText(const std::string& text)
|
||||
{
|
||||
if (text == getTitleText())
|
||||
|
@ -780,22 +799,27 @@ Color3B Button::getTitleColor() const
|
|||
|
||||
void Button::setTitleFontSize(float size)
|
||||
{
|
||||
if(nullptr == _titleRenderer)
|
||||
if (nullptr == _titleRenderer)
|
||||
{
|
||||
this->createTitleRenderer();
|
||||
}
|
||||
|
||||
_fontSize = size;
|
||||
if (_type == FontType::SYSTEM)
|
||||
{
|
||||
_titleRenderer->setSystemFontSize(size);
|
||||
_titleRenderer->setSystemFontSize(_fontSize);
|
||||
}
|
||||
else
|
||||
else if (_type == FontType::TTF)
|
||||
{
|
||||
TTFConfig config = _titleRenderer->getTTFConfig();
|
||||
config.fontSize = size;
|
||||
config.fontSize = _fontSize;
|
||||
_titleRenderer->setTTFConfig(config);
|
||||
}
|
||||
updateContentSize();
|
||||
_fontSize = size;
|
||||
//we can't change font size of BMFont.
|
||||
if(FontType::BMFONT != _type)
|
||||
{
|
||||
updateContentSize();
|
||||
}
|
||||
}
|
||||
|
||||
float Button::getTitleFontSize() const
|
||||
|
@ -821,11 +845,21 @@ void Button::setTitleFontName(const std::string& fontName)
|
|||
}
|
||||
if(FileUtils::getInstance()->isFileExist(fontName))
|
||||
{
|
||||
TTFConfig config = _titleRenderer->getTTFConfig();
|
||||
config.fontFilePath = fontName;
|
||||
config.fontSize = _fontSize;
|
||||
_titleRenderer->setTTFConfig(config);
|
||||
_type = FontType::TTF;
|
||||
std::string lowerCasedFontName = fontName;
|
||||
std::transform(lowerCasedFontName.begin(), lowerCasedFontName.end(), lowerCasedFontName.begin(), ::tolower);
|
||||
if (lowerCasedFontName.find(".fnt") != std::string::npos)
|
||||
{
|
||||
_titleRenderer->setBMFontFilePath(fontName);
|
||||
_type = FontType::BMFONT;
|
||||
}
|
||||
else
|
||||
{
|
||||
TTFConfig config = _titleRenderer->getTTFConfig();
|
||||
config.fontFilePath = fontName;
|
||||
config.fontSize = _fontSize;
|
||||
_titleRenderer->setTTFConfig(config);
|
||||
_type = FontType::TTF;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -849,14 +883,18 @@ const std::string Button::getTitleFontName() const
|
|||
{
|
||||
if (nullptr != _titleRenderer)
|
||||
{
|
||||
if(this->_type == FontType::SYSTEM)
|
||||
if (this->_type == FontType::SYSTEM)
|
||||
{
|
||||
return _titleRenderer->getSystemFontName();
|
||||
}
|
||||
else
|
||||
else if (this->_type == FontType::TTF)
|
||||
{
|
||||
return _titleRenderer->getTTFConfig().fontFilePath;
|
||||
}
|
||||
else
|
||||
{
|
||||
return _titleRenderer->getBMFontFilePath();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -247,6 +247,21 @@ public:
|
|||
*/
|
||||
const std::string getTitleFontName() const;
|
||||
|
||||
/**
|
||||
* Sets the title's text horizontal alignment.
|
||||
*
|
||||
* @param hAlignment see TextHAlignment
|
||||
*/
|
||||
void setTitleAlignment(TextHAlignment hAlignment);
|
||||
|
||||
/**
|
||||
* Sets the title's text vertical alignment.
|
||||
*
|
||||
* @param hAlignment see TextHAlignment.
|
||||
* @param vAlignment see TextVAlignment.
|
||||
*/
|
||||
void setTitleAlignment(TextHAlignment hAlignment, TextVAlignment vAlignment);
|
||||
|
||||
/** @brief When user pressed the button, the button will zoom to a scale.
|
||||
* The final scale of the button equals (button original scale + _zoomScale)
|
||||
* @since v3.3
|
||||
|
@ -331,7 +346,8 @@ private:
|
|||
enum class FontType
|
||||
{
|
||||
SYSTEM,
|
||||
TTF
|
||||
TTF,
|
||||
BMFONT
|
||||
};
|
||||
|
||||
int _fontSize;
|
||||
|
|
|
@ -461,7 +461,12 @@ void TextField::setPlaceHolderColor(const cocos2d::Color4B &color)
|
|||
{
|
||||
_textFieldRenderer->setColorSpaceHolder(color);
|
||||
}
|
||||
|
||||
|
||||
const Color4B& TextField::getTextColor()const
|
||||
{
|
||||
return _textFieldRenderer->getTextColor();
|
||||
}
|
||||
|
||||
void TextField::setTextColor(const cocos2d::Color4B &textColor)
|
||||
{
|
||||
_textFieldRenderer->setTextColor(textColor);
|
||||
|
@ -844,11 +849,21 @@ void TextField::setTextHorizontalAlignment(TextHAlignment alignment)
|
|||
_textFieldRenderer->setHorizontalAlignment(alignment);
|
||||
}
|
||||
|
||||
TextHAlignment TextField::getTextHorizontalAlignment() const
|
||||
{
|
||||
return _textFieldRenderer->getHorizontalAlignment();
|
||||
}
|
||||
|
||||
void TextField::setTextVerticalAlignment(TextVAlignment alignment)
|
||||
{
|
||||
_textFieldRenderer->setVerticalAlignment(alignment);
|
||||
}
|
||||
|
||||
TextVAlignment TextField::getTextVerticalAlignment() const
|
||||
{
|
||||
return _textFieldRenderer->getVerticalAlignment();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
NS_CC_END
|
||||
|
|
|
@ -354,6 +354,13 @@ public:
|
|||
*/
|
||||
void setPlaceHolderColor(const Color4B& color);
|
||||
|
||||
/**
|
||||
* @brief Query the text string color.
|
||||
*
|
||||
* @return The color of the text.
|
||||
*/
|
||||
const Color4B& getTextColor()const;
|
||||
|
||||
/**
|
||||
* @brief Change the text color.
|
||||
*
|
||||
|
@ -594,6 +601,13 @@ public:
|
|||
* @param alignment A alignment arguments in @see `TextHAlignment`.
|
||||
*/
|
||||
void setTextHorizontalAlignment(TextHAlignment alignment);
|
||||
|
||||
/**
|
||||
* @brief Inquire the horizontal alignment
|
||||
*
|
||||
* @return The horizontal alignment
|
||||
*/
|
||||
TextHAlignment getTextHorizontalAlignment() const;
|
||||
|
||||
/**
|
||||
* @brief Change the vertical text alignment.
|
||||
|
@ -601,6 +615,13 @@ public:
|
|||
* @param alignment A alignment arguments in @see `TextVAlignment`.
|
||||
*/
|
||||
void setTextVerticalAlignment(TextVAlignment alignment);
|
||||
|
||||
/**
|
||||
* @brief Inquire the horizontal alignment
|
||||
*
|
||||
* @return The horizontal alignment
|
||||
*/
|
||||
TextVAlignment getTextVerticalAlignment() const;
|
||||
|
||||
CC_CONSTRUCTOR_ACCESS:
|
||||
virtual bool init() override;
|
||||
|
|
|
@ -86,7 +86,7 @@ void Manifest::loadJson(const std::string& url)
|
|||
if (offset > 0)
|
||||
offset--;
|
||||
std::string errorSnippet = content.substr(offset, 10);
|
||||
CCLOG("File parse error %s at <%s>\n", _json.GetParseError(), errorSnippet.c_str());
|
||||
CCLOG("File parse error %d at <%s>\n", _json.GetParseError(), errorSnippet.c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -324,7 +324,7 @@ void Manifest::setAssetDownloadState(const std::string &key, const Manifest::Dow
|
|||
rapidjson::Value &assets = _json[KEY_ASSETS];
|
||||
if (assets.IsObject())
|
||||
{
|
||||
for (rapidjson::Value::MemberIterator itr = assets.MemberonBegin(); itr != assets.MemberonEnd(); ++itr)
|
||||
for (rapidjson::Value::MemberIterator itr = assets.MemberBegin(); itr != assets.MemberEnd(); ++itr)
|
||||
{
|
||||
std::string jkey = itr->name.GetString();
|
||||
if (jkey == key) {
|
||||
|
@ -426,7 +426,7 @@ void Manifest::loadVersion(const rapidjson::Document &json)
|
|||
const rapidjson::Value& groupVers = json[KEY_GROUP_VERSIONS];
|
||||
if (groupVers.IsObject())
|
||||
{
|
||||
for (rapidjson::Value::ConstMemberIterator itr = groupVers.MemberonBegin(); itr != groupVers.MemberonEnd(); ++itr)
|
||||
for (rapidjson::Value::ConstMemberIterator itr = groupVers.MemberBegin(); itr != groupVers.MemberEnd(); ++itr)
|
||||
{
|
||||
std::string group = itr->name.GetString();
|
||||
std::string version = "0";
|
||||
|
@ -470,7 +470,7 @@ void Manifest::loadManifest(const rapidjson::Document &json)
|
|||
const rapidjson::Value& assets = json[KEY_ASSETS];
|
||||
if (assets.IsObject())
|
||||
{
|
||||
for (rapidjson::Value::ConstMemberIterator itr = assets.MemberonBegin(); itr != assets.MemberonEnd(); ++itr)
|
||||
for (rapidjson::Value::ConstMemberIterator itr = assets.MemberBegin(); itr != assets.MemberEnd(); ++itr)
|
||||
{
|
||||
std::string key = itr->name.GetString();
|
||||
Asset asset = parseAsset(key, itr->value);
|
||||
|
@ -508,4 +508,4 @@ void Manifest::saveToFile(const std::string &filepath)
|
|||
output << buffer.GetString() << std::endl;
|
||||
}
|
||||
|
||||
NS_CC_EXT_END
|
||||
NS_CC_EXT_END
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
{
|
||||
"version":"v3-deps-54",
|
||||
"version":"v3-deps-56",
|
||||
"zip_file_size":"116842586",
|
||||
"repo_name":"cocos2d-x-3rd-party-libs-bin",
|
||||
"repo_parent":"https://github.com/cocos2d/",
|
||||
"move_dirs":{
|
||||
"fbx-conv":"tools"
|
||||
"fbx-conv":"tools",
|
||||
"framework-compile":"tools"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2790,11 +2790,29 @@
|
|||
"external/jpeg/prebuilt/mac/libjpeg.a",
|
||||
"external/jpeg/prebuilt/win32/libjpeg-2015.lib",
|
||||
"external/jpeg/prebuilt/win32/libjpeg.lib",
|
||||
"external/json/allocators.h",
|
||||
"external/json/document.h",
|
||||
"external/json/encodedstream.h",
|
||||
"external/json/encodings.h",
|
||||
"external/json/error/en.h",
|
||||
"external/json/error/error.h",
|
||||
"external/json/filereadstream.h",
|
||||
"external/json/filestream.h",
|
||||
"external/json/filewritestream.h",
|
||||
"external/json/internal/biginteger.h",
|
||||
"external/json/internal/diyfp.h",
|
||||
"external/json/internal/dtoa.h",
|
||||
"external/json/internal/ieee754.h",
|
||||
"external/json/internal/itoa.h",
|
||||
"external/json/internal/meta.h",
|
||||
"external/json/internal/pow10.h",
|
||||
"external/json/internal/stack.h",
|
||||
"external/json/internal/strfunc.h",
|
||||
"external/json/internal/strtod.h",
|
||||
"external/json/memorybuffer.h",
|
||||
"external/json/memorystream.h",
|
||||
"external/json/msinttypes/inttypes.h",
|
||||
"external/json/msinttypes/stdint.h",
|
||||
"external/json/prettywriter.h",
|
||||
"external/json/rapidjson.h",
|
||||
"external/json/reader.h",
|
||||
|
@ -2856,6 +2874,64 @@
|
|||
"external/poly2tri/sweep/sweep.h",
|
||||
"external/poly2tri/sweep/sweep_context.cc",
|
||||
"external/poly2tri/sweep/sweep_context.h",
|
||||
"external/recast/Android.mk",
|
||||
"external/recast/CMakeLists.txt",
|
||||
"external/recast/DebugUtils/DebugDraw.cpp",
|
||||
"external/recast/DebugUtils/DebugDraw.h",
|
||||
"external/recast/DebugUtils/DetourDebugDraw.cpp",
|
||||
"external/recast/DebugUtils/DetourDebugDraw.h",
|
||||
"external/recast/DebugUtils/RecastDebugDraw.cpp",
|
||||
"external/recast/DebugUtils/RecastDebugDraw.h",
|
||||
"external/recast/DebugUtils/RecastDump.cpp",
|
||||
"external/recast/DebugUtils/RecastDump.h",
|
||||
"external/recast/Detour/DetourAlloc.cpp",
|
||||
"external/recast/Detour/DetourAlloc.h",
|
||||
"external/recast/Detour/DetourAssert.h",
|
||||
"external/recast/Detour/DetourCommon.cpp",
|
||||
"external/recast/Detour/DetourCommon.h",
|
||||
"external/recast/Detour/DetourMath.h",
|
||||
"external/recast/Detour/DetourNavMesh.cpp",
|
||||
"external/recast/Detour/DetourNavMesh.h",
|
||||
"external/recast/Detour/DetourNavMeshBuilder.cpp",
|
||||
"external/recast/Detour/DetourNavMeshBuilder.h",
|
||||
"external/recast/Detour/DetourNavMeshQuery.cpp",
|
||||
"external/recast/Detour/DetourNavMeshQuery.h",
|
||||
"external/recast/Detour/DetourNode.cpp",
|
||||
"external/recast/Detour/DetourNode.h",
|
||||
"external/recast/Detour/DetourStatus.h",
|
||||
"external/recast/DetourCrowd/DetourCrowd.cpp",
|
||||
"external/recast/DetourCrowd/DetourCrowd.h",
|
||||
"external/recast/DetourCrowd/DetourLocalBoundary.cpp",
|
||||
"external/recast/DetourCrowd/DetourLocalBoundary.h",
|
||||
"external/recast/DetourCrowd/DetourObstacleAvoidance.cpp",
|
||||
"external/recast/DetourCrowd/DetourObstacleAvoidance.h",
|
||||
"external/recast/DetourCrowd/DetourPathCorridor.cpp",
|
||||
"external/recast/DetourCrowd/DetourPathCorridor.h",
|
||||
"external/recast/DetourCrowd/DetourPathQueue.cpp",
|
||||
"external/recast/DetourCrowd/DetourPathQueue.h",
|
||||
"external/recast/DetourCrowd/DetourProximityGrid.cpp",
|
||||
"external/recast/DetourCrowd/DetourProximityGrid.h",
|
||||
"external/recast/DetourTileCache/DetourTileCache.cpp",
|
||||
"external/recast/DetourTileCache/DetourTileCache.h",
|
||||
"external/recast/DetourTileCache/DetourTileCacheBuilder.cpp",
|
||||
"external/recast/DetourTileCache/DetourTileCacheBuilder.h",
|
||||
"external/recast/Recast/Recast.cpp",
|
||||
"external/recast/Recast/Recast.h",
|
||||
"external/recast/Recast/RecastAlloc.cpp",
|
||||
"external/recast/Recast/RecastAlloc.h",
|
||||
"external/recast/Recast/RecastArea.cpp",
|
||||
"external/recast/Recast/RecastAssert.h",
|
||||
"external/recast/Recast/RecastContour.cpp",
|
||||
"external/recast/Recast/RecastFilter.cpp",
|
||||
"external/recast/Recast/RecastLayers.cpp",
|
||||
"external/recast/Recast/RecastMesh.cpp",
|
||||
"external/recast/Recast/RecastMeshDetail.cpp",
|
||||
"external/recast/Recast/RecastRasterization.cpp",
|
||||
"external/recast/Recast/RecastRegion.cpp",
|
||||
"external/recast/fastlz/fastlz.c",
|
||||
"external/recast/fastlz/fastlz.h",
|
||||
"external/recast/proj.win32/librecast.vcxproj",
|
||||
"external/recast/proj.win32/librecast.vcxproj.filters",
|
||||
"external/sqlite3/Android.mk",
|
||||
"external/sqlite3/include/sqlite3.h",
|
||||
"external/sqlite3/include/sqlite3ext.h",
|
||||
|
@ -4951,6 +5027,7 @@
|
|||
"tools/framework-compile/bin-templates/cpp-template-default/Classes/HelloWorldScene.h",
|
||||
"tools/framework-compile/bin-templates/cpp-template-default/cocos-project-template.json",
|
||||
"tools/framework-compile/bin-templates/cpp-template-default/proj.android/jni/Android.mk",
|
||||
"tools/framework-compile/bin-templates/cpp-template-default/proj.android/project.properties",
|
||||
"tools/framework-compile/bin-templates/cpp-template-default/proj.win32/HelloCpp.sln",
|
||||
"tools/framework-compile/bin-templates/cpp-template-default/proj.win32/main.cpp",
|
||||
"tools/framework-compile/bin-templates/cpp-template-default/res-landscape/HelloCpp.ccs",
|
||||
|
@ -4976,6 +5053,7 @@
|
|||
"tools/framework-compile/bin-templates/js-template-runtime/cocos-project-template.json",
|
||||
"tools/framework-compile/bin-templates/js-template-runtime/frameworks/runtime-src/proj.android/build-cfg.json",
|
||||
"tools/framework-compile/bin-templates/js-template-runtime/frameworks/runtime-src/proj.android/jni/Android.mk",
|
||||
"tools/framework-compile/bin-templates/js-template-runtime/frameworks/runtime-src/proj.android/project.properties",
|
||||
"tools/framework-compile/bin-templates/js-template-runtime/frameworks/runtime-src/proj.win32/HelloJavascript.sln",
|
||||
"tools/framework-compile/bin-templates/js-template-runtime/frameworks/runtime-src/proj.win32/build-cfg.json",
|
||||
"tools/framework-compile/bin-templates/js-template-runtime/frameworks/runtime-src/proj.win32/main.cpp",
|
||||
|
@ -5008,6 +5086,7 @@
|
|||
"tools/framework-compile/bin-templates/js-template-runtime/src/resource.js",
|
||||
"tools/framework-compile/bin-templates/lua-template-runtime/cocos-project-template.json",
|
||||
"tools/framework-compile/bin-templates/lua-template-runtime/frameworks/runtime-src/proj.android/jni/Android.mk",
|
||||
"tools/framework-compile/bin-templates/lua-template-runtime/frameworks/runtime-src/proj.android/project.properties",
|
||||
"tools/framework-compile/bin-templates/lua-template-runtime/frameworks/runtime-src/proj.win32/HelloLua.sln",
|
||||
"tools/framework-compile/bin-templates/lua-template-runtime/frameworks/runtime-src/proj.win32/main.cpp",
|
||||
"tools/framework-compile/bin-templates/lua-template-runtime/res-landscape/HelloLua.ccs",
|
||||
|
@ -5032,7 +5111,6 @@
|
|||
"tools/framework-compile/bin-templates/lua-template-runtime/src/app/MyApp.lua",
|
||||
"tools/framework-compile/bin-templates/lua-template-runtime/src/app/views/MainScene.lua",
|
||||
"tools/framework-compile/bin-templates/lua-template-runtime/src/config.lua",
|
||||
"tools/framework-compile/gen_cocos_libs.sh",
|
||||
"tools/framework-compile/x-modified/cocos/audio/android/prebuilt-mk/Android.mk",
|
||||
"tools/framework-compile/x-modified/cocos/prebuilt-mk/Android.mk",
|
||||
"tools/framework-compile/x-modified/cocos/scripting/js-bindings/proj.android/prebuilt-mk/Android.mk",
|
||||
|
@ -6583,6 +6661,7 @@
|
|||
"cocos/scripting/lua-bindings/auto/api/Blink.lua",
|
||||
"cocos/scripting/lua-bindings/auto/api/Bone.lua",
|
||||
"cocos/scripting/lua-bindings/auto/api/BoneData.lua",
|
||||
"cocos/scripting/lua-bindings/auto/api/Bundle3D.lua",
|
||||
"cocos/scripting/lua-bindings/auto/api/Button.lua",
|
||||
"cocos/scripting/lua-bindings/auto/api/CCBAnimationManager.lua",
|
||||
"cocos/scripting/lua-bindings/auto/api/CCBReader.lua",
|
||||
|
@ -6771,6 +6850,17 @@
|
|||
"cocos/scripting/lua-bindings/auto/api/ParticleSystem.lua",
|
||||
"cocos/scripting/lua-bindings/auto/api/ParticleSystem3D.lua",
|
||||
"cocos/scripting/lua-bindings/auto/api/ParticleSystemQuad.lua",
|
||||
"cocos/scripting/lua-bindings/auto/api/Physics3D6DofConstraint.lua",
|
||||
"cocos/scripting/lua-bindings/auto/api/Physics3DComponent.lua",
|
||||
"cocos/scripting/lua-bindings/auto/api/Physics3DConeTwistConstraint.lua",
|
||||
"cocos/scripting/lua-bindings/auto/api/Physics3DConstraint.lua",
|
||||
"cocos/scripting/lua-bindings/auto/api/Physics3DHingeConstraint.lua",
|
||||
"cocos/scripting/lua-bindings/auto/api/Physics3DObject.lua",
|
||||
"cocos/scripting/lua-bindings/auto/api/Physics3DPointToPointConstraint.lua",
|
||||
"cocos/scripting/lua-bindings/auto/api/Physics3DRigidBody.lua",
|
||||
"cocos/scripting/lua-bindings/auto/api/Physics3DShape.lua",
|
||||
"cocos/scripting/lua-bindings/auto/api/Physics3DSliderConstraint.lua",
|
||||
"cocos/scripting/lua-bindings/auto/api/Physics3DWorld.lua",
|
||||
"cocos/scripting/lua-bindings/auto/api/PhysicsBody.lua",
|
||||
"cocos/scripting/lua-bindings/auto/api/PhysicsContact.lua",
|
||||
"cocos/scripting/lua-bindings/auto/api/PhysicsContactPostSolve.lua",
|
||||
|
@ -6796,6 +6886,7 @@
|
|||
"cocos/scripting/lua-bindings/auto/api/PhysicsShapeEdgePolygon.lua",
|
||||
"cocos/scripting/lua-bindings/auto/api/PhysicsShapeEdgeSegment.lua",
|
||||
"cocos/scripting/lua-bindings/auto/api/PhysicsShapePolygon.lua",
|
||||
"cocos/scripting/lua-bindings/auto/api/PhysicsSprite3D.lua",
|
||||
"cocos/scripting/lua-bindings/auto/api/PhysicsWorld.lua",
|
||||
"cocos/scripting/lua-bindings/auto/api/Place.lua",
|
||||
"cocos/scripting/lua-bindings/auto/api/PointLight.lua",
|
||||
|
@ -6950,6 +7041,7 @@
|
|||
"cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_experimental_video_auto_api.lua",
|
||||
"cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_experimental_webview_auto_api.lua",
|
||||
"cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_extension_auto_api.lua",
|
||||
"cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_physics3d_auto_api.lua",
|
||||
"cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_physics_auto_api.lua",
|
||||
"cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_spine_auto_api.lua",
|
||||
"cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_studio_auto_api.lua",
|
||||
|
@ -6976,6 +7068,8 @@
|
|||
"cocos/scripting/lua-bindings/auto/lua_cocos2dx_experimental_webview_auto.hpp",
|
||||
"cocos/scripting/lua-bindings/auto/lua_cocos2dx_extension_auto.cpp",
|
||||
"cocos/scripting/lua-bindings/auto/lua_cocos2dx_extension_auto.hpp",
|
||||
"cocos/scripting/lua-bindings/auto/lua_cocos2dx_physics3d_auto.cpp",
|
||||
"cocos/scripting/lua-bindings/auto/lua_cocos2dx_physics3d_auto.hpp",
|
||||
"cocos/scripting/lua-bindings/auto/lua_cocos2dx_physics_auto.cpp",
|
||||
"cocos/scripting/lua-bindings/auto/lua_cocos2dx_physics_auto.hpp",
|
||||
"cocos/scripting/lua-bindings/auto/lua_cocos2dx_spine_auto.cpp",
|
||||
|
@ -7038,6 +7132,8 @@
|
|||
"cocos/scripting/lua-bindings/manual/network/lua_extensions.h",
|
||||
"cocos/scripting/lua-bindings/manual/network/lua_xml_http_request.cpp",
|
||||
"cocos/scripting/lua-bindings/manual/network/lua_xml_http_request.h",
|
||||
"cocos/scripting/lua-bindings/manual/physics3d/lua_cocos2dx_physics3d_manual.cpp",
|
||||
"cocos/scripting/lua-bindings/manual/physics3d/lua_cocos2dx_physics3d_manual.h",
|
||||
"cocos/scripting/lua-bindings/manual/platform/android/CCLuaJavaBridge.cpp",
|
||||
"cocos/scripting/lua-bindings/manual/platform/android/CCLuaJavaBridge.h",
|
||||
"cocos/scripting/lua-bindings/manual/platform/android/jni/Java_org_cocos2dx_lib_Cocos2dxLuaJavaBridge.cpp",
|
||||
|
@ -7116,6 +7212,7 @@
|
|||
"cocos/scripting/lua-bindings/script/network/DeprecatedNetworkEnum.lua",
|
||||
"cocos/scripting/lua-bindings/script/network/DeprecatedNetworkFunc.lua",
|
||||
"cocos/scripting/lua-bindings/script/network/NetworkConstants.lua",
|
||||
"cocos/scripting/lua-bindings/script/physics3d/physics3d-constants.lua",
|
||||
"cocos/scripting/lua-bindings/script/spine/SpineConstants.lua",
|
||||
"cocos/scripting/lua-bindings/script/ui/DeprecatedUIEnum.lua",
|
||||
"cocos/scripting/lua-bindings/script/ui/DeprecatedUIFunc.lua",
|
||||
|
@ -7329,6 +7426,7 @@
|
|||
"tools/tolua/cocos2dx_experimental_webview.ini",
|
||||
"tools/tolua/cocos2dx_extension.ini",
|
||||
"tools/tolua/cocos2dx_physics.ini",
|
||||
"tools/tolua/cocos2dx_physics3d.ini",
|
||||
"tools/tolua/cocos2dx_spine.ini",
|
||||
"tools/tolua/cocos2dx_studio.ini",
|
||||
"tools/tolua/cocos2dx_ui.ini",
|
||||
|
|
|
@ -42,6 +42,7 @@
|
|||
"proj.android/AndroidManifest.xml",
|
||||
"proj.android/build.xml",
|
||||
"proj.android/res/values/strings.xml",
|
||||
"proj.android-studio/settings.gradle",
|
||||
"proj.ios_mac/ios/main.m",
|
||||
"proj.ios_mac/ios/Prefix.pch",
|
||||
"proj.ios_mac/PROJECT_NAME.xcodeproj/project.pbxproj",
|
||||
|
@ -51,7 +52,9 @@
|
|||
"project_replace_package_name":{
|
||||
"src_package_name":"org.cocos2dx.hellocpp",
|
||||
"files":[
|
||||
"proj.android/AndroidManifest.xml"
|
||||
"proj.android/AndroidManifest.xml",
|
||||
"proj.android-studio/app/build.gradle",
|
||||
"proj.android-studio/app/AndroidManifest.xml"
|
||||
]
|
||||
},
|
||||
"project_replace_mac_bundleid": {
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
android:value="cocos2dcpp" />
|
||||
|
||||
<activity
|
||||
android:name=".AppActivity"
|
||||
android:name="org.cocos2dx.cpp.AppActivity"
|
||||
android:screenOrientation="landscape"
|
||||
android:configChanges="orientation|keyboardHidden|screenSize"
|
||||
android:label="@string/app_name"
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue