Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
botUpdated(calc: BotCalculationContext): void {
// Get value of iframe plane position.
this._localPosition = new Vector3(
calculateNumericalTagValue(
calc,
this.bot3D.bot,
'aux.iframe.x',
DEFAULT_IFRAME_LOCAL_POSITION.x
),
calculateNumericalTagValue(
calc,
this.bot3D.bot,
'aux.iframe.y',
DEFAULT_IFRAME_LOCAL_POSITION.y
),
calculateNumericalTagValue(
calc,
this.bot3D.bot,
'aux.iframe.z',
DEFAULT_IFRAME_LOCAL_POSITION.z
)
);
// Get value of iframe plane rotation.
this._localRotation = new Vector3(
calculateNumericalTagValue(
calc,
this.bot3D.bot,
'aux.iframe.rotation.x',
DEFUALT_IFRAME_LOCAL_ROTATION.x
),
calculateNumericalTagValue(
'aux.iframe.rotation.z',
DEFUALT_IFRAME_LOCAL_ROTATION.z
)
);
// Get value of iframe plane scale.
this._planeScale = calculateNumericalTagValue(
calc,
this.bot3D.bot,
'aux.iframe.scale',
DEFAULT_IFRAME_PLANE_SCALE
);
// Get value of iframe plane size.
const iframeSizeValue = new Vector2(
calculateNumericalTagValue(
calc,
this.bot3D.bot,
'aux.iframe.size.x',
DEFAULT_IFRAME_PLANE_SIZE.x
),
calculateNumericalTagValue(
calc,
this.bot3D.bot,
'aux.iframe.size.y',
DEFAULT_IFRAME_PLANE_SIZE.y
)
);
let iframeSizeValueChanged = false;
if (!iframeSizeValue.equals(this._planeSize)) {
this._planeSize = iframeSizeValue;
botUpdated(calc: BotCalculationContext): void {
// Get value of iframe plane position.
this._localPosition = new Vector3(
calculateNumericalTagValue(
calc,
this.bot3D.bot,
'aux.iframe.x',
DEFAULT_IFRAME_LOCAL_POSITION.x
),
calculateNumericalTagValue(
calc,
this.bot3D.bot,
'aux.iframe.y',
DEFAULT_IFRAME_LOCAL_POSITION.y
),
calculateNumericalTagValue(
calc,
this.bot3D.bot,
'aux.iframe.z',
DEFAULT_IFRAME_LOCAL_POSITION.z
// Get value of iframe plane rotation.
this._localRotation = new Vector3(
calculateNumericalTagValue(
calc,
this.bot3D.bot,
'aux.iframe.rotation.x',
DEFUALT_IFRAME_LOCAL_ROTATION.x
),
calculateNumericalTagValue(
calc,
this.bot3D.bot,
'aux.iframe.rotation.y',
DEFUALT_IFRAME_LOCAL_ROTATION.y
),
calculateNumericalTagValue(
calc,
this.bot3D.bot,
'aux.iframe.rotation.z',
DEFUALT_IFRAME_LOCAL_ROTATION.z
)
);
// Get value of iframe plane scale.
this._planeScale = calculateNumericalTagValue(
calc,
this.bot3D.bot,
'aux.iframe.scale',
DEFAULT_IFRAME_PLANE_SCALE
);
// Get value of iframe plane size.
calc,
this.bot3D.bot,
'aux.iframe.z',
DEFAULT_IFRAME_LOCAL_POSITION.z
)
);
// Get value of iframe plane rotation.
this._localRotation = new Vector3(
calculateNumericalTagValue(
calc,
this.bot3D.bot,
'aux.iframe.rotation.x',
DEFUALT_IFRAME_LOCAL_ROTATION.x
),
calculateNumericalTagValue(
calc,
this.bot3D.bot,
'aux.iframe.rotation.y',
DEFUALT_IFRAME_LOCAL_ROTATION.y
),
calculateNumericalTagValue(
calc,
this.bot3D.bot,
'aux.iframe.rotation.z',
DEFUALT_IFRAME_LOCAL_ROTATION.z
)
);
// Get value of iframe plane scale.
this._planeScale = calculateNumericalTagValue(
calc,
this._zoomable = calculateBooleanTagValue(
calc,
bot,
`aux.context.zoomable`,
true
);
this._zoomMin = calculateNumericalTagValue(
calc,
bot,
`aux.context.zoomable.min`,
null
);
this._zoomMax = calculateNumericalTagValue(
calc,
bot,
`aux.context.zoomable.max`,
null
);
this._rotatable = calculateBooleanTagValue(
calc,
bot,
`aux.context.rotatable`,
true
);
this._inventoryVisible = calculateBooleanTagValue(
calc,
bot,
() => {
const height = calculateScale(calc, bot, gridScale).y;
const offset = calculateNumericalTagValue(
calc,
bot,
`${context}.z`,
0
);
return height + offset * gridScale;
},
bot.id,
this._inventoryHeight = calculateNumericalTagValue(
calc,
bot,
`aux.context.inventory.height`,
0
);
this._playerZoom = calculateNumericalTagValue(
calc,
bot,
`aux.context.player.zoom`,
null
);
this._playerRotationX = calculateNumericalTagValue(
calc,
bot,
`aux.context.player.rotation.x`,
null
);
this._playerRotationY = calculateNumericalTagValue(
calc,
bot,
`aux.context.player.rotation.y`,
null
);
let invColor = calculateBotValue(
calc,
bot,
this._pannable = calculateBooleanTagValue(
calc,
bot,
`aux.context.pannable`,
true
);
this._panMinX = calculateNumericalTagValue(
calc,
bot,
`aux.context.pannable.min.x`,
null
);
this._panMaxX = calculateNumericalTagValue(
calc,
bot,
`aux.context.pannable.max.x`,
null
);
this._panMinY = calculateNumericalTagValue(
calc,
bot,
`aux.context.pannable.min.y`,
null
);
this._panMaxY = calculateNumericalTagValue(
calc,
bot,
this._panMaxY = calculateNumericalTagValue(
calc,
bot,
`aux.context.pannable.max.y`,
null
);
this._zoomable = calculateBooleanTagValue(
calc,
bot,
`aux.context.zoomable`,
true
);
this._zoomMin = calculateNumericalTagValue(
calc,
bot,
`aux.context.zoomable.min`,
null
);
this._zoomMax = calculateNumericalTagValue(
calc,
bot,
`aux.context.zoomable.max`,
null
);
this._rotatable = calculateBooleanTagValue(
calc,
bot,