diff --git a/flutter_filament_federated/flutter_filament/example/web_app/.gitignore b/flutter_filament_federated/flutter_filament/example/web_app/.gitignore deleted file mode 100644 index 3a857904..00000000 --- a/flutter_filament_federated/flutter_filament/example/web_app/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -# https://dart.dev/guides/libraries/private-files -# Created by `dart pub` -.dart_tool/ diff --git a/flutter_filament_federated/flutter_filament/example/web_app/CHANGELOG.md b/flutter_filament_federated/flutter_filament/example/web_app/CHANGELOG.md deleted file mode 100644 index effe43c8..00000000 --- a/flutter_filament_federated/flutter_filament/example/web_app/CHANGELOG.md +++ /dev/null @@ -1,3 +0,0 @@ -## 1.0.0 - -- Initial version. diff --git a/flutter_filament_federated/flutter_filament/example/web_app/README.md b/flutter_filament_federated/flutter_filament/example/web_app/README.md deleted file mode 100644 index 3816eca3..00000000 --- a/flutter_filament_federated/flutter_filament/example/web_app/README.md +++ /dev/null @@ -1,2 +0,0 @@ -A sample command-line application with an entrypoint in `bin/`, library code -in `lib/`, and example unit test in `test/`. diff --git a/flutter_filament_federated/flutter_filament/example/web_app/analysis_options.yaml b/flutter_filament_federated/flutter_filament/example/web_app/analysis_options.yaml deleted file mode 100644 index dee8927a..00000000 --- a/flutter_filament_federated/flutter_filament/example/web_app/analysis_options.yaml +++ /dev/null @@ -1,30 +0,0 @@ -# This file configures the static analysis results for your project (errors, -# warnings, and lints). -# -# This enables the 'recommended' set of lints from `package:lints`. -# This set helps identify many issues that may lead to problems when running -# or consuming Dart code, and enforces writing Dart using a single, idiomatic -# style and format. -# -# If you want a smaller set of lints you can change this to specify -# 'package:lints/core.yaml'. These are just the most critical lints -# (the recommended set includes the core lints). -# The core lints are also what is used by pub.dev for scoring packages. - -include: package:lints/recommended.yaml - -# Uncomment the following section to specify additional rules. - -# linter: -# rules: -# - camel_case_types - -# analyzer: -# exclude: -# - path/to/excluded/files/** - -# For more information about the core and recommended set of lints, see -# https://dart.dev/go/core-lints - -# For additional information about configuring this file, see -# https://dart.dev/guides/language/analysis-options diff --git a/flutter_filament_federated/flutter_filament/example/web_app/bin/main.dart b/flutter_filament_federated/flutter_filament/example/web_app/bin/main.dart deleted file mode 100644 index 6e303c76..00000000 --- a/flutter_filament_federated/flutter_filament/example/web_app/bin/main.dart +++ /dev/null @@ -1,53 +0,0 @@ - -// import 'package:polyvox_engine/app/app.dart'; -// import 'package:polyvox_engine/app/states/states.dart'; -// import 'package:polyvox_engine/services/asr_service.dart'; -// import 'package:polyvox_web/error_handler.dart'; -// import 'package:polyvox_web/services/web_asr_service.dart'; -// import 'package:polyvox_web/services/web_asset_repository.dart'; -// import 'package:polyvox_web/services/web_audio_service.dart'; -// import 'package:polyvox_web/services/web_auth_service.dart'; -// import 'package:polyvox_web/services/web_data_provider.dart'; -// import 'package:polyvox_web/services/web_purchase_service.dart'; -// import 'package:polyvox_web/services/web_scoring_service.dart'; -// import 'package:polyvox_web/web_canvas.dart'; -import 'package:dart_filament/dart_filament/abstract_filament_viewer.dart'; -import 'package:dart_filament/dart_filament/compatibility/web/compatibility.dart'; -import 'package:dart_filament/dart_filament/filament_viewer_impl.dart'; -import 'package:dart_filament/dart_filament/compatibility/web/interop/dart_filament_js_export_type.dart'; -import 'package:dart_filament/dart_filament/compatibility/web/interop/dart_filament_js_extension_type.dart'; -import 'package:web/web.dart'; - -void main(List arguments) async { - var viewer = await WebViewer.initialize(); - - DartFilamentJSExportViewer.initializeBindings(viewer); - - print("Set wrapper, running!"); - - while (true) { - await Future.delayed(Duration(milliseconds: 16)); - } - print("Finisehd!"); -} - -class WebViewer { - static Future initialize() async { - var fc = FooChar(); - final canvas = document.getElementById("canvas") as HTMLCanvasElement; - canvas.width = window.innerWidth; - canvas.height = window.innerHeight; - - var resourceLoader = flutter_filament_web_get_resource_loader_wrapper(); - - var viewer = FilamentViewer(resourceLoader: resourceLoader); - - await viewer.initialized; - var width = window.innerWidth; - var height = window.innerHeight; - await viewer.createSwapChain(width.toDouble(), height.toDouble()); - await viewer.updateViewportAndCameraProjection( - width.toDouble(), height.toDouble()); - return viewer; - } -} diff --git a/flutter_filament_federated/flutter_filament/example/web_app/bin/main.mjs b/flutter_filament_federated/flutter_filament/example/web_app/bin/main.mjs deleted file mode 100644 index e37e599e..00000000 --- a/flutter_filament_federated/flutter_filament/example/web_app/bin/main.mjs +++ /dev/null @@ -1,359 +0,0 @@ -let buildArgsList; - -// `modulePromise` is a promise to the `WebAssembly.module` object to be -// instantiated. -// `importObjectPromise` is a promise to an object that contains any additional -// imports needed by the module that aren't provided by the standard runtime. -// The fields on this object will be merged into the importObject with which -// the module will be instantiated. -// This function returns a promise to the instantiated module. -export const instantiate = async (modulePromise, importObjectPromise) => { - let dartInstance; - - function stringFromDartString(string) { - const totalLength = dartInstance.exports.$stringLength(string); - let result = ''; - let index = 0; - while (index < totalLength) { - let chunkLength = Math.min(totalLength - index, 0xFFFF); - const array = new Array(chunkLength); - for (let i = 0; i < chunkLength; i++) { - array[i] = dartInstance.exports.$stringRead(string, index++); - } - result += String.fromCharCode(...array); - } - return result; - } - - function stringToDartString(string) { - const length = string.length; - let range = 0; - for (let i = 0; i < length; i++) { - range |= string.codePointAt(i); - } - if (range < 256) { - const dartString = dartInstance.exports.$stringAllocate1(length); - for (let i = 0; i < length; i++) { - dartInstance.exports.$stringWrite1(dartString, i, string.codePointAt(i)); - } - return dartString; - } else { - const dartString = dartInstance.exports.$stringAllocate2(length); - for (let i = 0; i < length; i++) { - dartInstance.exports.$stringWrite2(dartString, i, string.charCodeAt(i)); - } - return dartString; - } - } - - // Prints to the console - function printToConsole(value) { - if (typeof dartPrint == "function") { - dartPrint(value); - return; - } - if (typeof console == "object" && typeof console.log != "undefined") { - console.log(value); - return; - } - if (typeof print == "function") { - print(value); - return; - } - - throw "Unable to print message: " + js; - } - - // Converts a Dart List to a JS array. Any Dart objects will be converted, but - // this will be cheap for JSValues. - function arrayFromDartList(constructor, list) { - const length = dartInstance.exports.$listLength(list); - const array = new constructor(length); - for (let i = 0; i < length; i++) { - array[i] = dartInstance.exports.$listRead(list, i); - } - return array; - } - - buildArgsList = function(list) { - const dartList = dartInstance.exports.$makeStringList(); - for (let i = 0; i < list.length; i++) { - dartInstance.exports.$listAdd(dartList, stringToDartString(list[i])); - } - return dartList; - } - - // A special symbol attached to functions that wrap Dart functions. - const jsWrappedDartFunctionSymbol = Symbol("JSWrappedDartFunction"); - - function finalizeWrapper(dartFunction, wrapped) { - wrapped.dartFunction = dartFunction; - wrapped[jsWrappedDartFunctionSymbol] = true; - return wrapped; - } - - // Imports - const dart2wasm = { - -_11: x0 => new Array(x0), -_12: x0 => new Promise(x0), -_17: (o,s,v) => o[s] = v, -_18: f => finalizeWrapper(f,x0 => dartInstance.exports._18(f,x0)), -_19: f => finalizeWrapper(f,x0 => dartInstance.exports._19(f,x0)), -_20: (x0,x1,x2) => x0.call(x1,x2), -_21: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._21(f,x0,x1)), -_22: (x0,x1) => x0.call(x1), -_23: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._23(f,x0,x1)), -_44: () => Symbol("jsBoxedDartObjectProperty"), -_75: (x0,x1) => x0.getElementById(x1), -_1495: (x0,x1) => x0.width = x1, -_1497: (x0,x1) => x0.height = x1, -_1874: () => globalThis.window, -_1916: x0 => x0.innerWidth, -_1917: x0 => x0.innerHeight, -_6850: () => globalThis.document, -_12719: () => globalThis.createVoidCallback(), -_12720: () => globalThis.createVoidPointerCallback(), -_12721: () => globalThis.createBoolCallback(), -_12722: () => globalThis.createBoolCallback(), -_12724: v => stringToDartString(v.toString()), -_12740: () => { - let stackString = new Error().stack.toString(); - let frames = stackString.split('\n'); - let drop = 2; - if (frames[0] === 'Error') { - drop += 1; - } - return frames.slice(drop).join('\n'); - }, -_12759: s => stringToDartString(JSON.stringify(stringFromDartString(s))), -_12760: s => printToConsole(stringFromDartString(s)), -_12761: f => finalizeWrapper(f,() => dartInstance.exports._12761(f)), -_12762: f => finalizeWrapper(f,() => dartInstance.exports._12762(f)), -_12763: f => finalizeWrapper(f,x0 => dartInstance.exports._12763(f,x0)), -_12764: f => finalizeWrapper(f,() => dartInstance.exports._12764(f)), -_12765: f => finalizeWrapper(f,x0 => dartInstance.exports._12765(f,x0)), -_12766: f => finalizeWrapper(f,() => dartInstance.exports._12766(f)), -_12767: f => finalizeWrapper(f,x0 => dartInstance.exports._12767(f,x0)), -_12768: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12768(f,x0,x1)), -_12769: f => finalizeWrapper(f,() => dartInstance.exports._12769(f)), -_12770: f => finalizeWrapper(f,(x0,x1,x2,x3) => dartInstance.exports._12770(f,x0,x1,x2,x3)), -_12771: f => finalizeWrapper(f,x0 => dartInstance.exports._12771(f,x0)), -_12772: f => finalizeWrapper(f,() => dartInstance.exports._12772(f)), -_12773: f => finalizeWrapper(f,x0 => dartInstance.exports._12773(f,x0)), -_12774: f => finalizeWrapper(f,x0 => dartInstance.exports._12774(f,x0)), -_12775: f => finalizeWrapper(f,() => dartInstance.exports._12775(f)), -_12776: f => finalizeWrapper(f,(x0,x1,x2,x3,x4,x5,x6,x7,x8,x9) => dartInstance.exports._12776(f,x0,x1,x2,x3,x4,x5,x6,x7,x8,x9)), -_12777: f => finalizeWrapper(f,x0 => dartInstance.exports._12777(f,x0)), -_12778: f => finalizeWrapper(f,() => dartInstance.exports._12778(f)), -_12779: f => finalizeWrapper(f,x0 => dartInstance.exports._12779(f,x0)), -_12780: f => finalizeWrapper(f,x0 => dartInstance.exports._12780(f,x0)), -_12781: f => finalizeWrapper(f,x0 => dartInstance.exports._12781(f,x0)), -_12782: f => finalizeWrapper(f,x0 => dartInstance.exports._12782(f,x0)), -_12783: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12783(f,x0,x1)), -_12784: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12784(f,x0,x1)), -_12785: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12785(f,x0,x1)), -_12786: f => finalizeWrapper(f,() => dartInstance.exports._12786(f)), -_12787: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12787(f,x0,x1)), -_12788: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12788(f,x0,x1)), -_12789: f => finalizeWrapper(f,() => dartInstance.exports._12789(f)), -_12790: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12790(f,x0,x1)), -_12791: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12791(f,x0,x1)), -_12792: f => finalizeWrapper(f,x0 => dartInstance.exports._12792(f,x0)), -_12793: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12793(f,x0,x1)), -_12794: f => finalizeWrapper(f,(x0,x1,x2,x3) => dartInstance.exports._12794(f,x0,x1,x2,x3)), -_12795: f => finalizeWrapper(f,x0 => dartInstance.exports._12795(f,x0)), -_12796: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12796(f,x0,x1)), -_12797: f => finalizeWrapper(f,x0 => dartInstance.exports._12797(f,x0)), -_12798: f => finalizeWrapper(f,() => dartInstance.exports._12798(f)), -_12799: f => finalizeWrapper(f,() => dartInstance.exports._12799(f)), -_12800: f => finalizeWrapper(f,(x0,x1,x2) => dartInstance.exports._12800(f,x0,x1,x2)), -_12801: f => finalizeWrapper(f,() => dartInstance.exports._12801(f)), -_12802: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12802(f,x0,x1)), -_12803: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12803(f,x0,x1)), -_12804: f => finalizeWrapper(f,(x0,x1,x2) => dartInstance.exports._12804(f,x0,x1,x2)), -_12805: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12805(f,x0,x1)), -_12806: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12806(f,x0,x1)), -_12807: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12807(f,x0,x1)), -_12808: f => finalizeWrapper(f,() => dartInstance.exports._12808(f)), -_12809: f => finalizeWrapper(f,() => dartInstance.exports._12809(f)), -_12810: f => finalizeWrapper(f,(x0,x1,x2) => dartInstance.exports._12810(f,x0,x1,x2)), -_12811: f => finalizeWrapper(f,x0 => dartInstance.exports._12811(f,x0)), -_12812: f => finalizeWrapper(f,x0 => dartInstance.exports._12812(f,x0)), -_12813: f => finalizeWrapper(f,x0 => dartInstance.exports._12813(f,x0)), -_12814: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12814(f,x0,x1)), -_12815: f => finalizeWrapper(f,() => dartInstance.exports._12815(f)), -_12816: f => finalizeWrapper(f,() => dartInstance.exports._12816(f)), -_12817: f => finalizeWrapper(f,x0 => dartInstance.exports._12817(f,x0)), -_12818: f => finalizeWrapper(f,() => dartInstance.exports._12818(f)), -_12819: f => finalizeWrapper(f,() => dartInstance.exports._12819(f)), -_12820: f => finalizeWrapper(f,() => dartInstance.exports._12820(f)), -_12821: f => finalizeWrapper(f,() => dartInstance.exports._12821(f)), -_12822: f => finalizeWrapper(f,() => dartInstance.exports._12822(f)), -_12823: f => finalizeWrapper(f,() => dartInstance.exports._12823(f)), -_12824: f => finalizeWrapper(f,(x0,x1,x2) => dartInstance.exports._12824(f,x0,x1,x2)), -_12825: f => finalizeWrapper(f,() => dartInstance.exports._12825(f)), -_12826: f => finalizeWrapper(f,x0 => dartInstance.exports._12826(f,x0)), -_12827: f => finalizeWrapper(f,x0 => dartInstance.exports._12827(f,x0)), -_12828: f => finalizeWrapper(f,(x0,x1,x2) => dartInstance.exports._12828(f,x0,x1,x2)), -_12829: f => finalizeWrapper(f,x0 => dartInstance.exports._12829(f,x0)), -_12830: f => finalizeWrapper(f,x0 => dartInstance.exports._12830(f,x0)), -_12831: f => finalizeWrapper(f,(x0,x1,x2,x3,x4,x5,x6) => dartInstance.exports._12831(f,x0,x1,x2,x3,x4,x5,x6)), -_12832: f => finalizeWrapper(f,x0 => dartInstance.exports._12832(f,x0)), -_12833: f => finalizeWrapper(f,(x0,x1,x2,x3) => dartInstance.exports._12833(f,x0,x1,x2,x3)), -_12834: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12834(f,x0,x1)), -_12835: f => finalizeWrapper(f,(x0,x1,x2,x3,x4) => dartInstance.exports._12835(f,x0,x1,x2,x3,x4)), -_12836: f => finalizeWrapper(f,(x0,x1,x2,x3,x4) => dartInstance.exports._12836(f,x0,x1,x2,x3,x4)), -_12837: f => finalizeWrapper(f,(x0,x1,x2,x3,x4,x5) => dartInstance.exports._12837(f,x0,x1,x2,x3,x4,x5)), -_12838: f => finalizeWrapper(f,(x0,x1,x2) => dartInstance.exports._12838(f,x0,x1,x2)), -_12839: f => finalizeWrapper(f,x0 => dartInstance.exports._12839(f,x0)), -_12840: f => finalizeWrapper(f,(x0,x1,x2) => dartInstance.exports._12840(f,x0,x1,x2)), -_12841: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12841(f,x0,x1)), -_12842: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12842(f,x0,x1)), -_12843: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12843(f,x0,x1)), -_12844: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12844(f,x0,x1)), -_12845: f => finalizeWrapper(f,x0 => dartInstance.exports._12845(f,x0)), -_12846: f => finalizeWrapper(f,() => dartInstance.exports._12846(f)), -_12847: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12847(f,x0,x1)), -_12848: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12848(f,x0,x1)), -_12849: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12849(f,x0,x1)), -_12850: f => finalizeWrapper(f,x0 => dartInstance.exports._12850(f,x0)), -_12851: f => finalizeWrapper(f,x0 => dartInstance.exports._12851(f,x0)), -_12852: f => finalizeWrapper(f,x0 => dartInstance.exports._12852(f,x0)), -_12853: f => finalizeWrapper(f,x0 => dartInstance.exports._12853(f,x0)), -_12854: f => finalizeWrapper(f,() => dartInstance.exports._12854(f)), -_12868: (ms, c) => - setTimeout(() => dartInstance.exports.$invokeCallback(c),ms), -_12872: (c) => - queueMicrotask(() => dartInstance.exports.$invokeCallback(c)), -_12874: (a, i) => a.push(i), -_12885: a => a.length, -_12887: (a, i) => a[i], -_12888: (a, i, v) => a[i] = v, -_12890: a => a.join(''), -_12900: (s, p, i) => s.indexOf(p, i), -_12903: (o, start, length) => new Uint8Array(o.buffer, o.byteOffset + start, length), -_12904: (o, start, length) => new Int8Array(o.buffer, o.byteOffset + start, length), -_12905: (o, start, length) => new Uint8ClampedArray(o.buffer, o.byteOffset + start, length), -_12906: (o, start, length) => new Uint16Array(o.buffer, o.byteOffset + start, length), -_12907: (o, start, length) => new Int16Array(o.buffer, o.byteOffset + start, length), -_12908: (o, start, length) => new Uint32Array(o.buffer, o.byteOffset + start, length), -_12909: (o, start, length) => new Int32Array(o.buffer, o.byteOffset + start, length), -_12912: (o, start, length) => new Float32Array(o.buffer, o.byteOffset + start, length), -_12913: (o, start, length) => new Float64Array(o.buffer, o.byteOffset + start, length), -_12918: (o) => new DataView(o.buffer, o.byteOffset, o.byteLength), -_12922: Function.prototype.call.bind(Object.getOwnPropertyDescriptor(DataView.prototype, 'byteLength').get), -_12923: (b, o) => new DataView(b, o), -_12925: Function.prototype.call.bind(DataView.prototype.getUint8), -_12927: Function.prototype.call.bind(DataView.prototype.getInt8), -_12929: Function.prototype.call.bind(DataView.prototype.getUint16), -_12931: Function.prototype.call.bind(DataView.prototype.getInt16), -_12933: Function.prototype.call.bind(DataView.prototype.getUint32), -_12935: Function.prototype.call.bind(DataView.prototype.getInt32), -_12941: Function.prototype.call.bind(DataView.prototype.getFloat32), -_12942: Function.prototype.call.bind(DataView.prototype.setFloat32), -_12943: Function.prototype.call.bind(DataView.prototype.getFloat64), -_12962: (x0,x1,x2) => x0[x1] = x2, -_12964: o => o === undefined, -_12965: o => typeof o === 'boolean', -_12966: o => typeof o === 'number', -_12968: o => typeof o === 'string', -_12971: o => o instanceof Int8Array, -_12972: o => o instanceof Uint8Array, -_12973: o => o instanceof Uint8ClampedArray, -_12974: o => o instanceof Int16Array, -_12975: o => o instanceof Uint16Array, -_12976: o => o instanceof Int32Array, -_12977: o => o instanceof Uint32Array, -_12978: o => o instanceof Float32Array, -_12979: o => o instanceof Float64Array, -_12980: o => o instanceof ArrayBuffer, -_12981: o => o instanceof DataView, -_12982: o => o instanceof Array, -_12983: o => typeof o === 'function' && o[jsWrappedDartFunctionSymbol] === true, -_12987: (l, r) => l === r, -_12988: o => o, -_12989: o => o, -_12990: o => o, -_12991: b => !!b, -_12992: o => o.length, -_12995: (o, i) => o[i], -_12996: f => f.dartFunction, -_12997: l => arrayFromDartList(Int8Array, l), -_12998: l => arrayFromDartList(Uint8Array, l), -_12999: l => arrayFromDartList(Uint8ClampedArray, l), -_13000: l => arrayFromDartList(Int16Array, l), -_13001: l => arrayFromDartList(Uint16Array, l), -_13002: l => arrayFromDartList(Int32Array, l), -_13003: l => arrayFromDartList(Uint32Array, l), -_13004: l => arrayFromDartList(Float32Array, l), -_13005: l => arrayFromDartList(Float64Array, l), -_13006: (data, length) => { - const view = new DataView(new ArrayBuffer(length)); - for (let i = 0; i < length; i++) { - view.setUint8(i, dartInstance.exports.$byteDataGetUint8(data, i)); - } - return view; - }, -_13007: l => arrayFromDartList(Array, l), -_13008: stringFromDartString, -_13009: stringToDartString, -_13010: () => ({}), -_13012: l => new Array(l), -_13013: () => globalThis, -_13014: (constructor, args) => { - const factoryFunction = constructor.bind.apply( - constructor, [null, ...args]); - return new factoryFunction(); - }, -_13016: (o, p) => o[p], -_13018: (o, m, a) => o[m].apply(o, a), -_13020: o => String(o), -_13021: (p, s, f) => p.then(s, f), -_13040: (o, p) => o[p], -_13041: (o, p, v) => o[p] = v - }; - - const baseImports = { - dart2wasm: dart2wasm, - - - Math: Math, - Date: Date, - Object: Object, - Array: Array, - Reflect: Reflect, - }; - - const jsStringPolyfill = { - "charCodeAt": (s, i) => s.charCodeAt(i), - "compare": (s1, s2) => { - if (s1 < s2) return -1; - if (s1 > s2) return 1; - return 0; - }, - "concat": (s1, s2) => s1 + s2, - "equals": (s1, s2) => s1 === s2, - "fromCharCode": (i) => String.fromCharCode(i), - "length": (s) => s.length, - "substring": (s, a, b) => s.substring(a, b), - }; - - dartInstance = await WebAssembly.instantiate(await modulePromise, { - ...baseImports, - ...(await importObjectPromise), - "wasm:js-string": jsStringPolyfill, - }); - - return dartInstance; -} - -// Call the main function for the instantiated module -// `moduleInstance` is the instantiated dart2wasm module -// `args` are any arguments that should be passed into the main function. -export const invoke = (moduleInstance, ...args) => { - const dartMain = moduleInstance.exports.$getMain(); - const dartArgs = buildArgsList(args); - moduleInstance.exports.$invokeMain(dartMain, dartArgs); -} - diff --git a/flutter_filament_federated/flutter_filament/example/web_app/bin/main.unopt.wasm b/flutter_filament_federated/flutter_filament/example/web_app/bin/main.unopt.wasm deleted file mode 100644 index 5e8f3e1c..00000000 Binary files a/flutter_filament_federated/flutter_filament/example/web_app/bin/main.unopt.wasm and /dev/null differ diff --git a/flutter_filament_federated/flutter_filament/example/web_app/bin/main.wasm b/flutter_filament_federated/flutter_filament/example/web_app/bin/main.wasm deleted file mode 100644 index 265a88de..00000000 Binary files a/flutter_filament_federated/flutter_filament/example/web_app/bin/main.wasm and /dev/null differ diff --git a/flutter_filament_federated/flutter_filament/example/web_app/lib/filament_js.dart b/flutter_filament_federated/flutter_filament/example/web_app/lib/filament_js.dart deleted file mode 100644 index 6ad112e7..00000000 --- a/flutter_filament_federated/flutter_filament/example/web_app/lib/filament_js.dart +++ /dev/null @@ -1,329 +0,0 @@ -// @JS() -// library flutter_filament_js; -// import 'dart:js_interop'; - -// import 'package:dart_filament/dart_filament/entities/filament_entity.dart'; -// extension type DartFilamentJSShim(JSObject _) implements JSObject { - -// @JS('initialized') -// external JSPromise get initialized; - -// @JS('rendering') -// external bool get rendering; - -// @JS('setRendering') -// external JSPromise setRendering(bool render); - -// @JS('render') -// external JSPromise render(); - -// @JS('setFrameRate') -// external JSPromise setFrameRate(int framerate); - -// @JS('dispose') -// external JSPromise dispose(); - -// @JS('setBackgroundImage') -// external JSPromise setBackgroundImage(String path, bool fillHeight); - -// @JS('setBackgroundImagePosition') -// external JSPromise setBackgroundImagePosition(double x, double y, -// bool clamp); - -// @JS('clearBackgroundImage') -// external JSPromise clearBackgroundImage(); - -// @JS('setBackgroundColor') -// external JSPromise setBackgroundColor( -// double r, double g, double b, double alpha); - -// @JS('loadSkybox') -// external JSPromise loadSkybox(String skyboxPath); - -// @JS('removeSkybox') -// external JSPromise removeSkybox(); - -// @JS('loadIbl') -// external JSPromise loadIbl(String lightingPath, double intensity); - -// @JS('rotateIbl') -// external JSPromise rotateIbl(JSArray rotationMatrix); - -// @JS('removeIbl') -// external JSPromise removeIbl(); - -// @JS('addLight') -// external JSPromise addLight( -// int type, -// double colour, -// double intensity, -// double posX, -// double posY, -// double posZ, -// double dirX, -// double dirY, -// double dirZ, -// bool castShadows, -// ); - -// @JS('removeLight') -// external JSPromise removeLight(FilamentEntity light); - -// @JS('clearLights') -// external JSPromise clearLights(); - -// @JS('loadGlb') -// external JSPromise loadGlb(String path, int numInstances); - -// @JS('createInstance') -// external JSPromise createInstance(FilamentEntity entity); - -// @JS('getInstanceCount') -// external JSPromise getInstanceCount(FilamentEntity entity); - -// @JS('getInstances') -// external JSPromise> getInstances(FilamentEntity entity); - -// @JS('loadGltf') -// external JSPromise loadGltf( -// String path, -// String relativeResourcePath -// ); - -// @JS('panStart') -// external JSPromise panStart(double x, double y); - -// @JS('panUpdate') -// external JSPromise panUpdate(double x, double y); - -// @JS('panEnd') -// external JSPromise panEnd(); - -// @JS('rotateStart') -// external JSPromise rotateStart(double x, double y); - -// @JS('rotateUpdate') -// external JSPromise rotateUpdate(double x, double y); - -// @JS('rotateEnd') -// external JSPromise rotateEnd(); - -// @JS('setMorphTargetWeights') -// external JSPromise setMorphTargetWeights( -// FilamentEntity entity, JSArray weights); - -// @JS('getMorphTargetNames') -// external JSPromise> getMorphTargetNames( -// FilamentEntity entity, String meshName); - -// @JS('getAnimationNames') -// external JSPromise> getAnimationNames(FilamentEntity entity); - -// @JS('getAnimationDuration') -// external JSPromise getAnimationDuration( -// FilamentEntity entity, int animationIndex); - -// @JS('setMorphAnimationData') -// external JSPromise setMorphAnimationData( -// FilamentEntity entity, -// JSArray> animation, -// JSArray morphTargets, -// JSArray? targetMeshNames, -// ); - -// @JS('resetBones') -// external JSPromise resetBones(FilamentEntity entity); - -// @JS('addBoneAnimation') -// external JSPromise addBoneAnimation(FilamentEntity entity, JSObject animation); - -// @JS('removeEntity') -// external JSPromise removeEntity(FilamentEntity entity); - -// @JS('clearEntities') -// external JSPromise clearEntities(); - -// @JS('zoomBegin') -// external JSPromise zoomBegin(); - -// @JS('zoomUpdate') -// external JSPromise zoomUpdate(double x, double y, double z); - -// @JS('zoomEnd') -// external JSPromise zoomEnd(); - -// @JS('playAnimation') -// external JSPromise playAnimation( -// FilamentEntity entity, -// int index, -// bool loop, -// bool reverse, -// bool replaceActive, -// double crossfade, -// ); - -// @JS('playAnimationByName') -// external JSPromise playAnimationByName( -// FilamentEntity entity, -// String name, -// bool loop, -// bool reverse, -// bool replaceActive, -// double crossfade, -// ); - -// @JS('setAnimationFrame') -// external JSPromise setAnimationFrame( -// FilamentEntity entity, int index, int animationFrame); - -// @JS('stopAnimation') -// external JSPromise stopAnimation(FilamentEntity entity, int animationIndex); - -// @JS('stopAnimationByName') -// external JSPromise stopAnimationByName(FilamentEntity entity, String name); - -// @JS('setCamera') -// external JSPromise setCamera(FilamentEntity entity, String? name); - -// @JS('setMainCamera') -// external JSPromise setMainCamera(); - -// @JS('getMainCamera') -// external JSPromise getMainCamera(); - -// @JS('setCameraFov') -// external JSPromise setCameraFov(double degrees, double width, double height); - -// @JS('setToneMapping') -// external JSPromise setToneMapping(int mapper); - -// @JS('setBloom') -// external JSPromise setBloom(double bloom); - -// @JS('setCameraFocalLength') -// external JSPromise setCameraFocalLength(double focalLength); - -// @JS('setCameraCulling') -// external JSPromise setCameraCulling(double near, double far); - -// @JS('getCameraCullingNear') -// external JSPromise getCameraCullingNear(); - -// @JS('getCameraCullingFar') -// external JSPromise getCameraCullingFar(); - -// @JS('setCameraFocusDistance') -// external JSPromise setCameraFocusDistance(double focusDistance); - -// @JS('getCameraPosition') -// external JSPromise> getCameraPosition(); - -// @JS('getCameraModelMatrix') -// external JSPromise> getCameraModelMatrix(); - -// @JS('getCameraViewMatrix') -// external JSPromise> getCameraViewMatrix(); - -// @JS('getCameraProjectionMatrix') -// external JSPromise> getCameraProjectionMatrix(); - -// @JS('getCameraCullingProjectionMatrix') -// external JSPromise> getCameraCullingProjectionMatrix(); - -// @JS('getCameraFrustum') -// external JSPromise getCameraFrustum(); - -// @JS('setCameraPosition') -// external JSPromise setCameraPosition(double x, double y, double z); -// @JS('getCameraRotation') -// external JSPromise> getCameraRotation(); -// @JS('moveCameraToAsset') -// external JSPromise moveCameraToAsset(FilamentEntity entity); -// @JS('setViewFrustumCulling') -// external JSPromise setViewFrustumCulling(JSBoolean enabled); -// @JS('setCameraExposure') -// external JSPromise setCameraExposure( -// double aperture, double shutterSpeed, double sensitivity); -// @JS('setCameraRotation') -// external JSPromise setCameraRotation(JSArray quaternion); -// @JS('setCameraModelMatrix') -// external JSPromise setCameraModelMatrix(JSArray matrix); -// @JS('setMaterialColor') -// external JSPromise setMaterialColor(FilamentEntity entity, String meshName, -// int materialIndex, double r, double g, double b, double a); -// @JS('transformToUnitCube') -// external JSPromise transformToUnitCube(FilamentEntity entity); -// @JS('setPosition') -// external JSPromise setPosition(FilamentEntity entity, double x, double y, double z); -// @JS('setScale') -// external JSPromise setScale(FilamentEntity entity, double scale); -// @JS('setRotation') -// external JSPromise setRotation( -// FilamentEntity entity, double rads, double x, double y, double z); -// @JS('queuePositionUpdate') -// external JSPromise queuePositionUpdate( -// FilamentEntity entity, double x, double y, double z, -// bool relative); -// @JS('queueRotationUpdate') -// external JSPromise queueRotationUpdate( -// FilamentEntity entity, double rads, double x, double y, double z, -// bool relative); -// @JS('queueRotationUpdateQuat') -// external JSPromise queueRotationUpdateQuat( -// FilamentEntity entity, JSArray quat, -// bool relative); -// @JS('setPostProcessing') -// external JSPromise setPostProcessing(JSBoolean enabled); -// @JS('setAntiAliasing') -// external JSPromise setAntiAliasing( -// JSBoolean msaa, JSBoolean fxaa, JSBoolean taa); -// @JS('setRotationQuat') -// external JSPromise setRotationQuat( -// FilamentEntity entity, JSArray rotation); -// @JS('reveal') -// external JSPromise reveal(FilamentEntity entity, String? meshName); -// @JS('hide') -// external JSPromise hide(FilamentEntity entity, String? meshName); -// @JS('pick') -// external void pick(int x, int y); -// @JS('getNameForEntity') -// external String? getNameForEntity(FilamentEntity entity); -// @JS('setCameraManipulatorOptions') -// external JSPromise setCameraManipulatorOptions( -// int mode, -// double orbitSpeedX , -// double orbitSpeedY , -// double zoomSpeed , -// ); -// @JS('getChildEntities') -// external JSPromise> getChildEntities( -// FilamentEntity parent, bool renderableOnly); -// @JS('getChildEntity') -// external JSPromise getChildEntity( -// FilamentEntity parent, String childName); -// @JS('getChildEntityNames') -// external JSPromise> getChildEntityNames( -// FilamentEntity entity, -// ); -// @JS('setRecording') -// external JSPromise setRecording(JSBoolean recording); -// @JS('setRecordingOutputDirectory') -// external JSPromise setRecordingOutputDirectory(String outputDirectory); -// @JS('addAnimationComponent') -// external JSPromise addAnimationComponent(FilamentEntity entity); -// @JS('addCollisionComponent') -// external JSPromise addCollisionComponent(FilamentEntity entity); -// @JS('removeCollisionComponent') -// external JSPromise removeCollisionComponent(FilamentEntity entity); -// @JS('createGeometry') -// external JSPromise createGeometry( -// JSArray vertices, JSArray indices, -// String? materialPath, int primitiveType); -// @JS('setParent') -// external JSPromise setParent(FilamentEntity child, FilamentEntity parent); -// @JS('testCollisions') -// external JSPromise testCollisions(FilamentEntity entity); -// @JS('setPriority') -// external JSPromise setPriority(FilamentEntity entityId, int priority); - -// } diff --git a/flutter_filament_federated/flutter_filament/example/web_app/lib/test_web.dart b/flutter_filament_federated/flutter_filament/example/web_app/lib/test_web.dart deleted file mode 100644 index a4cc35cf..00000000 --- a/flutter_filament_federated/flutter_filament/example/web_app/lib/test_web.dart +++ /dev/null @@ -1,545 +0,0 @@ -// @JS() -// library flutter_filament_js; - -// import 'dart:js_interop'; - -// import 'package:animation_tools_dart/src/morph_animation_data.dart'; -// import 'package:dart_filament/dart_filament/abstract_filament_viewer.dart'; -// import 'package:dart_filament/dart_filament/entities/filament_entity.dart'; -// import 'dart:js_interop'; - -// @JSExport() -// class DartFilamentJSExportViewer { -// final AbstractFilamentViewer viewer; - -// DartFilamentJSExportViewer(this.viewer); - -// JSPromise get initialized { -// return viewer.initialized.then((v) => v.toJS).toJS; -// } - -// @JSExport() -// JSBoolean get rendering => viewer.rendering.toJS; - -// @JSExport() -// JSPromise setRendering(bool render) { -// return viewer.setRendering(render).toJS; -// } - -// @JSExport() -// JSPromise render() => viewer.render().toJS; - -// @JSExport() -// JSPromise setFrameRate(int framerate) => viewer.setFrameRate(framerate).toJS; - -// @JSExport() -// JSPromise dispose() => viewer.dispose().toJS; - -// @JSExport() -// JSPromise setBackgroundImage(String path, {bool fillHeight = false}) => -// viewer.setBackgroundImage(path, fillHeight: fillHeight).toJS; - -// @JSExport() -// JSPromise setBackgroundImagePosition(double x, double y, -// {bool clamp = false}) => -// viewer.setBackgroundImagePosition(x, y, clamp: clamp).toJS; - -// @JSExport() -// JSPromise clearBackgroundImage() => viewer.clearBackgroundImage().toJS; - -// @JSExport() -// JSPromise setBackgroundColor(double r, double g, double b, double alpha) => -// viewer.setBackgroundColor(r, g, b, alpha).toJS; - -// @JSExport() -// JSPromise loadSkybox(String skyboxPath) => viewer.loadSkybox(skyboxPath).toJS; - -// @JSExport() -// JSPromise removeSkybox() => viewer.removeSkybox().toJS; - -// @JSExport() -// JSPromise loadIbl(String lightingPath, {double intensity = 30000}) => -// viewer.loadIbl(lightingPath, intensity: intensity).toJS; - -// @JSExport() -// JSPromise rotateIbl(JSArray rotation) => throw UnimplementedError(); -// // viewer.rotateIbl(rotation.toDartMatrix3()).toJS; - -// @JSExport() -// JSPromise removeIbl() => viewer.removeIbl().toJS; - -// @JSExport() -// JSPromise addLight( -// int type, -// double colour, -// double intensity, -// double posX, -// double posY, -// double posZ, -// double dirX, -// double dirY, -// double dirZ, -// bool castShadows) { -// return viewer -// .addLight(type, colour, intensity, posX, posY, posZ, dirX, dirY, dirZ, -// castShadows) -// .then((entity) => entity.toJS) -// .toJS; -// } - -// @JSExport() -// JSPromise removeLight(FilamentEntity light) => viewer.removeLight(light).toJS; - -// @JSExport() -// JSPromise clearLights() => viewer.clearLights().toJS; - -// @JSExport() -// JSPromise loadGlb(String path, {int numInstances = 1}) { -// return viewer -// .loadGlb(path, numInstances: numInstances) -// .then((entity) => entity.toJS) -// .toJS; -// } - -// @JSExport() -// JSPromise createInstance(FilamentEntity entity) { -// return viewer.createInstance(entity).then((instance) => instance.toJS).toJS; -// } - -// @JSExport() -// JSPromise getInstanceCount(FilamentEntity entity) => -// viewer.getInstanceCount(entity).then((v) => v.toJS).toJS; - -// @JSExport() -// JSPromise> getInstances(FilamentEntity entity) { -// return viewer -// .getInstances(entity) -// .then((instances) => -// instances.map((instance) => instance.toJS).toList().toJS) -// .toJS; -// } - -// @JSExport() -// JSPromise loadGltf(String path, String relativeResourcePath, -// {bool force = false}) { -// return viewer -// .loadGltf(path, relativeResourcePath, force: force) -// .then((entity) => entity.toJS) -// .toJS; -// } - -// @JSExport() -// JSPromise panStart(double x, double y) => viewer.panStart(x, y).toJS; - -// @JSExport() -// JSPromise panUpdate(double x, double y) => viewer.panUpdate(x, y).toJS; - -// @JSExport() -// JSPromise panEnd() => viewer.panEnd().toJS; - -// @JSExport() -// JSPromise rotateStart(double x, double y) => viewer.rotateStart(x, y).toJS; - -// @JSExport() -// JSPromise rotateUpdate(double x, double y) => viewer.rotateUpdate(x, y).toJS; - -// @JSExport() -// JSPromise rotateEnd() => viewer.rotateEnd().toJS; - -// @JSExport() -// JSPromise setMorphTargetWeights( -// FilamentEntity entity, List weights) => -// viewer.setMorphTargetWeights(entity, weights).toJS; - -// @JSExport() -// JSPromise> getMorphTargetNames( -// FilamentEntity entity, String meshName) => -// viewer -// .getMorphTargetNames(entity, meshName) -// .then((v) => v.map((s) => s.toJS).toList().toJS) -// .toJS; - -// @JSExport() -// JSPromise> getAnimationNames(FilamentEntity entity) => -// viewer -// .getAnimationNames(entity) -// .then((v) => v.map((s) => s.toJS).toList().toJS) -// .toJS; - -// @JSExport() -// JSPromise getAnimationDuration( -// FilamentEntity entity, int animationIndex) => -// viewer -// .getAnimationDuration(entity, animationIndex) -// .then((v) => v.toJS) -// .toJS; - -// @JSExport() -// JSPromise setMorphAnimationData( -// FilamentEntity entity, -// JSArray> animation, -// JSArray morphTargets, -// JSArray targetMeshNames) => -// viewer -// .setMorphAnimationData( -// entity, -// MorphAnimationData( -// animation.toDart -// .map((x) => x.toDart.map((y) => y.toDartDouble).toList()) -// .toList(), -// morphTargets.toDart.map((m) => m.toDart).toList()), -// targetMeshNames: -// targetMeshNames.toDart.map((x) => x.toDart).toList(), -// ) -// .toJS; - -// @JSExport() -// JSPromise resetBones(FilamentEntity entity) => viewer.resetBones(entity).toJS; - -// @JSExport() -// JSPromise addBoneAnimation(FilamentEntity entity, JSObject animation) { -// throw Exception(); -// } -// // viewer -// // .addBoneAnimation( -// // entity, -// // BoneAnimationData._fromJSObject(animation), -// // ) -// // .toJS; - -// @JSExport() -// JSPromise removeEntity(FilamentEntity entity) => -// viewer.removeEntity(entity).toJS; - -// @JSExport() -// JSPromise clearEntities() => viewer.clearEntities().toJS; - -// @JSExport() -// JSPromise zoomBegin() => viewer.zoomBegin().toJS; - -// @JSExport() -// JSPromise zoomUpdate(double x, double y, double z) => -// viewer.zoomUpdate(x, y, z).toJS; - -// @JSExport() -// JSPromise zoomEnd() => viewer.zoomEnd().toJS; - -// @JSExport() -// JSPromise playAnimation(FilamentEntity entity, int index, -// {bool loop = false, -// bool reverse = false, -// bool replaceActive = true, -// double crossfade = 0.0}) => -// viewer -// .playAnimation( -// entity, -// index, -// loop: loop, -// reverse: reverse, -// replaceActive: replaceActive, -// crossfade: crossfade, -// ) -// .toJS; - -// @JSExport() -// JSPromise playAnimationByName(FilamentEntity entity, String name, -// {bool loop = false, -// bool reverse = false, -// bool replaceActive = true, -// double crossfade = 0.0}) => -// viewer -// .playAnimationByName( -// entity, -// name, -// loop: loop, -// reverse: reverse, -// replaceActive: replaceActive, -// crossfade: crossfade, -// ) -// .toJS; - -// @JSExport() -// JSPromise setAnimationFrame( -// FilamentEntity entity, int index, int animationFrame) => -// viewer -// .setAnimationFrame( -// entity, -// index, -// animationFrame, -// ) -// .toJS; - -// @JSExport() -// JSPromise stopAnimation(FilamentEntity entity, int animationIndex) => -// viewer.stopAnimation(entity, animationIndex).toJS; - -// @JSExport() -// JSPromise stopAnimationByName(FilamentEntity entity, String name) => -// viewer.stopAnimationByName(entity, name).toJS; - -// @JSExport() -// JSPromise setCamera(FilamentEntity entity, String? name) => -// viewer.setCamera(entity, name).toJS; - -// @JSExport() -// JSPromise setMainCamera() => viewer.setMainCamera().toJS; - -// @JSExport() -// JSPromise getMainCamera() { -// return viewer.getMainCamera().then((camera) => camera.toJS).toJS; -// } - -// @JSExport() -// JSPromise setCameraFov(double degrees, double width, double height) => -// viewer.setCameraFov(degrees, width, height).toJS; - -// @JSExport() -// JSPromise setToneMapping(int mapper) => -// viewer.setToneMapping(ToneMapper.values[mapper]).toJS; - -// @JSExport() -// JSPromise setBloom(double bloom) => viewer.setBloom(bloom).toJS; - -// @JSExport() -// JSPromise setCameraFocalLength(double focalLength) => -// viewer.setCameraFocalLength(focalLength).toJS; - -// @JSExport() -// JSPromise setCameraCulling(double near, double far) => -// viewer.setCameraCulling(near, far).toJS; - -// @JSExport() -// JSPromise getCameraCullingNear() => -// viewer.getCameraCullingNear().then((v) => v.toJS).toJS; - -// @JSExport() -// JSPromise getCameraCullingFar() => -// viewer.getCameraCullingFar().then((v) => v.toJS).toJS; - -// @JSExport() -// JSPromise setCameraFocusDistance(double focusDistance) => -// viewer.setCameraFocusDistance(focusDistance).toJS; - -// @JSExport() -// JSPromise> getCameraPosition() { -// throw UnimplementedError(); -// // return viewer.getCameraPosition().then((position) => position.toJS).toJS; -// } - -// @JSExport() -// JSPromise> getCameraModelMatrix() { -// throw UnimplementedError(); -// // return viewer.getCameraModelMatrix().then((matrix) => matrix.toJSArray()).toJS; -// } - -// @JSExport() -// JSPromise> getCameraViewMatrix() { -// throw UnimplementedError(); -// // return viewer.getCameraViewMatrix().then((matrix) => matrix.toJSArray()).toJS; -// } - -// @JSExport() -// JSPromise> getCameraProjectionMatrix() { -// throw UnimplementedError(); -// // return viewer.getCameraProjectionMatrix().then((matrix) => matrix.toJSArray()).toJS; -// } - -// @JSExport() -// JSPromise> getCameraCullingProjectionMatrix() { -// throw UnimplementedError(); -// // return viewer.getCameraCullingProjectionMatrix().then((matrix) => matrix.toJSArray()).toJS; -// } - -// @JSExport() -// JSPromise getCameraFrustum() { -// throw UnimplementedError(); -// // return viewer.getCameraFrustum().then((frustum) => frustum.toJS).toJS; -// } - -// @JSExport() -// JSPromise setCameraPosition(double x, double y, double z) => -// viewer.setCameraPosition(x, y, z).toJS; -// @JSExport() -// JSPromise> getCameraRotation() { -// return viewer -// .getCameraRotation() -// .then((rotation) => rotation.storage.map((v) => v.toJS).toList().toJS) -// .toJS; -// } - -// @JSExport() -// JSPromise moveCameraToAsset(FilamentEntity entity) => -// throw UnimplementedError(); -// // viewer.moveCameraToAsset(entity)).toJS; -// @JSExport() -// JSPromise setViewFrustumCulling(JSBoolean enabled) => -// throw UnimplementedError(); -// // viewer.setViewFrustumCulling(enabled).toJS; -// @JSExport() -// JSPromise setCameraExposure( -// double aperture, double shutterSpeed, double sensitivity) => -// viewer.setCameraExposure(aperture, shutterSpeed, sensitivity).toJS; -// @JSExport() -// JSPromise setCameraRotation(JSArray quaternion) => -// throw UnimplementedError(); -// // viewer.setCameraRotation(quaternion.toDartQuaternion()).toJS; -// @JSExport() -// JSPromise setCameraModelMatrix(List matrix) => -// viewer.setCameraModelMatrix(matrix).toJS; -// @JSExport() -// JSPromise setMaterialColor(FilamentEntity entity, String meshName, -// int materialIndex, double r, double g, double b, double a) => -// throw UnimplementedError(); -// // viewer.setMaterialColor( -// // entity), -// // meshName, -// // materialIndex, -// // r, -// // g, -// // b, -// // a, -// // ).toJS; -// @JSExport() -// JSPromise transformToUnitCube(FilamentEntity entity) => -// viewer.transformToUnitCube(entity).toJS; -// @JSExport() -// JSPromise setPosition(FilamentEntity entity, double x, double y, double z) => -// viewer.setPosition(entity, x, y, z).toJS; -// @JSExport() -// JSPromise setScale(FilamentEntity entity, double scale) => -// viewer.setScale(entity, scale).toJS; -// @JSExport() -// JSPromise setRotation( -// FilamentEntity entity, double rads, double x, double y, double z) => -// viewer.setRotation(entity, rads, x, y, z).toJS; -// @JSExport() -// JSPromise queuePositionUpdate( -// FilamentEntity entity, double x, double y, double z, bool relative) => -// viewer -// .queuePositionUpdate( -// entity, -// x, -// y, -// z, -// relative: relative, -// ) -// .toJS; -// @JSExport() -// JSPromise queueRotationUpdate(FilamentEntity entity, double rads, double x, -// double y, double z, bool relative) => -// viewer -// .queueRotationUpdate( -// entity, -// rads, -// x, -// y, -// z, -// relative: relative, -// ) -// .toJS; -// @JSExport() -// JSPromise queueRotationUpdateQuat( -// FilamentEntity entity, JSArray quat, JSBoolean relative) => -// throw UnimplementedError(); -// // viewer.queueRotationUpdateQuat( -// // entity, -// // quat.toDartQuaternion(), -// // relative: relative, -// // ).toJS; - -// @JSExport() -// JSPromise setPostProcessing(bool enabled) => -// viewer.setPostProcessing(enabled).toJS; -// @JSExport() -// JSPromise setAntiAliasing(bool msaa, bool fxaa, bool taa) => -// viewer.setAntiAliasing(msaa, fxaa, taa).toJS; -// @JSExport() -// JSPromise setRotationQuat( -// FilamentEntity entity, JSArray rotation) => -// throw UnimplementedError(); -// // viewer.setRotationQuat( -// // entity, -// // rotation.toDartQuaternion(), -// // ).toJS; -// @JSExport() -// JSPromise reveal(FilamentEntity entity, String? meshName) => -// viewer.reveal(entity, meshName).toJS; -// @JSExport() -// JSPromise hide(FilamentEntity entity, String? meshName) => -// viewer.hide(entity, meshName).toJS; -// @JSExport() -// void pick(int x, int y) => viewer.pick(x, y); -// @JSExport() -// String? getNameForEntity(FilamentEntity entity) => -// viewer.getNameForEntity(entity); -// @JSExport() -// JSPromise setCameraManipulatorOptions({ -// int mode = 0, -// double orbitSpeedX = 0.01, -// double orbitSpeedY = 0.01, -// double zoomSpeed = 0.01, -// }) => -// viewer -// .setCameraManipulatorOptions( -// mode: ManipulatorMode.values[mode], -// orbitSpeedX: orbitSpeedX, -// orbitSpeedY: orbitSpeedY, -// zoomSpeed: zoomSpeed, -// ) -// .toJS; -// @JSExport() -// JSPromise> getChildEntities( -// FilamentEntity parent, bool renderableOnly) { -// return viewer -// .getChildEntities( -// parent, -// renderableOnly, -// ) -// .then((entities) => entities.map((entity) => entity.toJS).toList().toJS) -// .toJS; -// } - -// @JSExport() -// JSPromise getChildEntity(FilamentEntity parent, String childName) { -// return viewer -// .getChildEntity( -// parent, -// childName, -// ) -// .then((entity) => entity.toJS) -// .toJS; -// } - -// @JSExport() -// JSPromise> getChildEntityNames( -// FilamentEntity entity, bool renderableOnly) => -// viewer -// .getChildEntityNames( -// entity, -// renderableOnly: renderableOnly, -// ) -// .then((v) => v.map((s) => s.toJS).toList().toJS) -// .toJS; -// @JSExport() -// JSPromise setRecording(bool recording) => viewer.setRecording(recording).toJS; -// @JSExport() -// JSPromise setRecordingOutputDirectory(String outputDirectory) => -// viewer.setRecordingOutputDirectory(outputDirectory).toJS; -// @JSExport() -// JSPromise addAnimationComponent(FilamentEntity entity) => -// viewer.addAnimationComponent(entity).toJS; - -// @JSExport() -// JSPromise addCollisionComponent(FilamentEntity entity, -// {JSFunction? callback, bool affectsTransform = false}) { -// throw UnimplementedError(); -// // final Function? dartCallback = callback != null -// // ? allowInterop((int entityId1, int entityId2) => callback.apply([entityId1, entityId2])) -// // : null; -// // return viewer.addCollisionComponent( -// // entity), -// // callback: dartCallback, -// // affectsTransform: affectsTransform, -// // ).toJs -// } -// } diff --git a/flutter_filament_federated/flutter_filament/example/web_app/pubspec.lock b/flutter_filament_federated/flutter_filament/example/web_app/pubspec.lock deleted file mode 100644 index fb3617eb..00000000 --- a/flutter_filament_federated/flutter_filament/example/web_app/pubspec.lock +++ /dev/null @@ -1,450 +0,0 @@ -# Generated by pub -# See https://dart.dev/tools/pub/glossary#lockfile -packages: - _fe_analyzer_shared: - dependency: transitive - description: - name: _fe_analyzer_shared - sha256: "5aaf60d96c4cd00fe7f21594b5ad6a1b699c80a27420f8a837f4d68473ef09e3" - url: "https://pub.dev" - source: hosted - version: "68.0.0" - _macros: - dependency: transitive - description: dart - source: sdk - version: "0.1.3" - analyzer: - dependency: transitive - description: - name: analyzer - sha256: "21f1d3720fd1c70316399d5e2bccaebb415c434592d778cce8acb967b8578808" - url: "https://pub.dev" - source: hosted - version: "6.5.0" - animation_tools_dart: - dependency: transitive - description: - path: "." - ref: HEAD - resolved-ref: "1a5ffc8a58353d43ba1864c8676c47948ee9b5ce" - url: "git@github.com:nmfisher/animation_tools_dart.git" - source: git - version: "0.0.2" - args: - dependency: transitive - description: - name: args - sha256: "7cf60b9f0cc88203c5a190b4cd62a99feea42759a7fa695010eb5de1c0b2252a" - url: "https://pub.dev" - source: hosted - version: "2.5.0" - async: - dependency: transitive - description: - name: async - sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" - url: "https://pub.dev" - source: hosted - version: "2.11.0" - boolean_selector: - dependency: transitive - description: - name: boolean_selector - sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" - url: "https://pub.dev" - source: hosted - version: "2.1.1" - collection: - dependency: transitive - description: - name: collection - sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a - url: "https://pub.dev" - source: hosted - version: "1.18.0" - convert: - dependency: transitive - description: - name: convert - sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" - url: "https://pub.dev" - source: hosted - version: "3.1.1" - coverage: - dependency: transitive - description: - name: coverage - sha256: "3945034e86ea203af7a056d98e98e42a5518fff200d6e8e6647e1886b07e936e" - url: "https://pub.dev" - source: hosted - version: "1.8.0" - crypto: - dependency: transitive - description: - name: crypto - sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab - url: "https://pub.dev" - source: hosted - version: "3.0.3" - dart_filament: - dependency: "direct main" - description: - path: "../../../../dart_filament" - relative: true - source: path - version: "0.5.0" - ffi: - dependency: transitive - description: - name: ffi - sha256: "493f37e7df1804778ff3a53bd691d8692ddf69702cf4c1c1096a2e41b4779e21" - url: "https://pub.dev" - source: hosted - version: "2.1.2" - file: - dependency: transitive - description: - name: file - sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" - url: "https://pub.dev" - source: hosted - version: "7.0.0" - frontend_server_client: - dependency: transitive - description: - name: frontend_server_client - sha256: f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694 - url: "https://pub.dev" - source: hosted - version: "4.0.0" - glob: - dependency: transitive - description: - name: glob - sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" - url: "https://pub.dev" - source: hosted - version: "2.1.2" - http_multi_server: - dependency: transitive - description: - name: http_multi_server - sha256: "97486f20f9c2f7be8f514851703d0119c3596d14ea63227af6f7a481ef2b2f8b" - url: "https://pub.dev" - source: hosted - version: "3.2.1" - http_parser: - dependency: transitive - description: - name: http_parser - sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" - url: "https://pub.dev" - source: hosted - version: "4.0.2" - io: - dependency: transitive - description: - name: io - sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e" - url: "https://pub.dev" - source: hosted - version: "1.0.4" - js: - dependency: transitive - description: - name: js - sha256: c1b2e9b5ea78c45e1a0788d29606ba27dc5f71f019f32ca5140f61ef071838cf - url: "https://pub.dev" - source: hosted - version: "0.7.1" - lints: - dependency: "direct dev" - description: - name: lints - sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290 - url: "https://pub.dev" - source: hosted - version: "3.0.0" - logging: - dependency: transitive - description: - name: logging - sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" - url: "https://pub.dev" - source: hosted - version: "1.2.0" - macros: - dependency: transitive - description: - name: macros - sha256: e4a273c4a7a81fdbea1f3faed45faa6a7c0b78a50076e89d3f02350caefc8939 - url: "https://pub.dev" - source: hosted - version: "0.1.0-main.3" - matcher: - dependency: transitive - description: - name: matcher - sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb - url: "https://pub.dev" - source: hosted - version: "0.12.16+1" - meta: - dependency: transitive - description: - name: meta - sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 - url: "https://pub.dev" - source: hosted - version: "1.15.0" - mime: - dependency: transitive - description: - name: mime - sha256: "2e123074287cc9fd6c09de8336dae606d1ddb88d9ac47358826db698c176a1f2" - url: "https://pub.dev" - source: hosted - version: "1.0.5" - node_preamble: - dependency: transitive - description: - name: node_preamble - sha256: "6e7eac89047ab8a8d26cf16127b5ed26de65209847630400f9aefd7cd5c730db" - url: "https://pub.dev" - source: hosted - version: "2.0.2" - package_config: - dependency: transitive - description: - name: package_config - sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" - url: "https://pub.dev" - source: hosted - version: "2.1.0" - path: - dependency: transitive - description: - name: path - sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" - url: "https://pub.dev" - source: hosted - version: "1.9.0" - plugin_platform_interface: - dependency: transitive - description: - name: plugin_platform_interface - sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" - url: "https://pub.dev" - source: hosted - version: "2.1.8" - pool: - dependency: transitive - description: - name: pool - sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a" - url: "https://pub.dev" - source: hosted - version: "1.5.1" - pub_semver: - dependency: transitive - description: - name: pub_semver - sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" - url: "https://pub.dev" - source: hosted - version: "2.1.4" - shelf: - dependency: transitive - description: - name: shelf - sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4 - url: "https://pub.dev" - source: hosted - version: "1.4.1" - shelf_packages_handler: - dependency: transitive - description: - name: shelf_packages_handler - sha256: "89f967eca29607c933ba9571d838be31d67f53f6e4ee15147d5dc2934fee1b1e" - url: "https://pub.dev" - source: hosted - version: "3.0.2" - shelf_static: - dependency: transitive - description: - name: shelf_static - sha256: a41d3f53c4adf0f57480578c1d61d90342cd617de7fc8077b1304643c2d85c1e - url: "https://pub.dev" - source: hosted - version: "1.1.2" - shelf_web_socket: - dependency: transitive - description: - name: shelf_web_socket - sha256: "073c147238594ecd0d193f3456a5fe91c4b0abbcc68bf5cd95b36c4e194ac611" - url: "https://pub.dev" - source: hosted - version: "2.0.0" - source_map_stack_trace: - dependency: transitive - description: - name: source_map_stack_trace - sha256: "84cf769ad83aa6bb61e0aa5a18e53aea683395f196a6f39c4c881fb90ed4f7ae" - url: "https://pub.dev" - source: hosted - version: "2.1.1" - source_maps: - dependency: transitive - description: - name: source_maps - sha256: "708b3f6b97248e5781f493b765c3337db11c5d2c81c3094f10904bfa8004c703" - url: "https://pub.dev" - source: hosted - version: "0.10.12" - source_span: - dependency: transitive - description: - name: source_span - sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" - url: "https://pub.dev" - source: hosted - version: "1.10.0" - stack_trace: - dependency: transitive - description: - name: stack_trace - sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" - url: "https://pub.dev" - source: hosted - version: "1.11.1" - stream_channel: - dependency: transitive - description: - name: stream_channel - sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 - url: "https://pub.dev" - source: hosted - version: "2.1.2" - string_scanner: - dependency: transitive - description: - name: string_scanner - sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" - url: "https://pub.dev" - source: hosted - version: "1.2.0" - term_glyph: - dependency: transitive - description: - name: term_glyph - sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 - url: "https://pub.dev" - source: hosted - version: "1.2.1" - test: - dependency: "direct dev" - description: - name: test - sha256: d11b55850c68c1f6c0cf00eabded4e66c4043feaf6c0d7ce4a36785137df6331 - url: "https://pub.dev" - source: hosted - version: "1.25.5" - test_api: - dependency: transitive - description: - name: test_api - sha256: "2419f20b0c8677b2d67c8ac4d1ac7372d862dc6c460cdbb052b40155408cd794" - url: "https://pub.dev" - source: hosted - version: "0.7.1" - test_core: - dependency: transitive - description: - name: test_core - sha256: "4d070a6bc36c1c4e89f20d353bfd71dc30cdf2bd0e14349090af360a029ab292" - url: "https://pub.dev" - source: hosted - version: "0.6.2" - tuple: - dependency: transitive - description: - name: tuple - sha256: a97ce2013f240b2f3807bcbaf218765b6f301c3eff91092bcfa23a039e7dd151 - url: "https://pub.dev" - source: hosted - version: "2.0.2" - typed_data: - dependency: transitive - description: - name: typed_data - sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c - url: "https://pub.dev" - source: hosted - version: "1.3.2" - vector_math: - dependency: transitive - description: - name: vector_math - sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" - url: "https://pub.dev" - source: hosted - version: "2.1.4" - vm_service: - dependency: transitive - description: - name: vm_service - sha256: "7475cb4dd713d57b6f7464c0e13f06da0d535d8b2067e188962a59bac2cf280b" - url: "https://pub.dev" - source: hosted - version: "14.2.2" - watcher: - dependency: transitive - description: - name: watcher - sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" - url: "https://pub.dev" - source: hosted - version: "1.1.0" - web: - dependency: transitive - description: - name: web - sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" - url: "https://pub.dev" - source: hosted - version: "0.5.1" - web_socket: - dependency: transitive - description: - name: web_socket - sha256: bfe704c186c6e32a46f6607f94d079cd0b747b9a489fceeecc93cd3adb98edd5 - url: "https://pub.dev" - source: hosted - version: "0.1.3" - web_socket_channel: - dependency: transitive - description: - name: web_socket_channel - sha256: a2d56211ee4d35d9b344d9d4ce60f362e4f5d1aafb988302906bd732bc731276 - url: "https://pub.dev" - source: hosted - version: "3.0.0" - webkit_inspection_protocol: - dependency: transitive - description: - name: webkit_inspection_protocol - sha256: "87d3f2333bb240704cd3f1c6b5b7acd8a10e7f0bc28c28dcf14e782014f4a572" - url: "https://pub.dev" - source: hosted - version: "1.2.1" - yaml: - dependency: transitive - description: - name: yaml - sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" - url: "https://pub.dev" - source: hosted - version: "3.1.2" -sdks: - dart: ">=3.4.0-256.0.dev <4.0.0" diff --git a/flutter_filament_federated/flutter_filament/example/web_app/pubspec.yaml b/flutter_filament_federated/flutter_filament/example/web_app/pubspec.yaml deleted file mode 100644 index 0975923a..00000000 --- a/flutter_filament_federated/flutter_filament/example/web_app/pubspec.yaml +++ /dev/null @@ -1,16 +0,0 @@ -name: web_app -description: A sample command-line application. -version: 1.0.0 -# repository: https://github.com/my_org/my_repo - -environment: - sdk: ^3.3.0 - -# Add regular dependencies here. -dependencies: - dart_filament: - path: ../../../../dart_filament - -dev_dependencies: - lints: ^3.0.0 - test: ^1.24.0 diff --git a/flutter_filament_federated/flutter_filament/example/web_app/test/web_app_test.dart b/flutter_filament_federated/flutter_filament/example/web_app/test/web_app_test.dart deleted file mode 100644 index 8f76d261..00000000 --- a/flutter_filament_federated/flutter_filament/example/web_app/test/web_app_test.dart +++ /dev/null @@ -1,8 +0,0 @@ -import 'package:web_app/web_app.dart'; -import 'package:test/test.dart'; - -void main() { - test('calculate', () { - expect(calculate(), 42); - }); -}