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

57 lines
1.2 KiB
JavaScript

/**
* R3.Curve.Path.D2.Shape
* @param apiComponent
* @param inherited
* @constructor
*/
R3.Curve.Path.D2.Shape = function(
apiComponent,
inherited
) {
if (R3.Utils.UndefinedOrNull(inherited)) {
inherited = false;
}
if (inherited) {
/**
* Do not construct a runtime object of this class - the child is the runtime object
*/
} else {
__RUNTIME_COMPONENT__;
}
/**
* Now we call the parent class but with linkedComponents - indicating that its being called from a child class
* and should not do any runtime instantiation
*/
R3.Curve.Path.D2.call(
this,
apiComponent,
true
)
};
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() {
this.instance = this.graphics.Shape(this.points);
__CREATE_INSTANCE__;
};
/**
* 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);
};