Frocessing
FrocessingはProcessingライクなドロー系AS3ライブラリです。あくまでライクです。 移植ではなくリファレンス実装なので本家と違う振る舞いをする部分もあります。 ※PerlinNoise?,PFont等はほぼ移植になります。
3D、Font、Image等は気持ち程度です。
また、現在テストが十分ではないのでバグが多いと思います。
まとめると、遊ぶのがメインの酔狂なライブラリです。
メモ
- 3D系の実装をしている最中で、なかなかのコード荒れ気味につきご了承ください。(2008/6/30)
- テキスト入りました。コードはまだ荒れていています。(2008/7/15)
ソースコード
ドキュメント
とりあえずASDoc吐いてみました。
asdoc(0.2)
※Spark Project 内にasdocを移動しました。(2008/6/26)
※asDoc用のコメントをぼちぼち書いている途中です。
Processing的なメソッドに関しては本家で読む方がわかりやすいと思います。
http://processing.org/reference/index_ext.html
現在Processing的な実装をしているのは、主に以下のようなところです。
*付きは3Dの場合、カメラの場合メソッドが異なります。
- 2D Primitives
- triangle()
- line() *line3d()
- arc()
- point() *point3d()
- quad()
- ellipse()
- rect()
- 3D Primitives
- box()
- sphere()
- sphereDetail()
- Curves
- bezierTangent()
- bezierDetail()
- curveTightness()
- bezierPoint()
- curveDetail()
- curvePoint()
- curve() *curve3d()
- bezier() *bezier3d()
- Attributes
- strokeWeight()
- strokeJoin()
- strokeCap()
- ellipseMode()
- rectMode()
- Vertex
- beginShape()
- endShape()
- texture()
- vertex() *vertex3d()
- bezierVertex() *bezierVertex3d()
- curveVertex() *curveVertex3d()
- Transform
- pushMatrix()
- popMatrix()
- resetMatrix()
- scale()
- translate() *translateCamera()
- rotate()
- rotateX() *rotateXCamera()
- rotateY() *rotateYCamera()
- rotateZ() *rotateZCamera()
- printMatrix()
- Camera
- camera()
- beginCamera()
- endCamera()
- printCamera()
- perspective()
- frustum()
- ortho()
- printProjection()
- Color
- colorMode()
- fill()
- stroke()
- noFill()
- noStroke()
- background()
- Creating & Reading
- red()
- green()
- blue()
- hue()
- saturation()
- brightness()
- alpha() *F5MovieClip系ではf5_alpha()
- color()
- blendColor()
- lerpColor()
- Math
- dist() *dist3d()
- constrain()
- mag() *mag3d()
- lerp()
- sq()
- norm()
- map()
- degrees()
- radians()
- Random
- noise()
- noiseDetail()
- random()
- Image
- imageMode()
- image() *image3d() 現在Sprite2D仕様(暫定)
- tint()
- noTint()
- Typographic
- text()
- textFont()
- textSize()
- textWidth()
- textAlign()
- textLeading()
- textAscent()
- textDescent()
使い方
Processing気分でFlashで遊ぶ場合、frocessing.display.F5MovieClip2D、或いは、frocessing.display.F5MovieClip3DをDocumentClass?に指定してフレームスクリプトに色々書くと気分を味わえます。
このとき、function draw()がある場合、自動的にEnterFrame?のリスナに指定されます。setupはありません。
リポジトリの中に簡単なサンプルがありますので遊んでみてください。
普通に使う場合は、frocessing.core.F5Graphics2D、frocessing.core.F5Graphics3Dなどを使うのだと思う。
ライセンス
とりあえずProcessingにならってLGPLです。ライセンス文とか自信ないのですが…。
