Class Index | File Index

Classes


Class enchant.PhyRevoluteJoint


Extends enchant.BaseJoint.

Defined in: PhySprite.enchant.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
enchant.PhyRevoluteJoint(axis, sprite)
物体と物体のモーター付きジョイント
Field Summary
Field Attributes Field Name and Description
 
限界の有効化/無効化
 
モータを有効化/無効化
 
最低角度
 
トルクの最大値
 
モータの回転速度(deg/s)
 
最高角度
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.PhyRevoluteJoint(axis, sprite)
物体と物体のモーター付きジョイント
//軸
var axis = new PhyCircleSprite(8, STATIC_SPRITE);
axis.position = { x: 160, y: 160 };
game.rootScene.addChild(axis); // シーンに追加
//ボール生成
var ball = new PhyCircleSprite(8, DYNAMIC_SPRITE);
ball.position = { x: 100, y: 250 };
game.rootScene.addChild(ball); // シーンに追加
//距離ジョイント
var joint = new PhyRevoluteJoint(axis, ball);
joint.enableMotor = true;
joint.maxMotorTorque = 100;
joint.motorSpeed = 90;
Parameters:
{enchant.PhySprite} axis Optional
軸となるスプライト
{enchant.PhySprite} sprite Optional
繋げるスプライト
Field Detail
enableLimit
限界の有効化/無効化

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

lowerAngle
最低角度

maxMotorTorque
トルクの最大値

motorSpeed
モータの回転速度(deg/s)

upperAngle
最高角度
Method Detail
getJointAngle()

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)