Chronflow解説

なにをするコンポーネント?

Media Libraryに登録されたアルバムを選択するためのコンポーネントです。

*安定性について 大変不安定です。常に最新バージョンを使用するように心がけてください。 また、ビデオドライバを更新することで改善する例もあるようです。

foobarがなかなか終了しないことがあります。(ウィンドウは消えてもプロセスが残っている場合など)。 この状態になったときには一度ログアウトするのが効果的です。

スクリプト

カバーの位置、向き、視線の位置などをJScriptで制御します。 記述したスクリプトの関数をコンポーネントが呼び出してその戻り値のとおりにカバーなどを制御します。 このため、いくつかの関数を実装する必要があります。

各所に原文と訳がありますが、訳は信用しないでください。直訳であったり、意訳であったり、まったく別の説明であったりします。

General Notes:
Most of these functions return an array with 3 elements
These are the x,y,z coordinates in 3d-space
x is left to right
y is bottom to top
z is front to back
ほとんどの関数は3要素の配列を返す。
これら3要素は3次元を構成するx,y,zです。
x は左から右へ 
y は下から上へ
z は手前から奥へ

カバー表示系 COVER DISPLAY

These functions define the Display of the single Covers
The given parameter coverId is a floating point number.
It is 0 for the center cover, 1 for the one right
beneath it, -1 for the one on the left side and so on.
During movement the values float between the integer
values.
これらの関数はカバーの表示を1枚ずつ定義します。(カバー毎にこれらの関数がコールされると言うこと)
coverIdパラメータは浮動点小数(float/実数)で渡されます。
これは0が中央のカバー(つまりは選択されたカバー)、1は次のカバー、-1は一つ前のカバーです
整数だけではなく0.5などの中間値も存在します。(0.5は次のカバーが中央へ移動する途中など)

coverPosition(coverId)

この関数はカバーの位置を制御します。

引数 coverId
今取り扱っているカバーのIDです
戻り値 Array(x , y , z)
カバーの座標をxyzで表します
例:
function coverPosition(coverId){
  var x, y, z;
  x = coverId*1.1;
  y = 0;
  z = -Math.abs(coverId);
  return new Array(x, y, z);
}  

カバー一枚あたりの幅、高さは 1です。 ただしcoverSizeLimits関数やジャケットのアスペクト比によって変わります。

coverAlign関数も参照してください。coverAlign関数によってcoverPositionで指定する座標の意味が変わります。

coverRotation(coverId)

個の関数はカバーの傾きを制御します

引数 coverId
今取り扱っているカバーのIDです
戻り値 Array(angle, x , y , z)
angle = カバーの傾き加減を度数法で表します。 xyz = 傾ける向きを表します
return array is (angle, x, ,y, z) - this rotates
the cover *angle* degrees around the vector (x,y,z)
With (0,0,0,0) the cover is parallel to the y-z-Plane
戻り値の配列は (角度 ,x ,y ,z) - これは
カバーを (x,y,z)ベクトルの周りに回転させます。
(0,0,0,0)を返したとき、カバーはy-z平面に対して平行になります。
(が、x-y平面に対して平行になる。)

angleに度数法で角度を指定し、xyzに傾ける向きを指定します。以下に例を出します

例:
function coverRotation(coverId){
   var angle = coverId*30;
   return new Array(angle,0,0,1);
}
function coverPosition(coverId){
  return new Array(coverId*1.2, 1, 0);
}
function coverAlign(coverId){
  return new Array(0, 0);
}

基準となる点はcoverAlign関数で指定します。coverAlign関数も参照してください。

coverAlign(coverId)

coverPositionで指定する点、coverRotationの基点を設定します。

引数 coverId
今取り扱っているカバーのIDです
戻り値 Array(x, y)
基点の位置です
Sets which point of the cover coverPosition() defines
(-1,-1) means bottom left, (0,0) means center,
(1,1) means top right, (0, -1) means bottom center etc.
The cover is also rotated around this point.
どこにcoverPosition()の基準を置くか決める。
(-1,-1)は左下を基準に、(0,0)は中心,(1,1)は左上,
(0, -1)は底辺の中点....
また、この基点まわりに回転します。
// 基点を中心にとっているため、カバーが半分地面に埋まります。
function coverAlign(coverId){
  return new Array(0, 0);
}
function coverPosition(coverId){
  return new Array(coverId*1.2, 0, 0);
}
// 基点を底辺にとっているため、地面に埋まりません。
function coverAlign(coverId){
  return new Array(0, -1);
}
function coverPosition(coverId){
  return new Array(coverId*1.2, 0, 0);
}

