asinesio / cocos2d-prkit Goto Github PK
View Code? Open in Web Editor NEWAdditions to the fabulous cocos2d-iphone library as provided by Precognitive Research.
Home Page: http://precognitiveresearch.com
Additions to the fabulous cocos2d-iphone library as provided by Precognitive Research.
Home Page: http://precognitiveresearch.com
Hello!
Could you add MIT License to all files of this repo?
I'm building official cocos2d extensions repo: https://github.com/cocos2d/cocos2d-iphone-extensions
So i would like to add your prKit to it, if you don't mind.
Thanks!
Best Regards,
Stepan
When I use the portrait mode,
it aways shows error in line 155 in file PRFilledPolygon.m
this line ---->
glDrawArrays(GL_TRIANGLES, 0, areaTrianglePointCount);
PRFilledPolygon has some blending issues. Try putting some background sprite in the example code.
It's time for update! Please make subj support newest cocos.
I'm creating a car driving game.. and when my car travel the level, where I've created many PRFilledpolygons, I see "swimming" and glitches effect on the polygons.
I've created a test project, to reproduce this: http://kamikazeua.narod.ru/test_3.zip
Just start project and touch once a screen, after that screen must start moving so you can see this glitches. Please take a look carefully. THIS CAN BE REPRODUCED ONLY ON REAL DEVICES.
UPD1: another example, on it this bug can be seen more often: http://kamikazeua.narod.ru/test_2.zip
UPD2 (added 13 march 2:26 GMT+2): LATEST - some funny car - http://kamikazeua.narod.ru/test_3.zip
init methods never return autoreleased objects in obj-c.
initWithPoints: (NSArray *) polygonPoints andTexture: (CCTexture2D *) fillTexture
returns an autoreleades PRFilledPolygon while
initWithPoints:(NSArray *)polygonPoints andTexture:(CCTexture2D *)fillTexture usingTriangulator: (id<PRTriangulator>) polygonTriangulator
does not.
Test project http://kamikazeua.narod.ru/prkit.zip
It's draw nothing on MAC and all works ok on iOS.
I'm using PRKit with the new version of Cocos2d, and I'm getting EXC_BAD_ACCESS in PRFilledPolygon.m on the following line:
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL); (in the draw method)
The texture is loaded correctly, and it works fine with the old version of Cocos2d.
So I assume the OpenGl version is the real problem, as the big difference with cocos2d 2.0 is that is uses OpenGLES 2.0.
But being a complete noob with OpenGL, I can't manage to make it work...
Any idea on how I could do that ?
Hello, sir, i want save the lastest texture to resource file. how can i do ?
PRFilledPolygon sprites are drawn much too small when running on the retina display. This appears to be due to the fact that cocos2d scales things by the CC_CONTENT_SCALE_FACTOR and PRKit is currently not doing the same. I'm running with the following patch in place which fixes the issue:
--- PRFilledPolygon.m
+++ PRFilledPolygon.m
@@ -67,7 +67,7 @@
textureCoordinates = (CGPoint *) malloc(sizeof(CGPoint) * areaTrianglePointCount);
for (int i = 0; i < areaTrianglePointCount; i++) {
- areaTrianglePoints[i] = [[triangulatedPoints objectAtIndex:i] CGPointValue];
+ areaTrianglePoints[i] = ccpMult([[triangulatedPoints objectAtIndex:i] CGPointValue], CC_CONTENT_SCALE_FACTOR());
}
[self calculateTextureCoordinates];
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.