Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to Aframe v1.4.2 #176

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<meta property="twitter:image" content="https://supermedium.com/moonrider/assets/img/splash.jpg">

<link rel="shortcut icon" href="assets/img/favicon.png" type="image/x-icon">
<script src="https://cdn.jsdelivr.net/gh/aframevr/aframe@37b219d2cf43c1f7cbd7ac4fc98e8ce5d914a1f7/dist/aframe-master.min.js"></script>
<script src="https://aframe.io/releases/1.4.1/aframe.min.js"></script>
<script src="build/build.js?v=3"></script>
</head>
<body>
Expand Down
51 changes: 7 additions & 44 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,90 +2,53 @@
"private": true,
"version": "1.0.0",
"scripts": {
"build": "cross-env NODE_ENV=production webpack",
"deploy": "npm run predeploy && ghpages [email protected]:supermedium/moonrider.git -p .ghpages && rm -rf .ghpages",
"build": "cross-env NODE_ENV=production NODE_OPTIONS=--openssl-legacy-provider webpack",
"deploy": "yarn run predeploy && ghpages [email protected]:Maxmystere/moonrider.git -p .ghpages && shx rm -rf .ghpages",
"lint": "semistandard -v | snazzy",
"lint:fix": "semistandard --fix",
"predeploy": "cross-env NODE_ENV=production npm run build && shx mkdir -p .ghpages && cp -r index.html assets build vendor CNAME .ghpages",
"start": "webpack-dev-server --host 0.0.0.0 --progress --colors --hot-only --inline --port 3000"
"predeploy": "cross-env NODE_ENV=production yarn run build && shx mkdir -p .ghpages && shx cp -r index.html assets build vendor CNAME .ghpages",
"start": "cross-env NODE_OPTIONS=--openssl-legacy-provider webpack serve --host 0.0.0.0 --progress --color --hot-only --inline --port 3000"
},
"dependencies": {
"@babel/cli": "^7.17.0",
"@babel/core": "^7.17.2",
"@babel/plugin-proposal-class-properties": "^7.16.7",
"@babel/plugin-proposal-decorators": "^7.17.2",
"@babel/plugin-proposal-do-expressions": "^7.16.7",
"@babel/plugin-proposal-export-default-from": "^7.16.7",
"@babel/plugin-proposal-export-namespace-from": "^7.16.7",
"@babel/plugin-proposal-function-bind": "^7.16.7",
"@babel/plugin-proposal-function-sent": "^7.16.7",
"@babel/plugin-proposal-json-strings": "^7.16.7",
"@babel/plugin-proposal-logical-assignment-operators": "^7.16.7",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.16.7",
"@babel/plugin-proposal-numeric-separator": "^7.16.7",
"@babel/plugin-proposal-optional-chaining": "^7.16.7",
"@babel/plugin-proposal-pipeline-operator": "^7.16.7",
"@babel/plugin-proposal-throw-expressions": "^7.16.7",
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/plugin-syntax-import-meta": "^7.10.4",
"@babel/preset-env": "^7.16.11",
"aframe-aabb-collider-component": "^3.1.0",
"aframe-atlas-uvs-component": "^2.1.0",
"aframe-atlas-uvs-component": "^3.0.0",
"aframe-audioanalyser-component": "^6.0.0",
"aframe-event-decorators": "^1.0.2",
"aframe-event-set-component": "^4.2.1",
"aframe-geometry-merger-component": "^2.0.0-beta1",
"aframe-haptics-component": "^1.6.3",
"aframe-layout-component": "^5.3.0",
"aframe-log-component": "^1.0.7",
"aframe-orbit-controls": "^1.2.0",
"aframe-proxy-event-component": "^2.1.0",
"aframe-render-order-component": "^1.1.0",
"aframe-slice9-component": "^1.0.0",
"aframe-state-component": "6.7.0",
"aframe-super-hot-html-loader": "^1.2.0",
"aframe-super-hot-loader": "^1.5.0",
"aframe-thumb-controls-component": "^2.0.2",
"ansi-html": "0.0.7",
"autoprefixer": "^7.2.3",
"babel-loader": "^8.0.5",
"babel-preset-minify": "^0.5.0",
"css-loader": "^0.28.7",
"debug": "^4.1.0",
"firebase": "^7.19.0",
"html-require-loader": "^1.0.1",
"ip": "1.1.5",
"json-loader": "^0.5.7",
"lodash.debounce": "^4.0.8",
"profane-words": "^1.3.1",
"promise-polyfill": "^8.1.0",
"style-loader": "^0.23.1",
"super-nunjucks-loader": "^2.0.0",
"uglify-es": "git://github.com/mishoo/UglifyJS2.git#harmony",
"uglify-js": "git://github.com/mishoo/UglifyJS2#harmony",
"uglifyjs-webpack-plugin": "0.4.6",
"url-loader": "^1.1.2",
"webpack": "^4.46.0",
"webpack-cli": "^4.10.0",
"webpack-glsl-loader": "^1.0.1",
"webpack-sources": "1.0.1",
"zip-loader": "github:ngokevin/ziploader#xhrdist",
"unzip-js": "^1.0.0"
},
"overrides": {
"aframe-render-order-component": {
"webpack": "~4.46.0"
},
"uglifyjs-webpack-plugin": {
"webpack": "~4.46.0"
}
},
"devDependencies": {
"aframe-super-hot-html-loader": "^1.2.0",
"cross-env": "4.0.0",
"ghpages": "0.0.10",
"semistandard": "10.0.0",
"shx": "^0.2.2",
"snazzy": "7.0.0",
"superagent": "^3.8.2",
"webpack-dev-server": "^3.2.0"
},
"semistandard": {
Expand Down
2 changes: 1 addition & 1 deletion src/components/beat-cut-fx.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ AFRAME.registerComponent('beat-cut-fx', {
for (let i = 0; i < this.pieces.length; i++) {
let piece = this.pieces[i];
piece.posVelocity.copy(AUX_VECTOR);
piece.rotation.z = THREE.Math.degToRad(ROTATIONS[beatDirection]);
piece.rotation.z = THREE.MathUtils.degToRad(ROTATIONS[beatDirection]);
if (correctHit) {
// Dir is a hardcoded value, based on the position of meshes in .OBJ files.
let dir = i % 2 == 0 ? -0.001 : 0.001;
Expand Down
4 changes: 2 additions & 2 deletions src/components/beat-generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -306,11 +306,11 @@ AFRAME.registerComponent('beat-generator', {
if (data.gameMode === 'ride') {
beatEl.components.plume.onGenerate(songPosition, horizontalPosition, verticalPosition,
this.playerHeight.beatOffset);
beatEl.setAttribute('render-order', renderOrder);
beatEl.setAttribute('render-order', renderOrder);
} else {
beatEl.components.beat.onGenerate(songPosition, horizontalPosition, verticalPosition,
cutDirection, this.playerHeight.beatOffset);
beatEl.components.beat.blockEl.object3D.renderOrder = renderOrder;
beatEl.components.beat.blockEl.object3D.renderOrder = renderOrder;
}
beatEl.play();
},
Expand Down
2 changes: 1 addition & 1 deletion src/components/beat.js
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ AFRAME.registerComponent('beat', {
el.object3D.position.x += this.beatSystem.horizontalPositions[horizontalPosition];

if (data.type !== DOT) {
el.object3D.rotation.z = THREE.Math.degToRad(ROTATIONS[cutDirection]);
el.object3D.rotation.z = THREE.MathUtils.degToRad(ROTATIONS[cutDirection]);
}

// Set up rotation warmup.
Expand Down
6 changes: 3 additions & 3 deletions src/components/raycaster-target.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ AFRAME.registerComponent('raycaster-target', {

raycastTarget.object3D.visible = false;
raycastTarget.object3D.position.copy(data.position);
raycastTarget.object3D.rotation.x = THREE.Math.degToRad(data.rotation.x);
raycastTarget.object3D.rotation.y = THREE.Math.degToRad(data.rotation.y);
raycastTarget.object3D.rotation.z = THREE.Math.degToRad(data.rotation.z);
raycastTarget.object3D.rotation.x = THREE.MathUtils.degToRad(data.rotation.x);
raycastTarget.object3D.rotation.y = THREE.MathUtils.degToRad(data.rotation.y);
raycastTarget.object3D.rotation.z = THREE.MathUtils.degToRad(data.rotation.z);

el.appendChild(raycastTarget);
};
Expand Down
2 changes: 1 addition & 1 deletion src/components/tail.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ AFRAME.registerComponent('tail', {
init: function () {
const data = this.data;

const geometry = this.geometry = new THREE.PlaneBufferGeometry(
const geometry = this.geometry = new THREE.PlaneGeometry(
data.width, data.height, data.segments, 1);
geometry.deleteAttribute('normal');
geometry.translate(data.width / 2, 0, 0);
Expand Down
56 changes: 0 additions & 56 deletions src/components/text-geometry.js

This file was deleted.

3 changes: 2 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ console.timeEnd = () => {
};

require('../vendor/BufferGeometryUtils');
require('../vendor/aframe-text-geometry-component.min');

require('aframe-aabb-collider-component');
require('aframe-atlas-uvs-component');
Expand All @@ -21,7 +22,7 @@ if (process.env.DEBUG_LOG) {
}
require('aframe-orbit-controls');
require('aframe-proxy-event-component');
require('aframe-render-order-component');
require('../vendor/aframe-render-order-component.min');
require('aframe-state-component');
require('aframe-slice9-component');
require('aframe-thumb-controls-component');
Expand Down
2 changes: 1 addition & 1 deletion vendor/Curve.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Modified to allow optional targets for GC.
// TODO: Upstream.
const _Math = THREE.Math;
const _Math = THREE.MathUtils;
const Vector3 = THREE.Vector3;
const Matrix4 = THREE.Matrix4;

Expand Down
Loading