mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-21 02:32:18 +00:00
Merge the PR branch (c737a354): the model items' nodes pose the stations' joints
Itallo's merge of main carried his own port of the ISS model onto the draw port and gave the renderer contract a `nodes` member (the Cesium port writes each named glTF node's matrix once the model is ready, changed ones only). The satellites files keep this branch's versions, which cover both stations, the STATION and LIVE sections and telemetry; the joint drivers' poses are now the draw item's `nodes`, so the arrays, radiators, dishes and arms move again. His duplicate point-range setters go; the changelog fragment takes #1690.
This commit is contained in:
commit
501a34ecaf
9 files changed
+159
-26
No files matched your search
@@ -248,7 +248,23 @@ test('posed, the model sits on the station with its flight axes as heading, pitc
|
||||
const track = column(ISS_MODEL_LOCAL_AXES.indexOf('x'));
|
||||
assert.ok(Math.abs(along(track)) < 1e-6, 'the along-track axis is level');
|
||||
assert.equal(f.updates.length, 1, 'the joints are driven');
|
||||
assert.equal(f.updates[0][0].ready, true, 'into node poses');
|
||||
const nodes = f.updates[0][0];
|
||||
assert.equal(nodes.ready, true, 'into node poses');
|
||||
// What the driver writes to a node is the item's `nodes`, by name, as a
|
||||
// column-major matrix the renderer applies to the model's glTF node.
|
||||
const turned = new Float64Array(16);
|
||||
turned[0] = turned[5] = turned[10] = turned[15] = 1;
|
||||
turned[14] = 2.5;
|
||||
nodes.getNode('SOLAR_JOINT').matrix = turned;
|
||||
f.tick();
|
||||
assert.equal(item.nodes, f.model._nodePoses, 'one object for the item');
|
||||
assert.deepEqual(Array.from(item.nodes.SOLAR_JOINT), Array.from(turned));
|
||||
f.model._destroyStationModel();
|
||||
assert.equal(
|
||||
Object.keys(f.model._nodePoses).length,
|
||||
0,
|
||||
'destroyed, every node goes back to its authored pose',
|
||||
);
|
||||
});
|
||||
|
||||
test('a station without views on its model hides it while the Cockpit rides the station, its own entry or a docked one', async (t) => {
|
||||
|
||||
Reference in new issue
Block a user