Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding basic support for touch force (3D force an iPad pro stylus) #30

Merged
merged 6 commits into from Dec 22, 2015

Conversation

richardgroves
Copy link
Contributor

Updated the submodule to use the latest cocos3d 3.4.9
Enabled iPhone support
Added a GestureRecognizer sub-class to capture the force of each touch (where available) to control the line width.

NB: There are a lot of linker warnings thrown due to a bad configuration in the ObjectAL submodule of cocos2d. It's easy to fix, but without write access to that repo it is hard to make a shareable project that is fixed, so for now I've left the module as is, with warnings and all.

NB2: Updated minimum iOS level to 8 as I don't have any earlier hardware to test on and XCode 7 doesn't support iOS7 simulators.
float -> CGFloat
int -> NSInteger
unsigned int -> NSUInteger
3D touch on phone or stylus on iPad Pro provide a 'force' value into each touch.
The GestureRecognizer sub-class captures this value and passes it to the LineDrawer class which uses it rather than the touch velocity, when available, to control line width.
krzysztofzablocki pushed a commit that referenced this pull request Dec 22, 2015
Adding basic support for touch force (3D force an iPad pro stylus)
@krzysztofzablocki krzysztofzablocki merged commit 4471997 into krzysztofzablocki:master Dec 22, 2015
@krzysztofzablocki
Copy link
Owner

thanks ;]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants