panorama: fixed initial longitude

This commit is contained in:
Thibault Deckers 2022-06-19 17:16:54 +09:00
parent cf3adbf503
commit c05538c6ec
5 changed files with 15 additions and 15 deletions

View file

@ -50,7 +50,8 @@ class MimeTypes {
static const aviVnd = 'video/vnd.avi';
static const flv = 'video/flv';
static const flvX = 'video/x-flv';
static const mkv = 'video/x-matroska';
static const mkv = 'video/mkv';
static const mkvX = 'video/x-matroska';
static const mov = 'video/quicktime';
static const mp2t = 'video/mp2t'; // .m2ts, .ts
static const mp2ts = 'video/mp2ts'; // .ts (prefer `mp2t` when possible)
@ -79,7 +80,7 @@ class MimeTypes {
static const Set<String> _knownOpaqueImages = {jpeg};
static const Set<String> _knownVideos = {v3gpp, asf, avi, aviVnd, flv, flvX, mkv, mov, mp2t, mp2ts, mp4, mpeg, ogv, webm, wmv};
static const Set<String> _knownVideos = {v3gpp, asf, avi, aviVnd, flv, flvX, mkv, mkvX, mov, mp2t, mp2ts, mp4, mpeg, ogv, webm, wmv};
static final Set<String> knownMediaTypes = {
anyImage,

View file

@ -279,7 +279,7 @@ class Constants {
sourceUrl: 'https://github.com/flutter/packages/tree/master/packages/palette_generator',
),
Dependency(
name: 'Panorama',
name: 'Panorama (Aves fork)',
license: 'Apache 2.0',
sourceUrl: 'https://github.com/zesage/panorama',
),

View file

@ -13,7 +13,6 @@ import 'package:aves/widgets/viewer/overlay/common.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/scheduler.dart';
import 'package:latlong2/latlong.dart';
import 'package:panorama/panorama.dart';
import 'package:provider/provider.dart';
@ -76,11 +75,7 @@ class _PanoramaPageState extends State<PanoramaPage> {
final fullSize = info.fullPanoSize!;
final longitude = ((croppedArea.left + croppedArea.width / 2) / fullSize.width - 1 / 2) * 360;
return Panorama(
// TODO TLAD [panorama] fork and fix
// as of panorama v0.4.0, doc says `latitude` and `longitude` parameters are in degrees,
// but they are actually converted from radians in state initialization
// as of panorama v0.4.0, state uses longitude in degrees as radians with `Quaternion.axisAngle`
longitude: degToRadian(longitude),
longitude: longitude,
sensorControl: sensorControl,
croppedArea: croppedArea,
croppedFullWidth: fullSize.width,

View file

@ -724,10 +724,12 @@ packages:
panorama:
dependency: "direct main"
description:
name: panorama
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.0"
path: "."
ref: aves
resolved-ref: "0050dc1aee451f821961980ea8b9c1eb3d131c01"
url: "https://github.com/deckerst/aves_panorama.git"
source: git
version: "0.4.1"
path:
dependency: "direct main"
description:

View file

@ -62,8 +62,10 @@ dependencies:
overlay_support:
package_info_plus:
palette_generator:
# TODO TLAD as of 2022/06/18, latest version (v0.4.1) has this issue: https://github.com/zesage/panorama/issues/25
panorama: 0.4.0
panorama:
git:
url: https://github.com/deckerst/aves_panorama.git
ref: aves
path:
pdf:
percent_indicator: