added yohoho module

This commit is contained in:
mig 2017-04-09 14:07:11 +02:00
parent 252e41ffb7
commit 484400b36d
100 changed files with 5707 additions and 0 deletions

View file

@ -0,0 +1,7 @@
<div style="position: relative; overflow: hidden;">
<img src="{GAME}/res/images/philippe.matharel.png" style="float: left; margin-right: 10px; width: 8rem"/>
<p>Yohoho! has been invented by Philippe Matharel between 1990 and 2010.</p>
</div>
<br/>
<p>Jocly development: Michel Gutierrez (@<a target="_blank" href="http://twitter.com/_mig_">_mig_</a>) and Jérôme Choain (@<a target="_blank" href="http://twitter.com/jcfrog">jcfrog</a>).</p>
<p>Graphic design: Philippe Matharel and Jérôme Choain (@<a target="_blank" href="http://twitter.com/jcfrog">jcfrog</a>).</p>

View file

@ -0,0 +1,5 @@
<p>Yohoho! is a two players game without any random.</p>
<p>It is played on a board made of hexagons and simulate a sea battle.</p>
<p>The game can be compared to Chess in a number of aspects.</p>

Binary file not shown.

After

Width:  |  Height:  |  Size: 367 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 KiB

View file

@ -0,0 +1,193 @@
/*
*
* Copyright (c) 2012 - Jocly - www.jocly.com
*
* This file is part of the Jocly game platform and cannot be used outside of this context without the written permission of Jocly.
*
*/
// tools
Model.Game.HexInitRCPosAndLayout=function(){
/*
if(this._HexInitRCPosAndLayout)
return;
this._HexInitRCPosAndLayout=true;
*/
var HEIGHT=this.mOptions.maxLines;
var layout=[];
var rcPositions=[];
var rcPosIdx=0;
for(var r=0;r<this.mOptions.maxLines;r++) {
layout[r]=[];
rcPositions[r]=[];
for(var c=0;c<this.mOptions.maxCols;c++) {
layout[r][c]=this.mOptions.boardLayout[HEIGHT-1-r][c];
if(layout[r][c]!="."){
rcPositions[r][c]=rcPosIdx;
rcPosIdx++;
} else {
rcPositions[r][c]=-1;
}
}
}
this.g.rcPositions=rcPositions;
this.g.Layout=layout;
this.g.nbPos=rcPosIdx;
}
Model.Game.HexRcPos=function(r,c){
//return r*this.mOptions.maxCols+c;
return this.g.rcPositions[r][c];
}
Model.Game.HexIsCell=function(r,c){
if (r<0 || r>=this.mOptions.maxLines || c<0 || c>=this.mOptions.maxCols) return false;
return this.g.Layout[r][c]!=".";
}
/* Optional method.
* Called when the game is created.
*/
Model.Game.HexInitGame = function() {
this.HexInitRCPosAndLayout();
this.g.orientation=this.mOptions.orientation;
this.g.maxNbCellsPerMove=this.mOptions.maxNbCellsPerMove;
this.g.margin=this.mOptions.margin;
var g=[];
var coord=[];
for(var r=0;r<this.mOptions.maxLines;r++) {
for(var c=0;c<this.mOptions.maxCols;c++) {
if (this.HexIsCell(r,c)){
var pos=this.HexRcPos(r,c);
coord[pos]=[r,c];
g[pos]=[];
// go for 6 directions, trigonometric positive way, start with 0° if onACorner, 30° if onASide
if (this.g.orientation=="onASide"){
for (var d=0 ; d < 6 ; d++){
switch (d){
case 0: if (this.HexIsCell(r+1,c+1)) g[pos].push(this.HexRcPos(r+1,c+1)); else g[pos].push(null); break;
case 1: if (this.HexIsCell(r+2,c)) g[pos].push(this.HexRcPos(r+2,c)); else g[pos].push(null); break;
case 2: if (this.HexIsCell(r+1,c-1)) g[pos].push(this.HexRcPos(r+1,c-1)); else g[pos].push(null); break;
case 3: if (this.HexIsCell(r-1,c-1)) g[pos].push(this.HexRcPos(r-1,c-1)); else g[pos].push(null); break;
case 4: if (this.HexIsCell(r-2,c)) g[pos].push(this.HexRcPos(r-2,c)); else g[pos].push(null); break;
case 5: if (this.HexIsCell(r-1,c+1)) g[pos].push(this.HexRcPos(r-1,c+1)); else g[pos].push(null); break;
default : break;
}
}
}else{ //onACorner
for (var d=0 ; d < 6 ; d++){
switch (d){
case 0: if (this.HexIsCell(r,c+2)) g[pos].push(this.HexRcPos(r,c+2)); else g[pos].push(null); break;
case 1: if (this.HexIsCell(r+1,c+1)) g[pos].push(this.HexRcPos(r+1,c+1)); else g[pos].push(null); break;
case 2: if (this.HexIsCell(r+1,c-1)) g[pos].push(this.HexRcPos(r+1,c-1)); else g[pos].push(null); break;
case 3: if (this.HexIsCell(r,c-2)) g[pos].push(this.HexRcPos(r,c-2)); else g[pos].push(null); break;
case 4: if (this.HexIsCell(r-1,c-1)) g[pos].push(this.HexRcPos(r-1,c-1)); else g[pos].push(null); break;
case 5: if (this.HexIsCell(r-1,c+1)) g[pos].push(this.HexRcPos(r-1,c+1)); else g[pos].push(null); break;
default : break;
}
}
}
}
}
}
this.g.Graph=g;
this.g.Coord=coord;
}
/* Optional method.
* Called when the game is over.
*/
Model.Game.DestroyGame = function() {
}
Model.Board.xtraInitBoard = function(aGame) {
}
/* Board object constructor.
* There 2 strategies about initializing boards:
* 1/ implement the starting board in the Init function and no implementation of Model.Board.InitialPosition
* 2/ implement in Init function the very minimum to allow Model.Board.CopyFrom to work (note the default CopyFrom is
* compatible with an empty Init) and implement Model.Board.InitialPosition to set the board data as starting board
* Second method is better for performance.
*/
Model.Board.HexInit = function(aGame) {
var WIDTH=aGame.mOptions.maxCols;
var HEIGHT=aGame.mOptions.maxLines;
this.board=[]; // access pieces by position
// init
var initVal=-1;
if (aGame.mOptions.boardInitValue!=undefined) initVal=aGame.mOptions.boardInitValue;
for(var r=0;r<HEIGHT;r++) {
for(var c=0;c<WIDTH;c++)
this.board[aGame.HexRcPos(r,c)]=initVal;
}
var INITIAL=aGame.mOptions.initial;
this.pieces=[]; // access pieces by index
var index=0;
var indexPieces=[{},{}]
if (INITIAL){
for(var rtab=0;rtab<HEIGHT;rtab++) {
var r = HEIGHT-1-rtab;
for(var c=0;c<WIDTH;c++) {
var pos=aGame.HexRcPos(r,c);
switch(INITIAL.a[rtab][c]){
case ".":
case "#":
break;
default:
var pieceType=INITIAL.a[rtab][c];
var indexPiece=indexPieces[0][pieceType];
if(typeof indexPiece=="undefined")
indexPieces[0][pieceType]=0;
this.pieces.push({
s: JocGame.PLAYER_A, // side
pos: pos, // cell num
type: pieceType, // type of token (pawn or king for instance)
alive: true,
index: indexPieces[0][pieceType]++,
});
this.board[pos]=index++; // update board
break;
}
switch(INITIAL.b[rtab][c]){
case ".":
case "#":
break;
default:
var pieceType=INITIAL.b[rtab][c];
var indexPiece=indexPieces[1][pieceType];
if(typeof indexPiece=="undefined")
indexPieces[1][pieceType]=0;
this.pieces.push({
s: JocGame.PLAYER_B, // side
pos: pos, // cell num
type: pieceType, // type of token (pawn or king for instance)
alive: true,
index: indexPieces[1][pieceType]++,
});
this.board[pos]=index++; // update board
break;
}
}
}
}
}
/* Optional method.
* Initialize the board as corresponding to a starting game
*/
/*
Model.Board.InitialPosition = function(aGame) {
}
*/

View file

@ -0,0 +1,464 @@
/*
*
* Copyright (c) 2012 - Jocly - www.jocly.com
*
* This file is part of the Jocly game platform and cannot be used outside of this context without the written permission of Jocly.
*
*/
// relative to top left corner of the board
View.Game.HexCellRow2Ycenter=function( r ){
if(this.mViewAs==JocGame.PLAYER_B)
r=this.g.HEIGHT-1-r;
if (this.mOptions.orientation=='onASide'){
var y=this.g.boardH-this.g.mainMarginY;
y-=this.g.R*(r+1);
return y;
}else{ // onACorner
var y=this.g.boardH-this.g.mainMarginY;
if (r%2==0){
y-=(1+r/2*3)*this.g.T;
}else{
y-=(-this.g.T/2+(r+1)/2*3*this.g.T);
}
return y;
}
}
View.Game.HexCellCol2Xcenter=function( c ){
if(this.mViewAs==JocGame.PLAYER_B)
c=this.g.WIDTH-1-c;
if (this.mOptions.orientation=='onASide'){
var x=this.g.mainMarginX;
if (c%2==0){
x+=(1+c/2*3)*this.g.T;
}else{
x+=(-this.g.T/2+(c+1)/2*3*this.g.T);
}
return x;
}else{// onACorner
var x=this.g.mainMarginX;
x+=this.g.R*(c+1);
return x;
}
}
/* Optional static method.
* Game based member: 'this' is a game (model) instance.
* Called at the init of the game to display the empty board.
*/
View.Game.HexInitView=function() {
this.g.WIDTH=this.mOptions.maxCols;
this.g.HEIGHT=this.mOptions.maxLines;
var GAME=this;
var mainMarginX=this.mGeometry.width*this.g.margin/100;
var mainMarginY=this.mGeometry.height*this.g.margin/100;
// an hexagone is made of 6 equilateral triangles. T is this triangles side length
var T=0;
var N=0;
if (this.mOptions.orientation=="onASide"){
T=(this.mGeometry.height-2*mainMarginY)/(this.g.HEIGHT+1)/Math.cos(Math.PI/6);
N=this.g.WIDTH;
if (this.g.WIDTH%2==0){
T=Math.min(T,(this.mGeometry.width-2*mainMarginX)/(1.5*N+1));
}else{
T=Math.min(T,(this.mGeometry.width-2*mainMarginX)/((N+1)+(N-1)/2));
}
}else{// onACorner
T=(this.mGeometry.width-2*mainMarginX)/(this.g.WIDTH+1)/Math.cos(Math.PI/6);
N=this.g.HEIGHT;
if (this.g.HEIGHT%2==0){
T=Math.min(T,(this.mGeometry.height-2*mainMarginY)/(1.5*N+1));
}else{
T=Math.min(T,(this.mGeometry.height-2*mainMarginY)/((N+1)+(N-1)/2));
}
}
var R=T*Math.cos(Math.PI/6);
this.g.R=R; // circle approach (included circle)
this.g.T=T; // triangle approach (triangle grid)
// diameter of included circle
this.g.cellSide=Math.floor(2*R);
this.g.hexRatio=0.866;
this.g.cellMargin=0;//this.g.cellSide/16;
this.g.tokenSide=this.g.cellSide-2*this.g.cellMargin;
if (this.mOptions.orientation=="onASide"){
this.g.boardH=2*mainMarginY+(this.g.HEIGHT+1)*R;
if (this.g.WIDTH%2==0){
this.g.boardW=2*mainMarginX+T*(3/2*N+0.5);
}else{
this.g.boardW=2*mainMarginX+T*((N+1)+(N-1)/2);
}
}else{
this.g.boardW=2*mainMarginX+(this.g.WIDTH+1)*R;
if (this.g.HEIGHT%2==0){
this.g.boardH=2*mainMarginY+T*(3/2*N+0.5);
}else{
this.g.boardH=2*mainMarginY+T*((N+1)+(N-1)/2);
}
}
this.g.top=(this.mGeometry.height-this.g.boardH)/2;//-mainMarginX;
this.g.left=(this.mGeometry.width-this.g.boardW)/2;//-mainMarginY;
this.g.mainMarginX=mainMarginX;
this.g.mainMarginY=mainMarginY;
this.g.backBoard=$("<div/>").addClass("hexa-board").css({position: "absolute",
top: this.g.top,
left: this.g.left,
width: this.g.boardW,
height: this.g.boardH,
}).appendTo(this.mWidget);
// adding the canvas to the div
$("<canvas/>").attr("id","canvasboard").attr("width",this.g.boardW).attr("height",this.g.boardH).
css({position: "absolute",
top: 0,
left: 0,
width: this.g.boardW,
height: this.g.boardH,
}).appendTo(this.g.backBoard);
this.g.ctxboard = $('#canvasboard')[0].getContext("2d");
this.HexDrawBoard(this.g.ctxboard);
if (this.mOptions.addCellCanvas){
//this.g.canvasCtx=[];
this.g.canvasCells=[];
this.g.CellClass=function(pos,nbmax,ctx){
this.pos=pos;
this.nb=0;
this.nbMax=nbmax;
this.who=0;
this.ctx=ctx;
};
/*this.g.CellClass.prototype.DisplayBmp=function(path){
var imageObj = new Image();
var ctx=this.ctx;
imageObj.onload = function(){
ctx.drawImage(imageObj, 0, 0, ctx.canvas.width,ctx.canvas.height);
}
imageObj.src = path;
};*/
this.g.CellClass.prototype.DisplayBmp=function(color){
var ctx=this.ctx;
if (GAME.g.SeedsImage != undefined){
var yOffset=color=="green"?5*88:0;
// images are 100x88px
ctx.drawImage(GAME.g.SeedsImage,
// src
(this.nb-1)*100,yOffset+(this.nbMax-2)*88,100,88,
// dest
0, 0, ctx.canvas.width,ctx.canvas.height);
}
};
this.g.CellClass.prototype.Display=function(n,who,bForceRepaint){
if ((n!=this.nb)||(who!=this.who)||(bForceRepaint)){
var ctx=this.ctx;
ctx.clearRect(0,0,ctx.canvas.width,ctx.canvas.height);
if (n>0){
// update members
this.nb=n;
this.who=who;
// do the job
var color=this.who==JocGame.PLAYER_A?"green":"red";
this.DisplayBackground(color);
//var path=GAME.mViewOptions.fullPath+"/res/images/hexplode/"+this.nbMax+"-"+this.nb+"-"+color+".png";
//this.DisplayBmp(path);
this.DisplayBmp(color);
}
}
};
this.g.CellClass.prototype.DisplayBackground=function(color){
var ctx=this.ctx;
var xCenter=ctx.canvas.width/2;
var yCenter=ctx.canvas.height/2;
var T=xCenter;
var R=yCenter;
var alpha="0.3";
if (this.nb==(this.nbMax-1)) alpha="1.0";
ctx.fillStyle=color=="green"?"rgba(194,255,0,"+alpha+")":"rgba(255,45,174,"+alpha+")";
ctx.beginPath();
ctx.moveTo(xCenter-T/2,yCenter-R);
ctx.lineTo(xCenter+T/2,yCenter-R);
ctx.lineTo(xCenter+T,yCenter);
ctx.lineTo(xCenter+T/2,yCenter+R);
ctx.lineTo(xCenter-T/2,yCenter+R);
ctx.lineTo(xCenter-T,yCenter);
ctx.lineTo(xCenter-T/2,yCenter-R);
ctx.fill();
};
}
// create cells
for(var r=0;r<this.g.HEIGHT;r++) {
for(var c=0;c<this.g.WIDTH;c++) {
var row=r;
var col=c;
var yCenter=this.HexCellRow2Ycenter( r );
var xCenter=this.HexCellCol2Xcenter( c );
var pos=this.HexRcPos(r,c);//r*this.g.WIDTH+c;
var prct=0.9;
if (this.g.Layout[r][c]!="."){
$("<div/>").attr("id","cell"+pos).addClass("cell").
addClass("cell-"+(((row+col)%2==0)?"white":"black")).
attr("jocpos",pos).css({
width: 2*this.g.R*prct,
height: 2*this.g.R*prct,
top: this.g.top+yCenter-this.g.R*prct,
left: this.g.left+xCenter-this.g.R*prct,
'border-radius': this.g.R*prct,
'-webkit-border-radius': this.g.R*prct,
}).appendTo(this.mWidget);
$("<div/>").addClass("front").
attr("jocpos",pos).css({
width: 2*this.g.R,
height: 2*this.g.R,
top: this.g.top+yCenter-this.g.R,
left: this.g.left+xCenter-this.g.R,
'border-radius': this.g.R
}).appendTo(this.mWidget);
// add a cell canvas if requested
if (this.mOptions.addCellCanvas){
var curCanvas=$("<canvas/>").attr("canvapos",pos).addClass("cellcanvas").css({
top: this.g.top+yCenter-this.g.R,
left: this.g.left+xCenter-this.g.T,
width: 2*this.g.T,
height: 2*this.g.R,
}).appendTo(this.mWidget);
var ctx=curCanvas[0].getContext("2d");
//this.g.canvasCtx[pos]=ctx;
this.g.canvasCells[pos]=new this.g.CellClass(pos,this.g.nbSeedsMax[pos],ctx);
}
if(this.mNotation) {
$("<div/>").text(pos/*+1*/).addClass("notation").css({
"line-height": this.g.cellSide/6+"px",
"font-size": this.g.cellSide/6+"pt",
"top": this.g.top+yCenter-this.g.cellSide/2,
"left": this.g.left+xCenter-this.g.R/2,
"width":this.g.R,
"text-align": "center"
}).appendTo(this.mWidget);
}
}
}
}
// create pieces
for(var i in this.mBoard.pieces) {
var piece=this.mBoard.pieces[i];
var curcell=$("<div/>").addClass("piece").attr("id","jocindex"+i).css({
width: 2*this.g.R,
height: 2*this.g.R,
}).appendTo(this.mWidget).hide();
$("<canvas/>").attr("id","tokencellcanvas").attr("width",this.g.tokenSide).attr("height",this.g.tokenSide).
css({position: "absolute",
top: this.g.cellMargin,
left: this.g.cellMargin,
width: this.g.tokenSide,
height: this.g.tokenSide,
}).appendTo(curcell);
if (this.mOptions.tokenBitmaps != undefined){
var bitmap=piece.s==JocGame.PLAYER_A?this.mOptions.tokenBitmaps.a[piece.type]:this.mOptions.tokenBitmaps.b[piece.type];
this.HexPaintToken(curcell,piece.s==JocGame.PLAYER_A?"black":"white",bitmap);
}else{
this.HexPaintTokenOneRes(curcell,piece.s,piece.type);
}
}
// PASS div
$("<div/>").attr("id","passingdiv").addClass("hex-score").html("<a class='hex-pass' href='javascript:void(0)'>Pass</a>" +
"<div style='width:100%' class='ardri-passing'>Passing</div>").css({
top: this.g.top,
left: this.g.left,
width: this.g.boardW+2,
height: this.g.boardH+2,
background: "rgba(255,255,255,0.6)",
textAlign: "center",
zIndex: 500,
'font-family': 'Arial',
'font-size': this.g.boardH/10,
'padding-top': this.g.boardH/2-this.g.boardH/10
}).hide().appendTo(this.mWidget);
}
View.Game.HexDrawBoard=function(){
var ctx=this.g.ctxboard;
var GAME=this;
var R=this.g.R;
var T=this.g.T;
var mX=this.g.mainMarginX;
var mY=this.g.mainMarginY;
var skin=this.mSkin;
var boardGradient = ctx.createRadialGradient(
0,0,this.g.boardW/2,
this.g.boardW,this.g.boardW,this.g.boardW*2);
boardGradient.addColorStop(0,"rgb(0,195,255)");
boardGradient.addColorStop(1,"rgb(0,25,200)");
var boardGradient2 = ctx.createRadialGradient(
0,0,this.g.boardW/2,
this.g.boardW,this.g.boardW,this.g.boardW*2);
boardGradient2.addColorStop(0,"rgba(0,195,255,0.7)");
boardGradient2.addColorStop(1,"rgba(0,25,200,0.7)");
function DrawHexagone(xCenter,yCenter,celltype){
ctx.beginPath();
if (GAME.mOptions.orientation=='onASide'){
ctx.moveTo(xCenter-T/2,yCenter-R);
ctx.lineTo(xCenter+T/2,yCenter-R);
ctx.lineTo(xCenter+T,yCenter);
ctx.lineTo(xCenter+T/2,yCenter+R);
ctx.lineTo(xCenter-T/2,yCenter+R);
ctx.lineTo(xCenter-T,yCenter);
ctx.lineTo(xCenter-T/2,yCenter-R);
}else{ // 'onACorner
ctx.moveTo(xCenter,yCenter-T);
ctx.lineTo(xCenter+R,yCenter-T/2);
ctx.lineTo(xCenter+R,yCenter+T/2);
ctx.lineTo(xCenter,yCenter+T);
ctx.lineTo(xCenter-R,yCenter+T/2);
ctx.lineTo(xCenter-R,yCenter-T/2);
ctx.lineTo(xCenter,yCenter-T);
}
ctx.lineWidth=1;
switch(skin){
default:
ctx.strokeStyle="rgba(255,255,255,0.2)";
ctx.stroke();
if (celltype=='c'){
ctx.fillStyle="rgba(0,0,0,0.2)";
ctx.fill();
}
break;
case 'basic':
case 'stylised':
case 'basicnosound':
case 'stylisednosound':
if (celltype=='c'){
ctx.strokeStyle="rgba(255,255,255,0.8)";
//ctx.fillStyle="rgba(75,180,255,0.8)";
ctx.fillStyle=boardGradient2;
}else{
ctx.strokeStyle="rgba(255,255,255,0.6)";
ctx.fillStyle=boardGradient;
}
ctx.stroke();
ctx.fill();
break;
}
}
function DrawCells(){
for (var r=0;r<GAME.mOptions.maxLines;r++){
for (var c=0;c<GAME.mOptions.maxCols;c++){
switch (GAME.g.Layout[r][c]){
default:
DrawHexagone(GAME.HexCellCol2Xcenter( c ),GAME.HexCellRow2Ycenter( r ),GAME.g.Layout[r][c]);
break;
case ".":
break;
}
}
}
}
var ctx=this.g.ctxboard;
ctx.clearRect(0,0,this.g.boardW,this.g.boardH);
ctx.save();
/*ctx.fillStyle = boardGradient ;
ctx.beginPath();
ctx.rect(0,0,this.g.boardW,this.g.boardH);
ctx.closePath();
ctx.fill();*/
var viewer=this.mViewAs;
var bg=this.mViewOptions.boardBackgrounds[this.mSkin];
if (bg!=undefined){
var path=this.mViewOptions.fullPath+"/res/images/"+bg;
var GAME=this;
var imageObj = new Image();
imageObj.onload = function(){
if (viewer==JocGame.PLAYER_B){
switch(skin){
default:
ctx.translate(GAME.g.boardW,GAME.g.boardH);
ctx.scale(-1, -1);
break;
case 'basic':
case 'stylised':
case 'basicnosound':
case 'stylisednosound':
ctx.translate(GAME.g.boardW,0);
ctx.scale(-1, 1);
break;
}
}
switch(skin){
default:
ctx.drawImage(imageObj, 0, 0, GAME.g.boardW, GAME.g.boardH);
DrawCells();
break;
case 'basic':
case 'stylised':
case 'basicnosound':
case 'stylisednosound':
DrawCells();
ctx.drawImage(imageObj, 0, 0, GAME.g.boardW, GAME.g.boardH);
break;
}
};
imageObj.src = path;
}else{
/*var boardGradient = ctx.createRadialGradient(
-this.g.boardW/2,-this.g.boardW/2,0,
this.g.boardW/6*4,this.g.boardW/6*2,this.g.boardW*2);
boardGradient.addColorStop(0,"#33ccff");
boardGradient.addColorStop(1,"#3366ff");
ctx.fillStyle = boardGradient ;
ctx.beginPath();
ctx.rect(0,0,this.g.boardW,this.g.boardH);
ctx.closePath(); */
//ctx.fill();
DrawCells();
}
ctx.restore();
}
View.Game.HexPaintToken=function(cell,coul,bitmap){
var ctx=cell.find("#tokencellcanvas")[0].getContext("2d");
var l=ctx.canvas.width;
var m=l/10;
var path=this.mViewOptions.fullPath+"/res/images/";
var imageObj = new Image();
imageObj.onload = function(){
ctx.clearRect(0,0,l,l);
ctx.drawImage(imageObj, m, m, l-2*m, l-2*m);
}
path+=bitmap;
imageObj.src = path;
}

