mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 18:47:35 +00:00
added rube knife, quickstart in menu lobby, cleaned up the lobby code a bit
This commit is contained in:
parent
d0e9f0d458
commit
8730324a83
8 changed files with 968 additions and 215 deletions
297
static/objects/rube/knife
Normal file
297
static/objects/rube/knife
Normal file
|
|
@ -0,0 +1,297 @@
|
|||
|
||||
{
|
||||
"collisionbitplanes" :
|
||||
{
|
||||
"names" :
|
||||
[
|
||||
"bitplane1",
|
||||
"bitplane2",
|
||||
"bitplane3",
|
||||
"bitplane4",
|
||||
"bitplane5",
|
||||
"bitplane6",
|
||||
"bitplane7",
|
||||
"bitplane8",
|
||||
"bitplane9",
|
||||
"bitplane10",
|
||||
"bitplane11",
|
||||
"bitplane12",
|
||||
"bitplane13",
|
||||
"bitplane14",
|
||||
"bitplane15",
|
||||
"bitplane16",
|
||||
"bitplane17",
|
||||
"bitplane18",
|
||||
"bitplane19",
|
||||
"bitplane20",
|
||||
"bitplane21",
|
||||
"bitplane22",
|
||||
"bitplane23",
|
||||
"bitplane24",
|
||||
"bitplane25",
|
||||
"bitplane26",
|
||||
"bitplane27",
|
||||
"bitplane28",
|
||||
"bitplane29",
|
||||
"bitplane30",
|
||||
"bitplane31",
|
||||
"bitplane32"
|
||||
]
|
||||
},
|
||||
"metaworld" :
|
||||
{
|
||||
"allowSleep" : true,
|
||||
"autoClearForces" : true,
|
||||
"continuousPhysics" : true,
|
||||
"exportOptions" :
|
||||
{
|
||||
"compactCommonFloats" : true,
|
||||
"compactZeroVecs" : true,
|
||||
"saveFullPathForImages" : false,
|
||||
"saveImagePathsRelativeToRUBEFile" : false,
|
||||
"useHumanReadableFloats" : true,
|
||||
"usePrettyPrint" : true
|
||||
},
|
||||
"gravity" :
|
||||
{
|
||||
"x" : 0,
|
||||
"y" : -10
|
||||
},
|
||||
"metabody" :
|
||||
[
|
||||
|
||||
{
|
||||
"angle" : 0,
|
||||
"angularVelocity" : 0,
|
||||
"awake" : true,
|
||||
"fixture" :
|
||||
[
|
||||
|
||||
{
|
||||
"density" : 1,
|
||||
"friction" : 0.2,
|
||||
"id" : 6,
|
||||
"name" : "fixture2",
|
||||
"shapes" :
|
||||
[
|
||||
|
||||
{
|
||||
"type" : "line"
|
||||
}
|
||||
],
|
||||
"vertices" :
|
||||
{
|
||||
"x" : [ 21.67079925537109, -21.67079925537109 ],
|
||||
"y" : [ 0.08283519744873047, 0.08283519744873047 ]
|
||||
}
|
||||
}
|
||||
],
|
||||
"id" : 5,
|
||||
"linearVelocity" : 0,
|
||||
"name" : "ignore",
|
||||
"position" :
|
||||
{
|
||||
"x" : -0.1640515327453613,
|
||||
"y" : -1.222461223602295
|
||||
},
|
||||
"type" : "static"
|
||||
},
|
||||
|
||||
{
|
||||
"angle" : 0,
|
||||
"angularVelocity" : 0,
|
||||
"awake" : true,
|
||||
"fixture" :
|
||||
[
|
||||
|
||||
{
|
||||
"density" : 3,
|
||||
"friction" : 0.2,
|
||||
"id" : 8,
|
||||
"name" : "fixture0",
|
||||
"shapes" :
|
||||
[
|
||||
|
||||
{
|
||||
"type" : "polygon"
|
||||
}
|
||||
],
|
||||
"vertices" :
|
||||
{
|
||||
"x" :
|
||||
[
|
||||
-0.1304440498352051,
|
||||
0.1304439306259155,
|
||||
0.1107617914676666,
|
||||
0.02803209424018860,
|
||||
-0.1304440498352051
|
||||
],
|
||||
"y" :
|
||||
[
|
||||
-0.05917119979858398,
|
||||
-0.05917119979858398,
|
||||
0.2331519126892090,
|
||||
0.4285533428192139,
|
||||
0.5828356742858887
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"density" : 1,
|
||||
"friction" : 0.2,
|
||||
"id" : 9,
|
||||
"name" : "fixture1",
|
||||
"shapes" :
|
||||
[
|
||||
|
||||
{
|
||||
"type" : "polygon"
|
||||
}
|
||||
],
|
||||
"vertices" :
|
||||
{
|
||||
"x" :
|
||||
[
|
||||
-0.04707279801368713,
|
||||
0.05067454278469086,
|
||||
0.05067454278469086,
|
||||
-0.04707279801368713
|
||||
],
|
||||
"y" :
|
||||
[
|
||||
-0.4052271842956543,
|
||||
-0.4052271842956543,
|
||||
-0.01811981201171875,
|
||||
-0.01811981201171875
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"id" : 6,
|
||||
"linearVelocity" : 0,
|
||||
"massData-I" : 0.02848954126238823,
|
||||
"massData-center" :
|
||||
{
|
||||
"x" : -0.01761996559798717,
|
||||
"y" : 0.1609777510166168
|
||||
},
|
||||
"massData-mass" : 0.4118219017982483,
|
||||
"name" : "body0",
|
||||
"position" :
|
||||
{
|
||||
"x" : 0.001211032271385193,
|
||||
"y" : 0.4150367975234985
|
||||
},
|
||||
"type" : "dynamic"
|
||||
},
|
||||
|
||||
{
|
||||
"angle" : 0,
|
||||
"angularVelocity" : 0,
|
||||
"awake" : true,
|
||||
"fixture" :
|
||||
[
|
||||
|
||||
{
|
||||
"density" : 1,
|
||||
"friction" : 1,
|
||||
"id" : 11,
|
||||
"name" : "fixture3",
|
||||
"shapes" :
|
||||
[
|
||||
|
||||
{
|
||||
"type" : "polygon"
|
||||
}
|
||||
],
|
||||
"vertices" :
|
||||
{
|
||||
"x" :
|
||||
[
|
||||
-0.1263020038604736,
|
||||
0.1263022422790527,
|
||||
0.1263022422790527,
|
||||
-0.1263020038604736
|
||||
],
|
||||
"y" :
|
||||
[
|
||||
-0.02517747879028320,
|
||||
-0.02517747879028320,
|
||||
0.02517747879028320,
|
||||
0.02517747879028320
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"id" : 7,
|
||||
"linearDamping" : 3,
|
||||
"linearVelocity" : 0,
|
||||
"massData-I" : 7.032450957922265e-05,
|
||||
"massData-center" :
|
||||
{
|
||||
"x" : 1.192092895507812e-07,
|
||||
"y" : 0
|
||||
},
|
||||
"massData-mass" : 0.01271987613290548,
|
||||
"name" : "body1",
|
||||
"position" :
|
||||
{
|
||||
"x" : -0.0002227276563644409,
|
||||
"y" : 0.03157053887844086
|
||||
},
|
||||
"type" : "dynamic"
|
||||
}
|
||||
],
|
||||
"metaimage" :
|
||||
[
|
||||
|
||||
{
|
||||
"aspectScale" : 1,
|
||||
"body" : 6,
|
||||
"center" :
|
||||
{
|
||||
"x" : 0.001725792884826660,
|
||||
"y" : 0.08973789215087891
|
||||
},
|
||||
"file" : "../../img/Items/kitchen/knife.gif",
|
||||
"filter" : 1,
|
||||
"flip" : false,
|
||||
"id" : 1,
|
||||
"name" : "image0",
|
||||
"opacity" : 1,
|
||||
"scale" : 1
|
||||
}
|
||||
],
|
||||
"metajoint" :
|
||||
[
|
||||
|
||||
{
|
||||
"anchorA" :
|
||||
{
|
||||
"x" : -0.001311389962211251,
|
||||
"y" : 0.004075049888342619
|
||||
},
|
||||
"anchorB" :
|
||||
{
|
||||
"x" : -0.002745149889960885,
|
||||
"y" : -0.3793910145759583
|
||||
},
|
||||
"bodyA" : 7,
|
||||
"bodyB" : 6,
|
||||
"collideConnected" : false,
|
||||
"dampingRatio" : 0,
|
||||
"frequency" : 0,
|
||||
"id" : 2,
|
||||
"name" : "joint0",
|
||||
"referenceAngle" : 0,
|
||||
"type" : "weld"
|
||||
}
|
||||
],
|
||||
"positionIterations" : 3,
|
||||
"stepsPerSecond" : 60.0,
|
||||
"subStepping" : false,
|
||||
"velocityIterations" : 8,
|
||||
"warmStarting" : true
|
||||
}
|
||||
}
|
||||
100
static/objects/rube/knife-backups/knife-scriptLog.rs
Normal file
100
static/objects/rube/knife-backups/knife-scriptLog.rs
Normal file
|
|
@ -0,0 +1,100 @@
|
|||
getBody(6).deselect();
|
||||
getBody(7).deselect();
|
||||
getFixture(8).setFilterCategoryBits(67108865);
|
||||
getFixture(8).setFilterCategoryBits(1);
|
||||
getBody(6).select();
|
||||
addCustomProperty('fixture','dangerous','dangerous','string');
|
||||
setCustomPropertyNames('fixture','dangerous','dangerous','dangerous');
|
||||
getFixture(8).setCustomString('dangerous','very');
|
||||
setCustomPropertyNames('fixture','dangerous','dangerous','dangerous');
|
||||
getFixture(8).setCustomString('dangerous','very');
|
||||
getFixture(8).setCustomString('dangerous','normal');
|
||||
setCustomPropertyNames('fixture','dangerous','dangerous','dangerous');
|
||||
setCustomPropertyNames('fixture','dangerous','dangerous','Dangerous');
|
||||
setCustomPropertyNames('fixture','dangerous','dangerous','Dangerous');
|
||||
setCustomPropertyNames('fixture','dangerous','dangerous','Dangerous');
|
||||
getFixture(8).deselect();
|
||||
addBody(8, '{"awake":true,"type":"dynamic"}');
|
||||
getBody(8).addFixture(12, '{"density":1,"shapes":[{"radius":0,"type":"polygon"}],"friction":0.2,"vertices":{"x":[-0.5,0.5,0.5,-0.5],"y":[-0.5,-0.5,0.5,0.5]}}');
|
||||
getBody(8).setPosition(0.186793,5.86778);
|
||||
getFixture(12).select();
|
||||
getFixture(12).deselect();
|
||||
getBody(8).setPosition(0,0);
|
||||
getFixture(12).delete();getBody(8).delete();
|
||||
getBody(6).deselect();
|
||||
addBody(9, '{"awake":true,"type":"dynamic"}');
|
||||
getBody(9).addFixture(13, '{"density":1,"shapes":[{"radius":0.5,"type":"circle"}],"friction":0.2,"vertices":{"x":[0],"y":[0]}}');
|
||||
getBody(9).setPosition(0.186793,5.86778);
|
||||
getBody(9).select();
|
||||
getBody(9).setPosition(-4.61105,2.66921);
|
||||
getVertex(13,0).select();
|
||||
getVertex(13,0).deselect();
|
||||
getVertex(13,0).select();
|
||||
getVertex(13,0).deselect();
|
||||
getVertex(13,0).select();
|
||||
getVertex(13,0).deselect();
|
||||
getVertex(13,0).select();
|
||||
getBody(9).addFixture(14, '{"density":1,"shapes":[{"radius":0.5,"type":"circle"}],"friction":0.2,"vertices":{"x":[4.79785],"y":[3.19857]}}');
|
||||
getVertex(13,0).setPos(2.57043, 3.07817);
|
||||
getVertex(13,0).deselect();
|
||||
getVertex(14,0).select();
|
||||
getVertex(14,0).setPos(2.92556, 1.99269);
|
||||
getVertex(14,0).deselect();
|
||||
getVertex(14,0).select();
|
||||
getBody(9).deselect();
|
||||
getBody(9).select();
|
||||
getFixture(14).select();
|
||||
{
|
||||
fixture _rube_redoFixture = getFixture(14);
|
||||
_rube_redoFixture.setVertex(0,0.338239,-0.0162923);
|
||||
}
|
||||
getFixture(14).deselect();
|
||||
getFixture(13).select();
|
||||
{
|
||||
fixture _rube_redoFixture = getFixture(13);
|
||||
_rube_redoFixture.setVertex(0,-0.161483,0.916989);
|
||||
}
|
||||
getFixture(13).deselect();
|
||||
getFixture(14).select();
|
||||
{
|
||||
fixture _rube_redoFixture = getFixture(14);
|
||||
_rube_redoFixture.setVertex(0,-0.00320554,-0.00176287);
|
||||
}
|
||||
getFixture(14).deselect();
|
||||
getFixture(13).select();
|
||||
{
|
||||
fixture _rube_redoFixture = getFixture(13);
|
||||
_rube_redoFixture.setVertex(0,0.00197458,1.25843);
|
||||
}
|
||||
getFixture(13).deselect();
|
||||
getFixture(14).select();
|
||||
getBody(9).deselect();
|
||||
getBody(9).select();
|
||||
getFixture(14).deselect();
|
||||
getFixture(13).select();
|
||||
getVertex(14,0).setPos(-0.00320554, -0.00176287);
|
||||
getFixture(13).deselect();
|
||||
getFixture(13).select();
|
||||
getFixture(13).setCustomString('dangerous','very');
|
||||
getFixture(13).setCustomString('dangerous','normal');
|
||||
getFixture(13).deselect();
|
||||
getFixture(13).select();
|
||||
getFixture(13).deselect();
|
||||
getFixture(14).select();
|
||||
getFixture(14).deselect();
|
||||
getFixture(13).select();
|
||||
getFixture(13).deselect();
|
||||
getFixture(14).select();
|
||||
getFixture(14).deselect();
|
||||
getFixture(13).select();
|
||||
getFixture(13).deselect();
|
||||
getFixture(14).select();
|
||||
getFixture(14).deselect();
|
||||
getFixture(13).select();
|
||||
getVertex(14,0).deselect();
|
||||
getVertex(13,0).select();
|
||||
getVertex(13,0).deselect();
|
||||
getVertex(14,0).select();
|
||||
getImage(1).deselect();
|
||||
getBody(9).deselect();
|
||||
getBody(9).select();
|
||||
288
static/objects/rube/knife.json
Normal file
288
static/objects/rube/knife.json
Normal file
|
|
@ -0,0 +1,288 @@
|
|||
|
||||
{
|
||||
"allowSleep" : true,
|
||||
"autoClearForces" : true,
|
||||
"body" :
|
||||
[
|
||||
|
||||
{
|
||||
"angle" : 0,
|
||||
"angularVelocity" : 0,
|
||||
"awake" : true,
|
||||
"fixture" :
|
||||
[
|
||||
|
||||
{
|
||||
"density" : 1,
|
||||
"friction" : 1,
|
||||
"name" : "fixture3",
|
||||
"polygon" :
|
||||
{
|
||||
"vertices" :
|
||||
{
|
||||
"x" :
|
||||
[
|
||||
0.1263022422790527,
|
||||
0.1263022422790527,
|
||||
-0.1263020038604736,
|
||||
-0.1263020038604736
|
||||
],
|
||||
"y" :
|
||||
[
|
||||
-0.02517747879028320,
|
||||
0.02517747879028320,
|
||||
0.02517747879028320,
|
||||
-0.02517747879028320
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"linearDamping" : 3,
|
||||
"linearVelocity" : 0,
|
||||
"massData-I" : 7.032450957922265e-05,
|
||||
"massData-center" :
|
||||
{
|
||||
"x" : 1.192092895507812e-07,
|
||||
"y" : 0
|
||||
},
|
||||
"massData-mass" : 0.01271987613290548,
|
||||
"name" : "body1",
|
||||
"position" :
|
||||
{
|
||||
"x" : -0.0002227276563644409,
|
||||
"y" : 0.03157053887844086
|
||||
},
|
||||
"type" : 2
|
||||
},
|
||||
|
||||
{
|
||||
"angle" : 0,
|
||||
"angularVelocity" : 0,
|
||||
"awake" : true,
|
||||
"fixture" :
|
||||
[
|
||||
|
||||
{
|
||||
"density" : 3,
|
||||
"friction" : 0.2,
|
||||
"name" : "fixture0",
|
||||
"polygon" :
|
||||
{
|
||||
"vertices" :
|
||||
{
|
||||
"x" :
|
||||
[
|
||||
0.1304439306259155,
|
||||
0.1107617914676666,
|
||||
0.02803209424018860,
|
||||
-0.1304440498352051,
|
||||
-0.1304440498352051
|
||||
],
|
||||
"y" :
|
||||
[
|
||||
-0.05917119979858398,
|
||||
0.2331519126892090,
|
||||
0.4285533428192139,
|
||||
0.5828356742858887,
|
||||
-0.05917119979858398
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"density" : 1,
|
||||
"friction" : 0.2,
|
||||
"name" : "fixture1",
|
||||
"polygon" :
|
||||
{
|
||||
"vertices" :
|
||||
{
|
||||
"x" :
|
||||
[
|
||||
0.05067454278469086,
|
||||
0.05067454278469086,
|
||||
-0.04707279801368713,
|
||||
-0.04707279801368713
|
||||
],
|
||||
"y" :
|
||||
[
|
||||
-0.4052271842956543,
|
||||
-0.01811981201171875,
|
||||
-0.01811981201171875,
|
||||
-0.4052271842956543
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"linearVelocity" : 0,
|
||||
"massData-I" : 0.02848954126238823,
|
||||
"massData-center" :
|
||||
{
|
||||
"x" : -0.01761996559798717,
|
||||
"y" : 0.1609777510166168
|
||||
},
|
||||
"massData-mass" : 0.4118219017982483,
|
||||
"name" : "body0",
|
||||
"position" :
|
||||
{
|
||||
"x" : 0.001211032271385193,
|
||||
"y" : 0.4150367975234985
|
||||
},
|
||||
"type" : 2
|
||||
},
|
||||
|
||||
{
|
||||
"angle" : 0,
|
||||
"angularVelocity" : 0,
|
||||
"awake" : true,
|
||||
"fixture" :
|
||||
[
|
||||
|
||||
{
|
||||
"chain" :
|
||||
{
|
||||
"vertices" :
|
||||
{
|
||||
"x" : [ 21.67079925537109, -21.67079925537109 ],
|
||||
"y" : [ 0.08283519744873047, 0.08283519744873047 ]
|
||||
}
|
||||
},
|
||||
"density" : 1,
|
||||
"friction" : 0.2,
|
||||
"name" : "fixture2"
|
||||
}
|
||||
],
|
||||
"linearVelocity" : 0,
|
||||
"name" : "ignore",
|
||||
"position" :
|
||||
{
|
||||
"x" : -0.1640515327453613,
|
||||
"y" : -1.222461223602295
|
||||
},
|
||||
"type" : 0
|
||||
}
|
||||
],
|
||||
"collisionbitplanes" :
|
||||
{
|
||||
"names" :
|
||||
[
|
||||
"bitplane1",
|
||||
"bitplane2",
|
||||
"bitplane3",
|
||||
"bitplane4",
|
||||
"bitplane5",
|
||||
"bitplane6",
|
||||
"bitplane7",
|
||||
"bitplane8",
|
||||
"bitplane9",
|
||||
"bitplane10",
|
||||
"bitplane11",
|
||||
"bitplane12",
|
||||
"bitplane13",
|
||||
"bitplane14",
|
||||
"bitplane15",
|
||||
"bitplane16",
|
||||
"bitplane17",
|
||||
"bitplane18",
|
||||
"bitplane19",
|
||||
"bitplane20",
|
||||
"bitplane21",
|
||||
"bitplane22",
|
||||
"bitplane23",
|
||||
"bitplane24",
|
||||
"bitplane25",
|
||||
"bitplane26",
|
||||
"bitplane27",
|
||||
"bitplane28",
|
||||
"bitplane29",
|
||||
"bitplane30",
|
||||
"bitplane31",
|
||||
"bitplane32"
|
||||
]
|
||||
},
|
||||
"continuousPhysics" : true,
|
||||
"gravity" :
|
||||
{
|
||||
"x" : 0,
|
||||
"y" : -10
|
||||
},
|
||||
"image" :
|
||||
[
|
||||
|
||||
{
|
||||
"aspectScale" : 1,
|
||||
"body" : 1,
|
||||
"center" :
|
||||
{
|
||||
"x" : 0.001725792884826660,
|
||||
"y" : 0.08973789215087891
|
||||
},
|
||||
"corners" :
|
||||
{
|
||||
"x" :
|
||||
[
|
||||
-0.1316075474023819,
|
||||
0.1350591331720352,
|
||||
0.1350591331720352,
|
||||
-0.1316075474023819
|
||||
],
|
||||
"y" :
|
||||
[
|
||||
-0.4102621078491211,
|
||||
-0.4102621078491211,
|
||||
0.5897378921508789,
|
||||
0.5897378921508789
|
||||
]
|
||||
},
|
||||
"file" : "../../img/Items/kitchen/knife.gif",
|
||||
"filter" : 1,
|
||||
"glDrawElements" : [ 0, 1, 2, 2, 3, 0 ],
|
||||
"glTexCoordPointer" : [ 0.0, 0.0, 1, 0.0, 1, 1, 0.0, 1 ],
|
||||
"glVertexPointer" :
|
||||
[
|
||||
-0.1316075474023819,
|
||||
-0.4102621078491211,
|
||||
0.1350591331720352,
|
||||
-0.4102621078491211,
|
||||
0.1350591331720352,
|
||||
0.5897378921508789,
|
||||
-0.1316075474023819,
|
||||
0.5897378921508789
|
||||
],
|
||||
"name" : "image0",
|
||||
"opacity" : 1,
|
||||
"scale" : 1
|
||||
}
|
||||
],
|
||||
"joint" :
|
||||
[
|
||||
|
||||
{
|
||||
"anchorA" :
|
||||
{
|
||||
"x" : -0.001311389962211251,
|
||||
"y" : 0.004075050354003906
|
||||
},
|
||||
"anchorB" :
|
||||
{
|
||||
"x" : -0.002745149889960885,
|
||||
"y" : -0.3793910145759583
|
||||
},
|
||||
"bodyA" : 0,
|
||||
"bodyB" : 1,
|
||||
"dampingRatio" : 0,
|
||||
"frequency" : 0,
|
||||
"name" : "joint0",
|
||||
"refAngle" : 0,
|
||||
"type" : "weld"
|
||||
}
|
||||
],
|
||||
"positionIterations" : 3,
|
||||
"stepsPerSecond" : 60.0,
|
||||
"subStepping" : false,
|
||||
"velocityIterations" : 8,
|
||||
"warmStarting" : true
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue