naver / egjs-view360

360 integrated viewing solution
https://naver.github.io/egjs-view360/
MIT License
500 stars 90 forks source link

fix: low performance due to proxy wrapping #411

Closed WoodNeck closed 1 year ago

WoodNeck commented 1 year ago

Details

This fixes low WebGL performance due to Vue's proxy wrapping when using projection in data(). basic demo to reproduce this issue:

<template>
  <div class="wrapper">
    <View360
      ref="view360"
      class="is-1by1"
      :projection="projection"
    />
  </div>
</template>
<script>
import { View360, EquirectProjection } from "@egjs/vue-view360";
import "@egjs/view360/css/view360.min.css";

export default {
  data() {
    return {
      projection: new EquirectProjection({
        src: "https://iili.io/HGJXXr7.jpg",
      })
    };
  },
  components: {
    View360,
  },
};
</script>