isaacscript-common
Version:
Helper functions and features for IsaacScript mods.
33 lines (32 loc) • 1.09 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.newReadonlyColor = newReadonlyColor;
exports.newReadonlyKColor = newReadonlyKColor;
exports.newReadonlyVector = newReadonlyVector;
/**
* Helper function to create a read-only `Color` object. (Otherwise, you would have to manually
* specify both the type and the constructor.)
*
* Note that read-only colors will be writable at run-time.
*/
function newReadonlyColor(r, g, b, a, ro, go, bo) {
return Color(r, g, b, a, ro, go, bo);
}
/**
* Helper function to create a read-only `KColor` object. (Otherwise, you would have to manually
* specify both the type and the constructor.)
*
* Note that read-only colors will be writable at run-time.
*/
function newReadonlyKColor(r, g, b, a) {
return KColor(r, g, b, a);
}
/**
* Helper function to create a read-only `Vector` object. (Otherwise, you would have to manually
* specify both the type and the constructor.)
*
* Note that read-only vectors will be writable at run-time.
*/
function newReadonlyVector(x, y) {
return Vector(x, y);
}