|
@@ -30598,7 +30598,7 @@ var DeviceInputSystem = /** @class */ (function () {
|
|
* @returns Current value of input
|
|
* @returns Current value of input
|
|
*/
|
|
*/
|
|
/**
|
|
/**
|
|
- * Checks for current device input value, given an id and input index
|
|
|
|
|
|
+ * Checks for current device input value, given an id and input index. Throws exception if requested device not initialized.
|
|
* @param deviceType Enum specifiying device type
|
|
* @param deviceType Enum specifiying device type
|
|
* @param deviceSlot "Slot" or index that device is referenced in
|
|
* @param deviceSlot "Slot" or index that device is referenced in
|
|
* @param inputIndex Id of input to be checked
|
|
* @param inputIndex Id of input to be checked
|
|
@@ -30648,7 +30648,7 @@ var DeviceInputSystem = /** @class */ (function () {
|
|
if (!this._inputs[deviceType][deviceSlot]) {
|
|
if (!this._inputs[deviceType][deviceSlot]) {
|
|
var device = new Array(numberOfInputs);
|
|
var device = new Array(numberOfInputs);
|
|
for (var i = 0; i < numberOfInputs; i++) {
|
|
for (var i = 0; i < numberOfInputs; i++) {
|
|
- device[i] = null;
|
|
|
|
|
|
+ device[i] = 0; /* set device input as unpressed */
|
|
}
|
|
}
|
|
this._inputs[deviceType][deviceSlot] = device;
|
|
this._inputs[deviceType][deviceSlot] = device;
|
|
this.onDeviceConnected(deviceType, deviceSlot);
|
|
this.onDeviceConnected(deviceType, deviceSlot);
|
|
@@ -30709,6 +30709,9 @@ var DeviceInputSystem = /** @class */ (function () {
|
|
if (!_this._inputs[deviceType][deviceSlot]) {
|
|
if (!_this._inputs[deviceType][deviceSlot]) {
|
|
_this._pointerActive = true;
|
|
_this._pointerActive = true;
|
|
_this._registerDevice(deviceType, deviceSlot, DeviceInputSystem._MAX_POINTER_INPUTS);
|
|
_this._registerDevice(deviceType, deviceSlot, DeviceInputSystem._MAX_POINTER_INPUTS);
|
|
|
|
+ var pointer_1 = _this._inputs[deviceType][deviceSlot]; /* initalize our pointer position immediately after registration */
|
|
|
|
+ pointer_1[0] = evt.clientX;
|
|
|
|
+ pointer_1[1] = evt.clientY;
|
|
}
|
|
}
|
|
var pointer = _this._inputs[deviceType][deviceSlot];
|
|
var pointer = _this._inputs[deviceType][deviceSlot];
|
|
if (pointer) {
|
|
if (pointer) {
|
|
@@ -30729,6 +30732,9 @@ var DeviceInputSystem = /** @class */ (function () {
|
|
if (!_this._inputs[deviceType][deviceSlot]) {
|
|
if (!_this._inputs[deviceType][deviceSlot]) {
|
|
_this._pointerActive = true;
|
|
_this._pointerActive = true;
|
|
_this._registerDevice(deviceType, deviceSlot, DeviceInputSystem._MAX_POINTER_INPUTS);
|
|
_this._registerDevice(deviceType, deviceSlot, DeviceInputSystem._MAX_POINTER_INPUTS);
|
|
|
|
+ var pointer_2 = _this._inputs[deviceType][deviceSlot]; /* initalize our pointer position immediately after registration */
|
|
|
|
+ pointer_2[0] = evt.clientX;
|
|
|
|
+ pointer_2[1] = evt.clientY;
|
|
}
|
|
}
|
|
var pointer = _this._inputs[deviceType][deviceSlot];
|
|
var pointer = _this._inputs[deviceType][deviceSlot];
|
|
if (pointer) {
|
|
if (pointer) {
|
|
@@ -182580,6 +182586,7 @@ var SpriteManager = /** @class */ (function () {
|
|
if (this._scene.useRightHandedSystem) {
|
|
if (this._scene.useRightHandedSystem) {
|
|
engine.setState(culling, zOffset, false, true);
|
|
engine.setState(culling, zOffset, false, true);
|
|
}
|
|
}
|
|
|
|
+ engine.unbindInstanceAttributes();
|
|
};
|
|
};
|
|
/**
|
|
/**
|
|
* Release associated resources
|
|
* Release associated resources
|