coverSizeLimits(coverId)

カバーのサイズの上限を設定します。

引数 coverId
今取り扱っているカバーのIDです|
戻り値 Array(width, height)
制限する幅と高さです。|
Defines the the size boundaries for the cover.
Aspect ratio is preserved.
Return Array is (widht, height)
境界線を含めたカバーのサイズを定義します。
アスペクト比(縦横比)は固定です。
戻り値は(width,height)です。

以下に例を出します.

例:
function coverSizeLimits(coverId){
   return new Array(1, 2);
}

drawCovers()

表示するカバーの数を設定する。

戻り値 Array(start, end)
startからendまでのカバーを表示。
Defines the range of covers to draw.
Return array is (leftmostCover, rightmostCover)
This interval shouldn't be larger than 80
The center cover is 0.
描画するカバーの範囲を設定する。
戻り値は(最左端カバー, 最右端カバー)
最大表示可能枚数は80枚です。
センターのカバーは0です。

戻り値は整数で返します。 (-10,0.999)を返しても移動中のカバーは表示されません。移動直後に消えます。

例:
function drawCovers(){
  return new Array(-10, 0);
}

aspectBehaviour()

""パネルの""アスペクト比を設定します。

戻り値 Array(width, height)
幅と高さです。
In which direction should the fov be expanded/shrinked
when the panel is resized?
If this returns (0,1), the height is fixed.
If this returns (1,0), the width is fixed.
You can also return stuff like (0.5,0.5) or (7, 3)
The values determine how important it is for this
dimension to stay fixed.

パネル(chron flow)がリサイズされたとき、
どの向きを拡大縮小しますか?
もし(0,1)を返したとき、高さが固定されます。
もし(1,0)を返したとき、幅が固定されます。
(0.5,0.5)や(7.3)といった値も返せますが、
これらの値は...(だれか訳をお願いします)...
例: 高さに応じて中身が拡大縮小する
function aspectBehaviour(){
   return new Array(0, 1);
}

カメラの設定 CAMMERA SETUP

eyePos()

目の位置を設定します

戻り値 Array(x, y,z)
目の位置です
例: 0.5はカバーの半分の大きさです。つまりカバーの中心が画面の中心に来るように目の高さを調整しています。
function eyePos(){
  	return new Array(0, 0.5, 6);
}

lookAt()

視線の先を設定します。

戻り値 Array(x, y, z)
xyzで指定した点を見つめます
Defines the point for the eye to look at
視線の先を設定します。

例:
function lookAt(){
   return new Array(0, 0.5, 0);
}

upVector()

よく分からん

戻り値 Array(x, y, z)
xyzで指定したベクトルを?
Used to rotate the view.
The returned Vector points upwards in the viewport.
This vector must not be parallel to the line of sight from the
eyePos point to the lookAt point.
ビューを回転するときに使います。
返した位置ベクトルはビューの上向きになります。(?)
このベクトルはeyePos->lookAtに対して平行に""してはいけません""。

例:よくわかんない
function upVector(){
   return new Array(0, 1, 0);   
}

鏡の設定 MIRROR SETUP

showMirrorPlane()

戻り値 bool
鏡を表示するかしないか
例:鏡を表示する
function showMirrorPlane(){
   return true; // return false to hide the mirror
}

mirrorPoint ()

戻り値 Array(x, y, z)
xyz
Any Point on the Mirror Plane
鏡上の何処かの点(?)
function mirrorPoint (){
   return new Array(0, 0, 0);
}

mirrorNormal ()

戻り値 Array(x, y, z)
xyzそれぞれ1か0を指定する(?)
Normal of the Mirror Plane
鏡の向き(垂線)

function mirrorNormal (){
  return new Array(0, 1, 0);
}

取説UIElement要編集


*1 もし8.0なら.netコンポが使えて...

Last-modified: 2016-02-03 (水) 23:00:00