232
src/games/yohoho/index.js Normal file
View file

@ -0,0 +1,232 @@
var mvs = {
"models": {
"yohoho": {
"plazza": "true",
"title-en": "Yohoho!",
"module": "yohoho",
"js": [
"hexbase-model.js",
"yohoho-model.js"
],
"gameOptions": {
"maxLines": 9,
"maxCols": 17,
"orientation": "onACorner",
"boardLayout": [
"#.#.#.#.#.#.#.#.#",
".#.#.#.#.#.#.#.#.",
"#.#.#.#.#.#.#.#.#",
".#.#.#.#.#.#.#.#.",
"c.c.c.c.c.c.c.c.c",
".#.#.#.#.#.#.#.#.",
"#.#.#.#.#.#.#.#.#",
".#.#.#.#.#.#.#.#.",
"#.#.#.#.#.#.#.#.#"
],
"initial": {
"a": [
"#.#.#.#.#.#.#.#.#",
".#.#.#.#.#.#.#.#.",
"#.#.#.#.#.#.#.#.#",
".#.#.#.#.#.#.#.#.",
"#.#.#.#.#.#.#.#.#",
".#.#.#.#.#.#.#.#.",
"#.#.#.#.C.#.#.#.#",
".#.#.#.#.#.#.#.#.",
"#.p.p.c.r.c.p.p.#"
],
"b": [
"#.p.p.c.r.c.p.p.#",
".#.#.#.#.#.#.#.#.",
"#.#.#.#.C.#.#.#.#",
".#.#.#.#.#.#.#.#.",
"#.#.#.#.#.#.#.#.#",
".#.#.#.#.#.#.#.#.",
"#.#.#.#.#.#.#.#.#",
".#.#.#.#.#.#.#.#.",
"#.#.#.#.#.#.#.#.#"
]
},
"maxNbCellsPerMove": 3,
"margin": 1
},
"levels": [
{
"label": "Cabin boy",
"potential": 1000,
"isDefault": true,
"maxDepth": 1,
"moveCount": 12,
"calRatio": 3.31
},
{
"label": "Sailor",
"potential": 4000,
"maxDepth": 5,
"moveCount": 15,
"rowRaceLevel": 1,
"calRatio": 25.16
},
{
"label": "Officer",
"potential": 20000,
"maxDepth": 6,
"moveCount": 20,
"rowRaceLevel": 3,
"calRatio": 126.18
},
{
"label": "Captain",
"potential": 40000,
"maxDepth": 8,
"moveCount": 25,
"rowRaceLevel": 4,
"calRatio": 130.51
},
{
"label": "Admiral",
"potential": 100000,
"maxDepth": 8,
"moveCount": 25,
"rowRaceLevel": 4,
"calRatio": 192.22
}
],
"defaultLevel": 2,
"summary": "Sea Battle over hexagons",
"rules": {
"en": "rules.html",
"fr": "rules-fr.html"
},
"credits": {
"en": "credits.html"
},
"description": {
"en": "description.html"
},
"thumbnail": "yohoho-thumb3d.png"
}
},
"views": {
"yohoho": {
"title-en": "Yohoho View",
"module": "yohoho",
"js": [
"yohoho-xd-view.js"
],
"visuals": {
"600x600": [
"res/visuals/yohoho-600x600-3d.jpg",
"res/visuals/yohoho-600x600-2d.jpg"
]
},
"css": [
"yohoho.css"
],
"switchable": true,
"useShowMoves": true,
"useNotation": true,
"animateSelfMoves": false,
"sounds": {
"win": "yohoho_final",
"loss": "yohoho_final_lose",
"end": "yohoho_final",
"assault": "yohoho_assault",
"yohoho1": "yohoho1",
"yohoho2": "yohoho2",
"yohoho3": "yohoho3",
"yohoho4": "yohoho4",
"move": "yohoho_moveon"
},
"skins": [
{
"name": "cartoon3d",
"title": "Cartoon (3D)",
"3d": true,
"camera": {
"radius": 12,
"limitCamMoves": true,
"elevationMin": 0
},
"world": {
"lightIntensity": 1,
"skyLightIntensity": 0,
"fog": false,
"fogNear": 15,
"fogFar": 80,
"fogColor": "#ffffff"
},
"preload": [
"image|/res/xd-view/meshes/baril-256.jpg",
"image|/res/xd-view/meshes/explosion-256.png",
"image|/res/xd-view/meshes/jarmada-admiral-pirate-uvs-512.jpg",
"image|/res/xd-view/meshes/jarmada-admiral-uvs-512.jpg",
"image|/res/xd-view/meshes/jarmada-admiral-voiles-pirate-uvs-512.jpg",
"image|/res/xd-view/meshes/jarmada-admiral-voiles-uvs-512.jpg",
"image|/res/xd-view/meshes/jarmada-frigate-pirate-uvs-512.jpg",
"image|/res/xd-view/meshes/jarmada-frigate-uvs-512.jpg",
"image|/res/xd-view/meshes/jarmada-gallion-pirate-uvs-512.jpg",
"image|/res/xd-view/meshes/jarmada-gallion-uvs-512.jpg",
"image|/res/xd-view/meshes/ocean-texture.jpg",
"image|/res/xd-view/meshes/ocean-texture2.jpg",
"image|/res/xd-view/meshes/palm-leaves-texture-512.png",
"image|/res/xd-view/meshes/wood-texture.jpg",
"smoothedfilegeo|0|/res/xd-view/meshes/landscape-smoothed.js",
"smoothedfilegeo|0|/res/xd-view/meshes/jarmada-frigate.js",
"smoothedfilegeo|0|/res/xd-view/meshes/jarmada-gallion.js",
"smoothedfilegeo|0|/res/xd-view/meshes/jarmada-rock.js",
"smoothedfilegeo|0|/res/xd-view/meshes/jarmada-admiral.js"
]
},
{
"name": "official",
"title": "Official"
},
{
"name": "stylized",
"title": "Stylized"
}
],
"boardBackgrounds": {
"official": "oceanboard.jpg",
"officialnosound": "oceanboard.jpg",
"stylized": "winddirection.png",
"basic": "winddirection.png",
"stylizednosound": "winddirection.png",
"basicnosound": "winddirection.png"
},
"defaultOptions": {
"sounds": true,
"notation": false,
"moves": true
},
"preferredRatio": 1.1164274322169,
"xdView": true
}
}
};
var games = {};
for(var name in mvs.models) {
games[name] = {
name: name,
modelScripts: mvs.models[name].js,
config: {
status: true,
model: mvs.models[name]
}
}
}
for(var name in mvs.views) {
if(games[name]) {
games[name].viewScripts = mvs.views[name].js;
games[name].config.view = mvs.views[name];
}
}
exports.games = Object.keys(games).map((name)=>{
return games[name];
});

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 231 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

View file

@ -0,0 +1,90 @@
{
"metadata" :
{
"formatVersion" : 3.1,
"generatedBy" : "Blender 2.63 Exporter",
"vertices" : 100,
"faces" : 114,
"normals" : 100,
"colors" : 0,
"uvs" : [100],
"materials" : 1,
"morphTargets" : 0,
"bones" : 0
},
"scale" : 1.000000,
"materials" : [ {
"DbgColor" : 15658734,
"DbgIndex" : 0,
"DbgName" : "Material.001",
"blending" : "NormalBlending",
"colorDiffuse" : [0.6400000190734865, 0.062147600384765855, 0.0],
"colorSpecular" : [0.0, 0.0, 0.0],
"depthTest" : true,
"depthWrite" : true,
"shading" : "Lambert",
"specularCoef" : 50,
"opacity" : 1.0,
"transparent" : false,
"vertexColors" : false
},
{
"DbgColor" : 15597568,
"DbgIndex" : 1,
"DbgName" : "Material.002",
"blending" : "NormalBlending",
"colorDiffuse" : [0.10573657883290632, 0.02793011254074984, 0.014413246848382966],
"colorSpecular" : [0.0, 0.0, 0.0],
"depthTest" : true,
"depthWrite" : true,
"shading" : "Lambert",
"specularCoef" : 50,
"opacity" : 1.0,
"transparent" : false,
"vertexColors" : false
},
{
"DbgColor" : 15597568,
"DbgIndex" : 1,
"DbgName" : "Material.003",
"blending" : "NormalBlending",
"colorDiffuse" : [0.800000011920929, 0.800000011920929, 0.800000011920929],
"colorSpecular" : [0.5, 0.5, 0.5],
"depthTest" : true,
"depthWrite" : true,
"mapDiffuse" : "baril-256.jpg",
"mapDiffuseWrap" : ["repeat", "repeat"],
"shading" : "Lambert",
"specularCoef" : 50,
"opacity" : 1.0,
"transparent" : false,
"vertexColors" : false
}],
"vertices" : [1.59226e-08,1.41766,-0.0250069,-1.59226e-08,1.83947,-0.025007,1.49735e-09,1.60873,-0.682247,-1.49735e-09,1.6484,-0.682247,0.0146108,1.43847,-0.130458,-0.0171778,1.47287,-0.324184,0.007838,1.51629,-0.463159,0.00783799,1.74084,-0.463159,-0.0171778,1.78426,-0.324184,0.0145621,1.8256,-0.128722,-0.00208872,1.41766,-0.0252983,-0.00208875,1.83947,-0.0252983,-0.00210766,1.60873,-0.682172,-0.00210766,1.6484,-0.682172,0.0125019,1.43847,-0.130469,-0.0192864,1.47287,-0.324145,0.00573871,1.51629,-0.463361,0.00573869,1.74084,-0.463361,-0.0192864,1.78426,-0.324141,0.0124531,1.8256,-0.128733,0,-0.412869,-0.0290247,0,1.87664,-0.0290248,0.0158771,-0.412869,-0.0224482,0.0158771,1.87664,-0.0224483,0.0224536,-0.412869,-0.00657109,0.0224536,1.87664,-0.00657119,0.0158771,-0.412869,0.00930604,0.0158771,1.87664,0.00930594,-1.96296e-09,-0.412869,0.0158826,-1.96296e-09,1.87664,0.0158825,-0.0158771,-0.412869,0.00930603,-0.0158771,1.87664,0.00930593,-0.0224536,-0.412869,-0.00657109,-0.0224536,1.87664,-0.00657119,-0.0158771,-0.412869,-0.0224482,-0.0158771,1.87664,-0.0224483,0,-0.396313,-0.399971,0,0.507719,-0.399971,0.149042,-0.396313,-0.370025,0.149042,0.507719,-0.370025,0.275394,-0.396313,-0.284747,0.275394,0.507719,-0.284747,0.359819,-0.396313,-0.157119,0.359819,0.507719,-0.157119,0.389465,-0.396313,-0.00657107,0.389465,0.507719,-0.00657111,0.359819,-0.396313,0.143976,0.359819,0.507719,0.143976,0.275394,-0.396313,0.271604,0.275394,0.507719,0.271604,0.149042,-0.396313,0.356883,0.149042,0.507719,0.356883,5.88077e-08,-0.396313,0.386828,5.88077e-08,0.507719,0.386828,-0.149042,-0.396313,0.356883,-0.149042,0.507719,0.356883,-0.275394,-0.396313,0.271604,-0.275394,0.507719,0.271604,-0.359819,-0.396313,0.143976,-0.359819,0.507719,0.143976,-0.389465,-0.396313,-0.00657109,-0.389465,0.507719,-0.00657113,-0.359819,-0.396313,-0.157119,-0.359819,0.507719,-0.157119,-0.275394,-0.396313,-0.284747,-0.275394,0.507719,-0.284747,-0.149042,-0.396313,-0.370025,-0.149042,0.507719,-0.370025,-8.3251e-09,-0.120776,-0.467353,-8.3251e-09,0.232182,-0.467353,0.17457,0.232182,-0.432279,0.17457,-0.120776,-0.432279,0.322564,0.232182,-0.332393,0.322564,-0.120776,-0.332393,0.42145,0.232182,-0.182905,0.42145,-0.120776,-0.182905,0.456175,0.232183,-0.0065711,0.456175,-0.120776,-0.00657108,0.42145,0.232183,0.169763,0.42145,-0.120776,0.169763,0.322564,0.232183,0.319251,0.322564,-0.120776,0.319251,0.17457,0.232183,0.419136,0.17457,-0.120776,0.419136,6.05553e-08,0.232183,0.454211,6.05553e-08,-0.120776,0.454211,-0.17457,0.232183,0.419136,-0.17457,-0.120776,0.419136,-0.322564,0.232183,0.319251,-0.322564,-0.120776,0.319251,-0.42145,0.232183,0.169763,-0.42145,-0.120776,0.169763,-0.456175,0.232183,-0.00657112,-0.456175,-0.120776,-0.00657111,-0.42145,0.232182,-0.182905,-0.42145,-0.120776,-0.182905,-0.322564,0.232182,-0.332394,-0.322564,-0.120776,-0.332394,-0.17457,0.232182,-0.432279,-0.17457,-0.120776,-0.432279],
"morphTargets" : [],
"normals" : [0.729759,0.661733,-0.17188,0.72982,-0.661641,-0.171819,0.58504,-0.438368,-0.682272,0.58504,0.438368,-0.682272,0.486618,0.619617,0.615833,0.484329,-0.638234,0.598346,0.741783,-0.659963,-0.119114,0.731101,0.673086,-0.11124,0.652272,-0.733543,-0.190832,0.655538,0.727378,-0.202826,-0.617115,0.444868,-0.649037,-0.617115,-0.444868,-0.649037,-0.652852,-0.68862,-0.31547,-0.652943,0.688528,-0.31547,-0.660024,0.739738,-0.130894,-0.669942,-0.729148,-0.139683,-0.63979,-0.632588,0.436445,-0.643483,0.615558,0.45497,-0.730766,0.664205,-0.157262,-0.727103,-0.670309,-0.148167,0,-0.630238,-0.77636,0,0.630238,-0.77636,0.548967,0.630238,-0.548967,0.548967,-0.630238,-0.548967,0.77636,0.630238,0,0.77636,-0.630238,0,0.548967,0.630238,0.548967,0.548967,-0.630238,0.548967,0,0.630238,0.77636,0,-0.630238,0.77636,-0.548967,0.630238,0.548967,-0.548967,-0.630238,0.548967,-0.77636,0.630238,0,-0.77636,-0.630238,0,-0.548967,0.630238,-0.548967,-0.548967,-0.630238,-0.548967,0,0.117862,-0.993011,0,0.750175,-0.661214,0.255165,0.750145,-0.610004,0.382946,0.11771,-0.916227,0.469893,0.750114,-0.465285,0.705374,0.117344,-0.699026,0.611866,0.750084,-0.250923,0.918729,0.116947,-0.377117,0.661336,0.750053,0,0.993133,0.116794,0,0.611866,0.750084,0.250923,0.918729,0.116947,0.377117,0.469893,0.750114,0.465285,0.705374,0.117344,0.699026,0.255165,0.750145,0.610004,0.382946,0.11771,0.916227,0,0.750175,0.661214,0,0.117862,0.993011,-0.255165,0.750145,0.610004,-0.382946,0.11771,0.916227,-0.469893,0.750114,0.465285,-0.705374,0.117344,0.699026,-0.611866,0.750084,0.250923,-0.918729,0.116947,0.377117,-0.661336,0.750053,0,-0.993133,0.116794,0,-0.611866,0.750084,-0.250923,-0.918729,0.116947,-0.377117,-0.469893,0.750114,-0.465285,-0.705374,0.117344,-0.699026,-0.255165,0.750145,-0.610004,-0.382946,0.11771,-0.916227,0.255165,-0.750145,0.610004,0,-0.750175,0.661214,-0.255165,-0.750145,0.610004,-0.469893,-0.750114,0.465285,0.469893,-0.750114,0.465285,-0.611866,-0.750084,0.250923,0.611866,-0.750084,0.250923,-0.661336,-0.750053,0,0.661336,-0.750053,0,0.611866,-0.750084,-0.250923,-0.611866,-0.750084,-0.250923,0.469893,-0.750114,-0.465285,-0.469893,-0.750114,-0.465285,0.255165,-0.750145,-0.610004,-0.255165,-0.750145,-0.610004,0,-0.750175,-0.661214,0,-0.117862,-0.993011,0.382946,-0.11771,-0.916227,0.705374,-0.117344,-0.699026,0.918729,-0.116947,-0.377117,0.993133,-0.116794,0,0.918729,-0.116947,0.377117,0.705374,-0.117344,0.699026,0.382946,-0.11771,0.916227,0,-0.117862,0.993011,-0.382946,-0.11771,0.916227,-0.705374,-0.117344,0.699026,-0.918729,-0.116947,0.377117,-0.993133,-0.116794,0,-0.918729,-0.116947,-0.377117,-0.705374,-0.117344,-0.699026,-0.382946,-0.11771,-0.916227],
"colors" : [],
"uvs" : [[0.260603,0.293489,0.260603,0.419939,0.200267,0.419939,0.200267,0.293489,0.139294,0.419939,0.139294,0.293489,0.077367,0.419939,0.077367,0.293489,0.01387,0.419939,0.01387,0.293489,0.988181,0.293489,0.988181,0.419939,0.924688,0.419939,0.924688,0.293489,0.862767,0.419939,0.862767,0.293489,0.801797,0.419939,0.801797,0.293489,0.741463,0.419939,0.741463,0.293489,0.681035,0.419939,0.681035,0.293489,0.62085,0.419939,0.62085,0.293489,0.560871,0.419939,0.560871,0.293489,0.501038,0.419939,0.501038,0.293489,0.441204,0.419939,0.441204,0.293489,0.381222,0.419939,0.381222,0.293489,0.278435,0.865978,0.356239,0.943783,0.457896,0.98589,0.236328,0.764322,0.567928,0.98589,0.236328,0.65429,0.669584,0.943782,0.278435,0.552634,0.747388,0.865978,0.789495,0.764322,0.356239,0.474829,0.789495,0.65429,0.457896,0.432722,0.747388,0.552634,0.567928,0.432722,0.669584,0.474829,0.321034,0.293489,0.321034,0.419939,0.747277,0.865855,0.669473,0.94366,0.567817,0.985767,0.457785,0.985767,0.789385,0.764199,0.356129,0.94366,0.789385,0.654167,0.278324,0.865855,0.747277,0.552511,0.669473,0.474707,0.236217,0.764199,0.567817,0.432599,0.236217,0.654167,0.457785,0.432599,0.278324,0.552511,0.356129,0.474707,0.260603,0.008702,0.260603,0.135162,0.200267,0.135162,0.200267,0.008702,0.139294,0.135162,0.139294,0.008702,0.077367,0.135162,0.077367,0.008702,0.01387,0.135162,0.01387,0.008702,0.988181,0.008702,0.988181,0.135162,0.924688,0.135162,0.924688,0.008702,0.862767,0.135162,0.862767,0.008702,0.801797,0.135162,0.801797,0.008702,0.741463,0.135162,0.741463,0.008702,0.681035,0.135162,0.681035,0.008702,0.62085,0.135162,0.62085,0.008702,0.560871,0.135162,0.560871,0.008702,0.501038,0.135162,0.501038,0.008702,0.441204,0.135162,0.441204,0.008702,0.381222,0.135162,0.381222,0.008702,0.321034,0.008702,0.321034,0.135162]],
"faces" : [35,7,6,2,3,0,0,1,2,3,35,1,0,4,9,0,4,5,6,7,35,9,4,5,8,0,7,6,8,9,35,8,5,6,7,0,9,8,1,0,35,13,12,16,17,0,10,11,12,13,35,19,14,10,11,0,14,15,16,17,35,18,15,14,19,0,18,19,15,14,35,17,16,15,18,0,13,12,19,18,35,0,1,11,10,0,5,4,17,16,35,6,5,15,16,0,1,8,19,12,35,9,8,18,19,0,7,9,18,14,35,5,4,14,15,0,8,6,15,19,35,7,3,13,17,0,0,3,10,13,35,1,9,19,11,0,4,7,14,17,35,2,6,16,12,0,2,1,12,11,35,3,2,12,13,0,3,2,11,10,35,4,0,10,14,0,6,5,16,15,35,8,7,17,18,0,9,0,13,18,35,20,21,23,22,1,20,21,22,23,35,22,23,25,24,1,23,22,24,25,35,24,25,27,26,1,25,24,26,27,35,26,27,29,28,1,27,26,28,29,35,28,29,31,30,1,29,28,30,31,35,30,31,33,32,1,31,30,32,33,34,31,29,27,1,30,28,26,34,31,27,25,1,30,26,24,34,33,31,25,1,32,30,24,34,23,33,25,1,22,32,24,34,23,35,33,1,22,34,32,34,23,21,35,1,22,21,34,35,21,20,34,35,1,21,20,35,34,35,32,33,35,34,1,33,32,34,35,34,26,28,30,1,27,29,31,34,24,26,30,1,25,27,31,34,24,30,32,1,25,31,33,34,22,24,32,1,23,25,33,34,22,32,34,1,23,33,35,34,20,22,34,1,20,23,35,43,69,37,39,70,2,0,1,2,3,36,37,38,39,43,70,39,41,72,2,3,2,4,5,39,38,40,41,43,72,41,43,74,2,5,4,6,7,41,40,42,43,43,74,43,45,76,2,7,6,8,9,43,42,44,45,43,76,45,47,78,2,10,11,12,13,45,44,46,47,43,78,47,49,80,2,13,12,14,15,47,46,48,49,43,80,49,51,82,2,15,14,16,17,49,48,50,51,43,82,51,53,84,2,17,16,18,19,51,50,52,53,43,84,53,55,86,2,19,18,20,21,53,52,54,55,43,86,55,57,88,2,21,20,22,23,55,54,56,57,43,88,57,59,90,2,23,22,24,25,57,56,58,59,43,90,59,61,92,2,25,24,26,27,59,58,60,61,43,92,61,63,94,2,27,26,28,29,61,60,62,63,43,94,63,65,96,2,29,28,30,31,63,62,64,65,42,55,53,51,2,32,33,34,54,52,50,42,57,55,51,2,35,32,34,56,54,50,42,57,51,49,2,35,34,36,56,50,48,42,59,57,49,2,37,35,36,58,56,48,42,59,49,47,2,37,36,38,58,48,46,42,61,59,47,2,39,37,38,60,58,46,42,61,47,45,2,39,38,40,60,46,44,42,61,45,43,2,39,40,41,60,44,42,42,63,61,43,2,42,39,41,62,60,42,42,63,43,41,2,42,41,43,62,42,40,42,65,63,41,2,44,42,43,64,62,40,42,39,65,41,2,45,44,43,38,64,40,42,39,67,65,2,45,46,44,38,66,64,42,39,37,67,2,45,47,46,38,37,66,43,98,67,37,69,2,48,49,1,0,67,66,37,36,43,96,65,67,98,2,31,30,49,48,65,64,66,67,42,50,52,54,2,50,51,52,68,69,70,42,50,54,56,2,50,52,53,68,70,71,42,48,50,56,2,54,50,53,72,68,71,42,48,56,58,2,54,53,55,72,71,73,42,46,48,58,2,56,54,55,74,72,73,42,46,58,60,2,56,55,57,74,73,75,42,44,46,60,2,58,56,57,76,74,75,42,42,44,60,2,59,58,57,77,76,75,42,42,60,62,2,59,57,60,77,75,78,42,40,42,62,2,61,59,60,79,77,78,42,40,62,64,2,61,60,62,79,78,80,42,38,40,64,2,63,61,62,81,79,80,42,38,64,66,2,63,62,64,81,80,82,42,36,38,66,2,65,63,64,83,81,82,43,36,68,71,38,2,66,67,68,69,83,84,85,81,43,68,69,70,71,2,67,0,3,68,84,36,39,85,43,38,71,73,40,2,69,68,70,71,81,85,86,79,43,71,70,72,73,2,68,3,5,70,85,39,41,86,43,40,73,75,42,2,71,70,72,73,79,86,87,77,43,73,72,74,75,2,70,5,7,72,86,41,43,87,43,42,75,77,44,2,73,72,74,75,77,87,88,76,43,75,74,76,77,2,72,7,9,74,87,43,45,88,43,44,77,79,46,2,76,77,78,79,76,88,89,74,43,77,76,78,79,2,77,10,13,78,88,45,47,89,43,46,79,81,48,2,79,78,80,81,74,89,90,72,43,79,78,80,81,2,78,13,15,80,89,47,49,90,43,48,81,83,50,2,81,80,82,83,72,90,91,68,43,81,80,82,83,2,80,15,17,82,90,49,51,91,43,50,83,85,52,2,83,82,84,85,68,91,92,69,43,83,82,84,85,2,82,17,19,84,91,51,53,92,43,52,85,87,54,2,85,84,86,87,69,92,93,70,43,85,84,86,87,2,84,19,21,86,92,53,55,93,43,54,87,89,56,2,87,86,88,89,70,93,94,71,43,87,86,88,89,2,86,21,23,88,93,55,57,94,43,56,89,91,58,2,89,88,90,91,71,94,95,73,43,89,88,90,91,2,88,23,25,90,94,57,59,95,43,58,91,93,60,2,91,90,92,93,73,95,96,75,43,91,90,92,93,2,90,25,27,92,95,59,61,96,43,60,93,95,62,2,93,92,94,95,75,96,97,78,43,93,92,94,95,2,92,27,29,94,96,61,63,97,43,62,95,97,64,2,95,94,96,97,78,97,98,80,43,95,94,96,97,2,94,29,31,96,97,63,65,98,43,68,36,66,99,2,67,66,98,99,84,83,82,99,43,99,98,69,68,2,99,48,0,67,99,67,36,84,43,64,97,99,66,2,97,96,99,98,80,98,99,82,43,97,96,98,99,2,96,31,48,99,98,65,67,99],
"bones" : [],
"skinIndices" : [],
"skinWeights" : [],
"animation" : {}
}

