Skip to content

Commit

Permalink
Merge pull request #5155 from ccnmtl/gas-pixi
Browse files Browse the repository at this point in the history
Gas Retention sim: Update build for current pixi version (7.2.4)
  • Loading branch information
ndittren authored Aug 31, 2023
2 parents 7e613a1 + 626f6b3 commit c8eedac
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 148 deletions.
2 changes: 1 addition & 1 deletion gas-retention-simulator/dist/bundle.js

Large diffs are not rendered by default.

137 changes: 1 addition & 136 deletions gas-retention-simulator/dist/bundle.js.LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,119 +5,7 @@ object-assign
*/

/*!
* @pixi/app - v6.3.0
* Compiled Wed, 23 Mar 2022 18:58:56 UTC
*
* @pixi/app is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/

/*!
* @pixi/constants - v6.3.0
* Compiled Wed, 23 Mar 2022 18:58:56 UTC
*
* @pixi/constants is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/

/*!
* @pixi/core - v6.3.0
* Compiled Wed, 23 Mar 2022 18:58:56 UTC
*
* @pixi/core is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/

/*!
* @pixi/display - v6.3.0
* Compiled Wed, 23 Mar 2022 18:58:56 UTC
*
* @pixi/display is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/

/*!
* @pixi/extract - v6.3.0
* Compiled Wed, 23 Mar 2022 18:58:56 UTC
*
* @pixi/extract is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/

/*!
* @pixi/filter-displacement - v6.3.0
* Compiled Wed, 23 Mar 2022 18:58:56 UTC
*
* @pixi/filter-displacement is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/

/*!
* @pixi/math - v6.3.0
* Compiled Wed, 23 Mar 2022 18:58:56 UTC
*
* @pixi/math is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/

/*!
* @pixi/mesh-extras - v6.3.0
* Compiled Wed, 23 Mar 2022 18:58:56 UTC
*
* @pixi/mesh-extras is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/

/*!
* @pixi/mixin-get-child-by-name - v6.3.0
* Compiled Wed, 23 Mar 2022 18:58:56 UTC
*
* @pixi/mixin-get-child-by-name is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/

/*!
* @pixi/mixin-get-global-position - v6.3.0
* Compiled Wed, 23 Mar 2022 18:58:56 UTC
*
* @pixi/mixin-get-global-position is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/

/*!
* @pixi/polyfill - v6.3.0
* Compiled Wed, 23 Mar 2022 18:58:56 UTC
*
* @pixi/polyfill is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/

/*!
* @pixi/prepare - v6.3.0
* Compiled Wed, 23 Mar 2022 18:58:56 UTC
*
* @pixi/prepare is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/

/*!
* @pixi/ticker - v6.3.0
* Compiled Wed, 23 Mar 2022 18:58:56 UTC
*
* @pixi/ticker is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/

/*!
* @pixi/utils - v6.3.0
* Compiled Wed, 23 Mar 2022 18:58:56 UTC
*
* @pixi/utils is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/

/*!
* matter-js 0.18.0 by @liabru
* matter-js 0.19.0 by @liabru
* http://brm.io/matter-js/
* License MIT
*
Expand All @@ -144,29 +32,6 @@ object-assign
* THE SOFTWARE.
*/

/*!
* pixi.js - v6.3.0
* Compiled Wed, 23 Mar 2022 18:58:56 UTC
*
* pixi.js is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/

/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0

THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.

See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */

/*! For license information please see index.js.LICENSE.txt */

/*! https://mths.be/punycode v1.3.2 by @mathias */
Expand Down
2 changes: 1 addition & 1 deletion gas-retention-simulator/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ <h5 class="modal-title" id="aboutModalLabel">
</div>
<div class="modal-body">
<p class="sim-version">
gas-retention-simulator 0.0.1 (build date: 2021-06-28)
gas-retention-simulator 0.0.1 (build date: 2023-08-31)
</p>
<p>
See
Expand Down
1 change: 1 addition & 0 deletions gas-retention-simulator/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 12 additions & 10 deletions gas-retention-simulator/src/main.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,7 @@ class GasRetentionSimulator extends React.Component {
sharedLoader: true,
sharedTicker: true
});
app.renderer.events.features.globalMove = true;

this.app = app;
this.el.appendChild(app.view);
Expand All @@ -371,6 +372,10 @@ class GasRetentionSimulator extends React.Component {
document.addEventListener('touchup', this.onGasBarDragEnd);
document.addEventListener('touchupoutside', this.onGasBarDragEnd);

app.stage.eventMode = 'static';
app.stage.on('globalpointermove', this.onGasBarMove);
app.stage.on('globaltouchmove', this.onGasBarMove);

}
componentDidUpdate(prevProps, prevState) {
if (
Expand All @@ -387,7 +392,7 @@ class GasRetentionSimulator extends React.Component {
const proportion = this.state.gasProportions[parseInt(idx)] / 100;

const g = new PIXI.Graphics();
g.interactive = true;
g.eventMode = 'static';
g.cursor = 'pointer';
g.name = gas.id;
g.lineStyle(1, '0x' + toPaddedHexString(gas.color, 6));
Expand Down Expand Up @@ -420,17 +425,14 @@ class GasRetentionSimulator extends React.Component {

g.on('click', this.onGasBarClick)

.on('pointerdown', this.onGasBarDragStart)
.on('touchstart', this.onGasBarDragStart)

.on('pointerup', this.onGasBarDragEnd)
.on('pointerupoutside', this.onGasBarDragEnd)
.on('pointerdown', this.onGasBarDragStart)
.on('touchstart', this.onGasBarDragStart)

.on('touchend', this.onGasBarDragEnd)
.on('touchendoutside', this.onGasBarDragEnd)
.on('pointerup', this.onGasBarDragEnd)
.on('pointerupoutside', this.onGasBarDragEnd)

.on('pointermove', this.onGasBarMove)
.on('touchmove', this.onGasBarMove);
.on('touchend', this.onGasBarDragEnd)
.on('touchendoutside', this.onGasBarDragEnd);
}

drawGasBars(app) {
Expand Down

0 comments on commit c8eedac

Please sign in to comment.