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

feat: vendor threejs files #247

Merged
merged 10 commits into from
Aug 31, 2021
Merged
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
158 changes: 86 additions & 72 deletions package-lock.json

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

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
"ignore": [
"dist",
"docs",
"vendor",
"test/dist"
]
},
Expand All @@ -80,7 +81,7 @@
"dependencies": {
"@babel/runtime": "^7.14.5",
"global": "^4.4.0",
"three": "0.93.0",
"three": "0.125.2",
"video.js": "^6 || ^7",
"webvr-polyfill": "0.10.12"
},
Expand Down
13 changes: 0 additions & 13 deletions scripts/rollup-example-resolver.js

This file was deleted.

52 changes: 0 additions & 52 deletions scripts/rollup-replace.js

This file was deleted.

19 changes: 1 addition & 18 deletions scripts/rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,8 @@
const generate = require('videojs-generate-rollup-config');
const replace = require('./rollup-replace');
const exampleResolver = require('./rollup-example-resolver');

// see https://github.com/videojs/videojs-generate-rollup-config
// for options
const options = {
primedPlugins(defaults) {
return Object.assign(defaults, {exampleResolver,replace});
},
plugins(defaults) {
defaults.module.unshift('exampleResolver')

// add replace just after json for each build
Object.keys(defaults).forEach((type) => {
defaults[type].splice(defaults[type].indexOf('json') + 1, '0', 'replace');
});

return defaults;
}
};
const config = generate(options);
const config = generate({});

// Add additional builds/customization here!

Expand Down
2 changes: 1 addition & 1 deletion src/canvas-player-controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class CanvasPlayerControls extends videojs.EventTarget {
}

// We want the same behavior in Desktop for VR360 and standard player
if (e.type == 'mouseup') {
if (e.type === 'mouseup') {
this.togglePlay();
}

Expand Down
4 changes: 2 additions & 2 deletions src/orbit-orientation-controls.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as THREE from 'three';
import OrbitControls from 'three/examples/js/controls/OrbitControls.js';
import DeviceOrientationControls from 'three/examples/js/controls/DeviceOrientationControls.js';
import OrbitControls from '../vendor/three/OrbitControls.js';
import DeviceOrientationControls from '../vendor/three/DeviceOrientationControls.js';

/**
* Convert a quaternion to an angle
Expand Down
Loading