r3-legacy/src/r3-curve-path-d2-shape.js

57 lines
1.2 KiB
JavaScript
Raw Normal View History

2018-04-09 09:35:04 +02:00
/**
2019-07-25 22:22:32 +02:00
* R3.Curve.Path.D2.Shape
* @param apiComponent
2019-10-06 21:11:18 +02:00
* @param inherited
2018-04-09 09:35:04 +02:00
* @constructor
*/
R3.Curve.Path.D2.Shape = function(
2019-07-25 22:22:32 +02:00
apiComponent,
2019-10-06 21:11:18 +02:00
inherited
2018-04-09 09:35:04 +02:00
) {
2019-10-06 21:11:18 +02:00
if (R3.Utils.UndefinedOrNull(inherited)) {
inherited = false;
}
2018-04-09 09:35:04 +02:00
2019-10-06 21:11:18 +02:00
if (inherited) {
2019-07-25 22:22:32 +02:00
/**
2019-10-06 21:11:18 +02:00
* Do not construct a runtime object of this class - the child is the runtime object
2019-07-25 22:22:32 +02:00
*/
} else {
2019-10-06 21:11:18 +02:00
__RUNTIME_COMPONENT__;
2019-07-25 22:22:32 +02:00
}
/**
2019-10-15 22:21:34 +02:00
* Now we call the parent class but with linkedComponents - indicating that its being called from a child class
2019-07-25 22:22:32 +02:00
* and should not do any runtime instantiation
*/
2018-04-09 09:35:04 +02:00
R3.Curve.Path.D2.call(
this,
2019-07-25 22:22:32 +02:00
apiComponent,
2019-10-06 21:11:18 +02:00
true
2019-07-25 22:22:32 +02:00
)
2018-04-09 09:35:04 +02:00
};
R3.Curve.Path.D2.Shape.prototype = Object.create(R3.Curve.Path.D2.prototype);
R3.Curve.Path.D2.Shape.prototype.constructor = R3.Curve.Path.D2.Shape;
/**
* Creates a camera instance
* @returns {*}
*/
R3.Curve.Path.D2.Shape.prototype.createInstance = function() {
2019-07-25 22:22:32 +02:00
this.instance = this.graphics.Shape(this.points);
2018-04-09 09:35:04 +02:00
2019-10-06 21:11:18 +02:00
__CREATE_INSTANCE__;
2018-04-09 09:35:04 +02:00
};
/**
* Updates the instance with the current state
*/
R3.Curve.Path.D2.Shape.prototype.updateInstance = function(property) {
R3.Curve.Path.D2.prototype.updateInstance.call(this, property);
};