mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
fixes for animations with head and jump, etc.
This commit is contained in:
parent
142964938c
commit
283a1ef48b
16 changed files with 147 additions and 109 deletions
|
|
@ -48,6 +48,10 @@ function (Parent, DomController, PIXI, Settings) {
|
|||
this.container.addChild(mesh);
|
||||
};
|
||||
|
||||
PixiView.prototype.removeMesh = function(mesh) {
|
||||
this.container.removeChild(mesh);
|
||||
};
|
||||
|
||||
PixiView.prototype.createMesh = function (texturePath, callback, options) {
|
||||
|
||||
var texture = PIXI.Texture.fromImage(texturePath);
|
||||
|
|
@ -84,15 +88,10 @@ function (Parent, DomController, PIXI, Settings) {
|
|||
if (options.height) mesh.height = options.height;
|
||||
if (options.visible === true || options.visible === false) mesh.visible = options.visible;
|
||||
if (options.pivot) {
|
||||
switch(options.pivot) {
|
||||
case "mb":
|
||||
mesh.pivot.x = mesh.width / 2;
|
||||
mesh.pivot.y = mesh.height;
|
||||
break;
|
||||
case "mm":
|
||||
switch(options.pivot.length) {
|
||||
default:
|
||||
mesh.pivot.x = mesh.width / 2;
|
||||
mesh.pivot.y = mesh.height / 2;
|
||||
mesh.pivot.y = mesh.height;
|
||||
break;
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue