react-qml
Version:
123 lines (111 loc) • 4.18 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
var _exportNames = {
Age: true,
AngleDirection: true,
Attractor: true,
CumulativeDirection: true,
Affector: true,
CustomParticle: true,
EllipseShape: true,
Friction: true,
Gravity: true,
GroupGoal: true,
ImageParticle: true,
ItemParticle: true,
LineShape: true,
MaskShape: true,
Emitter: true,
ParticleGroup: true,
ParticleSystem: true,
PointDirection: true,
RectangleShape: true,
SpriteGoal: true,
TargetDirection: true,
TrailEmitter: true,
Turbulence: true,
Wander: true
};
exports.default = exports.Wander = exports.Turbulence = exports.TrailEmitter = exports.TargetDirection = exports.SpriteGoal = exports.RectangleShape = exports.PointDirection = exports.ParticleSystem = exports.ParticleGroup = exports.Emitter = exports.MaskShape = exports.LineShape = exports.ItemParticle = exports.ImageParticle = exports.GroupGoal = exports.Gravity = exports.Friction = exports.EllipseShape = exports.CustomParticle = exports.Affector = exports.CumulativeDirection = exports.Attractor = exports.AngleDirection = exports.Age = void 0;
var _renderer = require("../../renderer");
var _qmltypes = _interopRequireDefault(require("./qmltypes.json"));
var _types = require("./types");
Object.keys(_types).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _types[key];
}
});
});
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
// script: generateModule, version: 0.3
var generateQml = function generateQml(type) {
return "import QtQuick.Particles 2.0; ".concat(type, " {}");
};
var Module = {};
for (var index = 0; index < _qmltypes.default.length; index++) {
var definition = _qmltypes.default[index];
var _name = definition.name,
_module = definition.module,
_definition$defaultPr = definition.defaultProperty,
_defaultProperty = _definition$defaultPr === void 0 ? 'data' : _definition$defaultPr;
var tagName = "".concat(_module, ".").concat(_name);
Module[_name] = (0, _renderer.createRawQmlComponent)(generateQml(_name), tagName, {
defaultProp: _defaultProperty
});
}
var Age = Module.Age,
AngleDirection = Module.AngleDirection,
Attractor = Module.Attractor,
CumulativeDirection = Module.CumulativeDirection,
Affector = Module.Affector,
CustomParticle = Module.CustomParticle,
EllipseShape = Module.EllipseShape,
Friction = Module.Friction,
Gravity = Module.Gravity,
GroupGoal = Module.GroupGoal,
ImageParticle = Module.ImageParticle,
ItemParticle = Module.ItemParticle,
LineShape = Module.LineShape,
MaskShape = Module.MaskShape,
Emitter = Module.Emitter,
ParticleGroup = Module.ParticleGroup,
ParticleSystem = Module.ParticleSystem,
PointDirection = Module.PointDirection,
RectangleShape = Module.RectangleShape,
SpriteGoal = Module.SpriteGoal,
TargetDirection = Module.TargetDirection,
TrailEmitter = Module.TrailEmitter,
Turbulence = Module.Turbulence,
Wander = Module.Wander;
exports.Wander = Wander;
exports.Turbulence = Turbulence;
exports.TrailEmitter = TrailEmitter;
exports.TargetDirection = TargetDirection;
exports.SpriteGoal = SpriteGoal;
exports.RectangleShape = RectangleShape;
exports.PointDirection = PointDirection;
exports.ParticleSystem = ParticleSystem;
exports.ParticleGroup = ParticleGroup;
exports.Emitter = Emitter;
exports.MaskShape = MaskShape;
exports.LineShape = LineShape;
exports.ItemParticle = ItemParticle;
exports.ImageParticle = ImageParticle;
exports.GroupGoal = GroupGoal;
exports.Gravity = Gravity;
exports.Friction = Friction;
exports.EllipseShape = EllipseShape;
exports.CustomParticle = CustomParticle;
exports.Affector = Affector;
exports.CumulativeDirection = CumulativeDirection;
exports.Attractor = Attractor;
exports.AngleDirection = AngleDirection;
exports.Age = Age;
var _default = Module;
exports.default = _default;