View file

@ -0,0 +1,90 @@
{
"metadata" :
{
"formatVersion" : 3.1,
"generatedBy" : "Blender 2.63 Exporter",
"vertices" : 100,
"faces" : 114,
"normals" : 100,
"colors" : 0,
"uvs" : [100],
"materials" : 1,
"morphTargets" : 0,
"bones" : 0
},
"scale" : 1.000000,
"materials" : [ {
"DbgColor" : 15658734,
"DbgIndex" : 0,
"DbgName" : "Material.001",
"blending" : "NormalBlending",
"colorDiffuse" : [0.6400000190734865, 0.062147600384765855, 0.0],
"colorSpecular" : [0.0, 0.0, 0.0],
"depthTest" : true,
"depthWrite" : true,
"shading" : "Lambert",
"specularCoef" : 50,
"opacity" : 1.0,
"transparent" : false,
"vertexColors" : false
},
{
"DbgColor" : 15597568,
"DbgIndex" : 1,
"DbgName" : "Material.002",
"blending" : "NormalBlending",
"colorDiffuse" : [0.10573657883290632, 0.02793011254074984, 0.014413246848382966],
"colorSpecular" : [0.0, 0.0, 0.0],
"depthTest" : true,
"depthWrite" : true,
"shading" : "Lambert",
"specularCoef" : 50,
"opacity" : 1.0,
"transparent" : false,
"vertexColors" : false
},
{
"DbgColor" : 15597568,
"DbgIndex" : 1,
"DbgName" : "Material.003",
"blending" : "NormalBlending",
"colorDiffuse" : [0.800000011920929, 0.800000011920929, 0.800000011920929],
"colorSpecular" : [0.5, 0.5, 0.5],
"depthTest" : true,
"depthWrite" : true,
"mapDiffuse" : "baril-256.jpg",
"mapDiffuseWrap" : ["repeat", "repeat"],
"shading" : "Lambert",
"specularCoef" : 50,
"opacity" : 1.0,
"transparent" : false,
"vertexColors" : false
}],
"vertices" : [1.59226e-08,1.41766,-0.0250069,-1.59226e-08,1.83947,-0.025007,1.49735e-09,1.41317,-0.682247,-1.49735e-09,1.7581,-0.682247,0.0146108,1.43847,-0.130458,-0.0171778,1.42549,-0.291591,0.00783801,1.44518,-0.463159,0.00783799,1.81499,-0.463159,-0.0171778,1.80804,-0.291591,0.0145621,1.8256,-0.128722,-0.00208872,1.41766,-0.0252983,-0.00208875,1.83947,-0.0252983,-0.00210766,1.41317,-0.682172,-0.00210766,1.7581,-0.682172,0.0125019,1.43847,-0.130469,-0.0192864,1.42549,-0.291551,0.00573871,1.44518,-0.463361,0.00573869,1.81499,-0.463361,-0.0192864,1.80804,-0.291548,0.0124531,1.8256,-0.128733,0,-0.412869,-0.0290247,0,1.87664,-0.0290248,0.0158771,-0.412869,-0.0224482,0.0158771,1.87664,-0.0224483,0.0224536,-0.412869,-0.00657109,0.0224536,1.87664,-0.00657119,0.0158771,-0.412869,0.00930604,0.0158771,1.87664,0.00930594,-1.96296e-09,-0.412869,0.0158826,-1.96296e-09,1.87664,0.0158825,-0.0158771,-0.412869,0.00930603,-0.0158771,1.87664,0.00930593,-0.0224536,-0.412869,-0.00657109,-0.0224536,1.87664,-0.00657119,-0.0158771,-0.412869,-0.0224482,-0.0158771,1.87664,-0.0224483,0,-0.396313,-0.399971,0,0.507719,-0.399971,0.149042,-0.396313,-0.370025,0.149042,0.507719,-0.370025,0.275394,-0.396313,-0.284747,0.275394,0.507719,-0.284747,0.359819,-0.396313,-0.157119,0.359819,0.507719,-0.157119,0.389465,-0.396313,-0.00657107,0.389465,0.507719,-0.00657111,0.359819,-0.396313,0.143976,0.359819,0.507719,0.143976,0.275394,-0.396313,0.271604,0.275394,0.507719,0.271604,0.149042,-0.396313,0.356883,0.149042,0.507719,0.356883,5.88077e-08,-0.396313,0.386828,5.88077e-08,0.507719,0.386828,-0.149042,-0.396313,0.356883,-0.149042,0.507719,0.356883,-0.275394,-0.396313,0.271604,-0.275394,0.507719,0.271604,-0.359819,-0.396313,0.143976,-0.359819,0.507719,0.143976,-0.389465,-0.396313,-0.00657109,-0.389465,0.507719,-0.00657113,-0.359819,-0.396313,-0.157119,-0.359819,0.507719,-0.157119,-0.275394,-0.396313,-0.284747,-0.275394,0.507719,-0.284747,-0.149042,-0.396313,-0.370025,-0.149042,0.507719,-0.370025,-8.3251e-09,-0.120776,-0.467353,-8.3251e-09,0.232182,-0.467353,0.17457,0.232182,-0.432279,0.17457,-0.120776,-0.432279,0.322564,0.232182,-0.332393,0.322564,-0.120776,-0.332393,0.42145,0.232182,-0.182905,0.42145,-0.120776,-0.182905,0.456175,0.232183,-0.0065711,0.456175,-0.120776,-0.00657108,0.42145,0.232183,0.169763,0.42145,-0.120776,0.169763,0.322564,0.232183,0.319251,0.322564,-0.120776,0.319251,0.17457,0.232183,0.419136,0.17457,-0.120776,0.419136,6.05553e-08,0.232183,0.454211,6.05553e-08,-0.120776,0.454211,-0.17457,0.232183,0.419136,-0.17457,-0.120776,0.419136,-0.322564,0.232183,0.319251,-0.322564,-0.120776,0.319251,-0.42145,0.232183,0.169763,-0.42145,-0.120776,0.169763,-0.456175,0.232183,-0.00657112,-0.456175,-0.120776,-0.00657111,-0.42145,0.232182,-0.182905,-0.42145,-0.120776,-0.182905,-0.322564,0.232182,-0.332394,-0.322564,-0.120776,-0.332394,-0.17457,0.232182,-0.432279,-0.17457,-0.120776,-0.432279],
"morphTargets" : [],
"normals" : [0.697043,0.7163,-0.031495,0.75399,-0.655049,0.048555,0.546434,-0.623585,-0.559038,0.574236,0.490646,-0.655324,0.486618,0.619617,0.615833,0.484329,-0.638234,0.598346,0.771661,-0.633595,-0.055116,0.743889,0.66213,-0.090426,0.643849,-0.76455,-0.029389,0.681448,0.730522,-0.04358,-0.608997,0.495529,-0.619312,-0.592883,-0.619373,-0.514603,-0.716239,-0.697378,-0.025056,-0.649068,0.750633,-0.123295,-0.667837,0.740074,-0.078982,-0.697165,-0.716514,-0.022828,-0.63979,-0.632588,0.436445,-0.643483,0.615558,0.45497,-0.757378,0.652943,-0.00061,-0.72042,-0.693472,0.007263,0,-0.630238,-0.77636,0,0.630238,-0.77636,0.548967,0.630238,-0.548967,0.548967,-0.630238,-0.548967,0.77636,0.630238,0,0.77636,-0.630238,0,0.548967,0.630238,0.548967,0.548967,-0.630238,0.548967,0,0.630238,0.77636,0,-0.630238,0.77636,-0.548967,0.630238,0.548967,-0.548967,-0.630238,0.548967,-0.77636,0.630238,0,-0.77636,-0.630238,0,-0.548967,0.630238,-0.548967,-0.548967,-0.630238,-0.548967,0,0.117862,-0.993011,0,0.750175,-0.661214,0.255165,0.750145,-0.610004,0.382946,0.11771,-0.916227,0.469893,0.750114,-0.465285,0.705374,0.117344,-0.699026,0.611866,0.750084,-0.250923,0.918729,0.116947,-0.377117,0.661336,0.750053,0,0.993133,0.116794,0,0.611866,0.750084,0.250923,0.918729,0.116947,0.377117,0.469893,0.750114,0.465285,0.705374,0.117344,0.699026,0.255165,0.750145,0.610004,0.382946,0.11771,0.916227,0,0.750175,0.661214,0,0.117862,0.993011,-0.255165,0.750145,0.610004,-0.382946,0.11771,0.916227,-0.469893,0.750114,0.465285,-0.705374,0.117344,0.699026,-0.611866,0.750084,0.250923,-0.918729,0.116947,0.377117,-0.661336,0.750053,0,-0.993133,0.116794,0,-0.611866,0.750084,-0.250923,-0.918729,0.116947,-0.377117,-0.469893,0.750114,-0.465285,-0.705374,0.117344,-0.699026,-0.255165,0.750145,-0.610004,-0.382946,0.11771,-0.916227,0.255165,-0.750145,0.610004,0,-0.750175,0.661214,-0.255165,-0.750145,0.610004,-0.469893,-0.750114,0.465285,0.469893,-0.750114,0.465285,-0.611866,-0.750084,0.250923,0.611866,-0.750084,0.250923,-0.661336,-0.750053,0,0.661336,-0.750053,0,0.611866,-0.750084,-0.250923,-0.611866,-0.750084,-0.250923,0.469893,-0.750114,-0.465285,-0.469893,-0.750114,-0.465285,0.255165,-0.750145,-0.610004,-0.255165,-0.750145,-0.610004,0,-0.750175,-0.661214,0,-0.117862,-0.993011,0.382946,-0.11771,-0.916227,0.705374,-0.117344,-0.699026,0.918729,-0.116947,-0.377117,0.993133,-0.116794,0,0.918729,-0.116947,0.377117,0.705374,-0.117344,0.699026,0.382946,-0.11771,0.916227,0,-0.117862,0.993011,-0.382946,-0.11771,0.916227,-0.705374,-0.117344,0.699026,-0.918729,-0.116947,0.377117,-0.993133,-0.116794,0,-0.918729,-0.116947,-0.377117,-0.705374,-0.117344,-0.699026,-0.382946,-0.11771,-0.916227],
"colors" : [],
"uvs" : [[0.260603,0.293489,0.260603,0.419939,0.200267,0.419939,0.200267,0.293489,0.139294,0.419939,0.139294,0.293489,0.077367,0.419939,0.077367,0.293489,0.01387,0.419939,0.01387,0.293489,0.988181,0.293489,0.988181,0.419939,0.924688,0.419939,0.924688,0.293489,0.862767,0.419939,0.862767,0.293489,0.801797,0.419939,0.801797,0.293489,0.741463,0.419939,0.741463,0.293489,0.681035,0.419939,0.681035,0.293489,0.62085,0.419939,0.62085,0.293489,0.560871,0.419939,0.560871,0.293489,0.501038,0.419939,0.501038,0.293489,0.441204,0.419939,0.441204,0.293489,0.381222,0.419939,0.381222,0.293489,0.278435,0.865978,0.356239,0.943783,0.457896,0.98589,0.236328,0.764322,0.567928,0.98589,0.236328,0.65429,0.669584,0.943782,0.278435,0.552634,0.747388,0.865978,0.789495,0.764322,0.356239,0.474829,0.789495,0.65429,0.457896,0.432722,0.747388,0.552634,0.567928,0.432722,0.669584,0.474829,0.321034,0.293489,0.321034,0.419939,0.747277,0.865855,0.669473,0.94366,0.567817,0.985767,0.457785,0.985767,0.789385,0.764199,0.356129,0.94366,0.789385,0.654167,0.278324,0.865855,0.747277,0.552511,0.669473,0.474707,0.236217,0.764199,0.567817,0.432599,0.236217,0.654167,0.457785,0.432599,0.278324,0.552511,0.356129,0.474707,0.260603,0.008702,0.260603,0.135162,0.200267,0.135162,0.200267,0.008702,0.139294,0.135162,0.139294,0.008702,0.077367,0.135162,0.077367,0.008702,0.01387,0.135162,0.01387,0.008702,0.988181,0.008702,0.988181,0.135162,0.924688,0.135162,0.924688,0.008702,0.862767,0.135162,0.862767,0.008702,0.801797,0.135162,0.801797,0.008702,0.741463,0.135162,0.741463,0.008702,0.681035,0.135162,0.681035,0.008702,0.62085,0.135162,0.62085,0.008702,0.560871,0.135162,0.560871,0.008702,0.501038,0.135162,0.501038,0.008702,0.441204,0.135162,0.441204,0.008702,0.381222,0.135162,0.381222,0.008702,0.321034,0.008702,0.321034,0.135162]],
"faces" : [35,7,6,2,3,0,0,1,2,3,35,1,0,4,9,0,4,5,6,7,35,9,4,5,8,0,7,6,8,9,35,8,5,6,7,0,9,8,1,0,35,13,12,16,17,0,10,11,12,13,35,19,14,10,11,0,14,15,16,17,35,18,15,14,19,0,18,19,15,14,35,17,16,15,18,0,13,12,19,18,35,0,1,11,10,0,5,4,17,16,35,6,5,15,16,0,1,8,19,12,35,9,8,18,19,0,7,9,18,14,35,5,4,14,15,0,8,6,15,19,35,7,3,13,17,0,0,3,10,13,35,1,9,19,11,0,4,7,14,17,35,2,6,16,12,0,2,1,12,11,35,3,2,12,13,0,3,2,11,10,35,4,0,10,14,0,6,5,16,15,35,8,7,17,18,0,9,0,13,18,35,20,21,23,22,1,20,21,22,23,35,22,23,25,24,1,23,22,24,25,35,24,25,27,26,1,25,24,26,27,35,26,27,29,28,1,27,26,28,29,35,28,29,31,30,1,29,28,30,31,35,30,31,33,32,1,31,30,32,33,34,31,29,27,1,30,28,26,34,31,27,25,1,30,26,24,34,33,31,25,1,32,30,24,34,23,33,25,1,22,32,24,34,23,35,33,1,22,34,32,34,23,21,35,1,22,21,34,35,21,20,34,35,1,21,20,35,34,35,32,33,35,34,1,33,32,34,35,34,26,28,30,1,27,29,31,34,24,26,30,1,25,27,31,34,24,30,32,1,25,31,33,34,22,24,32,1,23,25,33,34,22,32,34,1,23,33,35,34,20,22,34,1,20,23,35,43,69,37,39,70,2,0,1,2,3,36,37,38,39,43,70,39,41,72,2,3,2,4,5,39,38,40,41,43,72,41,43,74,2,5,4,6,7,41,40,42,43,43,74,43,45,76,2,7,6,8,9,43,42,44,45,43,76,45,47,78,2,10,11,12,13,45,44,46,47,43,78,47,49,80,2,13,12,14,15,47,46,48,49,43,80,49,51,82,2,15,14,16,17,49,48,50,51,43,82,51,53,84,2,17,16,18,19,51,50,52,53,43,84,53,55,86,2,19,18,20,21,53,52,54,55,43,86,55,57,88,2,21,20,22,23,55,54,56,57,43,88,57,59,90,2,23,22,24,25,57,56,58,59,43,90,59,61,92,2,25,24,26,27,59,58,60,61,43,92,61,63,94,2,27,26,28,29,61,60,62,63,43,94,63,65,96,2,29,28,30,31,63,62,64,65,42,55,53,51,2,32,33,34,54,52,50,42,57,55,51,2,35,32,34,56,54,50,42,57,51,49,2,35,34,36,56,50,48,42,59,57,49,2,37,35,36,58,56,48,42,59,49,47,2,37,36,38,58,48,46,42,61,59,47,2,39,37,38,60,58,46,42,61,47,45,2,39,38,40,60,46,44,42,61,45,43,2,39,40,41,60,44,42,42,63,61,43,2,42,39,41,62,60,42,42,63,43,41,2,42,41,43,62,42,40,42,65,63,41,2,44,42,43,64,62,40,42,39,65,41,2,45,44,43,38,64,40,42,39,67,65,2,45,46,44,38,66,64,42,39,37,67,2,45,47,46,38,37,66,43,98,67,37,69,2,48,49,1,0,67,66,37,36,43,96,65,67,98,2,31,30,49,48,65,64,66,67,42,50,52,54,2,50,51,52,68,69,70,42,50,54,56,2,50,52,53,68,70,71,42,48,50,56,2,54,50,53,72,68,71,42,48,56,58,2,54,53,55,72,71,73,42,46,48,58,2,56,54,55,74,72,73,42,46,58,60,2,56,55,57,74,73,75,42,44,46,60,2,58,56,57,76,74,75,42,42,44,60,2,59,58,57,77,76,75,42,42,60,62,2,59,57,60,77,75,78,42,40,42,62,2,61,59,60,79,77,78,42,40,62,64,2,61,60,62,79,78,80,42,38,40,64,2,63,61,62,81,79,80,42,38,64,66,2,63,62,64,81,80,82,42,36,38,66,2,65,63,64,83,81,82,43,36,68,71,38,2,66,67,68,69,83,84,85,81,43,68,69,70,71,2,67,0,3,68,84,36,39,85,43,38,71,73,40,2,69,68,70,71,81,85,86,79,43,71,70,72,73,2,68,3,5,70,85,39,41,86,43,40,73,75,42,2,71,70,72,73,79,86,87,77,43,73,72,74,75,2,70,5,7,72,86,41,43,87,43,42,75,77,44,2,73,72,74,75,77,87,88,76,43,75,74,76,77,2,72,7,9,74,87,43,45,88,43,44,77,79,46,2,76,77,78,79,76,88,89,74,43,77,76,78,79,2,77,10,13,78,88,45,47,89,43,46,79,81,48,2,79,78,80,81,74,89,90,72,43,79,78,80,81,2,78,13,15,80,89,47,49,90,43,48,81,83,50,2,81,80,82,83,72,90,91,68,43,81,80,82,83,2,80,15,17,82,90,49,51,91,43,50,83,85,52,2,83,82,84,85,68,91,92,69,43,83,82,84,85,2,82,17,19,84,91,51,53,92,43,52,85,87,54,2,85,84,86,87,69,92,93,70,43,85,84,86,87,2,84,19,21,86,92,53,55,93,43,54,87,89,56,2,87,86,88,89,70,93,94,71,43,87,86,88,89,2,86,21,23,88,93,55,57,94,43,56,89,91,58,2,89,88,90,91,71,94,95,73,43,89,88,90,91,2,88,23,25,90,94,57,59,95,43,58,91,93,60,2,91,90,92,93,73,95,96,75,43,91,90,92,93,2,90,25,27,92,95,59,61,96,43,60,93,95,62,2,93,92,94,95,75,96,97,78,43,93,92,94,95,2,92,27,29,94,96,61,63,97,43,62,95,97,64,2,95,94,96,97,78,97,98,80,43,95,94,96,97,2,94,29,31,96,97,63,65,98,43,68,36,66,99,2,67,66,98,99,84,83,82,99,43,99,98,69,68,2,99,48,0,67,99,67,36,84,43,64,97,99,66,2,97,96,99,98,80,98,99,82,43,97,96,98,99,2,96,31,48,99,98,65,67,99],
"bones" : [],
"skinIndices" : [],
"skinWeights" : [],
"animation" : {}
}

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View file

