GithubHelp home page GithubHelp logo

c4labs / c4ios Goto Github PK

View Code? Open in Web Editor NEW
977.0 977.0 74.0 66.53 MB

C4 is an open-source creative coding framework that harnesses the power of native iOS programming with a simplified API that gets you working with media right away. Build artworks, design interfaces and explore new possibilities working with media and interaction.

Home Page: www.c4ios.com

License: MIT License

Swift 99.39% Objective-C 0.35% Ruby 0.26%
creative-coding swift uikit

c4ios's People

Contributors

3lvis avatar alejandro-isaza avatar buza avatar c4code avatar ha1f avatar jancassio avatar jbloit avatar luketurvey avatar mikeocasio avatar ollstar avatar raburski avatar schwarrrtz avatar sebastianvarela avatar tnantoka avatar traviskirton avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

c4ios's Issues

installer doesn't work for xcode 4.3 in osx 10.7.3

the installer doesn't work because the path to where template files should be located has changed...
i worked around this with greg, and his setup is now able to generate projects from the template, but i haven't yet added this to a 10.7.3 installer

addition: complex shapes

should add functionality to create complex shapes...

C4Shape *complex = [C4Line ...];
[complex addEllipse:]
[complex appendEllipse];
etc...

Gesture settings not taking effect

for the following code:

myCustomShape = [CustomShape new];
[myCustomShape rect:CGRectMake(284, 412, 200, 200)];

[myCustomShape addGesture:TAP name:@"singleTap" action:@"methodA"];
[myCustomShape addGesture:TAP name:@"doubleTap" action:@"methodB"];

[myCustomShape numberOfTapsRequired:1 forGesture:@"singleTap"];
[myCustomShape numberOfTapsRequired:2 forGesture:@"doubleTap"];

[self.canvas addShape:myCustomShape];

the gestures aren't setting the right number of taps...

the @"doubleTap" gesture triggers only with a single tap

Begin from current value for CALayer transitions not working

When applying the BEGINCURRENT animation option to a C4Shape object, in the middle of an ongoing animation, the visible state of the object flicks back to its original state before initiating a new animation.

The expected behaviour for the following is to animate from C4GREY to C4RED over 5 seconds. At 2.5 seconds the current colour (mix of grey / red) should begin smoothly animating to C4BLUE.

@implementation C4WorkSpace {
    C4Shape *s;
}

- (void)setup {
    s = [C4Shape ellipse:CGRectMake(0, 0, 100, 100)];
    s.center = self.canvas.center;
    [self.canvas addShape:s];

    s.animationDuration = 5.0f;
    s.animationOptions = BEGINCURRENT;
    s.fillColor = C4RED;

    [self runMethod:@"test" afterDelay:2.5];
}

-(void)test {
    s.fillColor = C4BLUE;
}
@end

This causes the fillColor of the shape to flick back to C4GREY before animating to C4BLUE.

Masks & Animations

Add masks and make them animated, for images (first) and then for any other C4Control (if possible)

Text Shapes have no frames?

When a shape is made using shapeFromString: it seems to not have a frame.
The origin is at the bottom-left of the object (instead of the typical top-right).

mpeg

C4Movie crashed when creating with an mpeg..
Should check this, or any other file types...

addition: remove / delete object

there should be remove / delete object methods...
remove would take something off the canvas
delete would take something off the canvas and then delete the object from memory

shape frames not set properly in setup{}

in the setup method, when a shape is created, it takes longer to build the path than to set its new center position...
so if i write

shape = [C4Shape rect:];
shape.center = CGPoint;

the shape stays in its original rect...

not sure how to get around this...

listenfor ... OBJECTS?

is it possible to include a method for listening to multiple objects at the same time?

example:

listenFor:@"something" fromObjects:(NSArray *)anArrayOfObjects andRunMethod: ...

Might be handy...

[image colorInvert] didn't work on one computer

Strangely, the [image colorInvert] method didn't do anything on one computer... but it generally works on all other computers...
Not sure why this would happen, if the computers have the same configuration

addition: animation control

We need to find a way to be able to get animations to slow down and/or stop mid-animation, as well as modify current animations and also to be able to set the current time of the animation (something akin to scrubbing in a movie).

Animation Interaction Bug ?

When an animation is in progress, and was triggered by touchesBegan, touching the canvas a second time really messes with the way the animation looks.

Perhaps there should be a way of blocking interaction when something is animating, or of being able to reset the animation more smoothly when this happens.

arcs are broken

creating arcs doesn't work...
there's a bunch of problems with them...
they need to be thoroughly tested

image.width, image.height?

You should be able to set the image.width property, like working with movies.
perhaps there should also be a image.constrainsProportions = YES property

documentation: add short examples?

