ThermionViewerJSDartBridge class
A (Dart) class that wraps a (Dart) instance of ThermionViewer, but exported to JS by binding to a global property. This is effectively an implementation of ThermionViewerJSShim; allowing users to interact with an instance of ThermionViewer (presumably compiled to WASM) from any Javascript context (including the browser console).
- Annotations
-
- @JSExport()
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
initialized
→ JSPromise<
JSBoolean> -
no setter
- rendering → JSBoolean
-
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- viewer → ThermionViewer
-
final
Methods
-
addAnimationComponent(
ThermionEntity entity) → JSPromise< JSAny?> -
addBoneAnimation(
ThermionEntity entity, JSArray< JSString> bones, JSArray<JSArray< frameData, JSNumber frameLengthInMs, JSNumber spaceEnum, JSNumber skinIndex, JSNumber fadeInInSecs, JSNumber fadeOutInSecs, JSNumber maxDelta) → JSPromise<JSArray< >JSNumber> >JSAny?> -
addCollisionComponent(
ThermionEntity entity, {JSFunction? callback, bool affectsTransform = false}) → JSPromise< JSAny?> -
addLight(
int type, double colour, double intensity, double posX, double posY, double posZ, double dirX, double dirY, double dirZ, double falloffRadius, double spotLightConeInner, double spotLightConeOuter, double sunAngularRadius, double sunHaloSize, double sunHaloFallof, bool castShadows) → JSPromise< JSNumber> -
bind(
{String globalPropertyName = "thermionViewer"}) → void -
clearBackgroundImage(
) → JSPromise< JSAny?> -
clearEntities(
) → JSPromise< JSAny?> -
clearLights(
) → JSPromise< JSAny?> -
createInstance(
ThermionEntity entity) → JSPromise< JSNumber> -
dispose(
) → JSPromise< JSAny?> -
getAnimationDuration(
ThermionEntity entity, int animationIndex) → JSPromise< JSNumber> -
getAnimationNames(
ThermionEntity entity) → JSPromise< JSArray< JSString> > -
getBone(
ThermionEntity entity, int boneIndex, int skinIndex) → JSPromise< JSAny?> -
getBoneNames(
ThermionEntity entity, int skinIndex) → JSPromise< JSArray< JSString> > -
getCameraCullingFar(
) → JSPromise< JSNumber> -
getCameraCullingNear(
) → JSPromise< JSNumber> -
getCameraCullingProjectionMatrix(
) → JSPromise< JSArray< JSNumber> > -
getCameraFrustum(
) → JSPromise< JSNumber> -
getCameraModelMatrix(
) → JSPromise< JSArray< JSNumber> > -
getCameraPosition(
) → JSPromise< JSArray< JSNumber> > -
getCameraProjectionMatrix(
) → JSPromise< JSArray< JSNumber> > -
getCameraRotation(
) → JSPromise< JSArray< JSNumber> > -
getCameraViewMatrix(
) → JSPromise< JSArray< JSNumber> > -
getChildEntities(
ThermionEntity parent, bool renderableOnly) → JSPromise< JSArray< JSNumber> > -
getChildEntity(
ThermionEntity parent, String childName) → JSPromise< JSNumber> -
getChildEntityNames(
ThermionEntity entity, bool renderableOnly) → JSPromise< JSArray< JSString> > -
getInstanceCount(
ThermionEntity entity) → JSPromise< JSNumber> -
getInstances(
ThermionEntity entity) → JSPromise< JSArray< JSNumber> > -
getLocalTransform(
ThermionEntity entity) → JSPromise< JSArray< JSNumber> > -
getMainCamera(
) → JSPromise< JSNumber> -
getMorphTargetNames(
ThermionEntity entity, ThermionEntity childEntity) → JSPromise< JSArray< JSString> > -
getNameForEntity(
ThermionEntity entity) → String? -
getParent(
ThermionEntity entity) → JSPromise< JSAny?> -
getWorldTransform(
ThermionEntity entity) → JSPromise< JSArray< JSNumber> > -
hide(
ThermionEntity entity, String? meshName) → JSPromise< JSAny?> -
loadGlb(
String path, {int numInstances = 1}) → JSPromise< JSNumber> -
loadGltf(
String path, String relativeResourcePath, {bool force = false}) → JSPromise< JSNumber> -
loadIbl(
String lightingPath, double intensity) → JSPromise< JSAny?> -
loadSkybox(
String skyboxPath) → JSPromise< JSAny?> -
moveCameraToAsset(
ThermionEntity entity) → JSPromise< JSAny?> -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
panEnd(
) → JSPromise< JSAny?> -
panStart(
double x, double y) → JSPromise< JSAny?> -
panUpdate(
double x, double y) → JSPromise< JSAny?> -
pick(
int x, int y) → void -
playAnimation(
ThermionEntity entity, int index, {bool loop = false, bool reverse = false, bool replaceActive = true, double crossfade = 0.0}) → JSPromise< JSAny?> -
playAnimationByName(
ThermionEntity entity, String name, {bool loop = false, bool reverse = false, bool replaceActive = true, double crossfade = 0.0}) → JSPromise< JSAny?> -
queuePositionUpdate(
ThermionEntity entity, double x, double y, double z, bool relative) → JSPromise< JSAny?> -
queueRotationUpdate(
ThermionEntity entity, double rads, double x, double y, double z, bool relative) → JSPromise< JSAny?> -
queueRotationUpdateQuat(
ThermionEntity entity, JSArray< JSNumber> quat, JSBoolean relative) → JSPromise<JSAny?> -
removeAnimationComponent(
ThermionEntity entity) → JSPromise< JSAny?> -
removeEntity(
ThermionEntity entity) → JSPromise< JSAny?> -
removeIbl(
) → JSPromise< JSAny?> -
removeLight(
ThermionEntity light) → JSPromise< JSAny?> -
removeSkybox(
) → JSPromise< JSAny?> -
render(
) → JSPromise< JSAny?> -
resetBones(
ThermionEntity entity) → JSPromise< JSAny?> -
reveal(
ThermionEntity entity, String? meshName) → JSPromise< JSAny?> -
rotateEnd(
) → JSPromise< JSAny?> -
rotateIbl(
JSArray< JSNumber> rotation) → JSPromise<JSAny?> -
rotateStart(
double x, double y) → JSPromise< JSAny?> -
rotateUpdate(
double x, double y) → JSPromise< JSAny?> -
setAnimationFrame(
ThermionEntity entity, int index, int animationFrame) → JSPromise< JSAny?> -
setAntiAliasing(
bool msaa, bool fxaa, bool taa) → JSPromise< JSAny?> -
setBackgroundColor(
double r, double g, double b, double alpha) → JSPromise< JSAny?> -
setBackgroundImage(
String path, {bool fillHeight = false}) → JSPromise< JSAny?> -
setBackgroundImagePosition(
double x, double y, {bool clamp = false}) → JSPromise< JSAny?> -
setBloom(
double bloom) → JSPromise< JSAny?> -
setBoneTransform(
ThermionEntity entity, int boneIndex, JSArray< JSNumber> transform, int skinIndex) → JSPromise<JSAny?> -
setCamera(
ThermionEntity entity, String? name) → JSPromise< JSAny?> -
setCameraCulling(
double near, double far) → JSPromise< JSAny?> -
setCameraExposure(
double aperture, double shutterSpeed, double sensitivity) → JSPromise< JSAny?> -
setCameraFocalLength(
double focalLength) → JSPromise< JSAny?> -
setCameraFocusDistance(
double focusDistance) → JSPromise< JSAny?> -
setCameraFov(
double degrees, double width, double height) → JSPromise< JSAny?> -
setCameraManipulatorOptions(
{int mode = 0, double orbitSpeedX = 0.01, double orbitSpeedY = 0.01, double zoomSpeed = 0.01}) → JSPromise< JSAny?> -
setCameraModelMatrix(
JSArray< JSNumber> matrix) → JSPromise<JSAny?> -
setCameraPosition(
double x, double y, double z) → JSPromise< JSAny?> -
setCameraRotation(
JSArray< JSNumber> quaternion) → JSPromise<JSAny?> -
setFrameRate(
int framerate) → JSPromise< JSAny?> -
setMainCamera(
) → JSPromise< JSAny?> -
setMaterialColor(
ThermionEntity entity, String meshName, int materialIndex, double r, double g, double b, double a) → JSPromise< JSAny?> -
setMorphAnimationData(
ThermionEntity entity, JSArray< JSArray< animation, JSArray<JSNumber> >JSString> morphTargets, JSArray<JSString> ? targetMeshNames, double frameLengthInMs) → JSPromise<JSAny?> -
setMorphTargetWeights(
ThermionEntity entity, JSArray< JSNumber> weights) → JSPromise<JSAny?> -
setPosition(
ThermionEntity entity, double x, double y, double z) → JSPromise< JSAny?> -
setPostProcessing(
bool enabled) → JSPromise< JSAny?> -
setRecording(
bool recording) → JSPromise< JSAny?> -
setRecordingOutputDirectory(
String outputDirectory) → JSPromise< JSAny?> -
setRendering(
bool render) → JSPromise< JSAny?> -
setRotation(
ThermionEntity entity, double rads, double x, double y, double z) → JSPromise< JSAny?> -
setRotationQuat(
ThermionEntity entity, JSArray< JSNumber> rotation) → JSPromise<JSAny?> -
setScale(
ThermionEntity entity, double scale) → JSPromise< JSAny?> -
setShadowsEnabled(
bool enabled) → JSPromise< JSAny?> -
setShadowType(
int shadowType) → JSPromise< JSAny?> -
setSoftShadowOptions(
double penumbraScale, double penumbraRatioScale) → JSPromise< JSAny?> -
setToneMapping(
int mapper) → JSPromise< JSAny?> -
setTransform(
ThermionEntity entity, JSArray< JSNumber> transform) → JSPromise<JSAny?> -
setViewFrustumCulling(
JSBoolean enabled) → JSPromise< JSAny?> -
stopAnimation(
ThermionEntity entity, int animationIndex) → JSPromise< JSAny?> -
stopAnimationByName(
ThermionEntity entity, String name) → JSPromise< JSAny?> -
toString(
) → String -
A string representation of this object.
inherited
-
transformToUnitCube(
ThermionEntity entity) → JSPromise< JSAny?> -
updateBoneMatrices(
ThermionEntity entity) → JSPromise< JSAny?> -
zoomBegin(
) → JSPromise< JSAny?> -
zoomEnd(
) → JSPromise< JSAny?> -
zoomUpdate(
double x, double y, double z) → JSPromise< JSAny?>
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited