custom animatable properties in Core Animationを作成することはできますが、OS X 10.8のSceneKitフレームワークはどうでしょうか? SCNAnimatable
は、プロパティをアニメーション可能にするためにCALayer
と同じAPIを公開していないようです。SceneKitのカスタムアニメーション可能なプロパティ
私のアプリケーションでは、Starfield
というSCNNode
というサブクラスがあります。これは、古いOpenGLアプリケーションからSCNNodeRendererDelegate
を使って移植しました。 StarfieldsはwarpFactor
呼ばGLfloat
財産公開:
@interface Starfield : SCNNode<SCNNodeRendererDelegate> {
// other stuff that's not really important for this question
GLfloat warpFactor;
}
@property(nonatomic) GLfloat warpFactor;
@end
をしかし、私はそうのように、それにアニメーションを追加しようとすると:
CABasicAnimation *warp = [CABasicAnimation animationWithKeyPath:@"warpFactor"];
warp.toValue = @1.0;
warp.duration = 5.0;
[starfield addAnimation:warp forKey:@"warp"];
私は、コンソールに次のように取得する:
[SCNKit ERROR] warpFactor is not an animatable path (from <unnamed SCNNode 0x1016473c0, no children>)
私はSceneKitがまったく新しいことを知っていますが、この作業を行う方法を知っている人は誰ですか?
を介して他のアニメーションでカスタムプロパティのアニメーションを同期させることができます。 –