Class Index | File Index

Classes


Class enchant.PhyPrismaticJoint


Extends enchant.BaseJoint.

Defined in: PhySprite.enchant.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
enchant.PhyPrismaticJoint(sprite1, axis)
スライドジョイント
Field Summary
Field Attributes Field Name and Description
 
限界の有効化/無効化
 
モータを有効化/無効化
 
下ジョイント制限
 
モーターの力の最大値
 
モーターのスピード
 
上ジョイント制限
Fields borrowed from class enchant.BaseJoint:
sprite1, sprite2
Method Summary
Method Attributes Method Name and Description
 
setLimits(lower, upper)
ジョイント制限の設定
Methods borrowed from class enchant.BaseJoint:
destroy
Class Detail
enchant.PhyPrismaticJoint(sprite1, axis)
スライドジョイント
var box = new PhyBoxSprite(16, 8, DYNAMIC_SPRITE, 1.0, 0.5, 0.2, true);
box.position = { x: game.width * 2 / 3, y: game.height / 2 };
var prismaticAxis = new b2Vec2(1.0, 0);   //x軸にスライドを設定(右が正の値)
//スライドジョイント
var prismaticJoint = new PhyPrismaticJoint(box, prismaticAxis);
//スライドオブジェクトにモーター機能を持たせる場合
//prismaticJoint.enableMotor = true;      //モータの有効化
//prismaticJoint.maxMotorForce = 100.0;   //モータの最大力を設定
//prismaticJoint.motorSpeed = 50;         //モータの速度を設定
Parameters:
{enchant.PhySprite} sprite1 Optional
スライドさせるスプライト
{b2Vec2} axis Optional
Field Detail
enableLimit
限界の有効化/無効化

enableMotor
モータを有効化/無効化

lowerTranslation
下ジョイント制限

maxMotorForce
モーターの力の最大値

motorSpeed
モーターのスピード

upperTranslation
上ジョイント制限
Method Detail
setLimits(lower, upper)
ジョイント制限の設定
Parameters:
{Number} lower Optional
下ジョイント
{Number} upper Optional
上ジョイント

Documentation generated by JsDoc Toolkit 2.4.0 on Sat Mar 31 2012 19:45:18 GMT+0900 (JST)