- Mesh upload support
- LLMesh asset decoding and encoding (inc. LLPhysicsConvex, LLSkin, LLSubMesh) - Query inventory folder by type - onSelectedObject event - fetchInventoryItem command - Fix packing/unpacking of object shape - Time sync with SimulatorViewerTimeMessage - Changed several classes to a .from style rather than setting up in the constructor (exception friendly) - Whole bunch of other improvements - Object building
This commit is contained in:
@@ -35,6 +35,7 @@ import {SkyPreset} from './public/interfaces/SkyPreset';
|
||||
import {Vector4} from './Vector4';
|
||||
import {WaterPreset} from './public/interfaces/WaterPreset';
|
||||
import {ClientCommands} from './ClientCommands';
|
||||
import {SimulatorViewerTimeMessageMessage} from './messages/SimulatorViewerTimeMessage';
|
||||
|
||||
export class Region
|
||||
{
|
||||
@@ -119,6 +120,8 @@ export class Region
|
||||
|
||||
environment: RegionEnvironment;
|
||||
|
||||
timeOffset = 0;
|
||||
|
||||
static IDCTColumn16(linein: number[], lineout: number[], column: number)
|
||||
{
|
||||
let total: number;
|
||||
@@ -421,12 +424,14 @@ export class Region
|
||||
});
|
||||
|
||||
this.messageSubscription = this.circuit.subscribeToMessages([
|
||||
Message.LayerData
|
||||
Message.LayerData,
|
||||
Message.SimulatorViewerTimeMessage
|
||||
], (packet: Packet) =>
|
||||
{
|
||||
switch (packet.message.id)
|
||||
{
|
||||
case Message.LayerData:
|
||||
{
|
||||
const layerData: LayerDataMessage = packet.message as LayerDataMessage;
|
||||
const type: LayerType = layerData.LayerID.Type;
|
||||
|
||||
@@ -576,6 +581,14 @@ export class Region
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case Message.SimulatorViewerTimeMessage:
|
||||
{
|
||||
const msg = packet.message as SimulatorViewerTimeMessageMessage;
|
||||
const timeStamp = msg.TimeInfo.UsecSinceStart.toNumber() / 1000000;
|
||||
this.timeOffset = (new Date().getTime() / 1000) - timeStamp;
|
||||
break;
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user