this._scaling.isNonUniformWithinEpsilon

Getting this error…when I look at code, this method doesn’t exist:

Uncaught TypeError: this._scaling.isNonUniformWithinEpsilon is not a function
at InstancedMesh.computeWorldMatrix (transformNode.ts:1260:31)
at InstancedMesh.getAbsolutePosition (transformNode.ts:501:14)
at get absolutePosition [as absolutePosition] (transformNode.ts:361:21)
at DiagramConnection.recalculate (diagramConnection.ts:88:44)
at DiagramConnection.beforeRender (diagramConnection.ts:132:14)
at _Observable.notifyObservers (observable.ts:379:58)
at _Scene.render (scene.ts:4599:39)
at app.ts:175:24
at _Engine._renderFrame (engine.ts:1280:13)
at _Engine._renderLoop (engine.ts:1310:26)

Gets triggered when I call “absolutePosition” on a transformnode in a beforerender observer. Can’t seem to figure out why this is happening… it “might” be some wierdness in my current build, but wanted to post in case others are running into it.

private recalculate() {
if (this.fromAnchor && this.toAnchor) {
this.points = [this.fromAnchor.absolutePosition, this.toAnchor.absolutePosition];
} else {
this.points = [Vector3.Zero(), Vector3.Zero()];
}
}

Ohhhh…hmmmm, hold off digging into this…I’m realizing I may have accidentally included some code that got dragged into a web worker that may have caused my problem. Though it might make sense to check if that method exists as a sanity check from a defensive coding perspective.

_scaling should always be a vector and in your case it does not exist or is not a vector. We can not add too much defensive code everywhere as it slows down quite a lot every computation typescript would normally shout for the culprit in this case so it is strange you can end up in this situation.

1 Like