mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-28 03:24:43 +08:00
Link icon fixing, name refactoring
This commit is contained in:
@@ -9,8 +9,8 @@ export default class FunctionReferenceEntity extends IEntity {
|
||||
MemberName: "",
|
||||
}
|
||||
|
||||
constructor(options = {}) {
|
||||
super(options)
|
||||
constructor(values) {
|
||||
super(values)
|
||||
/** @type {ObjectReferenceEntity} */ this.MemberParent
|
||||
/** @type {String} */ this.MemberName
|
||||
}
|
||||
|
||||
@@ -18,11 +18,11 @@ export default class GuidEntity extends IEntity {
|
||||
return new GuidEntity({ value: guid })
|
||||
}
|
||||
|
||||
constructor(options) {
|
||||
if (!options) {
|
||||
options = GuidEntity.generateGuid().value
|
||||
constructor(values) {
|
||||
if (!values) {
|
||||
values = GuidEntity.generateGuid().value
|
||||
}
|
||||
super(options)
|
||||
super(values)
|
||||
/** @type {String} */ this.value
|
||||
}
|
||||
|
||||
|
||||
@@ -11,8 +11,8 @@ export default class IdentifierEntity extends IEntity {
|
||||
toAttribute: (value, type) => value.toString()
|
||||
}
|
||||
|
||||
constructor(options = {}) {
|
||||
super(options)
|
||||
constructor(values) {
|
||||
super(values)
|
||||
/** @type {String} */ this.value
|
||||
}
|
||||
|
||||
|
||||
@@ -6,9 +6,9 @@ export default class IntegerEntity extends IEntity {
|
||||
value: 0,
|
||||
}
|
||||
|
||||
/** @param {Object | Number | String} options */
|
||||
constructor(options = 0) {
|
||||
super(options)
|
||||
/** @param {Object | Number | String} values */
|
||||
constructor(values = 0) {
|
||||
super(values)
|
||||
/** @type {Number} */
|
||||
this.value = Math.round(this.value)
|
||||
}
|
||||
|
||||
@@ -7,8 +7,8 @@ export default class InvariantTextEntity extends IEntity {
|
||||
value: String,
|
||||
}
|
||||
|
||||
constructor(options = {}) {
|
||||
super(options)
|
||||
constructor(values) {
|
||||
super(values)
|
||||
/** @type {String} */ this.value
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,13 +12,13 @@ export default class KeyBindingEntity extends IEntity {
|
||||
Key: IdentifierEntity,
|
||||
}
|
||||
|
||||
constructor(options = {}) {
|
||||
options.ActionName = options.ActionName ?? ""
|
||||
options.bShift = options.bShift ?? false
|
||||
options.bCtrl = options.bCtrl ?? false
|
||||
options.bAlt = options.bAlt ?? false
|
||||
options.bCmd = options.bCmd ?? false
|
||||
super(options)
|
||||
constructor(values = {}) {
|
||||
values.ActionName = values.ActionName ?? ""
|
||||
values.bShift = values.bShift ?? false
|
||||
values.bCtrl = values.bCtrl ?? false
|
||||
values.bAlt = values.bAlt ?? false
|
||||
values.bCmd = values.bCmd ?? false
|
||||
super(values)
|
||||
/** @type {String} */ this.ActionName
|
||||
/** @type {Boolean} */ this.bShift
|
||||
/** @type {Boolean} */ this.bCtrl
|
||||
|
||||
@@ -41,8 +41,8 @@ export default class LinearColorEntity extends IEntity {
|
||||
}
|
||||
}
|
||||
|
||||
constructor(options) {
|
||||
super(options)
|
||||
constructor(values) {
|
||||
super(values)
|
||||
/** @type {RealUnitEntity} */ this.R
|
||||
/** @type {RealUnitEntity} */ this.G
|
||||
/** @type {RealUnitEntity} */ this.B
|
||||
|
||||
@@ -10,8 +10,8 @@ export default class LocalizedTextEntity extends IEntity {
|
||||
value: String,
|
||||
}
|
||||
|
||||
constructor(options = {}) {
|
||||
super(options)
|
||||
constructor(values) {
|
||||
super(values)
|
||||
/** @type {String} */ this.namespace
|
||||
/** @type {String} */ this.key
|
||||
/** @type {String} */ this.value
|
||||
|
||||
@@ -10,8 +10,8 @@ export default class MacroGraphReferenceEntity extends IEntity {
|
||||
GraphGuid: GuidEntity,
|
||||
}
|
||||
|
||||
constructor(options = {}) {
|
||||
super(options)
|
||||
constructor(values) {
|
||||
super(values)
|
||||
/** @type {ObjectReferenceEntity} */ this.MacroGraph
|
||||
/** @type {ObjectReferenceEntity} */ this.GraphBlueprint
|
||||
/** @type {GuidEntity} */ this.GuidEntity
|
||||
|
||||
@@ -3,8 +3,8 @@ import Utility from "../Utility"
|
||||
|
||||
export default class NaturalNumberEntity extends IntegerEntity {
|
||||
|
||||
constructor(options = {}) {
|
||||
super(options)
|
||||
constructor(values) {
|
||||
super(values)
|
||||
this.value = Math.round(Utility.clamp(this.value, 0))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import IntegerEntity from "./IntegerEntity"
|
||||
import MacroGraphReferenceEntity from "./MacroGraphReferenceEntity"
|
||||
import ObjectReferenceEntity from "./ObjectReferenceEntity"
|
||||
import PinEntity from "./PinEntity"
|
||||
import SymbolEntity from "./SymbolEntity"
|
||||
import TypeInitialization from "./TypeInitialization"
|
||||
import Utility from "../Utility"
|
||||
import VariableReferenceEntity from "./VariableReferenceEntity"
|
||||
@@ -18,6 +19,7 @@ export default class ObjectEntity extends IEntity {
|
||||
Name: "",
|
||||
bIsPureFunc: new TypeInitialization(Boolean, false, false),
|
||||
VariableReference: new TypeInitialization(VariableReferenceEntity, false, null),
|
||||
SelfContextInfo: new TypeInitialization(SymbolEntity, false, null),
|
||||
FunctionReference: new TypeInitialization(FunctionReferenceEntity, false, null,),
|
||||
EventReference: new TypeInitialization(FunctionReferenceEntity, false, null,),
|
||||
TargetType: new TypeInitialization(ObjectReferenceEntity, false, null),
|
||||
@@ -36,8 +38,8 @@ export default class ObjectEntity extends IEntity {
|
||||
static nameRegex = /^(\w+?)(?:_(\d+))?$/
|
||||
static sequencerScriptingNameRegex = /\/Script\/SequencerScripting\.MovieSceneScripting(.+)Channel/
|
||||
|
||||
constructor(options = {}) {
|
||||
super(options)
|
||||
constructor(values) {
|
||||
super(values)
|
||||
/** @type {ObjectReferenceEntity} */ this.Class
|
||||
/** @type {String} */ this.Name
|
||||
/** @type {Boolean?} */ this.bIsPureFunc
|
||||
|
||||
@@ -7,13 +7,13 @@ export default class ObjectReferenceEntity extends IEntity {
|
||||
path: String,
|
||||
}
|
||||
|
||||
constructor(options = {}) {
|
||||
if (options.constructor !== Object) {
|
||||
options = {
|
||||
path: options
|
||||
constructor(values = {}) {
|
||||
if (values.constructor !== Object) {
|
||||
values = {
|
||||
path: values
|
||||
}
|
||||
}
|
||||
super(options)
|
||||
super(values)
|
||||
/** @type {String} */ this.type
|
||||
/** @type {String} */ this.path
|
||||
}
|
||||
|
||||
@@ -6,8 +6,8 @@ export default class PathSymbolEntity extends IEntity {
|
||||
value: String,
|
||||
}
|
||||
|
||||
constructor(options = {}) {
|
||||
super(options)
|
||||
constructor(values) {
|
||||
super(values)
|
||||
/** @type {String} */ this.value
|
||||
}
|
||||
|
||||
|
||||
@@ -83,8 +83,8 @@ export default class PinEntity extends IEntity {
|
||||
: entity
|
||||
}
|
||||
|
||||
constructor(options = {}) {
|
||||
super(options)
|
||||
constructor(values = {}) {
|
||||
super(values)
|
||||
/** @type {GuidEntity} */ this.PinId
|
||||
/** @type {String} */ this.PinName
|
||||
/** @type {LocalizedTextEntity | String} */ this.PinFriendlyName
|
||||
|
||||
@@ -9,8 +9,8 @@ export default class PinReferenceEntity extends IEntity {
|
||||
pinGuid: GuidEntity,
|
||||
}
|
||||
|
||||
constructor(options = {}) {
|
||||
super(options)
|
||||
constructor(values) {
|
||||
super(values)
|
||||
/** @type {PathSymbolEntity} */ this.objectName
|
||||
/** @type {GuidEntity} */ this.pinGuid
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ export default class RotatorEntity extends IEntity {
|
||||
Y: Number,
|
||||
}
|
||||
|
||||
constructor(values = {}) {
|
||||
constructor(values) {
|
||||
super(values)
|
||||
/** @type {Number} */ this.R
|
||||
/** @type {Number} */ this.P
|
||||
|
||||
13
js/entity/SymbolEntity.js
Normal file
13
js/entity/SymbolEntity.js
Normal file
@@ -0,0 +1,13 @@
|
||||
import IEntity from "./IEntity"
|
||||
|
||||
export default class SymbolEntity extends IEntity {
|
||||
|
||||
static attributes = {
|
||||
value: String
|
||||
}
|
||||
|
||||
constructor(values) {
|
||||
super(values)
|
||||
/** @type {String} */ this.value
|
||||
}
|
||||
}
|
||||
@@ -7,10 +7,9 @@ export default class RealUnitEntity extends IEntity {
|
||||
value: 0,
|
||||
}
|
||||
|
||||
/** @param {Object | Number | String} options */
|
||||
constructor(options = 0) {
|
||||
super(options)
|
||||
/** @type {Number} */
|
||||
/** @param {Object | Number | String} values */
|
||||
constructor(values = 0) {
|
||||
super(values)
|
||||
this.value = Utility.clamp(this.value, 0, 1)
|
||||
}
|
||||
|
||||
@@ -21,4 +20,4 @@ export default class RealUnitEntity extends IEntity {
|
||||
toString() {
|
||||
return this.value.toFixed(6)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ export default class UnknownKeysEntity extends IEntity {
|
||||
lookbehind: new TypeInitialization(String, false, "", false, true)
|
||||
}
|
||||
|
||||
constructor(values = {}) {
|
||||
constructor(values) {
|
||||
super(values)
|
||||
/** @type {String} */ this.lookbehind
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ export default class VariableReferenceEntity extends IEntity {
|
||||
bSelfContext: new TypeInitialization(Boolean, false, false)
|
||||
}
|
||||
|
||||
constructor(values = {}) {
|
||||
constructor(values) {
|
||||
super(values)
|
||||
/** @type {String} */ this.MemberName
|
||||
/** @type {GuidEntity} */ this.GuidEntity
|
||||
|
||||
@@ -8,8 +8,8 @@ export default class VectorEntity extends IEntity {
|
||||
Z: Number,
|
||||
}
|
||||
|
||||
constructor(options = {}) {
|
||||
super(options)
|
||||
constructor(values) {
|
||||
super(values)
|
||||
/** @type {Number} */ this.X
|
||||
/** @type {Number} */ this.Y
|
||||
/** @type {Number} */ this.Z
|
||||
|
||||
Reference in New Issue
Block a user