merge
This commit is contained in:
@@ -1,3 +1,85 @@
|
||||
## 0.1.0+9
|
||||
|
||||
- Update a dependency to the latest release.
|
||||
|
||||
## 0.1.0+8
|
||||
|
||||
- Update a dependency to the latest release.
|
||||
|
||||
## 0.1.0+7
|
||||
|
||||
- Update a dependency to the latest release.
|
||||
|
||||
## 0.1.0+6
|
||||
|
||||
- Update a dependency to the latest release.
|
||||
|
||||
## 0.1.0+5
|
||||
|
||||
- Update a dependency to the latest release.
|
||||
|
||||
## 0.1.0+4
|
||||
|
||||
- Update a dependency to the latest release.
|
||||
|
||||
## 0.1.0+3
|
||||
|
||||
- Update a dependency to the latest release.
|
||||
|
||||
## 0.1.0+2
|
||||
|
||||
- Update a dependency to the latest release.
|
||||
|
||||
## 0.1.0+1
|
||||
|
||||
- Update a dependency to the latest release.
|
||||
|
||||
## 0.1.0
|
||||
|
||||
- Graduate package to a stable release. See pre-releases prior to this version for changelog entries.
|
||||
|
||||
## 0.1.0-dev.8.0.0
|
||||
|
||||
- Update a dependency to the latest release.
|
||||
|
||||
## 0.1.0-dev.7.0
|
||||
|
||||
- Update a dependency to the latest release.
|
||||
|
||||
## 0.1.0-dev.6.0
|
||||
|
||||
- Update a dependency to the latest release.
|
||||
|
||||
## 0.1.0-dev.5.0
|
||||
|
||||
- Update a dependency to the latest release.
|
||||
|
||||
## 0.1.0-dev.4.0
|
||||
|
||||
> Note: This release has breaking changes.
|
||||
|
||||
- **BREAKING** **CHORE**: restructure viewer folders as libraries to only export the public interface.
|
||||
|
||||
## 0.1.0-dev.1.0
|
||||
|
||||
> Note: This release has breaking changes.
|
||||
|
||||
- **FIX**: (flutter/web) use window.devicePixelRatio for viewport.
|
||||
- **FEAT**: (flutter) (web) use options to determine whether to create canvas, and set fixed position + offset.
|
||||
- **FEAT**: add ThermionFlutterOptions classes, rename interface parameter for offsetTop and ensure pixelRatio is passed to resizeTexture.
|
||||
- **BREAKING** **FEAT**: (flutter) (web) upgrade package:web dep to 1.0.0.
|
||||
- **BREAKING** **FEAT**: (web) (flutter) create canvas when createViewer is called (no longer need to manually add canvas element to web HTML).
|
||||
- **BREAKING** **FEAT**: resize canvas on web.
|
||||
|
||||
## 0.0.3
|
||||
|
||||
- **FEAT**: allow passing assetPathPrefix to ThermionViewerWasm to account for Flutter build asset paths.
|
||||
- **FEAT**: allow passing assetPathPrefix to ThermionViewerWasm to account for Flutter build asset paths.
|
||||
|
||||
## 0.0.2
|
||||
|
||||
- **FEAT**: allow passing assetPathPrefix to ThermionViewerWasm to account for Flutter build asset paths.
|
||||
|
||||
## 0.0.1+9
|
||||
|
||||
- Update a dependency to the latest release.
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
import 'package:thermion_dart/thermion_dart/compatibility/web/interop/thermion_viewer_wasm.dart';
|
||||
import 'package:thermion_dart/thermion_dart/thermion_viewer.dart';
|
||||
import 'package:thermion_flutter_platform_interface/thermion_flutter_platform_interface.dart';
|
||||
import 'package:thermion_flutter_platform_interface/thermion_flutter_texture.dart';
|
||||
import 'package:flutter_web_plugins/flutter_web_plugins.dart';
|
||||
import 'package:web/web.dart';
|
||||
|
||||
class ThermionFlutterWebPlugin extends ThermionFlutterPlatform {
|
||||
static void registerWith(Registrar registrar) {
|
||||
ThermionFlutterPlatform.instance = ThermionFlutterWebPlugin();
|
||||
}
|
||||
|
||||
@override
|
||||
Future<ThermionFlutterTexture?> createTexture(
|
||||
int width, int height, int offsetLeft, int offsetRight) async {
|
||||
return ThermionFlutterTexture(null, null, 0, 0, null);
|
||||
}
|
||||
|
||||
@override
|
||||
Future destroyTexture(ThermionFlutterTexture texture) async {
|
||||
// noop
|
||||
}
|
||||
|
||||
@override
|
||||
Future<ThermionFlutterTexture?> resizeTexture(ThermionFlutterTexture texture,
|
||||
int width, int height, int offsetLeft, int offsetRight) async {
|
||||
return ThermionFlutterTexture(null, null, 0, 0, null);
|
||||
}
|
||||
|
||||
Future<ThermionViewer> createViewer({String? uberArchivePath}) async {
|
||||
final canvas = document.getElementById("canvas") as HTMLCanvasElement;
|
||||
canvas.width = window.innerWidth;
|
||||
canvas.height = window.innerHeight;
|
||||
|
||||
var width = window.innerWidth;
|
||||
var height = window.innerHeight;
|
||||
|
||||
var viewer = ThermionViewerWasm(assetPathPrefix: "/assets/");
|
||||
await viewer.initialize(width, height, uberArchivePath: uberArchivePath);
|
||||
return viewer;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
import 'package:thermion_flutter_platform_interface/thermion_flutter_platform_interface.dart';
|
||||
|
||||
class ThermionFlutterWebOptions extends ThermionFlutterOptions {
|
||||
|
||||
final bool createCanvas;
|
||||
final bool importCanvasAsWidget;
|
||||
|
||||
ThermionFlutterWebOptions(
|
||||
{this.importCanvasAsWidget = false,
|
||||
this.createCanvas = true,
|
||||
String? uberarchivePath})
|
||||
: super(uberarchivePath: uberarchivePath);
|
||||
|
||||
const ThermionFlutterWebOptions.empty(
|
||||
{this.importCanvasAsWidget = false,
|
||||
this.createCanvas = true,
|
||||
String? uberarchivePath})
|
||||
: super.empty();
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
name: thermion_flutter_web
|
||||
description: A web platform interface for the thermion_flutter plugin.
|
||||
repository: https://github.com/nmfisher/thermion_flutter/thermion_flutter
|
||||
version: 0.0.1+9
|
||||
version: 0.1.0+9
|
||||
|
||||
environment:
|
||||
sdk: ">=3.3.0 <4.0.0"
|
||||
@@ -19,9 +19,9 @@ dependencies:
|
||||
flutter:
|
||||
sdk: flutter
|
||||
plugin_platform_interface: ^2.1.0
|
||||
web: ^0.5.1
|
||||
thermion_dart: ^0.1.1+5
|
||||
thermion_flutter_platform_interface: ^0.1.0+9
|
||||
web: ^1.0.0
|
||||
thermion_dart: ^0.2.1-dev.0.0.8
|
||||
thermion_flutter_platform_interface: ^0.2.1-dev.7
|
||||
flutter_web_plugins:
|
||||
sdk: flutter
|
||||
|
||||
|
||||
Reference in New Issue
Block a user