refactor: rearrange some stubs/imports for easier web WASM deployment
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
name: thermion_workspace
|
name: thermion_workspace
|
||||||
|
|
||||||
packages:
|
packages:
|
||||||
- thermion_dart
|
- thermion_dart
|
||||||
- thermion_flutter/**
|
- thermion_flutter/**
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
library filament_dart;
|
library filament_dart;
|
||||||
|
|
||||||
export 'thermion_dart/thermion_viewer.dart';
|
export 'thermion_dart/thermion_viewer.dart';
|
||||||
export 'thermion_dart/compatibility/web/interop/thermion_viewer_wasm.dart' if (dart.library.io) 'thermion_dart/thermion_viewer_ffi.dart';
|
export 'thermion_dart/thermion_viewer_stub.dart'
|
||||||
|
if (dart.library.io) 'thermion_dart/thermion_viewer_ffi.dart'
|
||||||
|
if (dart.library.js_interop)'thermion_dart/compatibility/web/interop/thermion_viewer_wasm.dart';
|
||||||
|
|
||||||
export 'thermion_dart/entities/entity_transform_controller.dart';
|
export 'thermion_dart/entities/entity_transform_controller.dart';
|
||||||
|
|||||||
@@ -1,3 +1 @@
|
|||||||
export 'web/compatibility.dart' if (dart.library.io) 'native/compatibility.dart';
|
export 'native/compatibility.dart';
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import 'dart:convert';
|
|||||||
import 'dart:ffi' as ffi hide Uint8Pointer, FloatPointer;
|
import 'dart:ffi' as ffi hide Uint8Pointer, FloatPointer;
|
||||||
import 'dart:typed_data';
|
import 'dart:typed_data';
|
||||||
|
|
||||||
import 'package:thermion_dart/thermion_dart/compatibility/web/thermion_dart.g.dart';
|
import 'package:thermion_dart/thermion_dart/compatibility/web/ffi/thermion_dart.g.dart';
|
||||||
|
|
||||||
import 'package:ffi/ffi.dart';
|
import 'package:ffi/ffi.dart';
|
||||||
export 'package:ffi/ffi.dart' hide StringUtf8Pointer, Utf8Pointer;
|
export 'package:ffi/ffi.dart' hide StringUtf8Pointer, Utf8Pointer;
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:js_interop';
|
import 'dart:js_interop';
|
||||||
import 'package:thermion_dart/thermion_dart/compatibility/web/interop.dart';
|
import 'package:thermion_dart/thermion_dart/compatibility/web/ffi/interop.dart';
|
||||||
|
|
||||||
import "allocator.dart";
|
import "allocator.dart";
|
||||||
|
|
||||||
@@ -33,8 +33,11 @@ extension type _EmscriptenModule(JSObject _) implements JSObject {
|
|||||||
external JSAny get HEAP32;
|
external JSAny get HEAP32;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
typedef ThermionViewerImpl = ThermionViewerWasm;
|
||||||
|
|
||||||
|
|
||||||
///
|
///
|
||||||
/// An [ThermionViewer] implementation that forwards calls to
|
/// A [ThermionViewer] implementation that forwards calls to
|
||||||
/// the (Emscripten-generated) ThermionDart JS module.
|
/// the (Emscripten-generated) ThermionDart JS module.
|
||||||
///
|
///
|
||||||
class ThermionViewerWasm implements ThermionViewer {
|
class ThermionViewerWasm implements ThermionViewer {
|
||||||
@@ -43,8 +46,8 @@ class ThermionViewerWasm implements ThermionViewer {
|
|||||||
bool _initialized = false;
|
bool _initialized = false;
|
||||||
bool _rendering = false;
|
bool _rendering = false;
|
||||||
|
|
||||||
ThermionViewerWasm({String moduleName = "thermion_dart"}) {
|
ThermionViewerWasm({JSObject? module, String moduleName = "thermion_dart"}) {
|
||||||
_module = window.getProperty<_EmscriptenModule>(moduleName.toJS);
|
_module = module as _EmscriptenModule? ?? window.getProperty<_EmscriptenModule>(moduleName.toJS);
|
||||||
}
|
}
|
||||||
|
|
||||||
JSNumber? _viewer;
|
JSNumber? _viewer;
|
||||||
@@ -1687,7 +1690,7 @@ class ThermionViewerWasm implements ThermionViewer {
|
|||||||
Future setMorphTargetWeights(
|
Future setMorphTargetWeights(
|
||||||
ThermionEntity entity, List<double> weights) async {
|
ThermionEntity entity, List<double> weights) async {
|
||||||
final numWeights = weights.length;
|
final numWeights = weights.length;
|
||||||
final ptr = _module._malloc(numWeights * 4) as JSNumber;
|
final ptr = _module._malloc(numWeights * 4);
|
||||||
for (int i = 0; i < numWeights; i++) {
|
for (int i = 0; i < numWeights; i++) {
|
||||||
_module.setValue(
|
_module.setValue(
|
||||||
(ptr.toDartInt + (i * 4)).toJS, weights[i].toJS, "float");
|
(ptr.toDartInt + (i * 4)).toJS, weights[i].toJS, "float");
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ class TextureDetails {
|
|||||||
}
|
}
|
||||||
|
|
||||||
abstract class ThermionViewer {
|
abstract class ThermionViewer {
|
||||||
|
|
||||||
Future<bool> get initialized;
|
Future<bool> get initialized;
|
||||||
|
|
||||||
///
|
///
|
||||||
|
|||||||
@@ -9,6 +9,8 @@ import 'thermion_viewer.dart';
|
|||||||
import 'scene_impl.dart';
|
import 'scene_impl.dart';
|
||||||
import 'package:logging/logging.dart';
|
import 'package:logging/logging.dart';
|
||||||
|
|
||||||
|
typedef ThermionViewerImpl = ThermionViewerFFI;
|
||||||
|
|
||||||
// ignore: constant_identifier_names
|
// ignore: constant_identifier_names
|
||||||
const ThermionEntity _FILAMENT_ASSET_ERROR = 0;
|
const ThermionEntity _FILAMENT_ASSET_ERROR = 0;
|
||||||
|
|
||||||
@@ -16,7 +18,6 @@ typedef RenderCallback = Pointer<NativeFunction<Void Function(Pointer<Void>)>>;
|
|||||||
|
|
||||||
class ThermionViewerFFI extends ThermionViewer {
|
class ThermionViewerFFI extends ThermionViewer {
|
||||||
final _logger = Logger("ThermionViewerFFI");
|
final _logger = Logger("ThermionViewerFFI");
|
||||||
final _compat = Compatibility();
|
|
||||||
|
|
||||||
SceneImpl? _scene;
|
SceneImpl? _scene;
|
||||||
Scene get scene => _scene!;
|
Scene get scene => _scene!;
|
||||||
|
|||||||
729
thermion_dart/lib/thermion_dart/thermion_viewer_stub.dart
Normal file
729
thermion_dart/lib/thermion_dart/thermion_viewer_stub.dart
Normal file
@@ -0,0 +1,729 @@
|
|||||||
|
import 'dart:math';
|
||||||
|
|
||||||
|
import 'package:thermion_dart/thermion_dart/scene.dart';
|
||||||
|
import 'package:thermion_dart/thermion_dart/thermion_viewer.dart';
|
||||||
|
import 'package:vector_math/vector_math_64.dart';
|
||||||
|
import 'dart:async';
|
||||||
|
import 'package:animation_tools_dart/animation_tools_dart.dart';
|
||||||
|
|
||||||
|
typedef ThermionViewerImpl = ThermionViewerStub;
|
||||||
|
|
||||||
|
class ThermionViewerStub extends ThermionViewer {
|
||||||
|
@override
|
||||||
|
Future addAnimationComponent(ThermionEntity entity) {
|
||||||
|
// TODO: implement addAnimationComponent
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future addBoneAnimation(ThermionEntity entity, BoneAnimationData animation,
|
||||||
|
{int skinIndex = 0,
|
||||||
|
double fadeInInSecs = 0.0,
|
||||||
|
double fadeOutInSecs = 0.0,
|
||||||
|
double maxDelta = 1.0}) {
|
||||||
|
// TODO: implement addBoneAnimation
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future addCollisionComponent(ThermionEntity entity,
|
||||||
|
{void Function(int entityId1, int entityId2)? callback,
|
||||||
|
bool affectsTransform = false}) {
|
||||||
|
// TODO: implement addCollisionComponent
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<ThermionEntity> addLight(
|
||||||
|
LightType type,
|
||||||
|
double colour,
|
||||||
|
double intensity,
|
||||||
|
double posX,
|
||||||
|
double posY,
|
||||||
|
double posZ,
|
||||||
|
double dirX,
|
||||||
|
double dirY,
|
||||||
|
double dirZ,
|
||||||
|
{double falloffRadius = 1.0,
|
||||||
|
double spotLightConeInner = pi / 8,
|
||||||
|
double spotLightConeOuter = pi / 4,
|
||||||
|
double sunAngularRadius = 0.545,
|
||||||
|
double sunHaloSize = 10.0,
|
||||||
|
double sunHaloFallof = 80.0,
|
||||||
|
bool castShadows = true}) {
|
||||||
|
// TODO: implement addLight
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future clearBackgroundImage() {
|
||||||
|
// TODO: implement clearBackgroundImage
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future clearEntities() {
|
||||||
|
// TODO: implement clearEntities
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future clearLights() {
|
||||||
|
// TODO: implement clearLights
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future createGeometry(List<double> vertices, List<int> indices,
|
||||||
|
{String? materialPath,
|
||||||
|
PrimitiveType primitiveType = PrimitiveType.TRIANGLES}) {
|
||||||
|
// TODO: implement createGeometry
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<ThermionEntity> createInstance(ThermionEntity entity) {
|
||||||
|
// TODO: implement createInstance
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future dispose() {
|
||||||
|
// TODO: implement dispose
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<double> getAnimationDuration(
|
||||||
|
ThermionEntity entity, int animationIndex) {
|
||||||
|
// TODO: implement getAnimationDuration
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<List<String>> getAnimationNames(ThermionEntity entity) {
|
||||||
|
// TODO: implement getAnimationNames
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<ThermionEntity> getBone(ThermionEntity parent, int boneIndex,
|
||||||
|
{int skinIndex = 0}) {
|
||||||
|
// TODO: implement getBone
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<List<String>> getBoneNames(ThermionEntity entity,
|
||||||
|
{int skinIndex = 0}) {
|
||||||
|
// TODO: implement getBoneNames
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<double> getCameraCullingFar() {
|
||||||
|
// TODO: implement getCameraCullingFar
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<double> getCameraCullingNear() {
|
||||||
|
// TODO: implement getCameraCullingNear
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<Matrix4> getCameraCullingProjectionMatrix() {
|
||||||
|
// TODO: implement getCameraCullingProjectionMatrix
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<Frustum> getCameraFrustum() {
|
||||||
|
// TODO: implement getCameraFrustum
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<Matrix4> getCameraModelMatrix() {
|
||||||
|
// TODO: implement getCameraModelMatrix
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<Vector3> getCameraPosition() {
|
||||||
|
// TODO: implement getCameraPosition
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<Matrix4> getCameraProjectionMatrix() {
|
||||||
|
// TODO: implement getCameraProjectionMatrix
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<Matrix3> getCameraRotation() {
|
||||||
|
// TODO: implement getCameraRotation
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<Matrix4> getCameraViewMatrix() {
|
||||||
|
// TODO: implement getCameraViewMatrix
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<List<ThermionEntity>> getChildEntities(
|
||||||
|
ThermionEntity parent, bool renderableOnly) {
|
||||||
|
// TODO: implement getChildEntities
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<ThermionEntity> getChildEntity(
|
||||||
|
ThermionEntity parent, String childName) {
|
||||||
|
// TODO: implement getChildEntity
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<List<String>> getChildEntityNames(ThermionEntity entity,
|
||||||
|
{bool renderableOnly = true}) {
|
||||||
|
// TODO: implement getChildEntityNames
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<int> getInstanceCount(ThermionEntity entity) {
|
||||||
|
// TODO: implement getInstanceCount
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<List<ThermionEntity>> getInstances(ThermionEntity entity) {
|
||||||
|
// TODO: implement getInstances
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<Matrix4> getInverseBindMatrix(ThermionEntity parent, int boneIndex,
|
||||||
|
{int skinIndex = 0}) {
|
||||||
|
// TODO: implement getInverseBindMatrix
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<Matrix4> getLocalTransform(ThermionEntity entity) {
|
||||||
|
// TODO: implement getLocalTransform
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<ThermionEntity> getMainCamera() {
|
||||||
|
// TODO: implement getMainCamera
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<List<String>> getMorphTargetNames(
|
||||||
|
ThermionEntity entity, ThermionEntity childEntity) {
|
||||||
|
// TODO: implement getMorphTargetNames
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
String? getNameForEntity(ThermionEntity entity) {
|
||||||
|
// TODO: implement getNameForEntity
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<ThermionEntity?> getParent(ThermionEntity child) {
|
||||||
|
// TODO: implement getParent
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<Matrix4> getWorldTransform(ThermionEntity entity) {
|
||||||
|
// TODO: implement getWorldTransform
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
// TODO: implement gizmo
|
||||||
|
AbstractGizmo? get gizmo => throw UnimplementedError();
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future hide(ThermionEntity entity, String? meshName) {
|
||||||
|
// TODO: implement hide
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
// TODO: implement initialized
|
||||||
|
Future<bool> get initialized => throw UnimplementedError();
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<ThermionEntity> loadGlb(String path, {int numInstances = 1}) {
|
||||||
|
// TODO: implement loadGlb
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<ThermionEntity> loadGltf(String path, String relativeResourcePath,
|
||||||
|
{bool force = false}) {
|
||||||
|
// TODO: implement loadGltf
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future loadIbl(String lightingPath, {double intensity = 30000}) {
|
||||||
|
// TODO: implement loadIbl
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future loadSkybox(String skyboxPath) {
|
||||||
|
// TODO: implement loadSkybox
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future moveCameraToAsset(ThermionEntity entity) {
|
||||||
|
// TODO: implement moveCameraToAsset
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void onDispose(Future Function() callback) {
|
||||||
|
// TODO: implement onDispose
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future panEnd() {
|
||||||
|
// TODO: implement panEnd
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future panStart(double x, double y) {
|
||||||
|
// TODO: implement panStart
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future panUpdate(double x, double y) {
|
||||||
|
// TODO: implement panUpdate
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void pick(int x, int y) {
|
||||||
|
// TODO: implement pick
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
// TODO: implement pickResult
|
||||||
|
Stream<FilamentPickResult> get pickResult => throw UnimplementedError();
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future playAnimation(ThermionEntity entity, int index,
|
||||||
|
{bool loop = false,
|
||||||
|
bool reverse = false,
|
||||||
|
bool replaceActive = true,
|
||||||
|
double crossfade = 0.0}) {
|
||||||
|
// TODO: implement playAnimation
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future playAnimationByName(ThermionEntity entity, String name,
|
||||||
|
{bool loop = false,
|
||||||
|
bool reverse = false,
|
||||||
|
bool replaceActive = true,
|
||||||
|
double crossfade = 0.0}) {
|
||||||
|
// TODO: implement playAnimationByName
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future queuePositionUpdate(
|
||||||
|
ThermionEntity entity, double x, double y, double z,
|
||||||
|
{bool relative = false}) {
|
||||||
|
// TODO: implement queuePositionUpdate
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future queueRotationUpdate(
|
||||||
|
ThermionEntity entity, double rads, double x, double y, double z,
|
||||||
|
{bool relative = false}) {
|
||||||
|
// TODO: implement queueRotationUpdate
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future queueRotationUpdateQuat(ThermionEntity entity, Quaternion quat,
|
||||||
|
{bool relative = false}) {
|
||||||
|
// TODO: implement queueRotationUpdateQuat
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future removeAnimationComponent(ThermionEntity entity) {
|
||||||
|
// TODO: implement removeAnimationComponent
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future removeCollisionComponent(ThermionEntity entity) {
|
||||||
|
// TODO: implement removeCollisionComponent
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future removeEntity(ThermionEntity entity) {
|
||||||
|
// TODO: implement removeEntity
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future removeIbl() {
|
||||||
|
// TODO: implement removeIbl
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future removeLight(ThermionEntity light) {
|
||||||
|
// TODO: implement removeLight
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future removeSkybox() {
|
||||||
|
// TODO: implement removeSkybox
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future render() {
|
||||||
|
// TODO: implement render
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
// TODO: implement rendering
|
||||||
|
bool get rendering => throw UnimplementedError();
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future resetBones(ThermionEntity entity) {
|
||||||
|
// TODO: implement resetBones
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future reveal(ThermionEntity entity, String? meshName) {
|
||||||
|
// TODO: implement reveal
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future rotateEnd() {
|
||||||
|
// TODO: implement rotateEnd
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future rotateIbl(Matrix3 rotation) {
|
||||||
|
// TODO: implement rotateIbl
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future rotateStart(double x, double y) {
|
||||||
|
// TODO: implement rotateStart
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future rotateUpdate(double x, double y) {
|
||||||
|
// TODO: implement rotateUpdate
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
// TODO: implement scene
|
||||||
|
Scene get scene => throw UnimplementedError();
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future setAnimationFrame(
|
||||||
|
ThermionEntity entity, int index, int animationFrame) {
|
||||||
|
// TODO: implement setAnimationFrame
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future setAntiAliasing(bool msaa, bool fxaa, bool taa) {
|
||||||
|
// TODO: implement setAntiAliasing
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future setBackgroundColor(double r, double g, double b, double alpha) {
|
||||||
|
// TODO: implement setBackgroundColor
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future setBackgroundImage(String path, {bool fillHeight = false}) {
|
||||||
|
// TODO: implement setBackgroundImage
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future setBackgroundImagePosition(double x, double y, {bool clamp = false}) {
|
||||||
|
// TODO: implement setBackgroundImagePosition
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future setBloom(double bloom) {
|
||||||
|
// TODO: implement setBloom
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future setBoneTransform(
|
||||||
|
ThermionEntity entity, int boneIndex, Matrix4 transform,
|
||||||
|
{int skinIndex = 0}) {
|
||||||
|
// TODO: implement setBoneTransform
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future setCamera(ThermionEntity entity, String? name) {
|
||||||
|
// TODO: implement setCamera
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future setCameraCulling(double near, double far) {
|
||||||
|
// TODO: implement setCameraCulling
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future setCameraExposure(
|
||||||
|
double aperture, double shutterSpeed, double sensitivity) {
|
||||||
|
// TODO: implement setCameraExposure
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future setCameraFocalLength(double focalLength) {
|
||||||
|
// TODO: implement setCameraFocalLength
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future setCameraFocusDistance(double focusDistance) {
|
||||||
|
// TODO: implement setCameraFocusDistance
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future setCameraFov(double degrees, double width, double height) {
|
||||||
|
// TODO: implement setCameraFov
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future setCameraManipulatorOptions(
|
||||||
|
{ManipulatorMode mode = ManipulatorMode.ORBIT,
|
||||||
|
double orbitSpeedX = 0.01,
|
||||||
|
double orbitSpeedY = 0.01,
|
||||||
|
double zoomSpeed = 0.01}) {
|
||||||
|
// TODO: implement setCameraManipulatorOptions
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future setCameraModelMatrix(List<double> matrix) {
|
||||||
|
// TODO: implement setCameraModelMatrix
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future setCameraPosition(double x, double y, double z) {
|
||||||
|
// TODO: implement setCameraPosition
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future setCameraRotation(Quaternion quaternion) {
|
||||||
|
// TODO: implement setCameraRotation
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future setFrameRate(int framerate) {
|
||||||
|
// TODO: implement setFrameRate
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future setMainCamera() {
|
||||||
|
// TODO: implement setMainCamera
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future setMaterialColor(ThermionEntity entity, String meshName,
|
||||||
|
int materialIndex, double r, double g, double b, double a) {
|
||||||
|
// TODO: implement setMaterialColor
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future setMorphAnimationData(
|
||||||
|
ThermionEntity entity, MorphAnimationData animation,
|
||||||
|
{List<String>? targetMeshNames}) {
|
||||||
|
// TODO: implement setMorphAnimationData
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future setMorphTargetWeights(ThermionEntity entity, List<double> weights) {
|
||||||
|
// TODO: implement setMorphTargetWeights
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future setParent(ThermionEntity child, ThermionEntity parent) {
|
||||||
|
// TODO: implement setParent
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future setPosition(ThermionEntity entity, double x, double y, double z) {
|
||||||
|
// TODO: implement setPosition
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future setPostProcessing(bool enabled) {
|
||||||
|
// TODO: implement setPostProcessing
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future setPriority(ThermionEntity entityId, int priority) {
|
||||||
|
// TODO: implement setPriority
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future setRecording(bool recording) {
|
||||||
|
// TODO: implement setRecording
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future setRecordingOutputDirectory(String outputDirectory) {
|
||||||
|
// TODO: implement setRecordingOutputDirectory
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future setRendering(bool render) {
|
||||||
|
// TODO: implement setRendering
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future setRotation(
|
||||||
|
ThermionEntity entity, double rads, double x, double y, double z) {
|
||||||
|
// TODO: implement setRotation
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future setRotationQuat(ThermionEntity entity, Quaternion rotation) {
|
||||||
|
// TODO: implement setRotationQuat
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future setScale(ThermionEntity entity, double scale) {
|
||||||
|
// TODO: implement setScale
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future setToneMapping(ToneMapper mapper) {
|
||||||
|
// TODO: implement setToneMapping
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future setTransform(ThermionEntity entity, Matrix4 transform) {
|
||||||
|
// TODO: implement setTransform
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future setViewFrustumCulling(bool enabled) {
|
||||||
|
// TODO: implement setViewFrustumCulling
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future stopAnimation(ThermionEntity entity, int animationIndex) {
|
||||||
|
// TODO: implement stopAnimation
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future stopAnimationByName(ThermionEntity entity, String name) {
|
||||||
|
// TODO: implement stopAnimationByName
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future testCollisions(ThermionEntity entity) {
|
||||||
|
// TODO: implement testCollisions
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future transformToUnitCube(ThermionEntity entity) {
|
||||||
|
// TODO: implement transformToUnitCube
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future updateBoneMatrices(ThermionEntity entity) {
|
||||||
|
// TODO: implement updateBoneMatrices
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future zoomBegin() {
|
||||||
|
// TODO: implement zoomBegin
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future zoomEnd() {
|
||||||
|
// TODO: implement zoomEnd
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future zoomUpdate(double x, double y, double z) {
|
||||||
|
// TODO: implement zoomUpdate
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -15,6 +15,7 @@ dependencies:
|
|||||||
native_toolchain_c: ^0.4.2
|
native_toolchain_c: ^0.4.2
|
||||||
archive: ^3.6.1
|
archive: ^3.6.1
|
||||||
web: ^0.5.1
|
web: ^0.5.1
|
||||||
|
logging: ^1.2.0
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
ffigen: ^11.0.0
|
ffigen: ^11.0.0
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
import 'dart:ffi';
|
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
import 'package:thermion_dart/thermion_dart/swift/swift_bindings.g.dart';
|
import 'package:thermion_dart/thermion_dart/swift/swift_bindings.g.dart';
|
||||||
|
import 'package:thermion_dart/thermion_dart/thermion_viewer_ffi.dart';
|
||||||
import 'package:thermion_dart/thermion_dart/utils/dart_resources.dart';
|
import 'package:thermion_dart/thermion_dart/utils/dart_resources.dart';
|
||||||
import 'package:ffi/ffi.dart';
|
|
||||||
import 'package:thermion_dart/thermion_dart.dart';
|
|
||||||
import 'package:thermion_dart/thermion_dart/compatibility/compatibility.dart';
|
import 'package:thermion_dart/thermion_dart/compatibility/compatibility.dart';
|
||||||
import 'package:test/test.dart';
|
import 'package:test/test.dart';
|
||||||
import 'package:animation_tools_dart/animation_tools_dart.dart';
|
import 'package:animation_tools_dart/animation_tools_dart.dart';
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import 'dart:async';
|
|||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'dart:ffi';
|
import 'dart:ffi';
|
||||||
import 'package:thermion_dart/thermion_dart.dart';
|
import 'package:thermion_dart/thermion_dart.dart';
|
||||||
|
import 'package:thermion_dart/thermion_dart/thermion_viewer_ffi.dart';
|
||||||
import 'package:thermion_flutter_platform_interface/thermion_flutter_platform_interface.dart';
|
import 'package:thermion_flutter_platform_interface/thermion_flutter_platform_interface.dart';
|
||||||
import 'package:thermion_flutter_platform_interface/thermion_flutter_texture.dart';
|
import 'package:thermion_flutter_platform_interface/thermion_flutter_texture.dart';
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user