@ -0,0 +1,58 @@
{
"metadata" :
{
"formatVersion" : 3.1,
"generatedBy" : "Blender 2.63 Exporter",
"vertices" : 64,
"faces" : 92,
"normals" : 64,
"colors" : 0,
"uvs" : [36],
"materials" : 1,
"morphTargets" : 0,
"bones" : 0
},
"scale" : 1.000000,
"materials" : [ {
"DbgColor" : 15658734,
"DbgIndex" : 0,
"DbgName" : "ocean",
"blending" : "NormalBlending",
"colorSpecular" : [0.0486111044883728, 0.0486111044883728, 0.0486111044883728],
"depthTest" : true,
"depthWrite" : true,
"mapDiffuse" : "ocean-texture2.jpg",
"mapDiffuseRepeat" : [200, 200],
"mapDiffuseWrap" : ["repeat", "repeat"],
"shading" : "Phong",
"specularCoef" : 50,
"opacity" : 1.0,
"transparent" : false,
"vertexColors" : false
}],
"vertices" : [0,-0.0123162,-1,0,0.0123161,-1,0.19509,-0.0123162,-0.980785,0.19509,0.0123161,-0.980785,0.382683,-0.0123162,-0.92388,0.382683,0.0123161,-0.92388,0.55557,-0.0123162,-0.83147,0.55557,0.0123161,-0.83147,0.707107,-0.0123162,-0.707107,0.707107,0.0123161,-0.707107,0.83147,-0.0123162,-0.55557,0.83147,0.0123161,-0.55557,0.92388,-0.0123162,-0.382683,0.92388,0.0123162,-0.382683,0.980785,-0.0123162,-0.19509,0.980785,0.0123162,-0.19509,1,-0.0123162,-7.49595e-08,1,0.0123162,-7.60363e-08,0.980785,-0.0123162,0.19509,0.980785,0.0123162,0.19509,0.92388,-0.0123162,0.382683,0.92388,0.0123162,0.382683,0.83147,-0.0123161,0.55557,0.83147,0.0123162,0.55557,0.707107,-0.0123161,0.707107,0.707107,0.0123162,0.707107,0.55557,-0.0123161,0.83147,0.55557,0.0123162,0.83147,0.382683,-0.0123161,0.92388,0.382683,0.0123162,0.92388,0.19509,-0.0123161,0.980785,0.19509,0.0123162,0.980785,-3.25841e-07,-0.0123161,1,-3.25841e-07,0.0123162,1,-0.195091,-0.0123161,0.980785,-0.195091,0.0123162,0.980785,-0.382684,-0.0123161,0.923879,-0.382684,0.0123162,0.923879,-0.555571,-0.0123161,0.831469,-0.555571,0.0123162,0.831469,-0.707107,-0.0123161,0.707106,-0.707107,0.0123162,0.707106,-0.83147,-0.0123161,0.55557,-0.83147,0.0123162,0.55557,-0.92388,-0.0123162,0.382683,-0.92388,0.0123162,0.382683,-0.980785,-0.0123162,0.195089,-0.980785,0.0123162,0.195089,-1,-0.0123162,-9.65061e-07,-1,0.0123162,-9.66137e-07,-0.980785,-0.0123162,-0.195091,-0.980785,0.0123162,-0.195091,-0.923879,-0.0123162,-0.382684,-0.923879,0.0123162,-0.382684,-0.831469,-0.0123162,-0.555571,-0.831469,0.0123161,-0.555571,-0.707106,-0.0123162,-0.707108,-0.707106,0.0123161,-0.707108,-0.555569,-0.0123162,-0.83147,-0.555569,0.0123161,-0.83147,-0.382682,-0.0123162,-0.92388,-0.382682,0.0123161,-0.92388,-0.195089,-0.0123162,-0.980786,-0.195089,0.0123161,-0.980786],
"morphTargets" : [],
"normals" : [0,-0.68569,-0.727866,0,0.68569,-0.727866,0.142003,0.68569,-0.713889,0.142003,-0.68569,-0.713889,0.278542,0.68569,-0.672475,0.278542,-0.68569,-0.672475,0.40437,0.68569,-0.605213,0.40437,-0.68569,-0.605213,0.514664,0.68569,-0.514664,0.514664,-0.68569,-0.514664,0.605213,0.68569,-0.40437,0.605213,-0.68569,-0.40437,0.672475,0.68569,-0.278542,0.672475,-0.68569,-0.278542,0.713889,0.68569,-0.142003,0.713889,-0.68569,-0.142003,0.727866,0.68569,0,0.727866,-0.68569,0,0.713889,0.68569,0.142003,0.713889,-0.68569,0.142003,0.672475,0.68569,0.278542,0.672475,-0.68569,0.278542,0.605213,0.68569,0.40437,0.605213,-0.68569,0.40437,0.514664,0.68569,0.514664,0.514664,-0.68569,0.514664,0.40437,0.68569,0.605213,0.40437,-0.68569,0.605213,0.278542,0.68569,0.672475,0.278542,-0.68569,0.672475,0.142003,0.68569,0.713889,0.142003,-0.68569,0.713889,0,0.68569,0.727866,0,-0.68569,0.727866,-0.142003,0.68569,0.713889,-0.142003,-0.68569,0.713889,-0.278542,0.68569,0.672475,-0.278542,-0.68569,0.672475,-0.40437,0.68569,0.605213,-0.40437,-0.68569,0.605213,-0.514664,0.68569,0.514664,-0.514664,-0.68569,0.514664,-0.605213,0.68569,0.40437,-0.605213,-0.68569,0.40437,-0.672475,0.68569,0.278542,-0.672475,-0.68569,0.278542,-0.713889,0.68569,0.142003,-0.713889,-0.68569,0.142003,-0.727866,0.68569,0,-0.727866,-0.68569,0,-0.713889,0.68569,-0.142003,-0.713889,-0.68569,-0.142003,-0.672475,0.68569,-0.278542,-0.672475,-0.68569,-0.278542,-0.605213,0.68569,-0.40437,-0.605213,-0.68569,-0.40437,-0.514664,0.68569,-0.514695,-0.514664,-0.68569,-0.514695,-0.40437,0.68569,-0.605213,-0.40437,-0.68569,-0.605213,-0.278542,0.68569,-0.672475,-0.278542,-0.68569,-0.672475,-0.142003,0.68569,-0.713889,-0.142003,-0.68569,-0.713889],
"colors" : [],
"uvs" : [[0,0,1,0,1,1,0,1,0.5,0,0.402455,0.009607,0.308658,0.03806,0.222215,0.084265,0.597545,0.009607,0.146446,0.146447,0.691342,0.03806,0.084265,0.222215,0.777785,0.084265,0.03806,0.308659,0.853553,0.146447,0.009607,0.402455,0.915735,0.222215,0,0.5,0.96194,0.308658,0.009607,0.597546,0.990393,0.402455,0.03806,0.691342,1,0.5,0.084266,0.777786,0.990393,0.597545,0.146447,0.853554,0.96194,0.691342,0.222215,0.915735,0.915735,0.777785,0.308659,0.96194,0.853553,0.853553,0.402456,0.990393,0.777785,0.915735,0.5,1,0.691342,0.96194,0.597545,0.990393]],
"faces" : [43,0,1,3,2,0,0,1,2,3,0,1,2,3,43,2,3,5,4,0,0,1,2,3,3,2,4,5,43,4,5,7,6,0,0,1,2,3,5,4,6,7,43,6,7,9,8,0,0,1,2,3,7,6,8,9,43,8,9,11,10,0,0,1,2,3,9,8,10,11,43,10,11,13,12,0,0,1,2,3,11,10,12,13,43,12,13,15,14,0,0,1,2,3,13,12,14,15,43,14,15,17,16,0,0,1,2,3,15,14,16,17,43,16,17,19,18,0,0,1,2,3,17,16,18,19,43,18,19,21,20,0,0,1,2,3,19,18,20,21,43,20,21,23,22,0,0,1,2,3,21,20,22,23,43,22,23,25,24,0,0,1,2,3,23,22,24,25,43,24,25,27,26,0,0,1,2,3,25,24,26,27,43,26,27,29,28,0,0,1,2,3,27,26,28,29,43,28,29,31,30,0,0,1,2,3,29,28,30,31,43,30,31,33,32,0,0,1,2,3,31,30,32,33,43,32,33,35,34,0,0,1,2,3,33,32,34,35,43,34,35,37,36,0,0,1,2,3,35,34,36,37,43,36,37,39,38,0,0,1,2,3,37,36,38,39,43,38,39,41,40,0,0,1,2,3,39,38,40,41,43,40,41,43,42,0,0,1,2,3,41,40,42,43,43,42,43,45,44,0,0,1,2,3,43,42,44,45,43,44,45,47,46,0,0,1,2,3,45,44,46,47,43,46,47,49,48,0,0,1,2,3,47,46,48,49,43,48,49,51,50,0,0,1,2,3,49,48,50,51,43,50,51,53,52,0,0,1,2,3,51,50,52,53,43,52,53,55,54,0,0,1,2,3,53,52,54,55,43,54,55,57,56,0,0,1,2,3,55,54,56,57,43,56,57,59,58,0,0,1,2,3,57,56,58,59,43,58,59,61,60,0,0,1,2,3,59,58,60,61,42,35,33,31,0,4,5,6,34,32,30,42,35,31,29,0,4,6,7,34,30,28,42,37,35,29,0,8,4,7,36,34,28,42,37,29,27,0,8,7,9,36,28,26,42,39,37,27,0,10,8,9,38,36,26,42,39,27,25,0,10,9,11,38,26,24,42,41,39,25,0,12,10,11,40,38,24,42,41,25,23,0,12,11,13,40,24,22,42,43,41,23,0,14,12,13,42,40,22,42,43,23,21,0,14,13,15,42,22,20,42,45,43,21,0,16,14,15,44,42,20,42,45,21,19,0,16,15,17,44,20,18,42,47,45,19,0,18,16,17,46,44,18,42,47,19,17,0,18,17,19,46,18,16,42,49,47,17,0,20,18,19,48,46,16,42,49,17,15,0,20,19,21,48,16,14,42,51,49,15,0,22,20,21,50,48,14,42,51,15,13,0,22,21,23,50,14,12,42,53,51,13,0,24,22,23,52,50,12,42,53,13,11,0,24,23,25,52,12,10,42,55,53,11,0,26,24,25,54,52,10,42,55,11,9,0,26,25,27,54,10,8,42,57,55,9,0,28,26,27,56,54,8,42,57,9,7,0,28,27,29,56,8,6,42,59,57,7,0,30,28,29,58,56,6,42,59,7,5,0,30,29,31,58,6,4,42,61,59,5,0,32,30,31,60,58,4,42,3,61,5,0,33,32,31,2,60,4,42,3,63,61,0,33,34,32,2,62,60,42,3,1,63,0,33,35,34,2,1,62,43,1,0,62,63,0,2,3,0,1,1,0,63,62,43,60,61,63,62,0,0,1,2,3,61,60,62,63,42,30,32,34,0,8,4,5,31,33,35,42,28,30,34,0,10,8,5,29,31,35,42,28,34,36,0,10,5,6,29,35,37,42,26,28,36,0,12,10,6,27,29,37,42,26,36,38,0,12,6,7,27,37,39,42,24,26,38,0,14,12,7,25,27,39,42,24,38,40,0,14,7,9,25,39,41,42,22,24,40,0,16,14,9,23,25,41,42,22,40,42,0,16,9,11,23,41,43,42,20,22,42,0,18,16,11,21,23,43,42,20,42,44,0,18,11,13,21,43,45,42,18,20,44,0,20,18,13,19,21,45,42,18,44,46,0,20,13,15,19,45,47,42,16,18,46,0,22,20,15,17,19,47,42,16,46,48,0,22,15,17,17,47,49,42,14,16,48,0,24,22,17,15,17,49,42,14,48,50,0,24,17,19,15,49,51,42,12,14,50,0,26,24,19,13,15,51,42,12,50,52,0,26,19,21,13,51,53,42,10,12,52,0,28,26,21,11,13,53,42,10,52,54,0,28,21,23,11,53,55,42,8,10,54,0,30,28,23,9,11,55,42,8,54,56,0,30,23,25,9,55,57,42,6,8,56,0,32,30,25,7,9,57,42,6,56,58,0,32,25,27,7,57,59,42,4,6,58,0,34,32,27,5,7,59,42,4,58,60,0,34,27,29,5,59,61,42,2,4,60,0,35,34,29,3,5,61,42,2,60,62,0,35,29,31,3,61,63,42,0,2,62,0,33,35,31,0,3,63],
"bones" : [],
"skinIndices" : [],
"skinWeights" : [],
"animation" : {}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,58 @@
{
"metadata" :
{
"formatVersion" : 3.1,
"generatedBy" : "Blender 2.63 Exporter",
"vertices" : 108,
"faces" : 116,
"normals" : 108,
"colors" : 0,
"uvs" : [141],
"materials" : 1,
"morphTargets" : 0,
"bones" : 0
},
"scale" : 1.000000,
"materials" : [ {
"DbgColor" : 15658734,
"DbgIndex" : 0,
"DbgName" : "palmtree-leaves",
"blending" : "NormalBlending",
"colorDiffuse" : [0.6400000190734865, 0.6400000190734865, 0.6400000190734865],
"colorSpecular" : [0.5, 0.5, 0.5],
"depthTest" : true,
"depthWrite" : true,
"mapDiffuse" : "palm-leaves-texture-512.png",
"mapDiffuseWrap" : ["repeat", "repeat"],
"shading" : "Lambert",
"specularCoef" : 50,
"opacity" : 1.0,
"transparent" : false,
"vertexColors" : false
}],
"vertices" : [-0.020561,-0.871785,0.253759,-0.0144862,-0.707493,0.17287,0.00890052,-0.871789,0.261889,0.0117388,-0.707901,0.18014,0.0305397,-0.871802,0.284542,0.0311402,-0.709377,0.200152,0.038579,-0.871821,0.315806,0.0384703,-0.711867,0.228058,0.0307295,-0.871842,0.347395,0.0315544,-0.714683,0.256453,0.00894154,-0.871858,0.37078,0.0120601,-0.717096,0.277588,-0.0209665,-0.871866,0.379544,-0.0147427,-0.718487,0.28558,-0.0508501,-0.871862,0.371247,-0.0415112,-0.717965,0.278109,-0.0725501,-0.871849,0.348168,-0.0609767,-0.71588,0.257198,-0.0802041,-0.871829,0.316556,-0.067788,-0.712934,0.228708,-0.0719345,-0.871809,0.285141,-0.0602986,-0.710279,0.200657,-0.0501078,-0.871793,0.262263,-0.0407934,-0.708417,0.180356,-0.00947153,-0.56475,0.112222,0.0123652,-0.564882,0.11815,0.0285019,-0.565431,0.134447,0.0346555,-0.566236,0.156962,0.0289875,-0.567222,0.179871,0.0128268,-0.568147,0.196938,-0.00949923,-0.568631,0.203335,-0.0318577,-0.568508,0.197216,-0.0480444,-0.567682,0.180212,-0.0537044,-0.56653,0.157202,-0.0475246,-0.565517,0.13453,-0.0313389,-0.564921,0.118157,-0.00532141,-0.427498,0.0614707,0.0132669,-0.427572,0.0665021,0.0269046,-0.428053,0.0803853,0.0319899,-0.429392,0.0996729,0.0270986,-0.431211,0.119301,0.0134032,-0.432445,0.133744,-0.00541982,-0.433078,0.139151,-0.0242545,-0.43298,0.134027,-0.0379138,-0.431641,0.119547,-0.0427627,-0.429975,0.0999651,-0.0376094,-0.428495,0.0805929,-0.0239145,-0.42761,0.066549,-0.00183128,-0.285886,0.0175355,0.0134643,-0.285484,0.0215658,0.0246404,-0.285292,0.0327536,0.0287725,-0.28568,0.0482153,0.0247397,-0.286472,0.0638731,0.0135405,-0.287266,0.0754853,-0.00185372,-0.287543,0.0797515,-0.0172585,-0.287522,0.0756039,-0.0284488,-0.286749,0.063998,-0.0324759,-0.28605,0.0483559,-0.0282907,-0.285336,0.0327874,-0.0171007,-0.285276,0.0215357,0.000183851,-0.184148,-0.00567965,0.0128078,-0.183983,-0.00231172,0.0220247,-0.183795,0.00690621,0.0254023,-0.183795,0.019531,0.0220466,-0.183983,0.0322189,0.0128268,-0.184285,0.04159,0.000182487,-0.184299,0.0449901,-0.0124621,-0.184292,0.0415966,-0.0216911,-0.184096,0.0322626,-0.0250354,-0.183847,0.0195513,-0.0216462,-0.183772,0.00690822,-0.0124287,-0.183891,-0.00231953,0.00116455,-0.120372,-0.0158184,0.012104,-0.120373,-0.0128864,0.0201074,-0.120347,-0.00487885,0.0230366,-0.120342,0.00606032,0.0201151,-0.120392,0.017017,0.0121061,-0.120398,0.0250318,0.00116439,-0.120401,0.0279661,-0.00977741,-0.120399,0.0250332,-0.0177866,-0.120395,0.0170191,-0.0207103,-0.120357,0.00606536,-0.017776,-0.120337,-0.00487862,-0.00977505,-0.120375,-0.0128855,0.00171492,-0.0588667,-0.0210709,0.0114169,-0.0588667,-0.0184712,0.0185193,-0.0588669,-0.0113686,0.021119,-0.0588672,-0.0016664,0.0185194,-0.0588675,0.00803601,0.011417,-0.0588676,0.0151387,0.00171492,-0.0588678,0.0177386,-0.00798721,-0.0588677,0.0151389,-0.0150896,-0.0588675,0.00803613,-0.0176892,-0.0588673,-0.00166625,-0.0150895,-0.058867,-0.0113685,-0.00798707,-0.0588668,-0.0184712,0.00186716,-0.00085175,-0.0224278,0.0111267,-0.00085175,-0.0199467,0.0179052,-0.00085175,-0.0131682,0.0203863,-0.00085175,-0.00390867,0.0179052,-0.00085175,0.00535091,0.0111267,-0.00085175,0.0121293,0.00186716,-0.00085175,0.0146105,-0.00739241,-0.00085175,0.0121294,-0.0141709,-0.00085175,0.00535091,-0.016652,-0.00085175,-0.00390867,-0.0141709,-0.00085175,-0.0131682,-0.00739242,-0.00085175,-0.0199467],
"morphTargets" : [],
"normals" : [-0.005341,-0.808252,-0.588794,-0.001679,-0.414716,-0.90994,0.469314,-0.375683,-0.799097,0.329264,-0.792688,-0.513016,0.845424,-0.22895,-0.482467,0.611744,-0.734642,-0.293252,0.999908,0.005982,-0.010285,0.766289,-0.640004,0.056307,0.849269,0.256203,0.461592,0.707511,-0.537797,0.458449,0.468551,0.433973,0.769463,0.422559,-0.463301,0.778924,0.003693,0.503464,0.863979,-0.001709,-0.432966,0.901395,-0.455519,0.464553,0.759362,-0.428694,-0.449782,0.783502,-0.833216,0.3155,0.454054,-0.722251,-0.512558,0.464278,-0.996887,0.077731,-0.012513,-0.789514,-0.611133,0.056032,-0.855678,-0.171056,-0.488357,-0.634602,-0.711875,-0.30076,-0.477706,-0.346202,-0.807398,-0.479415,-0.303812,-0.823298,-0.000427,-0.367595,-0.92996,-0.344066,-0.781762,-0.520035,-0.856166,-0.143895,-0.4962,-0.858913,-0.123173,-0.497024,-0.485733,-0.262947,-0.833583,-0.996734,0.079623,-0.012787,-0.462172,0.422376,0.779717,-0.837184,0.29075,0.463179,0.472152,0.39555,0.787774,0.002411,0.456984,0.889462,0.999786,0.014283,-0.013367,0.851161,0.23777,0.46791,0.473922,-0.331584,-0.815729,0.847804,-0.197607,-0.49208,-0.000793,-0.320139,-0.947356,-0.491104,-0.208808,-0.845668,-0.000763,-0.258675,-0.965941,0.855403,0.208014,0.474319,0.480056,0.348399,0.805048,0.00238,0.404828,0.914365,-0.47206,0.372723,0.798883,0.481796,-0.28721,-0.827845,-0.845058,0.253487,0.470717,0.853481,-0.168279,-0.493179,-0.997528,0.06946,-0.010163,0.999817,0.014618,-0.010376,0.001679,0.350383,0.936583,0.485611,0.301767,0.820399,0.49028,0.250618,0.834742,0.000977,0.289804,0.95706,-0.480026,0.322184,0.815912,0.48851,-0.229377,-0.841853,-0.850887,0.219977,0.477004,0.858272,-0.128697,-0.49675,-0.997711,0.066866,-0.009186,0.999695,0.022858,-0.008637,-0.861232,-0.091922,-0.499802,0.85815,0.182745,0.479751,-0.486557,0.26719,0.831751,0.000702,0.212531,0.977142,-0.493942,0.196234,0.847041,-0.000214,-0.189184,-0.981933,0.493271,-0.166295,-0.853786,-0.855342,0.186438,0.483322,0.86166,-0.086428,-0.500046,-0.997711,0.066988,-0.00763,0.999451,0.032075,-0.006928,-0.862972,-0.056856,-0.502029,0.860225,0.156468,0.485305,-0.494491,-0.149632,-0.856197,-0.861415,0.139103,0.488418,-0.50032,0.101749,0.859828,-0.866848,0.073183,0.493118,0.000305,-0.120457,-0.992706,0.495499,-0.104862,-0.862239,0.862514,-0.049745,-0.503525,-0.998383,0.056063,-0.007996,0.999451,0.03177,-0.00763,-0.862819,-0.029176,-0.504654,0.864101,0.117954,0.489242,-0.495437,-0.093326,-0.863582,0.496261,0.184179,0.848384,-0.372234,0.671682,0.640492,-0.647359,0.666799,0.369152,0.496933,-0.046205,-0.866543,0.862972,-0.019105,-0.504837,-0.99942,0.03235,-0.007385,0.999756,0.020753,-0.007324,-0.862789,-0.009278,-0.505417,0.867733,0.06299,0.492996,-0.496292,-0.040651,-0.867183,0.50145,0.095828,0.859828,0.000458,-0.053987,-0.998535,0.000549,0.11005,0.993896,0.000305,0.673116,0.739494,0.37315,0.670705,0.64098,0.648823,0.66512,0.36961,-0.751427,0.659749,-0.004791,0.753136,0.657796,-0.004791,-0.654073,0.652455,-0.382641,0.655507,0.650777,-0.383068,-0.378948,0.64687,-0.661733,0.379833,0.645894,-0.662191,0.000305,0.64449,-0.764611],
"colors" : [],
"uvs" : [[0.145052,0.021564,0.145051,0.127604,0.114012,0.127604,0.114013,0.021563,0.082973,0.127604,0.082973,0.021562,0.051933,0.127605,0.051933,0.021561,0.020893,0.127605,0.020893,0.021561,0.393361,0.021568,0.393359,0.127605,0.362321,0.127604,0.362323,0.021567,0.331283,0.127604,0.331285,0.021567,0.300244,0.127604,0.300246,0.021566,0.269206,0.127603,0.269208,0.021566,0.238168,0.127603,0.238169,0.021565,0.207129,0.127603,0.20713,0.021565,0.17609,0.127603,0.176093,0.252501,0.145055,0.252502,0.176091,0.021564,0.356523,0.849007,0.331716,0.863343,0.303072,0.863343,0.278266,0.849007,0.370845,0.824175,0.263944,0.824175,0.370845,0.795502,0.263944,0.795503,0.356523,0.770671,0.278266,0.770671,0.331716,0.756335,0.303072,0.756335,0.207131,0.2525,0.207136,0.383126,0.176099,0.383127,0.238169,0.2525,0.300244,0.252499,0.269206,0.2525,0.362319,0.2525,0.331282,0.252499,0.051939,0.252506,0.0209,0.252508,0.114017,0.252503,0.082978,0.252505,0.393357,0.2525,0.145063,0.383129,0.176108,0.516783,0.145073,0.516785,0.393355,0.383124,0.362318,0.383124,0.331282,0.383124,0.300245,0.383124,0.114026,0.38313,0.269209,0.383124,0.082989,0.383133,0.238173,0.383125,0.051952,0.383135,0.020915,0.383138,0.331281,0.516779,0.362316,0.51678,0.362313,0.641316,0.33128,0.641315,0.300247,0.516779,0.114038,0.516787,0.269212,0.51678,0.083003,0.51679,0.238177,0.51678,0.051968,0.516793,0.207143,0.516781,0.020933,0.516796,0.393351,0.51678,0.300247,0.641315,0.331277,0.747619,0.300247,0.747618,0.145084,0.64132,0.114052,0.641323,0.269215,0.641315,0.083019,0.641325,0.238182,0.641316,0.051987,0.641329,0.207149,0.641317,0.020954,0.641333,0.176117,0.641318,0.393345,0.641317,0.269216,0.747618,0.300246,0.866062,0.269217,0.866062,0.145094,0.747623,0.114063,0.747625,0.083033,0.747628,0.238185,0.747619,0.052002,0.747631,0.207155,0.74762,0.020972,0.747634,0.176124,0.747621,0.393339,0.747621,0.362308,0.747619,0.300244,0.978422,0.269218,0.978421,0.114075,0.866069,0.083046,0.866071,0.238189,0.866062,0.052017,0.866073,0.20716,0.866063,0.020989,0.866076,0.176132,0.866065,0.393331,0.866064,0.362303,0.866063,0.145103,0.866066,0.331274,0.866062,0.2894,0.124684,0.318044,0.124684,0.342851,0.110348,0.264594,0.110348,0.357173,0.085516,0.250272,0.085516,0.357173,0.056844,0.250272,0.056843,0.342851,0.032012,0.264594,0.032012,0.318044,0.017676,0.2894,0.017676,0.114085,0.978431,0.083057,0.978434,0.238192,0.978422,0.05203,0.978437,0.207166,0.978424,0.021002,0.978439,0.176139,0.978426,0.393325,0.978426,0.362298,0.978425,0.145112,0.978429,0.331271,0.978423]],
"faces" : [43,0,1,3,2,0,0,1,2,3,0,1,2,3,43,2,3,5,4,0,3,2,4,5,3,2,4,5,43,4,5,7,6,0,5,4,6,7,5,4,6,7,43,6,7,9,8,0,7,6,8,9,7,6,8,9,43,8,9,11,10,0,10,11,12,13,9,8,10,11,43,10,11,13,12,0,13,12,14,15,11,10,12,13,43,12,13,15,14,0,15,14,16,17,13,12,14,15,43,14,15,17,16,0,17,16,18,19,15,14,16,17,43,16,17,19,18,0,19,18,20,21,17,16,18,19,43,18,19,21,20,0,21,20,22,23,19,18,20,21,43,1,23,35,24,0,1,24,25,26,1,22,23,24,43,1,0,22,23,0,1,0,27,24,1,0,25,22,43,20,21,23,22,0,23,22,24,27,21,20,22,25,42,10,12,14,0,28,29,30,11,13,15,42,10,14,16,0,28,30,31,11,15,17,42,8,10,16,0,32,28,31,9,11,17,42,8,16,18,0,32,31,33,9,17,19,42,6,8,18,0,34,32,33,7,9,19,42,6,18,20,0,34,33,35,7,19,21,42,4,6,20,0,36,34,35,5,7,21,42,4,20,22,0,36,35,37,5,21,25,42,2,4,22,0,38,36,37,3,5,25,42,0,2,22,0,39,38,37,0,3,25,43,35,34,46,47,0,25,40,41,42,23,26,27,28,43,21,19,33,34,0,22,20,43,40,20,18,29,26,43,17,15,31,32,0,18,16,44,45,16,14,30,31,43,13,11,29,30,0,14,12,46,47,12,10,32,33,43,9,7,27,28,0,8,6,48,49,8,6,34,35,43,5,3,25,26,0,4,2,50,51,4,2,36,37,43,3,1,24,25,0,2,1,26,50,2,1,24,36,43,23,21,34,35,0,24,22,40,25,22,20,26,23,43,19,17,32,33,0,20,18,45,43,18,16,31,29,43,15,13,30,31,0,16,14,47,44,14,12,33,30,43,11,9,28,29,0,12,11,52,46,10,8,35,32,43,7,5,26,27,0,6,4,51,48,6,4,37,34,43,36,47,59,48,0,53,42,54,55,38,28,39,40,43,29,28,40,41,0,46,52,56,57,32,35,41,42,43,24,35,47,36,0,26,25,42,53,24,23,28,38,43,30,29,41,42,0,47,46,57,58,33,32,42,43,43,31,30,42,43,0,44,47,58,59,30,33,43,44,43,25,24,36,37,0,50,26,53,60,36,24,38,45,43,32,31,43,44,0,45,44,59,61,31,30,44,46,43,26,25,37,38,0,51,50,60,62,37,36,45,47,43,33,32,44,45,0,43,45,61,63,29,31,46,48,43,27,26,38,39,0,48,51,62,64,34,37,47,49,43,34,33,45,46,0,40,43,63,41,26,29,48,27,43,28,27,39,40,0,49,48,64,65,35,34,49,41,43,54,53,65,66,0,66,67,68,69,50,51,52,53,43,42,41,53,54,0,58,57,67,66,43,42,51,50,43,43,42,54,55,0,59,58,66,70,44,43,50,54,43,37,36,48,49,0,60,53,55,71,45,38,40,55,43,44,43,55,56,0,61,59,70,72,46,44,54,56,43,38,37,49,50,0,62,60,71,73,47,45,55,57,43,45,44,56,57,0,63,61,72,74,48,46,56,58,43,39,38,50,51,0,64,62,73,75,49,47,57,59,43,46,45,57,58,0,41,63,74,76,27,48,58,60,43,40,39,51,52,0,65,64,75,77,41,49,59,61,43,47,46,58,59,0,42,41,76,54,28,27,60,39,43,41,40,52,53,0,57,56,78,67,42,41,61,51,43,67,66,78,79,0,79,69,80,81,62,53,63,64,43,55,54,66,67,0,70,66,69,79,54,50,53,62,43,49,48,60,61,0,71,55,82,83,55,40,65,66,43,56,55,67,68,0,72,70,79,84,56,54,62,67,43,50,49,61,62,0,73,71,83,85,57,55,66,68,43,57,56,68,69,0,74,72,84,86,58,56,67,69,43,51,50,62,63,0,75,73,85,87,59,57,68,70,43,58,57,69,70,0,76,74,86,88,60,58,69,71,43,52,51,63,64,0,77,75,87,89,61,59,70,72,43,59,58,70,71,0,54,76,88,90,39,60,71,73,43,53,52,64,65,0,67,78,91,68,51,61,72,52,43,48,59,71,60,0,55,54,90,82,40,39,73,65,43,80,79,91,92,0,92,81,93,94,74,64,75,76,43,61,60,72,73,0,83,82,95,96,66,65,77,78,43,68,67,79,80,0,84,79,81,92,67,62,64,74,43,62,61,73,74,0,85,83,96,97,68,66,78,79,43,69,68,80,81,0,86,84,92,98,69,67,74,80,43,63,62,74,75,0,87,85,97,99,70,68,79,81,43,70,69,81,82,0,88,86,98,100,71,69,80,82,43,64,63,75,76,0,89,87,99,101,72,70,81,83,43,71,70,82,83,0,90,88,100,102,73,71,82,84,43,65,64,76,77,0,68,91,103,104,52,72,83,85,43,60,71,83,72,0,82,90,102,95,65,73,84,77,43,66,65,77,78,0,69,68,104,80,53,52,85,63,43,92,91,103,104,0,94,93,105,106,76,75,86,87,43,74,73,85,86,0,97,96,107,108,79,78,88,89,43,81,80,92,93,0,98,92,94,109,80,74,76,90,43,75,74,86,87,0,99,97,108,110,81,79,89,91,43,82,81,93,94,0,100,98,109,111,82,80,90,92,43,76,75,87,88,0,101,99,110,112,83,81,91,93,43,83,82,94,95,0,102,100,111,113,84,82,92,94,43,77,76,88,89,0,104,103,114,115,85,83,93,95,43,72,83,95,84,0,95,102,113,116,77,84,94,96,43,78,77,89,90,0,80,104,115,117,63,85,95,97,43,79,78,90,91,0,81,80,117,93,64,63,97,75,43,73,72,84,85,0,96,95,116,107,78,77,96,88,42,103,102,101,0,118,119,120,86,98,99,42,104,103,101,0,121,118,120,87,86,99,42,104,101,100,0,121,120,122,87,99,100,42,105,104,100,0,123,121,122,101,87,100,42,105,100,99,0,123,122,124,101,100,102,42,106,105,99,0,125,123,124,103,101,102,42,106,99,98,0,125,124,126,103,102,104,42,107,106,98,0,127,125,126,105,103,104,42,97,107,98,0,128,127,126,106,105,104,42,97,96,107,0,128,129,127,106,107,105,43,86,85,97,98,0,108,107,130,131,89,88,106,104,43,93,92,104,105,0,109,94,106,132,90,76,87,101,43,87,86,98,99,0,110,108,131,133,91,89,104,102,43,94,93,105,106,0,111,109,132,134,92,90,101,103,43,88,87,99,100,0,112,110,133,135,93,91,102,100,43,95,94,106,107,0,113,111,134,136,94,92,103,105,43,89,88,100,101,0,115,114,137,138,95,93,100,99,43,84,95,107,96,0,116,113,136,139,96,94,105,107,43,90,89,101,102,0,117,115,138,140,97,95,99,98,43,91,90,102,103,0,93,117,140,105,75,97,98,86,43,85,84,96,97,0,107,116,139,130,88,96,107,106],
"bones" : [],
"skinIndices" : [],
"skinWeights" : [],
"animation" : {}
}

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,91 @@
{
"metadata" :
{
"formatVersion" : 3.1,
"generatedBy" : "Blender 2.63 Exporter",
"vertices" : 72,
"faces" : 73,
"normals" : 72,
"colors" : 2,
"uvs" : [],
"materials" : 1,
"morphTargets" : 0,
"bones" : 0
},
"scale" : 1.000000,
"materials" : [ {
"DbgColor" : 15658734,
"DbgIndex" : 0,
"DbgName" : "redflag",
"blending" : "NormalBlending",
"colorAmbient" : [0.6400000190734865, 0.047438851705772445, 0.0],
"colorDiffuse" : [0.6400000190734865, 0.047438851705772445, 0.0],
"colorSpecular" : [0.5, 0.5, 0.5],
"depthTest" : true,
"depthWrite" : true,
"shading" : "Lambert",
"specularCoef" : 50,
"transparency" : 1.0,
"transparent" : false,
"vertexColors" : false
},
{
"DbgColor" : 15597568,
"DbgIndex" : 1,
"DbgName" : "flagmat",
"blending" : "NormalBlending",
"colorAmbient" : [0.6400000190734865, 0.6400000190734865, 0.6400000190734865],
"colorDiffuse" : [0.6400000190734865, 0.6400000190734865, 0.6400000190734865],
"colorSpecular" : [0.5, 0.5, 0.5],
"depthTest" : true,
"depthWrite" : true,
"shading" : "Lambert",
"specularCoef" : 50,
"transparency" : 1.0,
"transparent" : false,
"vertexColors" : false
},
{
"DbgColor" : 15597568,
"DbgIndex" : 1,
"DbgName" : "flagmat",
"blending" : "NormalBlending",
"colorAmbient" : [0.6400000190734865, 0.6400000190734865, 0.6400000190734865],
"colorDiffuse" : [0.6400000190734865, 0.6400000190734865, 0.6400000190734865],
"colorSpecular" : [0.5, 0.5, 0.5],
"depthTest" : true,
"depthWrite" : true,
"shading" : "Lambert",
"specularCoef" : 50,
"transparency" : 1.0,
"transparent" : false,
"vertexColors" : false
}],
"vertices" : [-0.00477433,1.81853,1.6391,-0.0047743,1.38258,0.0400246,-0.00477437,2.25447,0.0400246,-0.00913378,1.81853,1.6391,-0.00913375,1.38258,0.0400246,-0.00913382,2.25447,0.0400246,0,-0.158144,0.0416267,0,2.29792,0.0416266,-0.0294346,-0.158144,0.0294346,-0.0294346,2.29792,0.0294345,-0.0416267,-0.158144,5.09315e-09,-0.0416267,2.29792,-1.02265e-07,-0.0294346,-0.158144,-0.0294345,-0.0294346,2.29792,-0.0294347,3.63913e-09,-0.158144,-0.0416267,3.63913e-09,2.29792,-0.0416268,0.0294346,-0.158144,-0.0294345,0.0294346,2.29792,-0.0294346,0.0416267,-0.158144,7.4091e-09,0.0416267,2.29792,-9.9949e-08,0.0294346,-0.158144,0.0294346,0.0294346,2.29792,0.0294344,0.200767,-0.0518243,-0.484694,0.484694,-0.0518243,-0.200767,0.484694,-0.0518243,0.200767,0.200767,-0.0518243,0.484694,-0.200767,-0.0518243,0.484694,-0.484694,-0.0518243,0.200767,-2.65127e-08,0.0396712,1.23081e-09,-0.200767,-0.0518243,-0.484694,-0.484694,-0.0518243,-0.200767,-4.41879e-09,-0.14332,6.26471e-09,0.155034,-0.120446,-0.374286,0.146116,0.0167973,-0.352755,-8.83757e-09,-0.0518243,-0.526275,0.372132,-0.0518243,-0.372132,0.374286,-0.120446,-0.155034,0.352755,0.0167973,-0.146116,0.526275,-0.0518243,1.99405e-08,0.374286,-0.120446,0.155034,0.352755,0.0167973,0.146116,0.372132,-0.0518243,0.372132,0.155034,-0.120446,0.374286,0.146116,0.0167973,0.352755,-5.30254e-08,-0.0518243,0.526275,-0.155034,-0.120446,0.374286,-0.146116,0.0167973,0.352755,-0.372132,-0.0518243,0.372132,-0.374286,-0.120446,0.155034,-0.352755,0.0167973,0.146116,-0.526275,-0.0518243,-2.15347e-09,-0.374286,-0.120446,-0.155034,-0.352755,0.0167973,-0.146116,-0.372132,-0.0518243,-0.372132,-0.155034,-0.120446,-0.374286,-0.146116,0.0167973,-0.352755,-1.22744e-08,-0.102655,-0.458889,-1.58365e-08,-0.000993513,-0.43975,0.324483,-0.102655,-0.324483,0.31095,-0.000993505,-0.31095,0.458889,-0.102655,1.90204e-08,0.43975,-0.00099349,1.41709e-08,0.324483,-0.102655,0.324483,0.31095,-0.000993475,0.31095,-4.13407e-08,-0.102655,0.458889,-4.24507e-08,-0.000993468,0.43975,-0.324483,-0.102655,0.324483,-0.31095,-0.000993475,0.31095,-0.458889,-0.102655,2.12973e-09,-0.43975,-0.00099349,-2.11351e-09,-0.324483,-0.102655,-0.324483,-0.31095,-0.000993505,-0.31095],
"morphTargets" : [],
"normals" : [0.541551,0,0.840663,0.564623,-0.655873,-0.500992,0.564623,0.655873,-0.500992,-0.564623,0.655873,-0.500992,-0.564623,-0.655873,-0.500992,-0.541551,0,0.840663,0,-0.630238,0.77636,0,0.630238,0.77636,-0.548967,0.630238,0.548967,-0.548967,-0.630238,0.548967,-0.77636,0.630238,0,-0.77636,-0.630238,0,-0.548967,0.630238,-0.548967,-0.548967,-0.630238,-0.548967,0,0.630238,-0.77636,0,-0.630238,-0.77636,0.548967,0.630238,-0.548967,0.548967,-0.630238,-0.548967,0.77636,0.630238,0,0.77636,-0.630238,0,0.548967,0.630238,0.548967,0.548967,-0.630238,0.548967,0.382336,0.040956,-0.923093,0.115574,-0.953276,-0.279031,0,-0.92172,-0.387768,0,0.037935,-0.999268,0,0.940123,-0.34077,0.099704,0.965453,-0.24073,0.240974,0.940123,-0.240974,0.706595,0.037935,-0.706595,0.274178,-0.92172,-0.274178,0.923093,0.040956,-0.382336,0.279031,-0.953276,-0.115574,0.24073,0.965453,-0.099704,0.34077,0.940123,0,0.999268,0.037935,0,0.387768,-0.92172,0,0.923093,0.040956,0.382336,0.279031,-0.953276,0.115574,0.24073,0.965453,0.099704,0.240974,0.940123,0.240974,0.706595,0.037935,0.706595,0.274178,-0.92172,0.274178,0.382336,0.040956,0.923093,0.115574,-0.953276,0.279031,0.099704,0.965453,0.24073,0,0.940123,0.34077,0,0.037935,0.999268,0,-0.92172,0.387768,-0.382336,0.040956,0.923093,-0.115574,-0.953276,0.279031,-0.099704,0.965453,0.24073,-0.240974,0.940123,0.240974,-0.706595,0.037935,0.706595,-0.274178,-0.92172,0.274178,-0.923093,0.040956,0.382336,-0.279031,-0.953276,0.115574,-0.24073,0.965453,0.099704,-0.34077,0.940123,0,-0.999268,0.037935,0,-0.387768,-0.92172,0,0,1,0,-0.099704,0.965453,-0.24073,-0.240974,0.940123,-0.240974,-0.24073,0.965453,-0.099704,-0.382336,0.040956,-0.923093,-0.115574,-0.953276,-0.279031,-0.274178,-0.92172,-0.274178,-0.706595,0.037935,-0.706595,-0.923093,0.040956,-0.382336,-0.279031,-0.953276,-0.115574,0,-0.999969,0],
"colors" : [16777215,0],
"uvs" : [],
"faces" : [162,0,1,2,0,0,1,2,0,0,0,162,5,4,3,0,3,4,5,0,0,0,163,0,2,5,3,0,0,2,3,5,0,0,0,0,163,1,0,3,4,0,1,0,5,4,0,0,0,0,163,2,1,4,5,0,2,1,4,3,0,0,0,0,35,6,7,9,8,1,6,7,8,9,35,8,9,11,10,1,9,8,10,11,35,10,11,13,12,1,11,10,12,13,35,12,13,15,14,1,13,12,14,15,35,14,15,17,16,1,15,14,16,17,35,16,17,19,18,1,17,16,18,19,34,9,7,21,1,8,7,20,34,9,21,11,1,8,20,10,34,21,19,11,1,20,18,10,34,19,17,11,1,18,16,10,34,17,13,11,1,16,12,10,34,17,15,13,1,16,14,12,35,7,6,20,21,1,7,6,21,20,35,18,19,21,20,1,19,18,20,21,34,6,8,20,1,6,9,21,34,8,10,20,1,9,11,21,34,10,18,20,1,11,19,21,34,10,16,18,1,11,17,19,34,10,12,16,1,11,13,17,34,12,14,16,1,13,15,17,35,22,32,56,34,2,22,23,24,25,35,22,34,57,33,2,22,25,26,27,35,22,33,59,35,2,22,27,28,29,35,22,35,58,32,2,22,29,30,23,35,23,36,58,35,2,31,32,30,29,35,23,35,59,37,2,31,29,28,33,35,23,37,61,38,2,31,33,34,35,35,23,38,60,36,2,31,35,36,32,35,24,39,60,38,2,37,38,36,35,35,24,38,61,40,2,37,35,34,39,35,24,40,63,41,2,37,39,40,41,35,24,41,62,39,2,37,41,42,38,35,25,42,62,41,2,43,44,42,41,35,25,41,63,43,2,43,41,40,45,35,25,43,65,44,2,43,45,46,47,35,25,44,64,42,2,43,47,48,44,35,26,45,64,44,2,49,50,48,47,35,26,44,65,46,2,49,47,46,51,35,26,46,67,47,2,49,51,52,53,35,26,47,66,45,2,49,53,54,50,35,27,48,66,47,2,55,56,54,53,35,27,47,67,49,2,55,53,52,57,35,27,49,69,50,2,55,57,58,59,35,27,50,68,48,2,55,59,60,56,35,28,37,59,33,2,61,33,28,27,35,28,33,57,55,2,61,27,26,62,35,28,55,71,52,2,61,62,63,64,35,28,52,69,49,2,61,64,58,57,35,28,49,67,46,2,61,57,52,51,35,28,46,65,43,2,61,51,46,45,35,28,43,63,40,2,61,45,40,39,35,28,40,61,37,2,61,39,34,33,35,29,54,70,53,2,65,66,67,68,35,29,53,71,55,2,65,68,63,62,35,29,55,57,34,2,65,62,26,25,35,29,34,56,54,2,65,25,24,66,35,30,51,68,50,2,69,70,60,59,35,30,50,69,52,2,69,59,58,64,35,30,52,71,53,2,69,64,63,68,35,30,53,70,51,2,69,68,67,70,35,31,54,56,32,2,71,66,24,23,35,31,32,58,36,2,71,23,30,32,35,31,36,60,39,2,71,32,36,38,35,31,39,62,42,2,71,38,42,44,35,31,42,64,45,2,71,44,48,50,35,31,45,66,48,2,71,50,54,56,35,31,48,68,51,2,71,56,60,70,35,31,51,70,54,2,71,70,67,66],
"bones" : [],
"skinIndices" : [],
"skinWeights" : [],
"animation" : {}
}

View file

@ -0,0 +1,57 @@
{
"metadata" :
{
"formatVersion" : 3.1,
"generatedBy" : "Blender 2.63 Exporter",
"vertices" : 68,
"faces" : 70,
"normals" : 68,
"colors" : 0,
"uvs" : [],
"materials" : 1,
"morphTargets" : 0,
"bones" : 0
},
"scale" : 1.000000,
"materials" : [ {
"DbgColor" : 15658734,
"DbgIndex" : 0,
"DbgName" : "ivory",
"blending" : "NormalBlending",
"colorAmbient" : [0.3, 0.3, 0.3],
"colorDiffuse" : [0.5, 0.5, 0.5],
"colorSpecular" : [0.0, 0.5, 1],
"depthTest" : true,
"depthWrite" : true,
"shading" : "Phong",
"specularCoef" : 10,
"transparency" : 1.0,
"transparent" : false,
"vertexColors" : false
}],
"vertices" : [0.0204362,0.00220886,-0.5724,0.0204361,0.00220891,0.5724,-0.0115407,0.00220891,0.5724,-0.0115406,0.00220886,-0.5724,0.0330968,0.47191,-0.835787,0.0330967,0.47191,0.835788,-0.0242013,0.47191,0.835787,-0.0242012,0.47191,-0.835788,0.123637,0.00220887,-0.417894,0.164332,0.00220888,4.97203e-08,0.123637,0.0022089,0.417894,-0.114742,0.0022089,0.417894,-0.155437,0.00220888,-2.49181e-07,-0.114741,0.00220887,-0.417894,0.218018,0.210941,-0.417893,0.290938,0.137081,4.42359e-07,0.218018,0.210941,0.417894,-0.209123,0.210941,0.417894,-0.282042,0.137081,-1.80351e-07,-0.209123,0.210941,-0.417894,0.00890504,0.0880924,-0.0322877,0.00890504,0.283244,-0.0163856,0.0532564,0.0880924,-0.0139168,0.0420119,0.283244,-0.0026723,0.0716274,0.0880924,0.0304346,0.0557253,0.283244,0.0304346,0.0532564,0.0880924,0.074786,0.0420119,0.283244,0.0635415,0.00890504,0.0880924,0.0931569,0.00890504,0.283244,0.0772548,-0.0354463,0.0880924,0.074786,-0.0242019,0.283244,0.0635415,-0.0538173,0.0880924,0.0304346,-0.0379152,0.283244,0.0304346,-0.0354463,0.0880924,-0.0139168,-0.0242019,0.283244,-0.00267229,0.00890504,0.448288,-0.013581,0.0400288,0.448288,-0.000689161,0.0529207,0.448288,0.0304346,0.0400288,0.448288,0.0615583,0.00890504,0.448288,0.0744502,-0.0222187,0.448288,0.0615583,-0.0351106,0.448288,0.0304346,-0.0222187,0.448288,-0.000689154,0.00890504,0.665461,-0.0696687,0.0796888,0.665461,-0.0403492,0.109008,0.665461,0.0304346,0.0796888,0.665461,0.101218,0.00890503,0.665461,0.130538,-0.0618787,0.665461,0.101218,-0.0911983,0.665461,0.0304346,-0.0618787,0.665461,-0.0403491,0.00890504,0.775492,-0.17006,0.150676,0.775492,-0.111336,0.209399,0.775492,0.0304346,0.150676,0.775492,0.172205,0.00890503,0.775492,0.230929,-0.132866,0.775492,0.172205,-0.191589,0.775492,0.0304346,-0.132866,0.775492,-0.111336,0.00890504,0.818626,-0.0163856,0.0420119,0.818626,-0.00267232,0.0557253,0.818626,0.0304346,0.0420119,0.818626,0.0635415,0.00890504,0.818626,0.0772548,-0.0242019,0.818626,0.0635414,-0.0379152,0.818626,0.0304346,-0.0242019,0.818626,-0.00267231],
"morphTargets" : [],
"normals" : [0.531663,-0.811274,0.243233,0.330912,-0.778954,0.53264,-0.330912,-0.778954,0.53264,-0.531663,-0.811274,0.243233,0.892178,0.439741,0.103,-0.892178,0.439741,0.103,-0.453536,0.634785,0.625538,0.453536,0.634785,0.625538,-0.531663,-0.811274,-0.243233,-0.892178,0.439741,-0.103,-0.453536,0.634785,-0.625538,-0.330912,-0.778954,-0.53264,0.453536,0.634785,-0.625538,0.330912,-0.778954,-0.53264,0.531663,-0.811274,-0.243233,0.500992,-0.865413,0,-0.500992,-0.865413,0,0.892178,0.439741,-0.103,-0.925779,0.378033,0,0.925779,0.378033,0,0,-0.599506,-0.800348,0,0.049501,-0.998749,0.706229,0.049501,-0.706229,0.565935,-0.599506,-0.565935,0.998749,0.049501,0,0.800348,-0.599506,0,0.706229,0.049501,0.706229,0.565935,-0.599506,0.565935,0,0.049501,0.998749,0,-0.599506,0.800348,-0.706229,0.049501,0.706229,-0.565935,-0.599506,0.565935,-0.998749,0.049501,0,-0.800348,-0.599506,0,-0.706229,0.049501,-0.706229,-0.701834,-0.121616,-0.701834,0,-0.121616,-0.992553,-0.565935,-0.599506,-0.565935,0.701834,-0.121616,0.701834,0.992553,-0.121616,0,0.864498,-0.502609,0,0.611286,-0.502609,0.611286,0.701834,-0.121616,-0.701834,0,-0.121616,0.992553,-0.701834,-0.121616,0.701834,-0.992553,-0.121616,0,0.611286,-0.502609,-0.611286,0,-0.502609,-0.864498,0,0.232368,-0.972594,0.687735,0.232368,-0.687735,-0.611286,-0.502609,0.611286,-0.864498,-0.502609,0,0,-0.502609,0.864498,-0.611286,-0.502609,-0.611286,0.972594,0.232368,0,0.119846,0.985504,-0.119846,0.169469,0.985504,0,0.687735,0.232368,0.687735,0,0.232368,0.972594,-0.972594,0.232368,0,-0.687735,0.232368,-0.687735,-0.687735,0.232368,0.687735,-0.119846,0.985504,0.119846,0,0.985504,0.169469,0.119846,0.985504,0.119846,-0.169469,0.985504,0,-0.119846,0.985504,-0.119846,0,0.985504,-0.169469],
"colors" : [],
"uvs" : [[]],
"faces" : [35,10,1,2,11,0,0,1,2,3,35,16,17,6,5,0,4,5,6,7,35,10,16,5,1,0,0,4,7,1,35,1,5,6,2,0,1,7,6,2,35,13,19,7,3,0,8,9,10,11,35,4,0,3,7,0,12,13,11,10,35,0,8,13,3,0,13,14,8,11,35,8,9,12,13,0,14,15,16,8,35,9,10,11,12,0,15,0,3,16,35,4,7,19,14,0,12,10,9,17,35,14,19,18,15,0,17,9,18,19,35,15,18,17,16,0,19,18,5,4,35,0,4,14,8,0,13,12,17,14,35,8,14,15,9,0,14,17,19,15,35,9,15,16,10,0,15,19,4,0,35,2,6,17,11,0,2,6,5,3,35,11,17,18,12,0,3,5,18,16,35,12,18,19,13,0,16,18,9,8,35,20,21,23,22,0,20,21,22,23,35,22,23,25,24,0,23,22,24,25,35,24,25,27,26,0,25,24,26,27,35,26,27,29,28,0,27,26,28,29,35,28,29,31,30,0,29,28,30,31,35,30,31,33,32,0,31,30,32,33,35,21,35,43,36,0,21,34,35,36,35,34,35,21,20,0,37,34,21,20,35,32,33,35,34,0,33,32,34,37,34,26,28,30,0,27,29,31,34,24,26,30,0,25,27,31,34,24,30,32,0,25,31,33,34,24,32,34,0,25,33,37,34,22,24,34,0,23,25,37,34,20,22,34,0,20,23,37,35,39,38,46,47,0,38,39,40,41,35,25,23,37,38,0,24,22,42,39,35,27,25,38,39,0,26,24,39,38,35,23,21,36,37,0,22,21,36,42,35,29,27,39,40,0,28,26,38,43,35,31,29,40,41,0,30,28,43,44,35,33,31,41,42,0,32,30,44,45,35,35,33,42,43,0,34,32,45,35,35,45,44,52,53,0,46,47,48,49,35,42,41,49,50,0,45,44,50,51,35,38,37,45,46,0,39,42,46,40,35,41,40,48,49,0,44,43,52,50,35,36,43,51,44,0,36,35,53,47,35,37,36,44,45,0,42,36,47,46,35,40,39,47,48,0,43,38,41,52,35,43,42,50,51,0,35,45,51,53,35,54,53,61,62,0,54,49,55,56,35,48,47,55,56,0,52,41,57,58,35,51,50,58,59,0,53,51,59,60,35,47,46,54,55,0,41,40,54,57,35,50,49,57,58,0,51,50,61,59,35,46,45,53,54,0,40,46,49,54,35,49,48,56,57,0,50,52,58,61,35,44,51,59,52,0,47,53,60,48,34,65,64,63,0,62,63,64,34,65,63,62,0,62,64,56,34,66,65,62,0,65,62,56,34,67,66,62,0,66,65,56,34,61,67,62,0,55,66,56,34,61,60,67,0,55,67,66,35,57,56,64,65,0,61,58,63,62,35,52,59,67,60,0,48,60,66,67,35,53,52,60,61,0,49,48,67,55,35,56,55,63,64,0,58,57,64,63,35,59,58,66,67,0,60,59,65,66,35,55,54,62,63,0,57,54,56,64,35,58,57,65,66,0,59,61,62,65],
"bones" : [],
"skinIndices" : [],
"skinWeights" : [],
"animation" : {}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View file

@ -0,0 +1,63 @@
{
"metadata" :
{
"formatVersion" : 3.1,
"generatedBy" : "Blender 2.63 Exporter",
"vertices" : 20,
"faces" : 18,
"normals" : 20,
"colors" : 0,
"uvs" : [33],
"materials" : 1,
"morphTargets" : 0,
"bones" : 0
},
"scale" : 1.000000,
"materials" : [ {
"DbgColor" : 15658734,
"DbgIndex" : 0,
"DbgName" : "Material",
"blending" : "NormalBlending",
"colorAmbient" : [0.6400000190734865, 0.6400000190734865, 0.6400000190734865],
"colorDiffuse" : [0.6400000190734865, 0.6400000190734865, 0.6400000190734865],
"colorSpecular" : [0.8, 0.8, 0.8],
"depthTest" : true,
"depthWrite" : true,
"mapDiffuse" : "wood-texture.jpg",
"mapDiffuseWrap" : ["repeat", "repeat"],
"mapDiffuseRepeat" : [5, 5],
"mapSpecular" : "wood-texture.jpg",
"mapSpecularWrap" : ["repeat", "repeat"],
"mapSpecularRepeat" : [5, 5],
"shading" : "Phong",
"specularCoef" : 50,
"transparency" : 1.0,
"transparent" : false,
"vertexColors" : false
}],
"vertices" : [2.5,-0.0905001,-2.5,2.5,-0.0904999,2.5,-2.5,-0.0904999,2.5,-2.5,-0.0905001,-2.5,2.5,0.0904999,-2.5,2.5,0.0905001,2.5,-2.5,0.0905001,2.5,-2.5,0.0904999,-2.5,2.4875,0.114493,-2.4875,2.4875,0.114494,2.4875,-2.4875,0.114494,2.4875,-2.4875,0.114493,-2.4875,2.46263,0.150374,-2.46262,2.46262,0.150374,2.46263,-2.46262,0.150374,2.46262,-2.46262,0.150374,-2.46262,2.475,-0.126776,-2.475,2.475,-0.126776,2.475,-2.475,-0.126776,2.475,-2.475,-0.126776,-2.475],
"morphTargets" : [],
"normals" : [0.66802,-0.327799,-0.66802,0.66802,-0.327799,0.66802,0.371258,-0.85107,0.371258,0.371258,-0.85107,-0.371258,0.679434,0.276925,-0.679434,-0.679434,0.276925,-0.679434,-0.547685,0.632466,-0.547685,0.547685,0.632466,-0.547685,0.679434,0.276925,0.679434,-0.679434,0.276925,0.679434,-0.66802,-0.327799,0.66802,-0.66802,-0.327799,-0.66802,-0.547685,0.632466,0.547685,-0.370159,0.852016,0.370159,-0.370159,0.852016,-0.370159,0.547685,0.632466,0.547685,0.370159,0.852016,-0.370159,0.370159,0.852016,0.370159,-0.371258,-0.85107,0.371258,-0.371258,-0.85107,-0.371258],
"colors" : [],
"uvs" : [[0.336969,0.946356,0.336969,0.048872,0.387407,0.048872,0.387407,0.946356,0.086341,0.946356,0.086341,0.049949,0.053154,0.049949,0.053154,0.946356,0.086341,0.048872,0.336969,0.046397,0.086341,0.046397,0.086341,0.945928,0.336969,0.945928,0.336969,0.049949,0.053154,0.945928,0.003472,0.945928,0.003472,0.049949,0.053154,0.046397,0.053154,0.048872,0.999939,0.992014,0.394095,0.992014,0.394095,0.38617,0.999938,0.38617,0.003472,0.946356,0.003472,0.048872,0.003472,0.046397,0.890783,0.380278,0.517288,0.380277,0.517288,0.006783,0.890783,0.006783,0.387407,0.049949,0.387407,0.945928,0.387407,0.046397]],
"faces" : [43,0,1,17,16,0,0,1,2,3,0,1,2,3,43,4,7,11,8,0,4,5,6,7,4,5,6,7,43,0,4,5,1,0,0,4,8,1,0,4,8,1,43,1,5,6,2,0,9,10,11,12,1,8,9,10,43,2,6,7,3,0,12,11,5,13,10,9,5,11,43,4,0,3,7,0,4,0,13,5,4,0,11,5,43,11,10,14,15,0,6,14,15,16,6,12,13,14,43,6,5,9,10,0,11,10,17,14,9,8,15,12,43,7,6,10,11,0,5,11,14,6,5,9,12,6,43,5,4,8,9,0,8,4,7,18,8,4,7,15,43,12,15,14,13,0,19,20,21,22,16,14,13,17,43,9,8,12,13,0,18,7,23,24,15,7,16,17,43,8,11,15,12,0,7,6,16,23,7,6,14,16,43,10,9,13,14,0,14,17,25,15,12,15,17,13,43,16,17,18,19,0,26,27,28,29,3,2,18,19,43,3,0,16,19,0,13,0,3,30,11,0,3,19,43,2,3,19,18,0,12,13,30,31,10,11,19,18,43,1,2,18,17,0,9,12,31,32,1,10,18,2],
"bones" : [],
"skinIndices" : [],
"skinWeights" : [],
"animation" : {}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

View file

@ -0,0 +1,117 @@
<style type='text/css'>
img.imgfit {
width: auto !important;
width: 100%;
max-width: 100%;
display: block;
margin-left: auto;
margin-right: auto
}
</style>
<h2>But du jeu</h2>
<p>Amener l'Amiral sur la dernière ligne ou capturer l'Amiral adverse.</p>
<h2>Pièces</h2>
<p>Chaque joueur dispose de:</p>
<table style="width: 100%; background-color: White;">
<tr>
<td>Un AMIRAL</td>
<td><img src="{GAME}/res/images/amiral.png" class="imgfit"/></td>
</tr>
<tr>
<td>Deux GALIONS</td>
<td><img src="{GAME}/res/images/big.png" class="imgfit"/></td>
</tr>
<tr>
<td>Un ROCHER</td>
<td><img src="{GAME}/res/images/rock.png" class="imgfit"/></td>
</tr>
<tr>
<td>Quatre CHEBECS</td>
<td><img src="{GAME}/res/images/small.png" class="imgfit"/></td>
</tr>
</table>
<h2>Position de départ</h2>
<img style="width: 100%;" src="{GAME}/res/images/starting.png"/>
<h2>Déroulement du jeu</h2>
<p>Chacun leur tour les joueurs se déplacent ou capturent.</p>
<p>Si on se déplace, on déplace deux de ses pièces (différentes).</p>
<p>Si on capture, on enlève une et une seule pièce de l'adversaire sans déplacer aucune de ses propres pièces.</p>
<p>Les Blancs commencent et pour ce premier coup ne déplacent exceptionnellement qu'une seule pièce.</p>
<h2>Déplacement des pièces</h2>
<img style="width: 100%;" src="{GAME}/res/images/moving-pieces.jpg"/>
<p>Les bateaux se déplacent en ligne droite dans n'importe quelle direction sauf face au vent.
L'Amiral d'une seule case,Le Galion d'une ou deux, le Chébec d'une, deux ou trois cases.
Le rocher de n'importe quel nombre de cases, dans les 6 directions y compris face au vent.
Aucune pièce ne peut sauter par dessus une autre.</p>
<h2>Capture des bateaux</h2>
<p>Un bateau est capturable s'il est au contact d'un ou plusieurs bateaux adverses dont le total des forces est supérieur.
La capture n'est pas obligatoire.</p>
<h3>Force des bateaux</h3>
<ul>
<li>AMIRAL: <strong>5</strong></li>
<li>GALION: <strong>3</strong></li>
<li>CHEBEC: <strong>2</strong></li>
</ul>
<p>Exemples de captures</p>
<ul>
<li>L'AMIRAL peut prendre un GALION</li>
<li>Un GALION peut prendre un CHEBEC</li>
<li>Deux CHEBECS peuvent prendre un GALION</li>
<li>Les deux GALIONS peuvent prendre l'AMIRAL</li>
<li>Trois CHEBECS peuvent prendre l'AMIRAL</li>
<li>etc</li>
</ul>
<p>Le ROCHER ne peut pas prendre et n'est pas pris.</p>
<h3>Règle d'Arno</h3>
<p>Un AMIRAL capturable doit se libérer dès sa première action (capture ou déplacement).</p>
<h2>Exemples de prises</h2>
<table style="width: 100%; background-color: White;">
<tr>
<td>
<img src="{GAME}/res/images/capture1.png" style="width: 100%;"/>
<p>Les deux CHEBECS noirs prennent le GALION blanc. Le GALION blanc prend un CHEBEC au choix.</p>
</td>
<td>
<img src="{GAME}/res/images/capture2.png" style="width: 100%;"/>
<p>L'AMIRAL noir prend un CHEBEC au choix. Les trois CHEBECS blancs prennent l'AMIRAL noir.</p>
</td>
</tr>
<tr>
<td>
<img src="{GAME}/res/images/capture3.png" style="width: 100%;"/>
<p>Les Blancs prennent l'AMIRAL noir. Les Noirs prennent l'AMIRAL blanc.</p>
</td>
<td>
<img src="{GAME}/res/images/capture4.png" style="width: 100%;"/>
<p>Règle d'Arno: L'AMIRAL blanc ne peut pas se libérer par une première action. Les Noirs gagnent.</p>
</td>
</tr>
</table>
<h3>Règle additionnelle (Compétition)</h3>
<p>Le score est différent selon le type de victoire:</p>
<ul>
<li><i>1 point</i>: L'AMIRAL atteint la dernière ligne</li>
<li><i>2 points</i>: L'AMIRAL adverse est capturé</li>
</ul>

117
src/games/yohoho/rules.html Normal file
View file

@ -0,0 +1,117 @@
<style type='text/css'>
img.imgfit {
width: auto !important;
width: 100%;
max-width: 100%;
display: block;
margin-left: auto;
margin-right: auto
}
</style>
<h2>Aim</h2>
<p>Bring your ADMIRAL to the last row or capture the opponent ADMIRAL.</p>
<h2>Material</h2>
<p>Each player owns:</p>
<table style="width: 100%; background-color: White;">
<tr>
<td>One ADMIRAL</td>
<td><img src="{GAME}/res/images/amiral.png" class="imgfit"/></td>
</tr>
<tr>
<td>Two GALLEONs</td>
<td><img src="{GAME}/res/images/big.png" class="imgfit"/></td>
</tr>
<tr>
<td>One ROCK</td>
<td><img src="{GAME}/res/images/rock.png" class="imgfit"/></td>
</tr>
<tr>
<td>Four FRIGATEs</td>
<td><img src="{GAME}/res/images/small.png" class="imgfit"/></td>
</tr>
</table>
<h2>Starting position</h2>
<img style="width: 100%;" src="{GAME}/res/images/starting.png"/>
<h2>Playing Yohoho!</h2>
<p>Players take alternate turns either moving ships or capturing.</p>
<p>When moving ships, a player must move two different pieces of his color.</p>
<p>When capturing, he takes one and only one of the opponent ships without moving any of his pieces.</p>
<p>White starts and exceptionnally, only moves one piece.</p>
<h2>Moving pieces</h2>
<img style="width: 100%;" src="{GAME}/res/images/moving-pieces.jpg"/>
<p>The ships move in straight line in any board direction except facing the wind. The ADMIRAL moves one cell per turn,
the GALLEON, one or two, the FRIGATE, one, two or three. The ROCK can move any number of cells in any of the 6 directions,
including facing the wind. No piece can jump over another one.</p>
<h2>Capturing ships</h2>
<p>A ship can be captured if it is adjacent to one or several opponent ships of superior combined strength.
Capturing is not compulsory.</p>
<h3>Ships strength</h3>
<ul>
<li>ADMIRAL: <strong>5</strong></li>
<li>GALLEON: <strong>3</strong></li>
<li>FRIGATE: <strong>2</strong></li>
</ul>
<p>For instance</p>
<ul>
<li>An ADMIRAL can capture a GALLEON</li>
<li>A GALLEON can capture a FRIGATE</li>
<li>Two FRIGATE can capture a GALLEON</li>
<li>Two GALLEON can capture the ADMIRAL</li>
<li>Three FRIGATE can capture the ADMIRAL</li>
<li>...</li>
</ul>
<p>ROCKS cannot capture and cannot be captured.</p>
<h3>Additional rule (Arno rule)</h3>
<p>A capturable ADMIRAL must escape the threat by its first action (capture or the first of both moves).</p>
<h2>Capture situations</h2>
<table style="width: 100%; background-color: White;">
<tr>
<td>
<img src="{GAME}/res/images/capture1.png" style="width: 100%;"/>
<p>The two black FRIGATE capture the white GALLEON. The white GALLEON captures either FRIGATE.</p>
</td>
<td>
<img src="{GAME}/res/images/capture2.png" style="width: 100%;"/>
<p>The black ADMIRAL captures any of the white FRIGATEs. The three white FRIGATEs capture the black ADMIRAL.</p>
</td>
</tr>
<tr>
<td>
<img src="{GAME}/res/images/capture3.png" style="width: 100%;"/>
<p>White captures the black ADMIRAL. Black captures the white ADMIRAL.</p>
</td>
<td>
<img src="{GAME}/res/images/capture4.png" style="width: 100%;"/>
<p>Arno rule: The white ADMIRAL cannot escape at first. Black wins.</p>
</td>
</tr>
</table>
<h3>Additional rule (Competition)</h3>
<p>When played in competition, winners get points depending on the game outcome:</p>
<ul>
<li><i>1 point</i>: the ADMIRAL reached the last row</li>
<li><i>2 points</i>: the opponent ADMIRAL was captured</li>
</ul>

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View file

@ -0,0 +1,760 @@
/*
*
* Copyright (c) 2012 - Jocly - www.jocly.com
*
* This file is part of the Jocly game platform and cannot be used outside of this context without the written permission of Jocly.
*
*/
Model.Game.InitGame = function() {
this.HexInitGame();
this.g.GetStrengthByType=function(type) {
switch(type) {
case 'C': return 5;
case 'c': return 3;
case 'p': return 2;
default: return 0;
}
}
this.g.distAmiralToLastRowSubFactor={ "-1": 10, "0":0, "1": -10 };
this.g.distAmiralToLastRowFactor=3;
this.g.pieceWeight={
c: 2,
p: 1,
C: 0,
r: 0,
}
this.g.weightFactor=3;
this.g.GainOtherAmiralDist=[0,15,4,2,1,0.7,0.6,0.5,0.4,0.3,0.2,0.1,0];
this.g.GainSelfAmiralDist=[0,5,4,2,1,0.7,0.6,0.5,0.4,0.3,0.2,0.1,0];
this.g.gainOtherAmiralDistSubFactor=1;
this.g.gainSelfAmiralDistSubFactor=1;
this.g.yohohoFactor=2;
this.g.MoveCount=22;
var $this=this;
this.g.Dist=function(pos1,pos2) {
if(pos1==pos2)
return 0;
if(pos2<pos1) {
var tmp=pos1;
pos1=pos2;
pos2=tmp;
}
return $this.g.DistArray[pos1][pos2-pos1-1];
}
var NBCELLS=this.g.Graph.length;
this.g.DistArray=[];
for(var i=0;i<NBCELLS-1;i++) {
var line=[];
for(var j=0;j<NBCELLS-i;j++)
line.push(-1);
this.g.DistArray.push(line);
}
this.g.SetDist=function(pos1,pos2,dist) {
if(pos1==pos2)
return;
if(pos2<pos1) {
var tmp=pos1;
pos1=pos2;
pos2=tmp;
}
$this.g.DistArray[pos1][pos2-pos1-1]=dist;
}
for(var pos=0;pos<NBCELLS;pos++) {
this.YohohoEachDirection(pos,function(pos1) {
if(pos<pos1) {
var dist=$this.g.Dist(pos,pos1);
if(dist<0)
$this.g.SetDist(pos,pos1,1);
}
return true;
});
}
for(var pos=0;pos<NBCELLS;pos++) {
this.YohohoEachDirection(pos,function(pos1) {
if(pos<pos1) {
for(var pos2=0;pos2<NBCELLS;pos2++) {
var dist2=$this.g.Dist(pos2,pos);
if(dist2>=0) {
var dist3=$this.g.Dist(pos2,pos1);
if(dist3==-1 || dist2+1<dist3)
$this.g.SetDist(pos2,pos1,dist2+1);
}
}
}
return true;
});
}
}
/* Constructs an instance of the Move object for the game.
* args is either an empty object ({}), or contains the data passed to the InitUI parameter.
*/
Model.Move.Init = function(args) {
if(typeof(args)!="undefined")
this.CopyFrom(args);
}
/* Optional method.
* Copy the given board data to self.
* Even if optional, it is better to implement the method for performance reasons.
*/
Model.Move.CopyFrom = function(args) {
this.t=args.t; // move type: 'm' move 2 pieces or 'a': attack
if(args.t=='m') {
this.m=[{
f: args.m[0].f, // first sub-move from
t: args.m[0].t, // first sub-move to
},{
f: args.m[1].f, // second sub-move from
t: args.m[1].t, // second sub-move to
}]
} else if(args.t=='a') {
this.af=[];
for(var i in args.af)
this.af.push(args.af[i]);
this.at=args.at;
}
}
/* Optional method.
* Returns a string to represent the move for display to human. If not defined JSON is used.
*/
Model.Move.ToString = function() {
var str;
if(this.t=='m') {
str="M "+this.m[0].f+">"+this.m[0].t;
if(typeof this.m[1].f!="undefined")
str+=" "+this.m[1].f+">"+this.m[1].t;
} else {
str="A "+this.af.join(",")+">"+this.at;
}
return str;
}
Model.Board.InitialPosition = function(aGame) {
this.HexInit(aGame);
this.first=true;
this.yohoho=false;
this.amirals={};
for(var i in this.pieces) {
var piece=this.pieces[i];
if(piece.type=='C')
this.amirals[piece.s]=i;
if(piece.s==JocGame.PLAYER_A)
piece.angle=0;
else
piece.angle=180;
}
this.piecesWeight={ "-1": 8, "1": 8, };
}
/* Push into the mMoves array, every moves that must be explored from this position.
* All possible moves may not be considered, for instance if a game has many possible
* different moves for a given board (like the game of GO). However, if not all possible
* moves are pushed, method IsValidMove must be implemented to validate human input moves.
*/
Model.Board.GenerateMoves = function(aGame) {
//JocLog("mLevelInfo",aGame.mLevelInfo);
var lastRowRace=false;
var moveCount=aGame.g.MoveCount;
if(typeof aGame.mLevelInfo!="undefined") {
if(typeof(aGame.mLevelInfo.rowRaceLevel)!="undefined")
lastRowRace=(aGame.mCurrentLevel>=0 && aGame.mCurrentLevel<=aGame.mLevelInfo.rowRaceLevel);
if(typeof(aGame.mLevelInfo.moveCount)!="undefined")
moveCount=aGame.mLevelInfo.moveCount;
}
//JocLog("GenerateMoves",aGame.mCurrentLevel,"/",aGame.mTopLevel,"lastRowRace",lastRowRace,typeof lastRowRace);
var $this=this;
var selfAmiralPos=this.pieces[this.amirals[this.mWho]].pos;
var otherAmiralPos=this.pieces[this.amirals[-this.mWho]].pos;
var otherAmiralRow=aGame.g.Coord[otherAmiralPos][0];
var otherAmiralNextRow=otherAmiralRow-this.mWho;
//JocLog("Position amiral self",selfAmiralPos,"other",otherAmiralPos);
var subMovesMap={};
var subMoves=[];
var subMovesLastRow=[];
var pieces=this.pieces;
if(lastRowRace)
pieces=[this.pieces[this.amirals[this.mWho]]];
for(var i in pieces) {
var piece=pieces[i];
if(piece.s==this.mWho && piece.alive) {
var poss=this.YohohoReachablePositionsThrough(aGame,piece.pos,piece.type);
//JocLog("Poss",piece.pos,poss);
for(var j in poss) {
var subMove={ f: piece.pos, t: poss[j].pos, index:i, reqEmpty: poss[j].reqEmpty };
//subMove.d2Self=aGame.g.Dist(piece.pos,selfAmiralPos);
//subMove.d2Other=aGame.g.Dist(piece.pos,otherAmiralPos);
var eval=0;
if(piece.type=='C') {
var coord=aGame.g.Coord[piece.pos];
var frow=coord[0];
var fdistToLastRow=(this.mWho==JocGame.PLAYER_A?8-frow:frow);
coord=aGame.g.Coord[subMove.t];
var trow=coord[0];
var tdistToLastRow=(this.mWho==JocGame.PLAYER_A?8-trow:trow);
if(tdistToLastRow==0 && this.board[subMove.t]==-1)
subMovesLastRow.push(subMove);
eval+=12;
eval+=aGame.g.distAmiralToLastRowSubFactor[tdistToLastRow-fdistToLastRow];
} else if(piece.type=='c') {
eval+=1;
}
/*
var distSelfAmiral0=aGame.g.Dist(subMove.f,selfAmiralPos);
var distSelfAmiral1=aGame.g.Dist(subMove.t,selfAmiralPos);
var distOtherAmiral0=aGame.g.Dist(subMove.f,otherAmiralPos);
var distOtherAmiral1=aGame.g.Dist(subMove.t,otherAmiralPos);
var gainSelfAmiralDist=aGame.g.GainSelfAmiralDist[distSelfAmiral1]-aGame.g.GainSelfAmiralDist[distSelfAmiral0];
var gainOtherAmiralDist=aGame.g.GainOtherAmiralDist[distOtherAmiral1]-aGame.g.GainOtherAmiralDist[distOtherAmiral0];
*/
var distSelfAmiral1=aGame.g.Dist(subMove.t,selfAmiralPos);
var distOtherAmiral1=aGame.g.Dist(subMove.t,otherAmiralPos);
var gainSelfAmiralDist=aGame.g.GainSelfAmiralDist[distSelfAmiral1];
var gainOtherAmiralDist=aGame.g.GainOtherAmiralDist[distOtherAmiral1];
if(distOtherAmiral1==2 && (piece.type=='c' || piece.type=='p')) {
aGame.YohohoEachDirection(subMove.t,function(pos) {
if($this.board[pos]==-1 && aGame.g.Dist(pos,otherAmiralPos)==1 && aGame.g.Dist(pos,selfAmiralPos)==1 && aGame.g.Coord[pos][0]==otherAmiralNextRow ) {
eval+=3;
return false;
}
return true;
});
}
var gainAmiralDist=Math.max(gainSelfAmiralDist*aGame.g.gainSelfAmiralDistSubFactor,gainOtherAmiralDist*aGame.g.gainOtherAmiralDistSubFactor);
eval+=gainAmiralDist;
subMove.eval=eval;
if(typeof subMovesMap[subMove.index]=="undefined")
subMovesMap[subMove.index]=[];
subMovesMap[subMove.index].push(subMove);
}
}
}
if(subMovesLastRow.length>0) {
for(var i in subMovesLastRow) {
var subMove=subMovesLastRow[i];
this.mMoves.push({ t: 'm', m: [{f:subMove.f, t:subMove.t }, { }] });
}
return;
}
var subMovesPool=[];
for(var index in subMovesMap) {
var subMovesByPiece=subMovesMap[index];
subMovesByPiece.sort(function(a,b) {
return b.eval-a.eval;
});
subMovesPool.push(subMovesByPiece);
}
subMovesPool.sort(function(a,b) {
return b[0].eval-a[0].eval;
});
//JocLog("subMovesPool",subMovesPool);
var i1=1;
var i2=0;
while(subMovesPool.length>0) {
subMoves.push(subMovesPool[i2].shift());
if(subMovesPool[i2].length==0) {
subMovesPool.splice(i2,1);
i1--;
} else
i2++;
if(i2==i1) {
if(i1<subMovesPool.length)
i1++;
i2=0;
}
}
//JocLog("GenerateMoves subMoves",subMoves);
if(lastRowRace) {
//JocLog("lastRowRace",subMoves);
var keptSubMoves=[];
var bestRowGain=-1;
for(var i in subMoves) {
var subMove=subMoves[i];
var rowGain=(aGame.g.Coord[subMove.t][0]-aGame.g.Coord[subMove.t][0])*this.mWho;
if(rowGain==bestRowGain)
keptSubMoves.push(subMove);
else if(rowGain>bestRowGain) {
bestRowGain=rowGain;
keptSubMoves=[subMove];
}
}
this.mMoves=this.YohohoCaptures(aGame,this.mWho);
for(var i in keptSubMoves) {
var subMove=keptSubMoves[i];
if(this.board[subMove.t]==-1)
this.mMoves.push({t:'m',m:[{ f: subMove.f, t: subMove.t },{}]})
}
//JocLog("GenerateMoves moves",moves);
if(this.mMoves.length==0) {
this.mFinished=true;
this.mWinner=JocGame.DRAW;
}
return;
}
function CompatibleSubMoves(sm1,sm2) {
if(sm1.index==sm2.index)
return false;
//if(sm1.f==sm2.f)
// JocLog("%",sm1,sm2);
for(var i in sm1.reqEmpty) {
var emptyPos=sm1.reqEmpty[i];
if($this.board[emptyPos]!=-1)
return false;
}
for(var i in sm2.reqEmpty) {
var emptyPos=sm2.reqEmpty[i];
if(emptyPos==sm1.t)
return false;
if($this.board[emptyPos]!=-1 && emptyPos!=sm1.f)
return false;
}
if(sm1.t==sm2.t)
return false;
return true;
}
var moves=[];
var amiralCapture=this.YohohoAmiralCapture(aGame,this.mWho);
//JocLog("Amiral capture",amiralCapture);
if(amiralCapture.risk) {
for(var i in amiralCapture.capture) {
var capture=amiralCapture.capture[i];
var af=JSON.parse(JSON.stringify(capture.af));
this.mMoves.push({ t:'a', af:af, at:capture.at });
}
for(var j=0;j<subMoves.length && moves.length<moveCount;j++)
for(var i=0;i<amiralCapture.escape.length && moves.length<moveCount;i++) {
var amiralIndex=this.amirals[this.mWho];
var amiralPiece=this.pieces[amiralIndex];
var escapeSubmove={ f: amiralPiece.pos, t: amiralCapture.escape[i].t, index: amiralIndex, reqEmpty: [amiralCapture.escape[i].t] };
if(subMoves[j].index!=amiralIndex) {
var valid=CompatibleSubMoves(escapeSubmove,subMoves[j]);
if(valid)
moves.push({ t: 'm', m: [{f: escapeSubmove.f, t: escapeSubmove.t },{f:subMoves[j].f, t:subMoves[j].t }] });
else if(CompatibleSubMoves(subMoves[j],escapeSubmove))
moves.push({ t: 'm', m: [{f:subMoves[j].f, t:subMoves[j].t },{f: escapeSubmove.f, t: escapeSubmove.t }] });
}
}
this.mMoves=this.mMoves.concat(moves);
//JocLog("GenerateMoves moves",moves);
if(this.mMoves.length==0) {
this.mFinished=true;
this.mWinner=-this.mWho;
}
return;
}
if(this.first) {
for(var j=0;j<i && moves.length<moveCount;j++)
if(this.board[subMoves[j].t]==-1)
moves.push({ t: 'm', m: [{f:subMoves[j].f, t:subMoves[j].t }, { }] });
} else {
for(var i=1;i<subMoves.length && moves.length<moveCount;i++)
for(var j=0;j<i && moves.length<moveCount;j++) {
if(subMoves[i].index!=subMoves[j].index)
if(CompatibleSubMoves(subMoves[i],subMoves[j]))
moves.push({ t: 'm', m: [{ f:subMoves[i].f, t:subMoves[i].t },{ f:subMoves[j].f, t:subMoves[j].t }] });
else if(CompatibleSubMoves(subMoves[j],subMoves[i]))
moves.push({ t: 'm', m: [{ f:subMoves[j].f, t:subMoves[j].t },{ f:subMoves[i].f, t:subMoves[i].t }] });
}
}
this.mMoves=this.YohohoCaptures(aGame,this.mWho);
this.mMoves=this.mMoves.concat(moves);
//JocLog("GenerateMoves moves",moves);
if(this.mMoves.length==0) {
this.mFinished=true;
this.mWinner=-this.mWho;
}
}
/* Optional method.
* If not defined, verification is made by checking move is equal to one of the moves generated by GenerateMove
*/
Model.Board.IsValidMove = function(aGame,move) {
// TODO: truly verify move validity to prevent hacked clients in duel
return true;
}
/* Optional method.
* Using it will decrease the number of explored boards but each explored board will take longer.
* In the case of TicTacToe, the overall duration will be bigger if QuickEvaluate is used.
*/
/*Model.Board.QuickEvaluate = function(aGame) {
return 0; // good to have board center
}*/
/* The Evaluate method must:
* - detects whether the game is finished by setting mFinished to true, and determine the winner by assigning
* mWinner (to JocGame.PLAYER_A, JocGame.PLAYER_B, JocGame.DRAW).
* - calculate mEvaluation to indicate apparent advantage to PLAYER_A (higher positive evaluation) or to
* PLAYER_B (lower negative evaluation)
* Parameters:
* - aFinishOnly: it is safe to ignore this parameter value, but for better performance, the mEvaluation setting
* can be skipped if aFinishOnly is true (function caller is only interested if the game is finished).
* - aTopLevel: it is safe to ignore this parameter value. For convenience, if true, there is no performance involved
* so it is safe to make additional calculation and storing data, for instance to simplify the display of the last move.
*/
Model.Board.Evaluate = function(aGame,aFinishOnly,aTopLevel) {
this.mEvaluation=0;
var amiralCaptureA=this.YohohoAmiralCapture(aGame,JocGame.PLAYER_A);
if(amiralCaptureA.risk && amiralCaptureA.end) {
this.mFinished=true;
this.mWinner=JocGame.PLAYER_B;
}
var amiralCaptureB=this.YohohoAmiralCapture(aGame,JocGame.PLAYER_B);
if(amiralCaptureB.risk && amiralCaptureB.end) {
this.mFinished=true;
this.mWinner=JocGame.PLAYER_A;
}
var aAmiralPos=this.pieces[this.amirals[JocGame.PLAYER_A]].pos;
var bAmiralPos=this.pieces[this.amirals[JocGame.PLAYER_B]].pos;
var arow=aGame.g.Coord[aAmiralPos][0];
if(arow==8) {
this.mFinished=true;
this.mWinner=JocGame.PLAYER_A;
}
var brow=aGame.g.Coord[bAmiralPos][0];
if(brow==0) {
this.mFinished=true;
this.mWinner=JocGame.PLAYER_B;
}
if(this.mFinished)
return;
//JocLog("amiral brow",this.pieces[this.amirals[JocGame.PLAYER_B]].pos,brow);
var distAmiralToLastRowFactor=aGame.g.distAmiralToLastRowFactor;
switch(aGame.g.Dist(aAmiralPos,bAmiralPos)) {
case 1: distAmiralToLastRowFactor=aGame.g.distAmiralToLastRowFactor; break;
case 2: distAmiralToLastRowFactor=1.2*aGame.g.distAmiralToLastRowFactor; break;
default: distAmiralToLastRowFactor=2*aGame.g.distAmiralToLastRowFactor;
}
this.mEvaluation+=(arow-8+brow)*distAmiralToLastRowFactor;
this.mEvaluation+=(this.piecesWeight[JocGame.PLAYER_A]-this.piecesWeight[JocGame.PLAYER_B])*aGame.g.weightFactor;
var adist=0, bdist=0;
for(var i in this.pieces) {
var piece=this.pieces[i];
if(piece.alive) {
var minDist=Math.min(aGame.g.Dist(piece.pos,aAmiralPos),aGame.g.Dist(piece.pos,bAmiralPos));
if(piece.s==JocGame.PLAYER_A)
adist+=minDist;
else
bdist+=minDist;
}
}
this.mEvaluation+=(bdist-adist)*0.001;
this.mEvaluation+=(amiralCaptureA?-aGame.g.yohohoFactor:0)+(amiralCaptureB?aGame.g.yohohoFactor:0);
//if(aGame.g.Dist(this.pieces[this.amirals[1]].pos,this.pieces[this.amirals[-1]].pos)==0)
// this.mEvaluation+=10*this.mWho;
//JocLog("Evaluation",this.mEvaluation,"arow",arow,"brow",brow);
}
/* Optional method.
* Copy the given board data to self.
* Even if optional, it is better to implement the method for performance reasons.
*/
/*
Model.Board.CopyFrom = function(aBoard) {
for(var i=0;i<3;i++) {
for(var j=0;j<3;j++) {
this.board[i][j]=aBoard.board[i][j];
}
}
}
*/
Model.Board.yohohoUpdateAngle = function(aGame,piece,pos0,pos) {
var angle=0;
if(pos===undefined || pos0===undefined)
angle=0;
else {
var coord0=aGame.g.Coord[pos0];
var coord=aGame.g.Coord[pos];
if(coord[1]>coord0[1])
if(coord[0]>coord0[0])
angle=-30;
else if(coord[0]<coord0[0])
angle=-150;
else
angle=-90; // ok
else if(coord[0]>coord0[0])
angle=30;
else if(coord[0]<coord0[0])
angle=150;
else
angle=90;
}
piece.angle=angle;
}
/* Modify the current board instance to apply the move.
*/
Model.Board.ApplyMove = function(aGame,move) {
if(move.t=='m') {
var index=this.board[move.m[0].f];
var side=this.pieces[index].s;
this.board[move.m[0].f]=-1;
this.board[move.m[0].t]=index;
this.pieces[index].pos=move.m[0].t;
this.yohohoUpdateAngle(aGame,this.pieces[index],move.m[0].f,move.m[0].t);
if(this.first==false && typeof move.m[1].f!="undefined") {
index=this.board[move.m[1].f];
if(index<0)
JocLog("!!!! move from nowhere",move);
this.board[move.m[1].f]=-1;
this.board[move.m[1].t]=index;
this.pieces[index].pos=move.m[1].t;
this.yohohoUpdateAngle(aGame,this.pieces[index],move.m[1].f,move.m[1].t);
}
var amiralCapture=this.YohohoAmiralCapture(aGame,-side);
this.yohoho=amiralCapture.risk;
} else if(move.t=='a') {
var index=this.board[move.at];
this.board[move.at]=-1;
this.pieces[index].alive=0;
this.piecesWeight[-this.mWho]-=aGame.g.pieceWeight[this.pieces[index].type];
}
this.first=false;
}
Model.Board.YohohoReachablePositions=function(aGame,pos,type,accept,reject) {
var $this=this;
var poss=[];
var range=0;
var side=this.pieces[this.board[pos]].s;
var eachDirection="YohohoEachDirectionWind";
switch(type) {
case 'C': range=1; break;
case 'c': range=2; break;
case 'p': range=3; break;
case 'r': eachDirection="YohohoEachDirection"; break;
}
aGame[eachDirection](pos,function(pos1,dir) {
var dist=0;
while(pos1!=null && (range==0 || dist<range) &&
(pos1==accept || ($this.board[pos1]==-1 && pos1!=reject))
) {
var valid=true;
if(type=='C') {
var strength=0;
aGame.YohohoEachDirection(pos1,function(pos2) {
var index=$this.board[pos2];
if(index>=0 && $this.pieces[index].alive && $this.pieces[index].s==-side) {
var strength0=aGame.g.GetStrengthByType($this.pieces[index].type);
strength+=strength0;
}
return true;
});
if(strength>5)
valid=false;
}
if(valid)
poss.push(pos1);
pos1=aGame.g.Graph[pos1][dir];
dist++;
}
return true;
});
return poss;
}
Model.Board.YohohoReachablePositionsThrough=function(aGame,pos,type) {
var $this=this;
var poss=[];
var range=0;
var side=this.pieces[this.board[pos]].s;
var eachDirection="YohohoEachDirectionWind";
switch(type) {
case 'C': range=1; break;
case 'c': range=2; break;
case 'p': range=3; break;
case 'r': eachDirection="YohohoEachDirection"; break;
}
aGame[eachDirection](pos,function(pos1,dir) {
var dist=0;
var reqEmpty=[];
while(pos1!=null && (range==0 || dist<range) && ($this.board[pos1]==-1 || $this.pieces[$this.board[pos1]].s==side)) {
var valid=true;
if(type=='C') {
var strength=0;
aGame.YohohoEachDirection(pos1,function(pos2) {
var index=$this.board[pos2];
if(index>=0 && $this.pieces[index].alive && $this.pieces[index].s==-side) {
var strength0=aGame.g.GetStrengthByType($this.pieces[index].type);
strength+=strength0;
}
return true;
});
if(strength>5)
valid=false;
}
reqEmpty.push(pos1);
if(valid) {
var reqEmpty0=[];
for(var i in reqEmpty)
reqEmpty0.push(reqEmpty[i]);
poss.push({ pos: pos1, reqEmpty: reqEmpty0 });
}
pos1=aGame.g.Graph[pos1][dir];
dist++;
}
return true;
});
return poss;
}
Model.Game.YohohoEachDirection = function(pos,fnt) {
for(var i=0;i<6;i++) {
var npos=this.g.Graph[pos][i];
if(npos!=null)
if(fnt(npos,i)==false)
return;
}
}
Model.Game.YohohoEachDirectionWind = function(pos,fnt) {
for(var i=1;i<6;i++) {
var npos=this.g.Graph[pos][i];
if(npos!=null)
if(fnt(npos,i)==false)
return;
}
}
Model.Board.YohohoAmiralCapture=function(aGame,who) {
var $this=this;
var capture={ risk: false };
// check whether the amiral is in capture
var amiralPos=this.pieces[this.amirals[who]].pos;
var strength=0;
var attackers=[];
aGame.YohohoEachDirection(amiralPos,function(pos1) {
var index=$this.board[pos1];
if(index>=0 && $this.pieces[index].alive && $this.pieces[index].s==-who) {
var strength0=aGame.g.GetStrengthByType($this.pieces[index].type);
if(strength0>0)
attackers.push(index);
strength+=strength0;
}
return true;
});
//JocLog("YohohoAmiralDanger", strength>5);
if(strength<=5)
return capture;
// check saving amiral by capturing ennemy
capture.risk=true;
capture.attackers=attackers;
capture.capture=[];
for(var i in attackers) {
var index=attackers[i];
var attackerStrength=aGame.g.GetStrengthByType(this.pieces[index].type);
if(strength-attackerStrength<=5) {
var strength1=0;
var attackers1=[];
aGame.YohohoEachDirection(this.pieces[index].pos,function(pos1) {
var index0=$this.board[pos1];
if(index0>=0 && $this.pieces[index0].alive && $this.pieces[index0].s==who) {
var strength0=aGame.g.GetStrengthByType($this.pieces[index0].type);
if(strength0>0)
attackers1.push($this.pieces[index0].pos);
strength1+=strength0;
}
return true;
});
if(strength1>attackerStrength)
capture.capture.push({ af: attackers1, at: this.pieces[index].pos });
}
}
// check saving amiral by moving the piece
capture.escape=[];
aGame.YohohoEachDirectionWind(amiralPos,function(pos1) {
var index=$this.board[pos1];
if(index==-1) {
var strength1=0;
aGame.YohohoEachDirection(pos1,function(pos2) {
var index1=$this.board[pos2];
if(index1>=0 && $this.pieces[index1].alive && $this.pieces[index1].s==-who) {
var strength0=aGame.g.GetStrengthByType($this.pieces[index1].type);
strength1+=strength0;
}
});
if(strength1<=5)
capture.escape.push({ f: amiralPos, t: pos1 });
}
return true;
});
capture.end = capture.escape.length==0 && capture.capture.length==0;
return capture;
}
Model.Board.YohohoCaptures=function(aGame,who) {
var $this=this;
var captures=[];
for(var i in $this.pieces) {
var piece=$this.pieces[i];
if(piece.s==-who && piece.alive) {
var attackeeStrength=aGame.g.GetStrengthByType(piece.type);
var attackers=[];
if(attackeeStrength>0) { // not a rock
var strength1=0;
aGame.YohohoEachDirection(piece.pos,function(pos) {
var index=$this.board[pos];
if(index>=0 && $this.pieces[index].alive && $this.pieces[index].s==who) {
var strength0=aGame.g.GetStrengthByType($this.pieces[index].type);
if(strength0>0)
attackers.push(pos);
strength1+=strength0;
}
return true;
});
if(strength1>attackeeStrength)
captures.push({ t: 'a', af: attackers, at: piece.pos });
}
}
}
return captures;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View file

@ -0,0 +1,382 @@
/*
*
* Copyright (c) 2012 - Jocly - www.jocly.com
*
* This file is part of the Jocly game platform and cannot be used outside of this context without the written permission of Jocly.
*
*/
View.Game.InitView=function() {
var $this=this;
this.HexInitView();
this.g.BattleSounds=function() {
var bRet=false;
switch($this.mSkin){
default:
break;
case 'basic':
case 'stylised':
case 'official':
bRet=true;
break;
}
return bRet;
}
this.g.YohohoSound=function() {
var soundName="yohoho"+(Math.floor(Math.random()*4)+1);
if ($this.g.BattleSounds()) $this.PlaySound(soundName);
}
}
View.Game.DestroyView=function() {
this.mWidget.empty();
}
View.Game.HexPaintTokenOneRes=function(cell,player,type){
var ctx=cell.find("#tokencellcanvas")[0].getContext("2d");
var l=ctx.canvas.width;
var m=0;
var yOffset=player==JocGame.PLAYER_A?100:0;
var xOffset=0;
switch(type){
default:
break;
case "p":
xOffset=0;
break;
case "C":
xOffset=100;
break;
case "c":
xOffset=200;
break;
case "r":
xOffset=300;
break;
}
var imageObj = new Image();
imageObj.onload = function(){
ctx.clearRect(0,0,l,l);
ctx.drawImage(imageObj,
xOffset,yOffset, 100,100,
m, m, l-2*m, l-2*m);
}
switch(this.mSkin){
default:
imageObj.src = path=this.mViewOptions.fullPath+"/res/images/yohohores6.png";
break;
case 'basic':
case 'basicnosound':
imageObj.src = path=this.mViewOptions.fullPath+"/res/images/yohohoresbasic2.png";
break;
case 'stylised':
case 'stylisednosound':
imageObj.src = path=this.mViewOptions.fullPath+"/res/images/yohohoresbasic5.png";
break;
}
}
/* Display the current board
* Board based member: 'this' is a board instance.
*/
View.Board.Display=function(aGame) {
//$.jBlocks("log","display");
var $this=this;
for (var i in $this.pieces){
var piece=$this.pieces[i];
aGame.mWidget.find("#jocindex"+i).show();
var cell=aGame.mWidget.find("#jocindex"+i);
var tCoord=aGame.g.Coord[piece.pos];
var tr=tCoord[0];
var tc=tCoord[1];
if (piece.alive){
cell.css({
opacity: 1,
top: aGame.g.top + aGame.HexCellRow2Ycenter( tr )-aGame.g.R,
left: aGame.g.left + aGame.HexCellCol2Xcenter( tc )-aGame.g.R,
});
cell.show();
}else{
cell.hide();
}
}
//aGame.mWidget.hide().show(0);
}
/* Optional method.
* Board based member: 'this' is a board instance.
* If implemented, it is called before a human player is to play.
*/
View.Board.HumanTurn=function(aGame) {
var $this=this;
var amiralCapture=this.YohohoAmiralCapture(aGame,this.mWho);
var captures=this.YohohoCaptures(aGame,this.mWho);
//JocLog("amiralCapture",amiralCapture);
var move={};
//JocLog("Board",this.mWho,this);
function HighlightStart() {
if(amiralCapture.risk) {
for(var i in amiralCapture.capture)
aGame.mWidget.find("[jocpos='"+amiralCapture.capture[i].at+"']").addClass("choice"+(aGame.mShowMoves?" choice-view-capture":""));
if(amiralCapture.escape.length>0)
aGame.mWidget.find("[jocpos='"+amiralCapture.escape[0].f+"']").addClass("choice"+(aGame.mShowMoves?" choice-view":""));
} else {
for(var i in captures)
aGame.mWidget.find("[jocpos='"+captures[i].at+"']").addClass("choice"+(aGame.mShowMoves?" choice-view-capture":""));
for(var i in $this.pieces) {
var piece=$this.pieces[i];
if(piece.alive && piece.s==$this.mWho) {
aGame.mWidget.find("[jocpos='"+piece.pos+"']").addClass("choice"+(aGame.mShowMoves?" choice-view":""));
}
}
}
}
function HighlightStart2() {
for(var i in $this.pieces) {
var piece=$this.pieces[i];
if(piece.alive && piece.s==$this.mWho && piece.pos!=move.m[0].f) {
aGame.mWidget.find("[jocpos='"+piece.pos+"']").addClass("choice"+(aGame.mShowMoves?" choice-view":""));
}
}
aGame.mWidget.find("[jocpos='"+move.m[0].t+"']").addClass("choice"+(aGame.mShowMoves?" choice-view-cancel":""));
}
function ClickEnd(obj) {
if(!obj.hasClass("choice"))
obj=obj.find("div");
aGame.mWidget.find(".choice").unbind(JocGame.CLICK).removeClass("choice choice-view choice-view-cancel choice-view-capture");
var epos=parseInt(obj.attr("jocpos"));
if(epos==move.m[0].f) {
HighlightStart();
aGame.mWidget.find(".front.choice").bind(JocGame.CLICK,function() {
ClickStart($(this));
});
} else {
if (aGame.g.BattleSounds()) aGame.PlaySound('move');
move.m[0].t=epos;
var tCoord=aGame.g.Coord[epos];
var tr=tCoord[0];
var tc=tCoord[1];
var idx=$this.board[move.m[0].f];
aGame.mWidget.find("#jocindex"+idx).animate({
top: aGame.g.top + aGame.HexCellRow2Ycenter( tr )-aGame.g.R,
left: aGame.g.left + aGame.HexCellCol2Xcenter( tc )-aGame.g.R,
},500,function() {
var pieceType=$this.pieces[idx].type;
if($this.first || ($this.mWho==JocGame.PLAYER_A && tr==8 && pieceType=="C") || ($this.mWho==JocGame.PLAYER_B && tr==0 && pieceType=="C")) {
aGame.MakeMove(move);
} else {
HighlightStart2();
aGame.mWidget.find(".front.choice").bind(JocGame.CLICK,function() {
ClickStart2($(this));
});
}
//aGame.mWidget.hide().show(0);
});
}
}
function ClickEnd2(obj) {
if(!obj.hasClass("choice"))
obj=obj.find("div");
aGame.mWidget.find(".choice").unbind(JocGame.CLICK).removeClass("choice choice-view choice-view-cancel choice-view-capture");
var epos=parseInt(obj.attr("jocpos"));
if(epos==move.m[1].f) {
HighlightStart2();
aGame.mWidget.find(".front.choice").bind(JocGame.CLICK,function() {
ClickStart2($(this));
});
} else {
move.m[1].t=epos;
var board = new (aGame.GetBoardClass())(aGame);
board.CopyFrom($this);
board.mWho = -$this.mWho;
board.mBoardClass = $this.mBoardClass;
//var mWho=aGame.mWho;
//aGame.mWho=-mWho;
board.ApplyMove(aGame,move);
//aGame.mWho=mWho;
if(board.yohoho)
aGame.g.YohohoSound();
if (aGame.g.BattleSounds()) aGame.PlaySound('move');
var tCoord=aGame.g.Coord[epos];
var tr=tCoord[0];
var tc=tCoord[1];
var idx=$this.board[move.m[1].f];
aGame.mWidget.find("#jocindex"+idx).animate({
top: aGame.g.top + aGame.HexCellRow2Ycenter( tr )-aGame.g.R,
left: aGame.g.left + aGame.HexCellCol2Xcenter( tc )-aGame.g.R,
},500,function() {
aGame.MakeMove(move);
//aGame.mWidget.hide().show(0);
});
}
}
function HighlightEnd() {
aGame.mWidget.find("[jocpos='"+spos+"']").addClass("choice choice-view-cancel");
var pos=move.m[0].f;
var piece=$this.pieces[$this.board[pos]];
var poss=$this.YohohoReachablePositions(aGame,pos,piece.type,null,null);
for(var i in poss) {
var pos1=poss[i];
aGame.mWidget.find("[jocpos='"+pos1+"']").addClass("choice choice-view");
}
}
function HighlightEnd2() {
aGame.mWidget.find("[jocpos='"+spos+"']").addClass("choice choice-view-cancel");
var pos=move.m[1].f;
var piece=$this.pieces[$this.board[pos]];
var poss=$this.YohohoReachablePositions(aGame,pos,piece.type,move.m[0].f,move.m[0].t);
for(var i in poss) {
var pos1=poss[i];
aGame.mWidget.find("[jocpos='"+pos1+"']").addClass("choice choice-view");
}
}
function ClickStart(obj) {
aGame.mWidget.find(".choice").unbind(JocGame.CLICK).removeClass("choice choice-view choice-view-cancel choice-view-capture");
spos=parseInt(obj.attr("jocpos"));
var index=$this.board[spos];
if(index>=0 && $this.pieces[index].s==-$this.mWho) {
for(var i in captures)
if(captures[i].at==spos) {
var cmove=captures[i];
if (aGame.g.BattleSounds()) aGame.PlaySound('assault');
for(var j in cmove.af)
aGame.mWidget.find("[jocpos='"+cmove.af[i]+"']").addClass("attacker");
aGame.mWidget.find("[jocpos='"+spos+"']").addClass("attack");
aGame.mWidget.find("#jocindex"+index).animate({
opacity: 0,
},2000,function() {
aGame.mWidget.find("[jocpos='"+spos+"']").removeClass("attack");
for(var j in cmove.af)
aGame.mWidget.find("[jocpos='"+cmove.af[i]+"']").removeClass("attacker");
aGame.MakeMove(captures[i]);
//aGame.mWidget.hide().show(0);
});
return;
}
}
move={
t: 'm',
m: [ { f:spos },{}]
};
HighlightEnd();
aGame.mWidget.find(".front.choice").bind(JocGame.CLICK,function() {
ClickEnd($(this));
});
}
function ClickStart2(obj) {
aGame.mWidget.find(".choice").unbind(JocGame.CLICK).removeClass("choice choice-view choice-view-cancel choice-view-capture");
spos=parseInt(obj.attr("jocpos"));
if(spos==move.m[0].t) {
var tCoord=aGame.g.Coord[move.m[0].f];
var tr=tCoord[0];
var tc=tCoord[1];
var idx=$this.board[move.m[0].f];
aGame.mWidget.find("#jocindex"+idx).css({
top: aGame.g.top + aGame.HexCellRow2Ycenter( tr )-aGame.g.R,
left: aGame.g.left + aGame.HexCellCol2Xcenter( tc )-aGame.g.R,
});
HighlightStart();
aGame.mWidget.find(".front.choice").bind(JocGame.CLICK,function() {
ClickStart($(this));
});
} else {
move.m[1].f=spos;
HighlightEnd2();
aGame.mWidget.find(".front.choice").bind(JocGame.CLICK,function() {
ClickEnd2($(this));
});
}
}
HighlightStart();
aGame.mWidget.find(".front.choice").bind(JocGame.CLICK,function() {
ClickStart($(this));
});
}
/* Optional method.
* Board based member: 'this' is a board instance.
* If implemented, it is called after a human player made the move.
*/
View.Board.HumanTurnEnd=function(aGame) {
aGame.mWidget.find(".hex-pass").hide().unbind(JocGame.CLICK);
aGame.mWidget.find(".front,.cell,.piece div").unbind(JocGame.CLICK);
aGame.mWidget.find(".choice,.choice-view").removeClass(" choice choice-view choice-view-cancel choice-view-capture");
}
/* Optional method.
* Board based member: 'this' is a board instance.
* If implemented, must return true if there is no need to wait for an animation to achieve,
* if it returns false, the implementation must ensure it will call aMoveDoneFnt to resume
* the game.
*/
View.Board.PlayedMove=function(aGame,aMove) {
var $this=this;
if(aMove.t=='m') {
if(this.yohoho) {
//JocLog("Yohoho");
//this.yohoho=false;
aGame.g.YohohoSound();
}
var coord=aGame.g.Coord[aMove.m[0].t];
var tr=coord[0];
var tc=coord[1];
var idx=this.board[aMove.m[0].t];
aGame.mWidget.find("#jocindex"+idx).animate({
top: aGame.g.top + aGame.HexCellRow2Ycenter( tr )-aGame.g.R,
left: aGame.g.left + aGame.HexCellCol2Xcenter( tc )-aGame.g.R,
},500,function() {
if(typeof aMove.m[1].f=="undefined")
aGame.MoveShown();
else {
var coord=aGame.g.Coord[aMove.m[1].t];
var tr=coord[0];
var tc=coord[1];
var idx=$this.board[aMove.m[1].t];
aGame.mWidget.find("#jocindex"+idx).animate({
top: aGame.g.top + aGame.HexCellRow2Ycenter( tr )-aGame.g.R,
left: aGame.g.left + aGame.HexCellCol2Xcenter( tc )-aGame.g.R,
},500,function() {
aGame.MoveShown();
});
}
//aGame.mWidget.hide().show(0);
});
} else if(aMove.t=='a') {
if (aGame.g.BattleSounds()) aGame.PlaySound('assault');
var idx=aGame.mOldBoard.board[aMove.at];
aGame.mWidget.find("[jocpos='"+aMove.at+"']").addClass("attack");
for(var i in aMove.af)
aGame.mWidget.find("[jocpos='"+aMove.af[i]+"']").addClass("attacker");
aGame.mWidget.find("#jocindex"+idx).animate({
opacity: 0,
},2000,function() {
aGame.mWidget.find("[jocpos='"+aMove.at+"']").removeClass("attack");
for(var i in aMove.af)
aGame.mWidget.find("[jocpos='"+aMove.af[i]+"']").removeClass("attacker");
aGame.MoveShown();
//aGame.mWidget.hide().show(0);
});
}
return false;
}
/* Optional method.
* Board based member: 'this' is a board instance.
* If implemented, must return true if there is no need to wait for an animation to achieve,
* if it returns false, the implementation must ensure it will call aMoveDoneFnt to resume
* the game.
*/
View.Board.ShowEnd=function(aGame) {
return true;
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,58 @@
.cell {
position: absolute;
z-index: 0;
}
.cellcanvas {
position: absolute;
z-index: 100;
}
.piece {
position:absolute;
}
.front {
position: absolute;
z-index: 200;
background-color: rgba(255,255,255,0);
}
.cell.chosen {
//background-color: rgba(69,139,211,1.0);
background-color: rgba(255,139,211,1.0);
}
.notation {
position: absolute;
z-index: 150;
color: White;
padding: 2px 0px 0px 2px;
font-weight: bold;
font-family: Arial, sans-serif;
/* text-shadow: 0 2px 0 #000; */
}
.choice-view {
background-color: rgba(255,255,255,0.2);
border-left: white solid 2px;
border-left-color: rgba(255,255,255,0.5);
border-right: white solid 2px;
cursor: pointer;
}
.choice-view-capture {
background-color: rgba(255,0,0,0.3);
cursor: pointer;
}
.choice-view-cancel {
background-color: rgba(255,255,128,0.3);
cursor: pointer;
}
.attack {
background-color: rgba(255,165,0,0.4);
}
.attacker {
background-color: rgba(255,255,0,0.4);
}