michael wylegly suggested adding short examples to the documentation writeup for each method...
a lot of work, but probably very useful

PointA, PointB issue

setting pointA for a line seems to work fine, but setting pointB results in a weird movement of the line...

whitespace truncation would be nice

would be nice to have some whitespace truncation for names in strings being passed to things...
just a small addition that might make things simpler...
perhaps not... who knows...

e.g. to handle things like: @" image.jpg", or @"image.jpg "

NSView animations flicker...

Any time an NSView animation uses AUTOREVERSE, without repeating, the animation flickers at the end...
This happens no matter what... with moving the view, or even changing its alpha...
I think this is a problem with Apple's view animation... That is, I don't think I can work around this on my own with views themselves... which is too bad...

I tried a variety of different ways of setting things with completion handlers, but even some of the techniques in the O'Reilly book iOS5 Programming do not work... though the author says they should...

General Animation Issue

People keep asking "how do i animate from here, to here and when the first animation is done, trigger a second animation?"

this is a serious design consideration for the coming development phase

Global Settings? or, settings object?

There should be an easy way to set global settings for all objects of a particular class.
For instance, shapes... So that you don't have to individually change the colors of each shape as you create them.

strange habit with assigning shapes

myshape =
followed by
myshape =
invalidates the shape...

not sure exactly what is happening here...
will have to test this after the workshops are done and i can focus better.

chaining animations...

there should be an easy way of chaining animations...
like a callback or something... but a very simple way of triggering things

you should also look into setting multiple kinds of animation options in a row... this needs to be tested
i.e.

option
delay
set property
option
set property
option
duration
set property

in the same block of code for a single object...

for instance
duration = 1
move
duration = 2
change color

so the object moves for 1 second and changes color for 2 seconds...

Initial animations on shapes...

There is an initial animation with shapes when they are added to the canvas...
Try to get rid of these....

This may have to do with where Setup is called in the application launch hierarchy, and to guarantee that the animation time is set to 0, rather than the implicit 0.25

C4Movie interaction issue?

I had to pause the movie before playing again after changing the rate... should this be the way it works????
Maybe setting rate should pause, then play?

self.canvas doesn't have gestures

you can't easily add gestures to the canvas, like adding them to objects...
it would be nice if gestures were incorporated into this as well...

addition: easier rotations

The following is awkward, we should make this easier...

polygon.transform = CGAffineTransformMakeRotation(-PI/2);

Can't pause / stop an animation

The ability to pause / stop an animation should be added in the coming design phase.
And, the ability to resume as well...

lack of framerate?... need to think of a workaround

there is no framerate in C4iOS... on purpose.
the intention is to update things only when they need to be updated, and to let the system handle a lot of the animation implicitly.
this raises issues, though, because a lot of ideology (especially in creative coding languages) relies on the concept of a framerate and things being updated 30fps or whatever...
this impacts any kind of Vector class... because particle / physics / vector systems necessarily need some kind of update function.
also, the technique for rendering a lot of these systems uses a frame-based drawing technique (e.g. draw circle at X,Y now) and doesn't think about using some kind of implicit animations...
i am not sure how to get around this kind of thing, or if it needs to be got around at all...

addition: constant rotation...

not sure how to implement this
many students have asked how-to... but i'm not sure yet...
the implicit transforms rotate to the nearest angle, (i.e. they will treat TWO_PI as if it were 0)

Video Frame/Orientation Issue

If I import a video and it's in "portrait" orientation, c4movie squishes it into "landscape" orientation without rotating it. I used my ipod to capture the video.

Here is a work around:

CGRect newFrame = newMovie.frame;
CGSize newSize = CGSizeMake(newFrame.size.height, newFrame.size.width);
newFrame.size = newSize;
newMovie.frame = newFrame;

newMovie.center = CGPointMake(384,512);

setup{} doesn't get called when initializing shapes with new

myCustomShape = [CustomShape new];

doesn't call (located in CustomShape.m):

-(void)setup {
    C4Log(@"setup");
    [self addGesture:TAP name:@"singleTap" action:@"methodA"];
    [self addGesture:TAP name:@"doubleTap" action:@"methodB"];

    [self numberOfTapsRequired:1 forGesture:@"singleTap"];
    [self numberOfTapsRequired:2 forGesture:@"doubleTap"];
}

documentation: add short examples?

michael wylegly suggested adding short examples to the documentation writeup for each method...
a lot of work, but probably very useful

Points inside a C4Shape / Polygon

It's possible to access the points inside a C4Shape which is a line... using shape.pointA and shape.pointB

Is it possible to have access to all the points in a polygon?
Or, at least return an array of the points inside the polygon?
There should also be a reference to the number of points inside the shape as well.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.