actuate
Version:
Actuate is a flexible, fast "tween" library for animations
66 lines (48 loc) • 1.84 kB
JavaScript
// Class: motion._Actuate.TransformOptions
var $global = typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : this
$global.Object.defineProperty(exports, "__esModule", {value: true});
var __map_reserved = {};
// Imports
var $hxClasses = require("./../../hxClasses_stub").default;
var $import = require("./../../import_stub").default;
function motion_Actuate() {return require("./../../motion/Actuate");}
function motion_actuators_TransformActuator() {return require("./../../motion/actuators/TransformActuator");}
// Constructor
var TransformOptions = function(target,duration,overwrite) {
this.target = target;
this.duration = duration;
this.overwrite = overwrite;
}
// Meta
TransformOptions.__name__ = ["motion","_Actuate","TransformOptions"];
TransformOptions.__isInterface__ = false;
TransformOptions.prototype = {
color: function(value,strength,alpha) {
if(strength == null) {
strength = 1;
}
if(value == null) {
value = 0;
}
var properties = { colorValue : value, colorStrength : strength};
if(alpha != null) {
properties.colorAlpha = alpha;
}
return (motion_Actuate().default).tween(this.target,this.duration,properties,this.overwrite,(motion_actuators_TransformActuator().default));
},
sound: function(volume,pan) {
var properties = { };
if(volume != null) {
properties.soundVolume = volume;
}
if(pan != null) {
properties.soundPan = pan;
}
return (motion_Actuate().default).tween(this.target,this.duration,properties,this.overwrite,(motion_actuators_TransformActuator().default));
}
};
TransformOptions.prototype.__class__ = TransformOptions.prototype.constructor = $hxClasses["motion._Actuate.TransformOptions"] = TransformOptions;
// Init
// Statics
// Export
exports.default = TransformOptions;