Update: CC - Snake FS - Entity Loaded (21g30t1e75.js) 49 bytes modified

beta.r3js.org
-=yb4f310 2018-03-21 10:23:46 +01:00
parent 6c6448262c
commit 4c96d70658
1 changed files with 9 additions and 10 deletions

View File

@ -156,9 +156,10 @@ GameLib.CustomCode.prototype.createGameMesh = function(image, visible) {
var mesh = new GameLib.D3.Mesh( var mesh = new GameLib.D3.Mesh(
this.runtime.graphics, this.runtime.graphics,
{ {
geometry : this.geometryBody, geometry : this.geometryBody,
materials : [this.createMaterial(image)], materials : [this.createMaterial(image)],
visible : visible visible : visible,
useQuaternion : false
} }
) )
@ -263,9 +264,7 @@ GameLib.CustomCode.SnakeBody = function(
if (GameLib.Utils.UndefinedOrNull(mesh)) { if (GameLib.Utils.UndefinedOrNull(mesh)) {
throw new Error('no mesh specified'); throw new Error('no mesh specified');
} }
this.mesh = mesh.clone(); this.mesh = mesh;
this.mesh.useQuaternion = false;
this.mesh.visible = true;
this.mesh.position.z = GameLib.CustomCode.SnakeBody.LastZ; this.mesh.position.z = GameLib.CustomCode.SnakeBody.LastZ;
GameLib.CustomCode.SnakeBody.LastZ += 0.1; GameLib.CustomCode.SnakeBody.LastZ += 0.1;
@ -561,7 +560,7 @@ GameLib.Event.Subscribe(
this.snake = [ this.snake = [
new GameLib.CustomCode.SnakeBody( new GameLib.CustomCode.SnakeBody(
this.meshBreadHead, this.createGameMesh(this.imageBreadHead),
{ {
x : 4, x : 4,
y : 4 y : 4
@ -569,7 +568,7 @@ GameLib.Event.Subscribe(
0 0
), ),
new GameLib.CustomCode.SnakeBody( new GameLib.CustomCode.SnakeBody(
this.meshBreadPatty, this.createGameMesh(this.imageBreadPatty),
{ {
x : 4, x : 4,
y : 3 y : 3
@ -577,7 +576,7 @@ GameLib.Event.Subscribe(
0 0
), ),
new GameLib.CustomCode.SnakeBody( new GameLib.CustomCode.SnakeBody(
this.meshBreadPatty, this.createGameMesh(this.imageBreadPatty),
{ {
x : 4, x : 4,
y : 2 y : 2
@ -585,7 +584,7 @@ GameLib.Event.Subscribe(
0 0
), ),
new GameLib.CustomCode.SnakeBody( new GameLib.CustomCode.SnakeBody(
this.meshBreadTail, this.createGameMesh(this.imageBreadTail),
{ {
x : 4, x : 4,
y : 1 y : 1