added rube knife, quickstart in menu lobby, cleaned up the lobby code a bit

This commit is contained in:
logsol 2014-03-03 02:47:23 +01:00
parent d0e9f0d458
commit 8730324a83
8 changed files with 968 additions and 215 deletions

View file

@ -65,7 +65,8 @@ function (Parent, Settings, Nc, Exception) {
Settings.GRAPHICS_PATH Settings.GRAPHICS_PATH
+ Settings.GRAPHICS_SUBPATH_CHARACTERS + Settings.GRAPHICS_SUBPATH_CHARACTERS
+ this.characterName + this.characterName
+ "/Animation/WithArms/ChuckAnimations0" + "/Animation/WithoutArms/ChuckAnimationsWithoutArms0"
//+ "/Animation/WithoutArms/ChuckAnimations0"
+ padF(i) + padF(i)
+ ".png" + ".png"
); );

View file

@ -56,19 +56,21 @@ function (Parent, Settings, Nc, PIXI) {
} }
var characterNames = ["Chuck"]; var characterNames = ["Chuck"];
var animationSets = ["WithArms"]; // FIXME add WithoutArms var animationSets = ["WithoutArms"];//, "WithArms"];
var addition = "";
for (var i = 0; i < characterNames.length; i++) { for (var i = 0; i < characterNames.length; i++) {
var characterName = characterNames[i]; var characterName = characterNames[i];
for (var j = 1; j <= 126; j++) { for (var j = 1; j <= 126; j++) {
for (var k = 0; k < animationSets.length; k++) { for (var k = 0; k < animationSets.length; k++) {
var animationSet = animationSets[k]; var animationSet = animationSets[k];
addition = animationSet == "WithoutArms" ? "WithoutArms" : "";
paths.push( paths.push(
Settings.GRAPHICS_PATH Settings.GRAPHICS_PATH
+ Settings.GRAPHICS_SUBPATH_CHARACTERS + Settings.GRAPHICS_SUBPATH_CHARACTERS
+ characterName + characterName
+ "/Animation/" + "/Animation/"
+ animationSet + animationSet
+ "/ChuckAnimations0" + "/ChuckAnimations" + addition + "0"
+ padF(j) + padF(j)
+ ".png" + ".png"
); );

View file

@ -72,7 +72,7 @@ function (ProtocolHelper, GameController, User, Nc, Settings, DomController) {
} }
Networker.prototype.onJoinError = function(options) { Networker.prototype.onJoinError = function(options) {
alert(options.message); // alert(options.message);
window.location.href = "/"; window.location.href = "/";
}; };

View file

@ -75,219 +75,10 @@
<button>Join</button> <button>Join</button>
<button id="refresh">Refresh list</button> <button id="refresh">Refresh list</button>
<button onclick="show('#createform'); return false;">Create</button> <button onclick="show('#createform'); return false;">Create</button>
<button onclick="quickstart(); return false;">Quickstart</button>
</p> </p>
</form> </form>
</article> </article>
<script type="text/javascript" src="/static/js/menu.js"></script>
<script>
function $(selector) {
return document.querySelector(selector);
}
function $$(selector) {
return document.querySelectorAll(selector);
}
if(localStorage["player"]) {
var player = JSON.parse(localStorage["player"]);
if(player.nickname) {
$("#nick").value = player.nickname;
}
}
if(localStorage["customname"]) {
$("#customname").value = localStorage["customname"];
}
var lastRefreshResponse;
function refresh() {
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function() {
if(xhr.readyState == 4) {
if(xhr.status == 200) {
var response = xhr.responseText;
if(response != lastRefreshResponse) {
lastRefreshResponse = response;
populate(JSON.parse(response).success);
}
document.body.className = "";
} else {
console.error("Ajax error: " + xhr.status + " " + xhr.responseText)
$("#list").innerHTML = "";
document.body.className = "offline";
}
}
}
xhr.open("POST", "/api", true);
xhr.send(JSON.stringify({command:"getChannels"}));
return false
}
function populate(list) {
var html = "";
if(list.length > 0) {
for (var i = 0; i < list.length; i++) {
var channel = list[i];
html += "<tr><td><label>";
html += "<input name='channel' type='radio' value='" + channel.name + "'"
if(i == 0) html += " checked"
html += "> ";
html += channel.name
html += "</label></td><td></td></tr>";
};
} else {
html += "<tr><td colspan='2'>No channels found.</td></tr>";
}
$("#list").innerHTML = html;
}
$("form#listform").onsubmit = function(e) {
var nickname = $("#nick").value;
if(!nickname || nickname.length < 3) {
alert("nickname too short")
return false;
}
localStorage["player"] = JSON.stringify({nickname: nickname});
var radios = document.querySelectorAll("form#listform input[name=channel]");
for (var i = 0; i < radios.length; i++) {
var radio = radios[i];
if(radio.checked) {
name = radio.value;
break;
}
};
if(name) {
localStorage["channel"] = JSON.stringify({
name: name
});
window.location.href = "/game.html";
return false;
} else {
alert("No channel selected")
return false;
}
}
$("form#createform").onsubmit = function(e) {
try {
var maps = [];
var checkboxes = document.querySelectorAll("form#createform input[name=maps]");
for (var i = 0; i < checkboxes.length; i++) {
var checkbox = checkboxes[i];
if(checkbox.checked) {
maps.push(checkbox.value);
}
};
if(maps.length == 0) {
alert("Please choose at least one map.")
return false;
}
var name = $("#customname").value;
if(!name) {
alert("Please provide a channel name.")
return false;
}
localStorage["customname"] = name;
var options = {
channelName: name,
maps: maps,
maxUsers: 10,
minUsers: 2
}
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function() {
if(xhr.readyState == 4) {
if(xhr.status == 200) {
onCreateSuccess(JSON.parse(xhr.responseText).success);
} else {
console.log(xhr.responseText)
alert(JSON.parse(xhr.responseText).error)
}
}
}
xhr.open("POST", "/api", true);
xhr.send(JSON.stringify({command:"createChannel", options: options}));
} catch(e) {
console.error(e)
}
return false;
}
$("form#customjoinform").onsubmit = function(e) {
try {
var nickname = $("#nick").value;
if(!nickname || nickname.length < 3) {
alert("nickname too short")
return false;
}
localStorage["player"] = JSON.stringify({nickname: nickname});
var name = $("#customname").value;
localStorage["channel"] = JSON.stringify({
name: name
});
window.location.href = "/game.html";
} catch(e) {
console.error(e)
}
return false;
}
function onCreateSuccess(options) {
$("#customname").value = options.channelName;
$("#link").value = window.location.href + options.link;
show("#customjoinform");
startTimer(options.timeout);
}
function show(id) {
$("#createform").style.display = "none";
$("#listform").style.display = "none";
$("#customjoinform").style.display = "none";
$(id).style.display = "block";
}
function startTimer(seconds) {
var now = new Date();
var end = new Date(now.getTime() + seconds * 1000);
setInterval(function() {
now = new Date();
var diff = new Date(end.getTime() - now.getTime());
if(diff.getTime() < 0) {
alert("Your channel has timed out.");
window.location.href = "/";
} else {
$("#timeout").innerHTML = " within " + formatDate(diff) + " minutes";
}
}, 1000);
}
function formatDate(date) {
var minutes = date.getMinutes();
var seconds = date.getSeconds();
if(minutes < 10) minutes = "0" + minutes;
if(seconds < 10) seconds = "0" + seconds;
return minutes + ":" + seconds;
}
$("#refresh").onclick = refresh;
refresh();
setInterval(refresh, 5000);
</script>
</body> </body>
</html> </html>

274
static/js/menu.js Normal file
View file

@ -0,0 +1,274 @@
function $(selector) {
return document.querySelector(selector);
}
function $$(selector) {
return document.querySelectorAll(selector);
}
if(localStorage["player"]) {
var player = JSON.parse(localStorage["player"]);
if(player.nickname) {
$("#nick").value = player.nickname;
}
}
if(localStorage["customname"]) {
$("#customname").value = localStorage["customname"];
}
var lastRefreshResponse;
function refresh(callback) {
try {
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function() {
if(xhr.readyState == 4) {
if(xhr.status == 200) {
var response = xhr.responseText;
if(response != lastRefreshResponse) {
lastRefreshResponse = response;
populate(JSON.parse(response).success);
}
document.body.className = "";
if(typeof callback == 'function') {
callback(JSON.parse(response).success)
}
} else {
console.error("Ajax error: " + xhr.status + " " + xhr.responseText)
$("#list").innerHTML = "";
document.body.className = "offline";
}
}
}
xhr.open("POST", "/api", true);
xhr.send(JSON.stringify({command:"getChannels"}));
} catch(e) {
console.error(e)
}
return false;
}
function populate(list) {
var html = "";
if(list.length > 0) {
for (var i = 0; i < list.length; i++) {
var channel = list[i];
html += "<tr><td><label>";
html += "<input name='channel' type='radio' value='" + channel.name + "'"
if(i == 0) html += " checked"
html += "> ";
html += channel.name
html += "</label></td><td></td></tr>";
};
} else {
html += "<tr><td colspan='2'>No channels found.</td></tr>";
}
$("#list").innerHTML = html;
}
$("form#listform").onsubmit = function(e) {
try {
var nickname = $("#nick").value;
var channelName = getSelectedChannel();
join(nickname, channelName);
} catch(e) {
console.error(e)
}
return false;
}
$("form#createform").onsubmit = function(e) {
try {
var channelName = $("#customname").value;
create(channelName, onCreateSuccess);
} catch(e) {
console.error(e)
}
return false;
}
$("form#customjoinform").onsubmit = function(e) {
try {
var nickname = $("#nick").value;
var channelName = $("#customname").value;
join(nickname, channelName);
} catch(e) {
console.error(e);
}
return false;
}
function onCreateSuccess(options) {
$("#customname").value = options.channelName;
$("#link").value = window.location.href + options.link;
show("#customjoinform");
startTimer(options.timeout);
}
function show(id) {
$("#createform").style.display = "none";
$("#listform").style.display = "none";
$("#customjoinform").style.display = "none";
$(id).style.display = "block";
}
function quickstart() {
refresh(function(list){
var defaultChannelName = "Dungeon";
var nickname = $("#nick").value;
if(!nickname) {
nickname = "Guest" + (Math.floor(Math.random() * 899) + 100)
}
if(!channelExists(list, defaultChannelName)) {
create(defaultChannelName, function() {
join(nickname, defaultChannelName); // only called on success
});
} else {
join(nickname, defaultChannelName);
}
});
}
function startTimer(seconds) {
var now = new Date();
var end = new Date(now.getTime() + seconds * 1000);
setInterval(function() {
now = new Date();
var diff = new Date(end.getTime() - now.getTime());
if(diff.getTime() < 0) {
alert("Your channel has timed out.");
window.location.href = "/";
} else {
$("#timeout").innerHTML = " within " + formatDate(diff) + " minutes";
}
}, 1000);
}
function formatDate(date) {
var minutes = date.getMinutes();
var seconds = date.getSeconds();
if(minutes < 10) minutes = "0" + minutes;
if(seconds < 10) seconds = "0" + seconds;
return minutes + ":" + seconds;
}
function channelExists(list, channelName) {
for (var i = 0; i < list.length; i++) {
var channel = list[i];
if(channel.name == channelName) {
return true;
}
}
return false;
}
function validateForJoin(nickname, channelName) {
if(!nickname || nickname.length < 3) {
alert("Nickname too short")
return false;
}
if(!channelName) {
alert('No channel name provided');
return false;
}
return true;
}
function validateForCreate(channelName, maps) {
if(maps.length < 1) {
alert("Please choose at least one map.")
return false;
}
if(!channelName) {
alert("Please provide a channel name.")
return false;
}
return true;
}
function getSelectedMaps() {
var maps = [];
var checkboxes = document.querySelectorAll("form#createform input[name=maps]");
for (var i = 0; i < checkboxes.length; i++) {
var checkbox = checkboxes[i];
if(checkbox.checked) {
maps.push(checkbox.value);
}
};
return maps;
}
function getSelectedChannel() {
var name = null;
var radios = document.querySelectorAll("form#listform input[name=channel]");
for (var i = 0; i < radios.length; i++) {
var radio = radios[i];
if(radio.checked) {
name = radio.value;
break;
}
};
return name
}
function join(nickname, channelName) {
if(validateForJoin(nickname, channelName)) {
localStorage["player"] = JSON.stringify({
nickname: nickname
});
localStorage["channel"] = JSON.stringify({
name: channelName
});
window.location.href = "/game.html";
}
}
function create(channelName, callback) {
var maps = getSelectedMaps();
if(validateForCreate(channelName, maps)) {
var options = {
channelName: channelName,
maps: maps,
maxUsers: 10,
minUsers: 2
}
localStorage["customname"] = channelName;
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function() {
if(xhr.readyState == 4) {
if(xhr.status == 200) {
if(typeof callback == 'function') {
callback(JSON.parse(xhr.responseText).success);
}
} else {
console.log(xhr.responseText)
alert(JSON.parse(xhr.responseText).error)
}
}
}
xhr.open("POST", "/api", true);
xhr.send(JSON.stringify({command:"createChannel", options: options}));
}
}
$("#refresh").onclick = refresh;
refresh();
setInterval(refresh, 5000);

297
static/objects/rube/knife Normal file
View 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
}
}

View 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();

View 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
}