google / marzipano

A 360° media viewer for the modern web.
http://www.marzipano.net
Apache License 2.0
1.95k stars 992 forks source link

Using DeviceOrientationControlMethod with Vue.js #422

Open ismaildkc opened 2 years ago

ismaildkc commented 2 years ago

I need to use DeviceOrientationControlMethod control on mobile But i can't figure it in Vue.js

var Marzipano = require("../plugins/marzipano/marzipano.js"); import * as DeviceOrientationControlMethod from "../plugins/marzipano/js/DeviceOrientationControlMethod.js";

I'm importing like this but it returns "Marzipano is not defined" in DeviceOrientationControlMethod.js

Thank for your help...

trevorparscal commented 2 years ago

The plugin itself also has a Marzipano import/require statement. You'll need to edit the plugin to ensure that it's able to find wherever you've put Marzipano. In my case, I use Marzipano as an NPM module, but if you have a copy in a lib folder or something, you'll need to adjust the path to the module accordingly.