mirror of https://github.com/OCA/web.git
[MIG] web_widget_model_viewer: Migration to 14.0
Co-authored-by: Andrea Piovesana <andrea.m.piovesana@gmail.com>pull/2044/head
parent
1e6942bd3f
commit
6de896bd80
|
@ -14,13 +14,13 @@ Model viewer widget
|
||||||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
:alt: License: AGPL-3
|
:alt: License: AGPL-3
|
||||||
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github
|
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github
|
||||||
:target: https://github.com/OCA/web/tree/12.0/web_widget_model_viewer
|
:target: https://github.com/OCA/web/tree/14.0/web_widget_model_viewer
|
||||||
:alt: OCA/web
|
:alt: OCA/web
|
||||||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
||||||
:target: https://translation.odoo-community.org/projects/web-12-0/web-12-0-web_widget_model_viewer
|
:target: https://translation.odoo-community.org/projects/web-14-0/web-14-0-web_widget_model_viewer
|
||||||
:alt: Translate me on Weblate
|
:alt: Translate me on Weblate
|
||||||
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
|
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
|
||||||
:target: https://runbot.odoo-community.org/runbot/162/12.0
|
:target: https://runbot.odoo-community.org/runbot/162/14.0
|
||||||
:alt: Try me on Runbot
|
:alt: Try me on Runbot
|
||||||
|
|
||||||
|badge1| |badge2| |badge3| |badge4| |badge5|
|
|badge1| |badge2| |badge3| |badge4| |badge5|
|
||||||
|
@ -33,13 +33,13 @@ The model to load is a GLTF 2.0 file format.
|
||||||
|
|
||||||
See `<https://www.khronos.org/gltf/>`_ and GLTF overview:
|
See `<https://www.khronos.org/gltf/>`_ and GLTF overview:
|
||||||
|
|
||||||
.. figure:: https://raw.githubusercontent.com/OCA/web/12.0/web_widget_model_viewer/static/img/gltfOverview.png
|
.. figure:: https://raw.githubusercontent.com/OCA/web/14.0/web_widget_model_viewer/static/img/gltfOverview.png
|
||||||
|
|
||||||
Many engine developers have already started transitioning to glTF 2.0 to reap performance, portability and quality benefits, including BabylonJS, three.js, Cesium, Sketchfab, and xeogl and instant3Dhub engines. glTF 2.0 is also seeing industry support by companies such as Adobe, Google, Marmoset, Microsoft, NVIDIA, Oculus, UX3D, and more as well as prominent universities such as, University of Pennsylvania and Sapienza University of Rome.
|
Many engine developers have already started transitioning to glTF 2.0 to reap performance, portability and quality benefits, including BabylonJS, three.js, Cesium, Sketchfab, and xeogl and instant3Dhub engines. glTF 2.0 is also seeing industry support by companies such as Adobe, Google, Marmoset, Microsoft, NVIDIA, Oculus, UX3D, and more as well as prominent universities such as, University of Pennsylvania and Sapienza University of Rome.
|
||||||
|
|
||||||
"example" directory contains the GLB file of a chair, that is rendered in the following way:
|
"example" directory contains the GLB file of a chair, that is rendered in the following way:
|
||||||
|
|
||||||
.. figure:: https://raw.githubusercontent.com/OCA/web/12.0/web_widget_model_viewer/static/img/Eames_Lounge_Chair.gif
|
.. figure:: https://raw.githubusercontent.com/OCA/web/14.0/web_widget_model_viewer/static/img/Eames_Lounge_Chair.gif
|
||||||
|
|
||||||
**Table of contents**
|
**Table of contents**
|
||||||
|
|
||||||
|
@ -54,6 +54,11 @@ Add ``widget="model_viewer"`` to your binary field in form view. Optionally you
|
||||||
Changelog
|
Changelog
|
||||||
=========
|
=========
|
||||||
|
|
||||||
|
14.0.1.0.0 (2021-10-07)
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
* [MIG] v14
|
||||||
|
|
||||||
12.0.2.0.0 (2020-07-14)
|
12.0.2.0.0 (2020-07-14)
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
@ -70,7 +75,7 @@ Bug Tracker
|
||||||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/web/issues>`_.
|
Bugs are tracked on `GitHub Issues <https://github.com/OCA/web/issues>`_.
|
||||||
In case of trouble, please check there if your issue has already been reported.
|
In case of trouble, please check there if your issue has already been reported.
|
||||||
If you spotted it first, help us smashing it by providing a detailed and welcomed
|
If you spotted it first, help us smashing it by providing a detailed and welcomed
|
||||||
`feedback <https://github.com/OCA/web/issues/new?body=module:%20web_widget_model_viewer%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
`feedback <https://github.com/OCA/web/issues/new?body=module:%20web_widget_model_viewer%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
||||||
|
|
||||||
Do not contact contributors directly about support or help with technical issues.
|
Do not contact contributors directly about support or help with technical issues.
|
||||||
|
|
||||||
|
@ -88,6 +93,7 @@ Contributors
|
||||||
|
|
||||||
* Lorenzo Battistini (https://takobi.online)
|
* Lorenzo Battistini (https://takobi.online)
|
||||||
* Andrea Piovesana (https://openindustry.it)
|
* Andrea Piovesana (https://openindustry.it)
|
||||||
|
* Marco Colombo (https://phi.technology)
|
||||||
|
|
||||||
Other credits
|
Other credits
|
||||||
~~~~~~~~~~~~~
|
~~~~~~~~~~~~~
|
||||||
|
@ -115,6 +121,6 @@ Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
|
||||||
|
|
||||||
|maintainer-eLBati|
|
|maintainer-eLBati|
|
||||||
|
|
||||||
This module is part of the `OCA/web <https://github.com/OCA/web/tree/12.0/web_widget_model_viewer>`_ project on GitHub.
|
This module is part of the `OCA/web <https://github.com/OCA/web/tree/14.0/web_widget_model_viewer>`_ project on GitHub.
|
||||||
|
|
||||||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
{
|
{
|
||||||
"name": "Model viewer widget",
|
"name": "Model viewer widget",
|
||||||
"summary": "Easily display interactive 3D models on the web & in AR",
|
"summary": "Easily display interactive 3D models on the web & in AR",
|
||||||
"version": "12.0.2.0.0",
|
"version": "14.0.1.0.0",
|
||||||
"development_status": "Beta",
|
"development_status": "Beta",
|
||||||
"category": "Web",
|
"category": "Web",
|
||||||
"website": "https://github.com/OCA/web",
|
"website": "https://github.com/OCA/web",
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 123 KiB |
|
@ -1,2 +1,3 @@
|
||||||
* Lorenzo Battistini (https://takobi.online)
|
* Lorenzo Battistini (https://takobi.online)
|
||||||
* Andrea Piovesana (https://openindustry.it)
|
* Andrea Piovesana (https://openindustry.it)
|
||||||
|
* Marco Colombo (https://phi.technology)
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
14.0.1.0.0 (2021-10-07)
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
* [MIG] v14
|
||||||
|
|
||||||
12.0.2.0.0 (2020-07-14)
|
12.0.2.0.0 (2020-07-14)
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
<meta name="generator" content="Docutils 0.15.1: http://docutils.sourceforge.net/" />
|
<meta name="generator" content="Docutils: http://docutils.sourceforge.net/" />
|
||||||
<title>Model viewer widget</title>
|
<title>Model viewer widget</title>
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
|
|
||||||
|
@ -367,87 +367,95 @@ ul.auto-toc {
|
||||||
!! This file is generated by oca-gen-addon-readme !!
|
!! This file is generated by oca-gen-addon-readme !!
|
||||||
!! changes will be overwritten. !!
|
!! changes will be overwritten. !!
|
||||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||||
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/web/tree/12.0/web_widget_model_viewer"><img alt="OCA/web" src="https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/web-12-0/web-12-0-web_widget_model_viewer"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/162/12.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
|
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/web/tree/14.0/web_widget_model_viewer"><img alt="OCA/web" src="https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/web-14-0/web-14-0-web_widget_model_viewer"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/162/14.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
|
||||||
<p><tt class="docutils literal"><span class="pre"><model-viewer></span></tt> is a web component that makes rendering interactive 3D models - optionally in AR - easy to do, on as many browsers and devices as possible. <tt class="docutils literal"><span class="pre"><model-viewer></span></tt> strives to give you great defaults for rendering quality and performance.</p>
|
<p><tt class="docutils literal"><span class="pre"><model-viewer></span></tt> is a web component that makes rendering interactive 3D models - optionally in AR - easy to do, on as many browsers and devices as possible. <tt class="docutils literal"><span class="pre"><model-viewer></span></tt> strives to give you great defaults for rendering quality and performance.</p>
|
||||||
<p>See <a class="reference external" href="https://github.com/google/model-viewer">source repository</a> and <a class="reference external" href="https://modelviewer.dev/">documentation</a>.</p>
|
<p>See <a class="reference external" href="https://github.com/google/model-viewer">source repository</a> and <a class="reference external" href="https://modelviewer.dev/">documentation</a>.</p>
|
||||||
<p>The model to load is a GLTF 2.0 file format.</p>
|
<p>The model to load is a GLTF 2.0 file format.</p>
|
||||||
<p>See <a class="reference external" href="https://www.khronos.org/gltf/">https://www.khronos.org/gltf/</a> and GLTF overview:</p>
|
<p>See <a class="reference external" href="https://www.khronos.org/gltf/">https://www.khronos.org/gltf/</a> and GLTF overview:</p>
|
||||||
<div class="figure">
|
<div class="figure">
|
||||||
<img alt="https://raw.githubusercontent.com/OCA/web/12.0/web_widget_model_viewer/static/img/gltfOverview.png" src="https://raw.githubusercontent.com/OCA/web/12.0/web_widget_model_viewer/static/img/gltfOverview.png" />
|
<img alt="https://raw.githubusercontent.com/OCA/web/14.0/web_widget_model_viewer/static/img/gltfOverview.png" src="https://raw.githubusercontent.com/OCA/web/14.0/web_widget_model_viewer/static/img/gltfOverview.png" />
|
||||||
</div>
|
</div>
|
||||||
<p>Many engine developers have already started transitioning to glTF 2.0 to reap performance, portability and quality benefits, including BabylonJS, three.js, Cesium, Sketchfab, and xeogl and instant3Dhub engines. glTF 2.0 is also seeing industry support by companies such as Adobe, Google, Marmoset, Microsoft, NVIDIA, Oculus, UX3D, and more as well as prominent universities such as, University of Pennsylvania and Sapienza University of Rome.</p>
|
<p>Many engine developers have already started transitioning to glTF 2.0 to reap performance, portability and quality benefits, including BabylonJS, three.js, Cesium, Sketchfab, and xeogl and instant3Dhub engines. glTF 2.0 is also seeing industry support by companies such as Adobe, Google, Marmoset, Microsoft, NVIDIA, Oculus, UX3D, and more as well as prominent universities such as, University of Pennsylvania and Sapienza University of Rome.</p>
|
||||||
<p>“example” directory contains the GLB file of a chair, that is rendered in the following way:</p>
|
<p>“example” directory contains the GLB file of a chair, that is rendered in the following way:</p>
|
||||||
<div class="figure">
|
<div class="figure">
|
||||||
<img alt="https://raw.githubusercontent.com/OCA/web/12.0/web_widget_model_viewer/static/img/Eames_Lounge_Chair.gif" src="https://raw.githubusercontent.com/OCA/web/12.0/web_widget_model_viewer/static/img/Eames_Lounge_Chair.gif" />
|
<img alt="https://raw.githubusercontent.com/OCA/web/14.0/web_widget_model_viewer/static/img/Eames_Lounge_Chair.gif" src="https://raw.githubusercontent.com/OCA/web/14.0/web_widget_model_viewer/static/img/Eames_Lounge_Chair.gif" />
|
||||||
</div>
|
</div>
|
||||||
<p><strong>Table of contents</strong></p>
|
<p><strong>Table of contents</strong></p>
|
||||||
<div class="contents local topic" id="contents">
|
<div class="contents local topic" id="contents">
|
||||||
<ul class="simple">
|
<ul class="simple">
|
||||||
<li><a class="reference internal" href="#usage" id="id3">Usage</a></li>
|
<li><a class="reference internal" href="#usage" id="id4">Usage</a></li>
|
||||||
<li><a class="reference internal" href="#changelog" id="id4">Changelog</a><ul>
|
<li><a class="reference internal" href="#changelog" id="id5">Changelog</a><ul>
|
||||||
<li><a class="reference internal" href="#id1" id="id5">12.0.2.0.0 (2020-07-14)</a></li>
|
<li><a class="reference internal" href="#id1" id="id6">14.0.1.0.0 (2021-10-07)</a></li>
|
||||||
<li><a class="reference internal" href="#id2" id="id6">12.0.1.0.0 (2020-07-10)</a></li>
|
<li><a class="reference internal" href="#id2" id="id7">12.0.2.0.0 (2020-07-14)</a></li>
|
||||||
|
<li><a class="reference internal" href="#id3" id="id8">12.0.1.0.0 (2020-07-10)</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li><a class="reference internal" href="#bug-tracker" id="id7">Bug Tracker</a></li>
|
<li><a class="reference internal" href="#bug-tracker" id="id9">Bug Tracker</a></li>
|
||||||
<li><a class="reference internal" href="#credits" id="id8">Credits</a><ul>
|
<li><a class="reference internal" href="#credits" id="id10">Credits</a><ul>
|
||||||
<li><a class="reference internal" href="#authors" id="id9">Authors</a></li>
|
<li><a class="reference internal" href="#authors" id="id11">Authors</a></li>
|
||||||
<li><a class="reference internal" href="#contributors" id="id10">Contributors</a></li>
|
<li><a class="reference internal" href="#contributors" id="id12">Contributors</a></li>
|
||||||
<li><a class="reference internal" href="#other-credits" id="id11">Other credits</a></li>
|
<li><a class="reference internal" href="#other-credits" id="id13">Other credits</a></li>
|
||||||
<li><a class="reference internal" href="#maintainers" id="id12">Maintainers</a></li>
|
<li><a class="reference internal" href="#maintainers" id="id14">Maintainers</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="usage">
|
<div class="section" id="usage">
|
||||||
<h1><a class="toc-backref" href="#id3">Usage</a></h1>
|
<h1><a class="toc-backref" href="#id4">Usage</a></h1>
|
||||||
<p>Add <tt class="docutils literal"><span class="pre">widget="model_viewer"</span></tt> to your binary field in form view. Optionally you can set <tt class="docutils literal">style</tt> and <tt class="docutils literal">max_upload_size</tt> (in MB) attributes.</p>
|
<p>Add <tt class="docutils literal"><span class="pre">widget="model_viewer"</span></tt> to your binary field in form view. Optionally you can set <tt class="docutils literal">style</tt> and <tt class="docutils literal">max_upload_size</tt> (in MB) attributes.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="changelog">
|
<div class="section" id="changelog">
|
||||||
<h1><a class="toc-backref" href="#id4">Changelog</a></h1>
|
<h1><a class="toc-backref" href="#id5">Changelog</a></h1>
|
||||||
<div class="section" id="id1">
|
<div class="section" id="id1">
|
||||||
<h2><a class="toc-backref" href="#id5">12.0.2.0.0 (2020-07-14)</a></h2>
|
<h2><a class="toc-backref" href="#id6">14.0.1.0.0 (2021-10-07)</a></h2>
|
||||||
|
<ul class="simple">
|
||||||
|
<li>[MIG] v14</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="id2">
|
||||||
|
<h2><a class="toc-backref" href="#id7">12.0.2.0.0 (2020-07-14)</a></h2>
|
||||||
<ul class="simple">
|
<ul class="simple">
|
||||||
<li>[IMP] fullscreen and view redesign</li>
|
<li>[IMP] fullscreen and view redesign</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="id2">
|
<div class="section" id="id3">
|
||||||
<h2><a class="toc-backref" href="#id6">12.0.1.0.0 (2020-07-10)</a></h2>
|
<h2><a class="toc-backref" href="#id8">12.0.1.0.0 (2020-07-10)</a></h2>
|
||||||
<ul class="simple">
|
<ul class="simple">
|
||||||
<li>Start of the history.</li>
|
<li>Start of the history.</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="bug-tracker">
|
<div class="section" id="bug-tracker">
|
||||||
<h1><a class="toc-backref" href="#id7">Bug Tracker</a></h1>
|
<h1><a class="toc-backref" href="#id9">Bug Tracker</a></h1>
|
||||||
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/web/issues">GitHub Issues</a>.
|
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/web/issues">GitHub Issues</a>.
|
||||||
In case of trouble, please check there if your issue has already been reported.
|
In case of trouble, please check there if your issue has already been reported.
|
||||||
If you spotted it first, help us smashing it by providing a detailed and welcomed
|
If you spotted it first, help us smashing it by providing a detailed and welcomed
|
||||||
<a class="reference external" href="https://github.com/OCA/web/issues/new?body=module:%20web_widget_model_viewer%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
<a class="reference external" href="https://github.com/OCA/web/issues/new?body=module:%20web_widget_model_viewer%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
||||||
<p>Do not contact contributors directly about support or help with technical issues.</p>
|
<p>Do not contact contributors directly about support or help with technical issues.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="credits">
|
<div class="section" id="credits">
|
||||||
<h1><a class="toc-backref" href="#id8">Credits</a></h1>
|
<h1><a class="toc-backref" href="#id10">Credits</a></h1>
|
||||||
<div class="section" id="authors">
|
<div class="section" id="authors">
|
||||||
<h2><a class="toc-backref" href="#id9">Authors</a></h2>
|
<h2><a class="toc-backref" href="#id11">Authors</a></h2>
|
||||||
<ul class="simple">
|
<ul class="simple">
|
||||||
<li>TAKOBI</li>
|
<li>TAKOBI</li>
|
||||||
<li>Openindustry.it</li>
|
<li>Openindustry.it</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="contributors">
|
<div class="section" id="contributors">
|
||||||
<h2><a class="toc-backref" href="#id10">Contributors</a></h2>
|
<h2><a class="toc-backref" href="#id12">Contributors</a></h2>
|
||||||
<ul class="simple">
|
<ul class="simple">
|
||||||
<li>Lorenzo Battistini (<a class="reference external" href="https://takobi.online">https://takobi.online</a>)</li>
|
<li>Lorenzo Battistini (<a class="reference external" href="https://takobi.online">https://takobi.online</a>)</li>
|
||||||
<li>Andrea Piovesana (<a class="reference external" href="https://openindustry.it">https://openindustry.it</a>)</li>
|
<li>Andrea Piovesana (<a class="reference external" href="https://openindustry.it">https://openindustry.it</a>)</li>
|
||||||
|
<li>Marco Colombo (<a class="reference external" href="https://phi.technology">https://phi.technology</a>)</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="other-credits">
|
<div class="section" id="other-credits">
|
||||||
<h2><a class="toc-backref" href="#id11">Other credits</a></h2>
|
<h2><a class="toc-backref" href="#id13">Other credits</a></h2>
|
||||||
<p>Chair © Copyright 2020 Shopify Inc., licensed under CC-BY-4.0.</p>
|
<p>Chair © Copyright 2020 Shopify Inc., licensed under CC-BY-4.0.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="maintainers">
|
<div class="section" id="maintainers">
|
||||||
<h2><a class="toc-backref" href="#id12">Maintainers</a></h2>
|
<h2><a class="toc-backref" href="#id14">Maintainers</a></h2>
|
||||||
<p>This module is maintained by the OCA.</p>
|
<p>This module is maintained by the OCA.</p>
|
||||||
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
|
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
|
||||||
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
|
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
|
||||||
|
@ -455,7 +463,7 @@ mission is to support the collaborative development of Odoo features and
|
||||||
promote its widespread use.</p>
|
promote its widespread use.</p>
|
||||||
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p>
|
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p>
|
||||||
<p><a class="reference external" href="https://github.com/eLBati"><img alt="eLBati" src="https://github.com/eLBati.png?size=40px" /></a></p>
|
<p><a class="reference external" href="https://github.com/eLBati"><img alt="eLBati" src="https://github.com/eLBati.png?size=40px" /></a></p>
|
||||||
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/web/tree/12.0/web_widget_model_viewer">OCA/web</a> project on GitHub.</p>
|
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/web/tree/14.0/web_widget_model_viewer">OCA/web</a> project on GitHub.</p>
|
||||||
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
|
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -26,23 +26,24 @@ odoo.define("web_widget_model_viewer.FieldBinaryModelViewer", function (require)
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
var max_upload_size = this.attrs.max_upload_size;
|
var max_upload_size = this.attrs.max_upload_size;
|
||||||
if (max_upload_size) {
|
if (max_upload_size) {
|
||||||
this.max_upload_size = parseInt(max_upload_size) * 1024 * 1024;
|
this.max_upload_size = parseInt(max_upload_size, 10) * 1024 * 1024;
|
||||||
} else {
|
} else {
|
||||||
this.max_upload_size = 250 * 1024 * 1024; // 250M
|
// 250M
|
||||||
|
this.max_upload_size = 250 * 1024 * 1024;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
_render: function () {
|
_render: function () {
|
||||||
var self = this;
|
var self = this;
|
||||||
var url = "";
|
var url = "";
|
||||||
if (this.value) {
|
if (this.value) {
|
||||||
if (!utils.is_bin_size(this.value)) {
|
if (utils.is_bin_size(this.value)) {
|
||||||
url = "data:model/gltf-binary;base64," + this.value;
|
|
||||||
} else {
|
|
||||||
url = session.url("/web/content", {
|
url = session.url("/web/content", {
|
||||||
model: this.model,
|
model: this.model,
|
||||||
id: JSON.stringify(this.res_id),
|
id: JSON.stringify(this.res_id),
|
||||||
field: this.name,
|
field: this.name,
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
url = "data:model/gltf-binary;base64," + this.value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var $glb = $(
|
var $glb = $(
|
||||||
|
@ -63,6 +64,7 @@ odoo.define("web_widget_model_viewer.FieldBinaryModelViewer", function (require)
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
/* eslint-disable complexity */
|
||||||
fullscreen: function (ev) {
|
fullscreen: function (ev) {
|
||||||
var isFullscreenAvailable =
|
var isFullscreenAvailable =
|
||||||
document.fullscreenEnabled ||
|
document.fullscreenEnabled ||
|
||||||
|
@ -91,17 +93,17 @@ odoo.define("web_widget_model_viewer.FieldBinaryModelViewer", function (require)
|
||||||
document.msExitFullscreen();
|
document.msExitFullscreen();
|
||||||
}
|
}
|
||||||
} else if (modelViewerElem.requestFullscreen) {
|
} else if (modelViewerElem.requestFullscreen) {
|
||||||
modelViewerElem.requestFullscreen();
|
modelViewerElem.requestFullscreen();
|
||||||
} else if (modelViewerElem.mozRequestFullScreen) {
|
} else if (modelViewerElem.mozRequestFullScreen) {
|
||||||
/* Firefox */
|
/* Firefox */
|
||||||
modelViewerElem.mozRequestFullScreen();
|
modelViewerElem.mozRequestFullScreen();
|
||||||
} else if (modelViewerElem.webkitRequestFullscreen) {
|
} else if (modelViewerElem.webkitRequestFullscreen) {
|
||||||
/* Chrome, Safari and Opera */
|
/* Chrome, Safari and Opera */
|
||||||
modelViewerElem.webkitRequestFullscreen();
|
modelViewerElem.webkitRequestFullscreen();
|
||||||
} else if (modelViewerElem.msRequestFullscreen) {
|
} else if (modelViewerElem.msRequestFullscreen) {
|
||||||
/* IE/Edge */
|
/* IE/Edge */
|
||||||
modelViewerElem.msRequestFullscreen();
|
modelViewerElem.msRequestFullscreen();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
console.error("ERROR : full screen not supported by web browser");
|
console.error("ERROR : full screen not supported by web browser");
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,6 @@
|
||||||
title="Clear"
|
title="Clear"
|
||||||
aria-label="Clear"
|
aria-label="Clear"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<span class="o_form_binary_progress">Uploading...</span>
|
<span class="o_form_binary_progress">Uploading...</span>
|
||||||
<t t-call="HiddenInputFile">
|
<t t-call="HiddenInputFile">
|
||||||
<t t-set="image_only" t-value="true" />
|
<t t-set="image_only" t-value="true" />
|
||||||
|
@ -29,7 +28,7 @@
|
||||||
</div>
|
</div>
|
||||||
</t>
|
</t>
|
||||||
<t t-name="FieldBinaryModelViewer-glb">
|
<t t-name="FieldBinaryModelViewer-glb">
|
||||||
<model-viewer
|
<model-viewer
|
||||||
t-att-src='url'
|
t-att-src='url'
|
||||||
t-att-border="widget.readonly ? 0 : 1"
|
t-att-border="widget.readonly ? 0 : 1"
|
||||||
t-att-name="widget.name"
|
t-att-name="widget.name"
|
||||||
|
@ -37,16 +36,16 @@
|
||||||
auto-rotate="1"
|
auto-rotate="1"
|
||||||
camera-controls="1"
|
camera-controls="1"
|
||||||
>
|
>
|
||||||
<div class="text-center mt-2 mb-2 mr-2">
|
<div class="text-center mt-2 mb-2 mr-2">
|
||||||
<span
|
<span
|
||||||
id="model-viewer-fullscreen"
|
id="model-viewer-fullscreen"
|
||||||
title="View fullscreen"
|
title="View fullscreen"
|
||||||
role="img"
|
role="img"
|
||||||
aria-label="Fullscreen"
|
aria-label="Fullscreen"
|
||||||
>
|
>
|
||||||
<i class="fa fa-arrows-alt fa-2x" />
|
<i class="fa fa-arrows-alt fa-2x" />
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</model-viewer>
|
</model-viewer>
|
||||||
</t>
|
</t>
|
||||||
</templates>
|
</templates>
|
||||||
|
|
|
@ -5,15 +5,11 @@
|
||||||
name="Web layout Model viewer"
|
name="Web layout Model viewer"
|
||||||
inherit_id="web.layout"
|
inherit_id="web.layout"
|
||||||
>
|
>
|
||||||
<xpath expr="//meta[@name='viewport']" position="after">
|
<xpath expr="//head" position="inside">
|
||||||
<script
|
<script
|
||||||
type="module"
|
type="module"
|
||||||
src="/web_widget_model_viewer/static/lib/model-viewer.min.js"
|
src="/web_widget_model_viewer/static/lib/model-viewer.min.js"
|
||||||
/>
|
/>
|
||||||
<script
|
|
||||||
nomodule="1"
|
|
||||||
src="/web_widget_model_viewer/static/lib/model-viewer-legacy.js"
|
|
||||||
/>
|
|
||||||
</xpath>
|
</xpath>
|
||||||
</template>
|
</template>
|
||||||
<template
|
<template
|
||||||
|
|
Loading…
Reference in New Issue