2017-11-30 04:11:59 +00:00
|
|
|
import {Circuit} from './Circuit';
|
|
|
|
|
import {Packet} from './Packet';
|
|
|
|
|
import {Message} from '../enums/Message';
|
|
|
|
|
import {ObjectUpdateMessage} from './messages/ObjectUpdate';
|
|
|
|
|
import {ObjectUpdateCachedMessage} from './messages/ObjectUpdateCached';
|
|
|
|
|
import {ObjectUpdateCompressedMessage} from './messages/ObjectUpdateCompressed';
|
|
|
|
|
import {ImprovedTerseObjectUpdateMessage} from './messages/ImprovedTerseObjectUpdate';
|
|
|
|
|
import {RequestMultipleObjectsMessage} from './messages/RequestMultipleObjects';
|
|
|
|
|
import {Agent} from './Agent';
|
|
|
|
|
import {UUID} from './UUID';
|
|
|
|
|
import {Utils} from './Utils';
|
2017-12-14 01:21:18 +00:00
|
|
|
import {ClientEvents} from './ClientEvents';
|
|
|
|
|
import {KillObjectMessage} from './messages/KillObject';
|
2017-12-14 02:06:28 +00:00
|
|
|
import {IObjectStore} from './interfaces/IObjectStore';
|
|
|
|
|
import {NameValue} from './NameValue';
|
2018-11-05 11:45:04 +00:00
|
|
|
import {
|
|
|
|
|
BotOptionFlags,
|
|
|
|
|
CompressedFlags,
|
|
|
|
|
NewObjectEvent,
|
|
|
|
|
ObjectPhysicsDataEvent,
|
|
|
|
|
ObjectUpdatedEvent,
|
|
|
|
|
PacketFlags,
|
|
|
|
|
PCode,
|
2018-11-15 03:10:14 +00:00
|
|
|
PrimFlags,
|
2018-11-05 11:45:04 +00:00
|
|
|
Vector3
|
|
|
|
|
} from '..';
|
- Add "GET" method to Caps
- New events: ObjectPhysicsDataEvent, ParcelPropertiesEvent, NewObjectEvent, ObjectUpdateEvent, ObjectKilledEvent
- Added getXML function to Color4, Vector2, Vector3, Vector4, GameObject, Region, Quaternion, UUID for opensim-compatible XML export
- Added TextureAnim and ParticleSystem decoding to the "full" ObjectStore
- Object store will automatically request missing "parent" prims
- "setPersist" - When persist is TRUE, the ObjectStore will not forget about "killed" prims - useful for region scanning
- Support for Flexible params, Light params, LightImage params, Mesh data, Sculpt maps
- Fixed object scale being incorrectly calculated
- Add terrain decoding (this was a ballache)
- Add parcel map decoding
- Add support for region windlight settings (region.environment)
- Add support for materials (normal / specular maps)
- Add getBuffer, getLong and bitwiseOr to UUID
- Added a circular-reference-safe JSONStringify to Utils
- Add XferFile capability to Circuit
PUBLIC API:
AssetCommands:
- Rework "downloadAsset" to detect failures
- NEW: downloadInventoryAsset() - uses TransferRequest for prim inventory items
- NEW: getMaterials() - resolves material UUIDs
RegionCommands:
- NEW: getTerrainTextures()
- NEW: exportSettings() - OpenSim XML export of region settings
- NEW: async getTerrain() - Get binary terrain heightmap, 256x256 float32
- resolveObjects() - now fetches task inventory contents too.
- resolveObjects() - fix calculation of land impact
- NEW: getObjectByLocalID(localID: number, timeout: number)
- NEW: getObjectByUUID(uuid: UUID, timeout: number)
- NEW: getParcels();
- NEW: pruneObjects - removes missing GameObjects from a list
- NEW: setPersist - prevent objectstore from forgetting about killed gameobjects
2018-10-31 11:28:24 +00:00
|
|
|
import {GameObject} from './public/GameObject';
|
2018-10-19 16:30:09 +01:00
|
|
|
import {RBush3D} from 'rbush-3d/dist';
|
|
|
|
|
import {ITreeBoundingBox} from './interfaces/ITreeBoundingBox';
|
- Add "GET" method to Caps
- New events: ObjectPhysicsDataEvent, ParcelPropertiesEvent, NewObjectEvent, ObjectUpdateEvent, ObjectKilledEvent
- Added getXML function to Color4, Vector2, Vector3, Vector4, GameObject, Region, Quaternion, UUID for opensim-compatible XML export
- Added TextureAnim and ParticleSystem decoding to the "full" ObjectStore
- Object store will automatically request missing "parent" prims
- "setPersist" - When persist is TRUE, the ObjectStore will not forget about "killed" prims - useful for region scanning
- Support for Flexible params, Light params, LightImage params, Mesh data, Sculpt maps
- Fixed object scale being incorrectly calculated
- Add terrain decoding (this was a ballache)
- Add parcel map decoding
- Add support for region windlight settings (region.environment)
- Add support for materials (normal / specular maps)
- Add getBuffer, getLong and bitwiseOr to UUID
- Added a circular-reference-safe JSONStringify to Utils
- Add XferFile capability to Circuit
PUBLIC API:
AssetCommands:
- Rework "downloadAsset" to detect failures
- NEW: downloadInventoryAsset() - uses TransferRequest for prim inventory items
- NEW: getMaterials() - resolves material UUIDs
RegionCommands:
- NEW: getTerrainTextures()
- NEW: exportSettings() - OpenSim XML export of region settings
- NEW: async getTerrain() - Get binary terrain heightmap, 256x256 float32
- resolveObjects() - now fetches task inventory contents too.
- resolveObjects() - fix calculation of land impact
- NEW: getObjectByLocalID(localID: number, timeout: number)
- NEW: getObjectByUUID(uuid: UUID, timeout: number)
- NEW: getParcels();
- NEW: pruneObjects - removes missing GameObjects from a list
- NEW: setPersist - prevent objectstore from forgetting about killed gameobjects
2018-10-31 11:28:24 +00:00
|
|
|
import {FilterResponse} from '../enums/FilterResponse';
|
|
|
|
|
import {ObjectSelectMessage} from './messages/ObjectSelect';
|
|
|
|
|
import {ObjectDeselectMessage} from './messages/ObjectDeselect';
|
|
|
|
|
import {Quaternion} from './Quaternion';
|
|
|
|
|
import {Subscription} from 'rxjs/internal/Subscription';
|
2018-11-05 11:45:04 +00:00
|
|
|
import {ExtraParams} from './public/ExtraParams';
|
2018-11-15 03:10:14 +00:00
|
|
|
import {ObjectPropertiesMessage} from './messages/ObjectProperties';
|
|
|
|
|
import {SelectedObjectEvent} from '../events/SelectedObjectEvent';
|
2017-11-30 04:11:59 +00:00
|
|
|
|
2017-12-14 02:06:28 +00:00
|
|
|
export class ObjectStoreLite implements IObjectStore
|
2017-11-30 04:11:59 +00:00
|
|
|
{
|
2018-10-19 16:30:09 +01:00
|
|
|
protected circuit: Circuit;
|
|
|
|
|
protected agent: Agent;
|
|
|
|
|
protected objects: { [key: number]: GameObject } = {};
|
|
|
|
|
protected objectsByUUID: { [key: string]: number } = {};
|
|
|
|
|
protected objectsByParent: { [key: number]: number[] } = {};
|
|
|
|
|
protected clientEvents: ClientEvents;
|
|
|
|
|
protected options: BotOptionFlags;
|
- Add "GET" method to Caps
- New events: ObjectPhysicsDataEvent, ParcelPropertiesEvent, NewObjectEvent, ObjectUpdateEvent, ObjectKilledEvent
- Added getXML function to Color4, Vector2, Vector3, Vector4, GameObject, Region, Quaternion, UUID for opensim-compatible XML export
- Added TextureAnim and ParticleSystem decoding to the "full" ObjectStore
- Object store will automatically request missing "parent" prims
- "setPersist" - When persist is TRUE, the ObjectStore will not forget about "killed" prims - useful for region scanning
- Support for Flexible params, Light params, LightImage params, Mesh data, Sculpt maps
- Fixed object scale being incorrectly calculated
- Add terrain decoding (this was a ballache)
- Add parcel map decoding
- Add support for region windlight settings (region.environment)
- Add support for materials (normal / specular maps)
- Add getBuffer, getLong and bitwiseOr to UUID
- Added a circular-reference-safe JSONStringify to Utils
- Add XferFile capability to Circuit
PUBLIC API:
AssetCommands:
- Rework "downloadAsset" to detect failures
- NEW: downloadInventoryAsset() - uses TransferRequest for prim inventory items
- NEW: getMaterials() - resolves material UUIDs
RegionCommands:
- NEW: getTerrainTextures()
- NEW: exportSettings() - OpenSim XML export of region settings
- NEW: async getTerrain() - Get binary terrain heightmap, 256x256 float32
- resolveObjects() - now fetches task inventory contents too.
- resolveObjects() - fix calculation of land impact
- NEW: getObjectByLocalID(localID: number, timeout: number)
- NEW: getObjectByUUID(uuid: UUID, timeout: number)
- NEW: getParcels();
- NEW: pruneObjects - removes missing GameObjects from a list
- NEW: setPersist - prevent objectstore from forgetting about killed gameobjects
2018-10-31 11:28:24 +00:00
|
|
|
protected requestedObjects: {[key: number]: boolean} = {};
|
|
|
|
|
protected deadObjects: number[] = [];
|
|
|
|
|
protected persist = false;
|
2018-11-15 03:10:14 +00:00
|
|
|
protected pendingObjectProperties: {[key: string]: any} = {};
|
- Add "GET" method to Caps
- New events: ObjectPhysicsDataEvent, ParcelPropertiesEvent, NewObjectEvent, ObjectUpdateEvent, ObjectKilledEvent
- Added getXML function to Color4, Vector2, Vector3, Vector4, GameObject, Region, Quaternion, UUID for opensim-compatible XML export
- Added TextureAnim and ParticleSystem decoding to the "full" ObjectStore
- Object store will automatically request missing "parent" prims
- "setPersist" - When persist is TRUE, the ObjectStore will not forget about "killed" prims - useful for region scanning
- Support for Flexible params, Light params, LightImage params, Mesh data, Sculpt maps
- Fixed object scale being incorrectly calculated
- Add terrain decoding (this was a ballache)
- Add parcel map decoding
- Add support for region windlight settings (region.environment)
- Add support for materials (normal / specular maps)
- Add getBuffer, getLong and bitwiseOr to UUID
- Added a circular-reference-safe JSONStringify to Utils
- Add XferFile capability to Circuit
PUBLIC API:
AssetCommands:
- Rework "downloadAsset" to detect failures
- NEW: downloadInventoryAsset() - uses TransferRequest for prim inventory items
- NEW: getMaterials() - resolves material UUIDs
RegionCommands:
- NEW: getTerrainTextures()
- NEW: exportSettings() - OpenSim XML export of region settings
- NEW: async getTerrain() - Get binary terrain heightmap, 256x256 float32
- resolveObjects() - now fetches task inventory contents too.
- resolveObjects() - fix calculation of land impact
- NEW: getObjectByLocalID(localID: number, timeout: number)
- NEW: getObjectByUUID(uuid: UUID, timeout: number)
- NEW: getParcels();
- NEW: pruneObjects - removes missing GameObjects from a list
- NEW: setPersist - prevent objectstore from forgetting about killed gameobjects
2018-10-31 11:28:24 +00:00
|
|
|
private physicsSubscription: Subscription;
|
2018-11-15 03:10:14 +00:00
|
|
|
private selectedPrimsWithoutUpdate: {[key: number]: boolean} = {};
|
2018-10-19 16:30:09 +01:00
|
|
|
|
|
|
|
|
rtree?: RBush3D;
|
2017-11-30 04:11:59 +00:00
|
|
|
|
2017-12-14 02:18:50 +00:00
|
|
|
constructor(circuit: Circuit, agent: Agent, clientEvents: ClientEvents, options: BotOptionFlags)
|
2017-11-30 04:11:59 +00:00
|
|
|
{
|
2017-12-14 02:37:47 +00:00
|
|
|
agent.localID = 0;
|
2017-12-14 02:18:50 +00:00
|
|
|
this.options = options;
|
2017-11-30 04:11:59 +00:00
|
|
|
this.clientEvents = clientEvents;
|
|
|
|
|
this.circuit = circuit;
|
|
|
|
|
this.agent = agent;
|
|
|
|
|
this.circuit.subscribeToMessages([
|
2017-12-14 01:21:18 +00:00
|
|
|
Message.ObjectUpdate,
|
|
|
|
|
Message.ObjectUpdateCached,
|
|
|
|
|
Message.ObjectUpdateCompressed,
|
|
|
|
|
Message.ImprovedTerseObjectUpdate,
|
2018-11-15 03:10:14 +00:00
|
|
|
Message.ObjectProperties,
|
2017-12-14 01:21:18 +00:00
|
|
|
Message.KillObject
|
- Add "GET" method to Caps
- New events: ObjectPhysicsDataEvent, ParcelPropertiesEvent, NewObjectEvent, ObjectUpdateEvent, ObjectKilledEvent
- Added getXML function to Color4, Vector2, Vector3, Vector4, GameObject, Region, Quaternion, UUID for opensim-compatible XML export
- Added TextureAnim and ParticleSystem decoding to the "full" ObjectStore
- Object store will automatically request missing "parent" prims
- "setPersist" - When persist is TRUE, the ObjectStore will not forget about "killed" prims - useful for region scanning
- Support for Flexible params, Light params, LightImage params, Mesh data, Sculpt maps
- Fixed object scale being incorrectly calculated
- Add terrain decoding (this was a ballache)
- Add parcel map decoding
- Add support for region windlight settings (region.environment)
- Add support for materials (normal / specular maps)
- Add getBuffer, getLong and bitwiseOr to UUID
- Added a circular-reference-safe JSONStringify to Utils
- Add XferFile capability to Circuit
PUBLIC API:
AssetCommands:
- Rework "downloadAsset" to detect failures
- NEW: downloadInventoryAsset() - uses TransferRequest for prim inventory items
- NEW: getMaterials() - resolves material UUIDs
RegionCommands:
- NEW: getTerrainTextures()
- NEW: exportSettings() - OpenSim XML export of region settings
- NEW: async getTerrain() - Get binary terrain heightmap, 256x256 float32
- resolveObjects() - now fetches task inventory contents too.
- resolveObjects() - fix calculation of land impact
- NEW: getObjectByLocalID(localID: number, timeout: number)
- NEW: getObjectByUUID(uuid: UUID, timeout: number)
- NEW: getParcels();
- NEW: pruneObjects - removes missing GameObjects from a list
- NEW: setPersist - prevent objectstore from forgetting about killed gameobjects
2018-10-31 11:28:24 +00:00
|
|
|
], async (packet: Packet) =>
|
2017-11-30 04:11:59 +00:00
|
|
|
{
|
|
|
|
|
switch (packet.message.id)
|
|
|
|
|
{
|
2018-11-15 03:10:14 +00:00
|
|
|
case Message.ObjectProperties:
|
|
|
|
|
const objProp = packet.message as ObjectPropertiesMessage;
|
|
|
|
|
for (const obj of objProp.ObjectData)
|
|
|
|
|
{
|
|
|
|
|
const obje = this.objectsByUUID[obj.ObjectID.toString()];
|
|
|
|
|
if (obje !== undefined && this.objects[obje] !== undefined)
|
|
|
|
|
{
|
|
|
|
|
const o = this.objects[obje];
|
|
|
|
|
this.applyObjectProperties(o, obj);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
this.pendingObjectProperties[obj.ObjectID.toString()] = obj;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
break;
|
2017-11-30 04:11:59 +00:00
|
|
|
case Message.ObjectUpdate:
|
|
|
|
|
const objectUpdate = packet.message as ObjectUpdateMessage;
|
2018-10-19 16:30:09 +01:00
|
|
|
this.objectUpdate(objectUpdate);
|
2017-11-30 04:11:59 +00:00
|
|
|
break;
|
|
|
|
|
case Message.ObjectUpdateCached:
|
|
|
|
|
const objectUpdateCached = packet.message as ObjectUpdateCachedMessage;
|
2018-10-19 16:30:09 +01:00
|
|
|
this.objectUpdateCached(objectUpdateCached);
|
2017-11-30 04:11:59 +00:00
|
|
|
break;
|
|
|
|
|
case Message.ObjectUpdateCompressed:
|
|
|
|
|
{
|
|
|
|
|
const objectUpdateCompressed = packet.message as ObjectUpdateCompressedMessage;
|
- Add "GET" method to Caps
- New events: ObjectPhysicsDataEvent, ParcelPropertiesEvent, NewObjectEvent, ObjectUpdateEvent, ObjectKilledEvent
- Added getXML function to Color4, Vector2, Vector3, Vector4, GameObject, Region, Quaternion, UUID for opensim-compatible XML export
- Added TextureAnim and ParticleSystem decoding to the "full" ObjectStore
- Object store will automatically request missing "parent" prims
- "setPersist" - When persist is TRUE, the ObjectStore will not forget about "killed" prims - useful for region scanning
- Support for Flexible params, Light params, LightImage params, Mesh data, Sculpt maps
- Fixed object scale being incorrectly calculated
- Add terrain decoding (this was a ballache)
- Add parcel map decoding
- Add support for region windlight settings (region.environment)
- Add support for materials (normal / specular maps)
- Add getBuffer, getLong and bitwiseOr to UUID
- Added a circular-reference-safe JSONStringify to Utils
- Add XferFile capability to Circuit
PUBLIC API:
AssetCommands:
- Rework "downloadAsset" to detect failures
- NEW: downloadInventoryAsset() - uses TransferRequest for prim inventory items
- NEW: getMaterials() - resolves material UUIDs
RegionCommands:
- NEW: getTerrainTextures()
- NEW: exportSettings() - OpenSim XML export of region settings
- NEW: async getTerrain() - Get binary terrain heightmap, 256x256 float32
- resolveObjects() - now fetches task inventory contents too.
- resolveObjects() - fix calculation of land impact
- NEW: getObjectByLocalID(localID: number, timeout: number)
- NEW: getObjectByUUID(uuid: UUID, timeout: number)
- NEW: getParcels();
- NEW: pruneObjects - removes missing GameObjects from a list
- NEW: setPersist - prevent objectstore from forgetting about killed gameobjects
2018-10-31 11:28:24 +00:00
|
|
|
await this.objectUpdateCompressed(objectUpdateCompressed);
|
2018-10-19 16:30:09 +01:00
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case Message.ImprovedTerseObjectUpdate:
|
|
|
|
|
const objectUpdateTerse = packet.message as ImprovedTerseObjectUpdateMessage;
|
|
|
|
|
this.objectUpdateTerse(objectUpdateTerse);
|
|
|
|
|
break;
|
|
|
|
|
case Message.KillObject:
|
|
|
|
|
const killObj = packet.message as KillObjectMessage;
|
|
|
|
|
this.killObject(killObj);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
});
|
- Add "GET" method to Caps
- New events: ObjectPhysicsDataEvent, ParcelPropertiesEvent, NewObjectEvent, ObjectUpdateEvent, ObjectKilledEvent
- Added getXML function to Color4, Vector2, Vector3, Vector4, GameObject, Region, Quaternion, UUID for opensim-compatible XML export
- Added TextureAnim and ParticleSystem decoding to the "full" ObjectStore
- Object store will automatically request missing "parent" prims
- "setPersist" - When persist is TRUE, the ObjectStore will not forget about "killed" prims - useful for region scanning
- Support for Flexible params, Light params, LightImage params, Mesh data, Sculpt maps
- Fixed object scale being incorrectly calculated
- Add terrain decoding (this was a ballache)
- Add parcel map decoding
- Add support for region windlight settings (region.environment)
- Add support for materials (normal / specular maps)
- Add getBuffer, getLong and bitwiseOr to UUID
- Added a circular-reference-safe JSONStringify to Utils
- Add XferFile capability to Circuit
PUBLIC API:
AssetCommands:
- Rework "downloadAsset" to detect failures
- NEW: downloadInventoryAsset() - uses TransferRequest for prim inventory items
- NEW: getMaterials() - resolves material UUIDs
RegionCommands:
- NEW: getTerrainTextures()
- NEW: exportSettings() - OpenSim XML export of region settings
- NEW: async getTerrain() - Get binary terrain heightmap, 256x256 float32
- resolveObjects() - now fetches task inventory contents too.
- resolveObjects() - fix calculation of land impact
- NEW: getObjectByLocalID(localID: number, timeout: number)
- NEW: getObjectByUUID(uuid: UUID, timeout: number)
- NEW: getParcels();
- NEW: pruneObjects - removes missing GameObjects from a list
- NEW: setPersist - prevent objectstore from forgetting about killed gameobjects
2018-10-31 11:28:24 +00:00
|
|
|
|
|
|
|
|
this.physicsSubscription = this.clientEvents.onPhysicsDataEvent.subscribe((evt: ObjectPhysicsDataEvent) =>
|
|
|
|
|
{
|
|
|
|
|
if (this.objects[evt.localID])
|
|
|
|
|
{
|
|
|
|
|
this.objects[evt.localID].physicsShapeType = evt.physicsShapeType;
|
|
|
|
|
this.objects[evt.localID].density = evt.density;
|
|
|
|
|
this.objects[evt.localID].restitution = evt.restitution;
|
|
|
|
|
this.objects[evt.localID].gravityMultiplier = evt.gravityMultiplier;
|
|
|
|
|
this.objects[evt.localID].friction = evt.friction;
|
|
|
|
|
}
|
|
|
|
|
});
|
2018-11-15 03:10:14 +00:00
|
|
|
|
|
|
|
|
setInterval(() =>
|
|
|
|
|
{
|
|
|
|
|
let selectObjects = [];
|
|
|
|
|
for (const key of Object.keys(this.selectedPrimsWithoutUpdate))
|
|
|
|
|
{
|
|
|
|
|
selectObjects.push(key);
|
|
|
|
|
}
|
|
|
|
|
function shuffle(a: any)
|
|
|
|
|
{
|
|
|
|
|
let j, x, i;
|
|
|
|
|
for (i = a.length - 1; i > 0; i--)
|
|
|
|
|
{
|
|
|
|
|
j = Math.floor(Math.random() * (i + 1));
|
|
|
|
|
x = a[i];
|
|
|
|
|
a[i] = a[j];
|
|
|
|
|
a[j] = x;
|
|
|
|
|
}
|
|
|
|
|
return a;
|
|
|
|
|
}
|
|
|
|
|
selectObjects = shuffle(selectObjects);
|
|
|
|
|
if (selectObjects.length > 10)
|
|
|
|
|
{
|
|
|
|
|
selectObjects = selectObjects.slice(0, 20);
|
|
|
|
|
}
|
|
|
|
|
if (selectObjects.length > 0)
|
|
|
|
|
{
|
|
|
|
|
const selectObject = new ObjectSelectMessage();
|
|
|
|
|
selectObject.AgentData = {
|
|
|
|
|
AgentID: this.agent.agentID,
|
|
|
|
|
SessionID: this.circuit.sessionID
|
|
|
|
|
};
|
|
|
|
|
selectObject.ObjectData = [];
|
|
|
|
|
for (const id of selectObjects)
|
|
|
|
|
{
|
|
|
|
|
selectObject.ObjectData.push({
|
|
|
|
|
ObjectLocalID: id
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
this.circuit.sendMessage(selectObject, PacketFlags.Reliable);
|
|
|
|
|
}
|
|
|
|
|
}, 1000)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private applyObjectProperties(o: GameObject, obj: any)
|
|
|
|
|
{
|
|
|
|
|
if (this.selectedPrimsWithoutUpdate[o.ID])
|
|
|
|
|
{
|
|
|
|
|
delete this.selectedPrimsWithoutUpdate[o.ID];
|
|
|
|
|
}
|
|
|
|
|
o.creatorID = obj.CreatorID;
|
|
|
|
|
o.creationDate = obj.CreationDate;
|
|
|
|
|
o.baseMask = obj.BaseMask;
|
|
|
|
|
o.ownerMask = obj.OwnerMask;
|
|
|
|
|
o.groupMask = obj.GroupMask;
|
|
|
|
|
o.everyoneMask = obj.EveryoneMask;
|
|
|
|
|
o.nextOwnerMask = obj.NextOwnerMask;
|
|
|
|
|
o.ownershipCost = obj.OwnershipCost;
|
|
|
|
|
o.saleType = obj.SaleType;
|
|
|
|
|
o.salePrice = obj.SalePrice;
|
|
|
|
|
o.aggregatePerms = obj.AggregatePerms;
|
|
|
|
|
o.aggregatePermTextures = obj.AggregatePermTextures;
|
|
|
|
|
o.aggregatePermTexturesOwner = obj.AggregatePermTexturesOwner;
|
|
|
|
|
o.category = obj.Category;
|
|
|
|
|
o.inventorySerial = obj.InventorySerial;
|
|
|
|
|
o.itemID = obj.ItemID;
|
|
|
|
|
o.folderID = obj.FolderID;
|
|
|
|
|
o.fromTaskID = obj.FromTaskID;
|
|
|
|
|
o.groupID = obj.GroupID;
|
|
|
|
|
o.lastOwnerID = obj.LastOwnerID;
|
|
|
|
|
o.name = Utils.BufferToStringSimple(obj.Name);
|
|
|
|
|
o.description = Utils.BufferToStringSimple(obj.Description);
|
|
|
|
|
o.touchName = Utils.BufferToStringSimple(obj.TouchName);
|
|
|
|
|
o.sitName = Utils.BufferToStringSimple(obj.SitName);
|
|
|
|
|
o.textureID = Utils.BufferToStringSimple(obj.TextureID);
|
|
|
|
|
o.resolvedAt = new Date().getTime() / 1000;
|
|
|
|
|
|
|
|
|
|
if (o.Flags !== undefined)
|
|
|
|
|
{
|
|
|
|
|
if (o.Flags & PrimFlags.CreateSelected)
|
|
|
|
|
{
|
|
|
|
|
const evt = new SelectedObjectEvent();
|
|
|
|
|
evt.object = o;
|
|
|
|
|
this.clientEvents.onSelectedObjectEvent.next(evt);
|
|
|
|
|
}
|
|
|
|
|
}
|
- Add "GET" method to Caps
- New events: ObjectPhysicsDataEvent, ParcelPropertiesEvent, NewObjectEvent, ObjectUpdateEvent, ObjectKilledEvent
- Added getXML function to Color4, Vector2, Vector3, Vector4, GameObject, Region, Quaternion, UUID for opensim-compatible XML export
- Added TextureAnim and ParticleSystem decoding to the "full" ObjectStore
- Object store will automatically request missing "parent" prims
- "setPersist" - When persist is TRUE, the ObjectStore will not forget about "killed" prims - useful for region scanning
- Support for Flexible params, Light params, LightImage params, Mesh data, Sculpt maps
- Fixed object scale being incorrectly calculated
- Add terrain decoding (this was a ballache)
- Add parcel map decoding
- Add support for region windlight settings (region.environment)
- Add support for materials (normal / specular maps)
- Add getBuffer, getLong and bitwiseOr to UUID
- Added a circular-reference-safe JSONStringify to Utils
- Add XferFile capability to Circuit
PUBLIC API:
AssetCommands:
- Rework "downloadAsset" to detect failures
- NEW: downloadInventoryAsset() - uses TransferRequest for prim inventory items
- NEW: getMaterials() - resolves material UUIDs
RegionCommands:
- NEW: getTerrainTextures()
- NEW: exportSettings() - OpenSim XML export of region settings
- NEW: async getTerrain() - Get binary terrain heightmap, 256x256 float32
- resolveObjects() - now fetches task inventory contents too.
- resolveObjects() - fix calculation of land impact
- NEW: getObjectByLocalID(localID: number, timeout: number)
- NEW: getObjectByUUID(uuid: UUID, timeout: number)
- NEW: getParcels();
- NEW: pruneObjects - removes missing GameObjects from a list
- NEW: setPersist - prevent objectstore from forgetting about killed gameobjects
2018-10-31 11:28:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected async requestMissingObject(localID: number, attempt = 0)
|
|
|
|
|
{
|
|
|
|
|
if (this.requestedObjects[localID])
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
this.requestedObjects[localID] = true;
|
|
|
|
|
const rmo = new RequestMultipleObjectsMessage();
|
|
|
|
|
rmo.AgentData = {
|
|
|
|
|
AgentID: this.agent.agentID,
|
|
|
|
|
SessionID: this.circuit.sessionID
|
|
|
|
|
};
|
|
|
|
|
rmo.ObjectData = [];
|
|
|
|
|
rmo.ObjectData.push({
|
|
|
|
|
CacheMissType: 0,
|
|
|
|
|
ID: localID
|
|
|
|
|
});
|
|
|
|
|
this.circuit.sendMessage(rmo, PacketFlags.Reliable);
|
|
|
|
|
|
|
|
|
|
const selectObject = new ObjectSelectMessage();
|
|
|
|
|
selectObject.AgentData = {
|
|
|
|
|
AgentID: this.agent.agentID,
|
|
|
|
|
SessionID: this.circuit.sessionID
|
|
|
|
|
};
|
|
|
|
|
selectObject.ObjectData = [
|
|
|
|
|
{
|
|
|
|
|
'ObjectLocalID': localID
|
|
|
|
|
}
|
|
|
|
|
];
|
|
|
|
|
this.circuit.sendMessage(selectObject, PacketFlags.Reliable);
|
|
|
|
|
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
await this.circuit.waitForMessage<ObjectUpdateMessage>(Message.ObjectUpdate, 10000, (message: ObjectUpdateMessage): FilterResponse =>
|
|
|
|
|
{
|
|
|
|
|
for (const obj of message.ObjectData)
|
|
|
|
|
{
|
|
|
|
|
if (obj.ID === localID)
|
|
|
|
|
{
|
|
|
|
|
return FilterResponse.Finish;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return FilterResponse.NoMatch;
|
|
|
|
|
});
|
|
|
|
|
delete this.requestedObjects[localID];
|
|
|
|
|
}
|
|
|
|
|
catch (error)
|
|
|
|
|
{
|
|
|
|
|
delete this.requestedObjects[localID];
|
|
|
|
|
if (attempt < 5)
|
|
|
|
|
{
|
|
|
|
|
await this.requestMissingObject(localID, ++attempt);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
console.error('Error retrieving missing object after 5 attempts: ' + localID);
|
|
|
|
|
console.error(error);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
finally
|
|
|
|
|
{
|
|
|
|
|
const deselectObject = new ObjectDeselectMessage();
|
|
|
|
|
deselectObject.AgentData = {
|
|
|
|
|
AgentID: this.agent.agentID,
|
|
|
|
|
SessionID: this.circuit.sessionID
|
|
|
|
|
};
|
|
|
|
|
deselectObject.ObjectData = [
|
|
|
|
|
{
|
|
|
|
|
'ObjectLocalID': localID
|
|
|
|
|
}
|
|
|
|
|
];
|
|
|
|
|
this.circuit.sendMessage(selectObject, PacketFlags.Reliable);
|
|
|
|
|
}
|
2018-10-19 16:30:09 +01:00
|
|
|
}
|
2017-12-14 02:06:28 +00:00
|
|
|
|
2018-10-19 16:30:09 +01:00
|
|
|
protected objectUpdate(objectUpdate: ObjectUpdateMessage)
|
|
|
|
|
{
|
|
|
|
|
objectUpdate.ObjectData.forEach((objData) =>
|
|
|
|
|
{
|
|
|
|
|
const localID = objData.ID;
|
|
|
|
|
const parentID = objData.ParentID;
|
|
|
|
|
let addToParentList = true;
|
- Add "GET" method to Caps
- New events: ObjectPhysicsDataEvent, ParcelPropertiesEvent, NewObjectEvent, ObjectUpdateEvent, ObjectKilledEvent
- Added getXML function to Color4, Vector2, Vector3, Vector4, GameObject, Region, Quaternion, UUID for opensim-compatible XML export
- Added TextureAnim and ParticleSystem decoding to the "full" ObjectStore
- Object store will automatically request missing "parent" prims
- "setPersist" - When persist is TRUE, the ObjectStore will not forget about "killed" prims - useful for region scanning
- Support for Flexible params, Light params, LightImage params, Mesh data, Sculpt maps
- Fixed object scale being incorrectly calculated
- Add terrain decoding (this was a ballache)
- Add parcel map decoding
- Add support for region windlight settings (region.environment)
- Add support for materials (normal / specular maps)
- Add getBuffer, getLong and bitwiseOr to UUID
- Added a circular-reference-safe JSONStringify to Utils
- Add XferFile capability to Circuit
PUBLIC API:
AssetCommands:
- Rework "downloadAsset" to detect failures
- NEW: downloadInventoryAsset() - uses TransferRequest for prim inventory items
- NEW: getMaterials() - resolves material UUIDs
RegionCommands:
- NEW: getTerrainTextures()
- NEW: exportSettings() - OpenSim XML export of region settings
- NEW: async getTerrain() - Get binary terrain heightmap, 256x256 float32
- resolveObjects() - now fetches task inventory contents too.
- resolveObjects() - fix calculation of land impact
- NEW: getObjectByLocalID(localID: number, timeout: number)
- NEW: getObjectByUUID(uuid: UUID, timeout: number)
- NEW: getParcels();
- NEW: pruneObjects - removes missing GameObjects from a list
- NEW: setPersist - prevent objectstore from forgetting about killed gameobjects
2018-10-31 11:28:24 +00:00
|
|
|
let newObject = false;
|
2017-12-14 02:06:28 +00:00
|
|
|
|
2018-10-19 16:30:09 +01:00
|
|
|
if (this.objects[localID])
|
|
|
|
|
{
|
|
|
|
|
if (this.objects[localID].ParentID !== parentID && this.objectsByParent[parentID])
|
|
|
|
|
{
|
|
|
|
|
const ind = this.objectsByParent[parentID].indexOf(localID);
|
|
|
|
|
if (ind !== -1)
|
|
|
|
|
{
|
|
|
|
|
this.objectsByParent[parentID].splice(ind, 1);
|
|
|
|
|
}
|
|
|
|
|
}
|
- Add "GET" method to Caps
- New events: ObjectPhysicsDataEvent, ParcelPropertiesEvent, NewObjectEvent, ObjectUpdateEvent, ObjectKilledEvent
- Added getXML function to Color4, Vector2, Vector3, Vector4, GameObject, Region, Quaternion, UUID for opensim-compatible XML export
- Added TextureAnim and ParticleSystem decoding to the "full" ObjectStore
- Object store will automatically request missing "parent" prims
- "setPersist" - When persist is TRUE, the ObjectStore will not forget about "killed" prims - useful for region scanning
- Support for Flexible params, Light params, LightImage params, Mesh data, Sculpt maps
- Fixed object scale being incorrectly calculated
- Add terrain decoding (this was a ballache)
- Add parcel map decoding
- Add support for region windlight settings (region.environment)
- Add support for materials (normal / specular maps)
- Add getBuffer, getLong and bitwiseOr to UUID
- Added a circular-reference-safe JSONStringify to Utils
- Add XferFile capability to Circuit
PUBLIC API:
AssetCommands:
- Rework "downloadAsset" to detect failures
- NEW: downloadInventoryAsset() - uses TransferRequest for prim inventory items
- NEW: getMaterials() - resolves material UUIDs
RegionCommands:
- NEW: getTerrainTextures()
- NEW: exportSettings() - OpenSim XML export of region settings
- NEW: async getTerrain() - Get binary terrain heightmap, 256x256 float32
- resolveObjects() - now fetches task inventory contents too.
- resolveObjects() - fix calculation of land impact
- NEW: getObjectByLocalID(localID: number, timeout: number)
- NEW: getObjectByUUID(uuid: UUID, timeout: number)
- NEW: getParcels();
- NEW: pruneObjects - removes missing GameObjects from a list
- NEW: setPersist - prevent objectstore from forgetting about killed gameobjects
2018-10-31 11:28:24 +00:00
|
|
|
else if (this.objectsByParent[parentID])
|
2018-10-19 16:30:09 +01:00
|
|
|
{
|
|
|
|
|
addToParentList = false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
- Add "GET" method to Caps
- New events: ObjectPhysicsDataEvent, ParcelPropertiesEvent, NewObjectEvent, ObjectUpdateEvent, ObjectKilledEvent
- Added getXML function to Color4, Vector2, Vector3, Vector4, GameObject, Region, Quaternion, UUID for opensim-compatible XML export
- Added TextureAnim and ParticleSystem decoding to the "full" ObjectStore
- Object store will automatically request missing "parent" prims
- "setPersist" - When persist is TRUE, the ObjectStore will not forget about "killed" prims - useful for region scanning
- Support for Flexible params, Light params, LightImage params, Mesh data, Sculpt maps
- Fixed object scale being incorrectly calculated
- Add terrain decoding (this was a ballache)
- Add parcel map decoding
- Add support for region windlight settings (region.environment)
- Add support for materials (normal / specular maps)
- Add getBuffer, getLong and bitwiseOr to UUID
- Added a circular-reference-safe JSONStringify to Utils
- Add XferFile capability to Circuit
PUBLIC API:
AssetCommands:
- Rework "downloadAsset" to detect failures
- NEW: downloadInventoryAsset() - uses TransferRequest for prim inventory items
- NEW: getMaterials() - resolves material UUIDs
RegionCommands:
- NEW: getTerrainTextures()
- NEW: exportSettings() - OpenSim XML export of region settings
- NEW: async getTerrain() - Get binary terrain heightmap, 256x256 float32
- resolveObjects() - now fetches task inventory contents too.
- resolveObjects() - fix calculation of land impact
- NEW: getObjectByLocalID(localID: number, timeout: number)
- NEW: getObjectByUUID(uuid: UUID, timeout: number)
- NEW: getParcels();
- NEW: pruneObjects - removes missing GameObjects from a list
- NEW: setPersist - prevent objectstore from forgetting about killed gameobjects
2018-10-31 11:28:24 +00:00
|
|
|
newObject = true;
|
2018-10-19 16:30:09 +01:00
|
|
|
this.objects[localID] = new GameObject();
|
- Add "GET" method to Caps
- New events: ObjectPhysicsDataEvent, ParcelPropertiesEvent, NewObjectEvent, ObjectUpdateEvent, ObjectKilledEvent
- Added getXML function to Color4, Vector2, Vector3, Vector4, GameObject, Region, Quaternion, UUID for opensim-compatible XML export
- Added TextureAnim and ParticleSystem decoding to the "full" ObjectStore
- Object store will automatically request missing "parent" prims
- "setPersist" - When persist is TRUE, the ObjectStore will not forget about "killed" prims - useful for region scanning
- Support for Flexible params, Light params, LightImage params, Mesh data, Sculpt maps
- Fixed object scale being incorrectly calculated
- Add terrain decoding (this was a ballache)
- Add parcel map decoding
- Add support for region windlight settings (region.environment)
- Add support for materials (normal / specular maps)
- Add getBuffer, getLong and bitwiseOr to UUID
- Added a circular-reference-safe JSONStringify to Utils
- Add XferFile capability to Circuit
PUBLIC API:
AssetCommands:
- Rework "downloadAsset" to detect failures
- NEW: downloadInventoryAsset() - uses TransferRequest for prim inventory items
- NEW: getMaterials() - resolves material UUIDs
RegionCommands:
- NEW: getTerrainTextures()
- NEW: exportSettings() - OpenSim XML export of region settings
- NEW: async getTerrain() - Get binary terrain heightmap, 256x256 float32
- resolveObjects() - now fetches task inventory contents too.
- resolveObjects() - fix calculation of land impact
- NEW: getObjectByLocalID(localID: number, timeout: number)
- NEW: getObjectByUUID(uuid: UUID, timeout: number)
- NEW: getParcels();
- NEW: pruneObjects - removes missing GameObjects from a list
- NEW: setPersist - prevent objectstore from forgetting about killed gameobjects
2018-10-31 11:28:24 +00:00
|
|
|
this.objects[localID].region = this.agent.currentRegion;
|
2018-10-19 16:30:09 +01:00
|
|
|
}
|
2017-12-14 02:06:28 +00:00
|
|
|
|
2018-10-19 16:30:09 +01:00
|
|
|
const obj = this.objects[localID];
|
- Add "GET" method to Caps
- New events: ObjectPhysicsDataEvent, ParcelPropertiesEvent, NewObjectEvent, ObjectUpdateEvent, ObjectKilledEvent
- Added getXML function to Color4, Vector2, Vector3, Vector4, GameObject, Region, Quaternion, UUID for opensim-compatible XML export
- Added TextureAnim and ParticleSystem decoding to the "full" ObjectStore
- Object store will automatically request missing "parent" prims
- "setPersist" - When persist is TRUE, the ObjectStore will not forget about "killed" prims - useful for region scanning
- Support for Flexible params, Light params, LightImage params, Mesh data, Sculpt maps
- Fixed object scale being incorrectly calculated
- Add terrain decoding (this was a ballache)
- Add parcel map decoding
- Add support for region windlight settings (region.environment)
- Add support for materials (normal / specular maps)
- Add getBuffer, getLong and bitwiseOr to UUID
- Added a circular-reference-safe JSONStringify to Utils
- Add XferFile capability to Circuit
PUBLIC API:
AssetCommands:
- Rework "downloadAsset" to detect failures
- NEW: downloadInventoryAsset() - uses TransferRequest for prim inventory items
- NEW: getMaterials() - resolves material UUIDs
RegionCommands:
- NEW: getTerrainTextures()
- NEW: exportSettings() - OpenSim XML export of region settings
- NEW: async getTerrain() - Get binary terrain heightmap, 256x256 float32
- resolveObjects() - now fetches task inventory contents too.
- resolveObjects() - fix calculation of land impact
- NEW: getObjectByLocalID(localID: number, timeout: number)
- NEW: getObjectByUUID(uuid: UUID, timeout: number)
- NEW: getParcels();
- NEW: pruneObjects - removes missing GameObjects from a list
- NEW: setPersist - prevent objectstore from forgetting about killed gameobjects
2018-10-31 11:28:24 +00:00
|
|
|
obj.deleted = false;
|
2018-10-19 16:30:09 +01:00
|
|
|
obj.ID = objData.ID;
|
|
|
|
|
obj.FullID = objData.FullID;
|
|
|
|
|
obj.ParentID = objData.ParentID;
|
|
|
|
|
obj.OwnerID = objData.OwnerID;
|
|
|
|
|
obj.PCode = objData.PCode;
|
2017-12-14 02:06:28 +00:00
|
|
|
|
2018-10-19 16:30:09 +01:00
|
|
|
this.objects[localID].NameValue = this.parseNameValues(Utils.BufferToStringSimple(objData.NameValue));
|
2017-12-14 02:06:28 +00:00
|
|
|
|
- Add "GET" method to Caps
- New events: ObjectPhysicsDataEvent, ParcelPropertiesEvent, NewObjectEvent, ObjectUpdateEvent, ObjectKilledEvent
- Added getXML function to Color4, Vector2, Vector3, Vector4, GameObject, Region, Quaternion, UUID for opensim-compatible XML export
- Added TextureAnim and ParticleSystem decoding to the "full" ObjectStore
- Object store will automatically request missing "parent" prims
- "setPersist" - When persist is TRUE, the ObjectStore will not forget about "killed" prims - useful for region scanning
- Support for Flexible params, Light params, LightImage params, Mesh data, Sculpt maps
- Fixed object scale being incorrectly calculated
- Add terrain decoding (this was a ballache)
- Add parcel map decoding
- Add support for region windlight settings (region.environment)
- Add support for materials (normal / specular maps)
- Add getBuffer, getLong and bitwiseOr to UUID
- Added a circular-reference-safe JSONStringify to Utils
- Add XferFile capability to Circuit
PUBLIC API:
AssetCommands:
- Rework "downloadAsset" to detect failures
- NEW: downloadInventoryAsset() - uses TransferRequest for prim inventory items
- NEW: getMaterials() - resolves material UUIDs
RegionCommands:
- NEW: getTerrainTextures()
- NEW: exportSettings() - OpenSim XML export of region settings
- NEW: async getTerrain() - Get binary terrain heightmap, 256x256 float32
- resolveObjects() - now fetches task inventory contents too.
- resolveObjects() - fix calculation of land impact
- NEW: getObjectByLocalID(localID: number, timeout: number)
- NEW: getObjectByUUID(uuid: UUID, timeout: number)
- NEW: getParcels();
- NEW: pruneObjects - removes missing GameObjects from a list
- NEW: setPersist - prevent objectstore from forgetting about killed gameobjects
2018-10-31 11:28:24 +00:00
|
|
|
this.objects[localID].IsAttachment = this.objects[localID].NameValue['AttachItemID'] !== undefined;
|
2018-10-20 14:32:33 +01:00
|
|
|
|
2018-10-19 16:30:09 +01:00
|
|
|
if (objData.PCode === PCode.Avatar && this.objects[localID].FullID.toString() === this.agent.agentID.toString())
|
|
|
|
|
{
|
|
|
|
|
this.agent.localID = localID;
|
2017-11-30 04:11:59 +00:00
|
|
|
|
2018-10-19 16:30:09 +01:00
|
|
|
if (this.options & BotOptionFlags.StoreMyAttachmentsOnly)
|
|
|
|
|
{
|
|
|
|
|
Object.keys(this.objectsByParent).forEach((objParentID: string) =>
|
|
|
|
|
{
|
|
|
|
|
const parent = parseInt(objParentID, 10);
|
|
|
|
|
if (parent !== this.agent.localID)
|
2017-11-30 04:11:59 +00:00
|
|
|
{
|
2018-10-19 16:30:09 +01:00
|
|
|
let foundAvatars = false;
|
|
|
|
|
this.objectsByParent[parent].forEach((objID) =>
|
2017-11-30 04:11:59 +00:00
|
|
|
{
|
2018-10-19 16:30:09 +01:00
|
|
|
if (this.objects[objID])
|
2017-11-30 04:11:59 +00:00
|
|
|
{
|
2018-10-19 16:30:09 +01:00
|
|
|
const o = this.objects[objID];
|
|
|
|
|
if (o.PCode === PCode.Avatar)
|
2017-11-30 04:11:59 +00:00
|
|
|
{
|
2018-10-19 16:30:09 +01:00
|
|
|
foundAvatars = true;
|
2017-11-30 04:11:59 +00:00
|
|
|
}
|
|
|
|
|
}
|
2018-10-19 16:30:09 +01:00
|
|
|
});
|
|
|
|
|
if (this.objects[parent])
|
2017-11-30 04:11:59 +00:00
|
|
|
{
|
2018-10-19 16:30:09 +01:00
|
|
|
const o = this.objects[parent];
|
|
|
|
|
if (o.PCode === PCode.Avatar)
|
2017-11-30 04:11:59 +00:00
|
|
|
{
|
2018-10-19 16:30:09 +01:00
|
|
|
foundAvatars = true;
|
2017-11-30 04:11:59 +00:00
|
|
|
}
|
|
|
|
|
}
|
2018-10-19 16:30:09 +01:00
|
|
|
if (!foundAvatars)
|
2017-12-14 02:18:50 +00:00
|
|
|
{
|
2018-10-19 16:30:09 +01:00
|
|
|
this.deleteObject(parent);
|
2017-12-14 02:18:50 +00:00
|
|
|
}
|
|
|
|
|
}
|
2018-10-19 16:30:09 +01:00
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
2017-11-30 04:11:59 +00:00
|
|
|
|
2018-10-19 16:30:09 +01:00
|
|
|
this.objectsByUUID[objData.FullID.toString()] = localID;
|
|
|
|
|
if (!this.objectsByParent[parentID])
|
|
|
|
|
{
|
|
|
|
|
this.objectsByParent[parentID] = [];
|
|
|
|
|
}
|
|
|
|
|
if (addToParentList)
|
|
|
|
|
{
|
|
|
|
|
this.objectsByParent[parentID].push(localID);
|
|
|
|
|
}
|
2017-11-30 04:11:59 +00:00
|
|
|
|
2018-10-19 16:30:09 +01:00
|
|
|
if (objData.PCode !== PCode.Avatar && this.options & BotOptionFlags.StoreMyAttachmentsOnly)
|
|
|
|
|
{
|
|
|
|
|
if (this.agent.localID !== 0 && obj.ParentID !== this.agent.localID)
|
|
|
|
|
{
|
|
|
|
|
// Drop object
|
|
|
|
|
this.deleteObject(localID);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
- Add "GET" method to Caps
- New events: ObjectPhysicsDataEvent, ParcelPropertiesEvent, NewObjectEvent, ObjectUpdateEvent, ObjectKilledEvent
- Added getXML function to Color4, Vector2, Vector3, Vector4, GameObject, Region, Quaternion, UUID for opensim-compatible XML export
- Added TextureAnim and ParticleSystem decoding to the "full" ObjectStore
- Object store will automatically request missing "parent" prims
- "setPersist" - When persist is TRUE, the ObjectStore will not forget about "killed" prims - useful for region scanning
- Support for Flexible params, Light params, LightImage params, Mesh data, Sculpt maps
- Fixed object scale being incorrectly calculated
- Add terrain decoding (this was a ballache)
- Add parcel map decoding
- Add support for region windlight settings (region.environment)
- Add support for materials (normal / specular maps)
- Add getBuffer, getLong and bitwiseOr to UUID
- Added a circular-reference-safe JSONStringify to Utils
- Add XferFile capability to Circuit
PUBLIC API:
AssetCommands:
- Rework "downloadAsset" to detect failures
- NEW: downloadInventoryAsset() - uses TransferRequest for prim inventory items
- NEW: getMaterials() - resolves material UUIDs
RegionCommands:
- NEW: getTerrainTextures()
- NEW: exportSettings() - OpenSim XML export of region settings
- NEW: async getTerrain() - Get binary terrain heightmap, 256x256 float32
- resolveObjects() - now fetches task inventory contents too.
- resolveObjects() - fix calculation of land impact
- NEW: getObjectByLocalID(localID: number, timeout: number)
- NEW: getObjectByUUID(uuid: UUID, timeout: number)
- NEW: getParcels();
- NEW: pruneObjects - removes missing GameObjects from a list
- NEW: setPersist - prevent objectstore from forgetting about killed gameobjects
2018-10-31 11:28:24 +00:00
|
|
|
|
|
|
|
|
if (obj.ParentID === 0)
|
|
|
|
|
{
|
|
|
|
|
this.notifyObjectUpdate(newObject, obj);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (objData.ParentID !== undefined && objData.ParentID !== 0 && !this.objects[objData.ParentID])
|
|
|
|
|
{
|
|
|
|
|
this.requestMissingObject(objData.ParentID);
|
|
|
|
|
}
|
2018-10-19 16:30:09 +01:00
|
|
|
});
|
|
|
|
|
}
|
2017-11-30 04:11:59 +00:00
|
|
|
|
- Add "GET" method to Caps
- New events: ObjectPhysicsDataEvent, ParcelPropertiesEvent, NewObjectEvent, ObjectUpdateEvent, ObjectKilledEvent
- Added getXML function to Color4, Vector2, Vector3, Vector4, GameObject, Region, Quaternion, UUID for opensim-compatible XML export
- Added TextureAnim and ParticleSystem decoding to the "full" ObjectStore
- Object store will automatically request missing "parent" prims
- "setPersist" - When persist is TRUE, the ObjectStore will not forget about "killed" prims - useful for region scanning
- Support for Flexible params, Light params, LightImage params, Mesh data, Sculpt maps
- Fixed object scale being incorrectly calculated
- Add terrain decoding (this was a ballache)
- Add parcel map decoding
- Add support for region windlight settings (region.environment)
- Add support for materials (normal / specular maps)
- Add getBuffer, getLong and bitwiseOr to UUID
- Added a circular-reference-safe JSONStringify to Utils
- Add XferFile capability to Circuit
PUBLIC API:
AssetCommands:
- Rework "downloadAsset" to detect failures
- NEW: downloadInventoryAsset() - uses TransferRequest for prim inventory items
- NEW: getMaterials() - resolves material UUIDs
RegionCommands:
- NEW: getTerrainTextures()
- NEW: exportSettings() - OpenSim XML export of region settings
- NEW: async getTerrain() - Get binary terrain heightmap, 256x256 float32
- resolveObjects() - now fetches task inventory contents too.
- resolveObjects() - fix calculation of land impact
- NEW: getObjectByLocalID(localID: number, timeout: number)
- NEW: getObjectByUUID(uuid: UUID, timeout: number)
- NEW: getParcels();
- NEW: pruneObjects - removes missing GameObjects from a list
- NEW: setPersist - prevent objectstore from forgetting about killed gameobjects
2018-10-31 11:28:24 +00:00
|
|
|
protected notifyObjectUpdate(newObject: boolean, obj: GameObject)
|
|
|
|
|
{
|
|
|
|
|
if (newObject)
|
|
|
|
|
{
|
|
|
|
|
const newObj = new NewObjectEvent();
|
|
|
|
|
newObj.localID = obj.ID;
|
|
|
|
|
newObj.objectID = obj.FullID;
|
|
|
|
|
newObj.object = obj;
|
2018-11-15 03:10:14 +00:00
|
|
|
if (obj.Flags !== undefined && obj.Flags & PrimFlags.CreateSelected && !this.pendingObjectProperties[obj.FullID.toString()])
|
|
|
|
|
{
|
|
|
|
|
this.selectedPrimsWithoutUpdate[obj.ID] = true;
|
|
|
|
|
}
|
- Add "GET" method to Caps
- New events: ObjectPhysicsDataEvent, ParcelPropertiesEvent, NewObjectEvent, ObjectUpdateEvent, ObjectKilledEvent
- Added getXML function to Color4, Vector2, Vector3, Vector4, GameObject, Region, Quaternion, UUID for opensim-compatible XML export
- Added TextureAnim and ParticleSystem decoding to the "full" ObjectStore
- Object store will automatically request missing "parent" prims
- "setPersist" - When persist is TRUE, the ObjectStore will not forget about "killed" prims - useful for region scanning
- Support for Flexible params, Light params, LightImage params, Mesh data, Sculpt maps
- Fixed object scale being incorrectly calculated
- Add terrain decoding (this was a ballache)
- Add parcel map decoding
- Add support for region windlight settings (region.environment)
- Add support for materials (normal / specular maps)
- Add getBuffer, getLong and bitwiseOr to UUID
- Added a circular-reference-safe JSONStringify to Utils
- Add XferFile capability to Circuit
PUBLIC API:
AssetCommands:
- Rework "downloadAsset" to detect failures
- NEW: downloadInventoryAsset() - uses TransferRequest for prim inventory items
- NEW: getMaterials() - resolves material UUIDs
RegionCommands:
- NEW: getTerrainTextures()
- NEW: exportSettings() - OpenSim XML export of region settings
- NEW: async getTerrain() - Get binary terrain heightmap, 256x256 float32
- resolveObjects() - now fetches task inventory contents too.
- resolveObjects() - fix calculation of land impact
- NEW: getObjectByLocalID(localID: number, timeout: number)
- NEW: getObjectByUUID(uuid: UUID, timeout: number)
- NEW: getParcels();
- NEW: pruneObjects - removes missing GameObjects from a list
- NEW: setPersist - prevent objectstore from forgetting about killed gameobjects
2018-10-31 11:28:24 +00:00
|
|
|
this.clientEvents.onNewObjectEvent.next(newObj);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
const updObj = new ObjectUpdatedEvent();
|
|
|
|
|
updObj.localID = obj.ID;
|
|
|
|
|
updObj.objectID = obj.FullID;
|
|
|
|
|
updObj.object = obj;
|
|
|
|
|
this.clientEvents.onObjectUpdatedEvent.next(updObj);
|
|
|
|
|
}
|
2018-11-15 03:10:14 +00:00
|
|
|
if (this.pendingObjectProperties[obj.FullID.toString()])
|
|
|
|
|
{
|
|
|
|
|
this.applyObjectProperties(obj, this.pendingObjectProperties[obj.FullID.toString()]);
|
|
|
|
|
delete this.pendingObjectProperties[obj.FullID.toString()];
|
|
|
|
|
}
|
- Add "GET" method to Caps
- New events: ObjectPhysicsDataEvent, ParcelPropertiesEvent, NewObjectEvent, ObjectUpdateEvent, ObjectKilledEvent
- Added getXML function to Color4, Vector2, Vector3, Vector4, GameObject, Region, Quaternion, UUID for opensim-compatible XML export
- Added TextureAnim and ParticleSystem decoding to the "full" ObjectStore
- Object store will automatically request missing "parent" prims
- "setPersist" - When persist is TRUE, the ObjectStore will not forget about "killed" prims - useful for region scanning
- Support for Flexible params, Light params, LightImage params, Mesh data, Sculpt maps
- Fixed object scale being incorrectly calculated
- Add terrain decoding (this was a ballache)
- Add parcel map decoding
- Add support for region windlight settings (region.environment)
- Add support for materials (normal / specular maps)
- Add getBuffer, getLong and bitwiseOr to UUID
- Added a circular-reference-safe JSONStringify to Utils
- Add XferFile capability to Circuit
PUBLIC API:
AssetCommands:
- Rework "downloadAsset" to detect failures
- NEW: downloadInventoryAsset() - uses TransferRequest for prim inventory items
- NEW: getMaterials() - resolves material UUIDs
RegionCommands:
- NEW: getTerrainTextures()
- NEW: exportSettings() - OpenSim XML export of region settings
- NEW: async getTerrain() - Get binary terrain heightmap, 256x256 float32
- resolveObjects() - now fetches task inventory contents too.
- resolveObjects() - fix calculation of land impact
- NEW: getObjectByLocalID(localID: number, timeout: number)
- NEW: getObjectByUUID(uuid: UUID, timeout: number)
- NEW: getParcels();
- NEW: pruneObjects - removes missing GameObjects from a list
- NEW: setPersist - prevent objectstore from forgetting about killed gameobjects
2018-10-31 11:28:24 +00:00
|
|
|
}
|
|
|
|
|
|
2018-10-19 16:30:09 +01:00
|
|
|
protected objectUpdateCached(objectUpdateCached: ObjectUpdateCachedMessage)
|
|
|
|
|
{
|
|
|
|
|
const rmo = new RequestMultipleObjectsMessage();
|
|
|
|
|
rmo.AgentData = {
|
|
|
|
|
AgentID: this.agent.agentID,
|
|
|
|
|
SessionID: this.circuit.sessionID
|
|
|
|
|
};
|
|
|
|
|
rmo.ObjectData = [];
|
|
|
|
|
objectUpdateCached.ObjectData.forEach((obj) =>
|
|
|
|
|
{
|
|
|
|
|
rmo.ObjectData.push({
|
|
|
|
|
CacheMissType: 0,
|
|
|
|
|
ID: obj.ID
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
this.circuit.sendMessage(rmo, 0);
|
|
|
|
|
}
|
2017-11-30 04:11:59 +00:00
|
|
|
|
- Add "GET" method to Caps
- New events: ObjectPhysicsDataEvent, ParcelPropertiesEvent, NewObjectEvent, ObjectUpdateEvent, ObjectKilledEvent
- Added getXML function to Color4, Vector2, Vector3, Vector4, GameObject, Region, Quaternion, UUID for opensim-compatible XML export
- Added TextureAnim and ParticleSystem decoding to the "full" ObjectStore
- Object store will automatically request missing "parent" prims
- "setPersist" - When persist is TRUE, the ObjectStore will not forget about "killed" prims - useful for region scanning
- Support for Flexible params, Light params, LightImage params, Mesh data, Sculpt maps
- Fixed object scale being incorrectly calculated
- Add terrain decoding (this was a ballache)
- Add parcel map decoding
- Add support for region windlight settings (region.environment)
- Add support for materials (normal / specular maps)
- Add getBuffer, getLong and bitwiseOr to UUID
- Added a circular-reference-safe JSONStringify to Utils
- Add XferFile capability to Circuit
PUBLIC API:
AssetCommands:
- Rework "downloadAsset" to detect failures
- NEW: downloadInventoryAsset() - uses TransferRequest for prim inventory items
- NEW: getMaterials() - resolves material UUIDs
RegionCommands:
- NEW: getTerrainTextures()
- NEW: exportSettings() - OpenSim XML export of region settings
- NEW: async getTerrain() - Get binary terrain heightmap, 256x256 float32
- resolveObjects() - now fetches task inventory contents too.
- resolveObjects() - fix calculation of land impact
- NEW: getObjectByLocalID(localID: number, timeout: number)
- NEW: getObjectByUUID(uuid: UUID, timeout: number)
- NEW: getParcels();
- NEW: pruneObjects - removes missing GameObjects from a list
- NEW: setPersist - prevent objectstore from forgetting about killed gameobjects
2018-10-31 11:28:24 +00:00
|
|
|
protected async objectUpdateCompressed(objectUpdateCompressed: ObjectUpdateCompressedMessage)
|
2018-10-19 16:30:09 +01:00
|
|
|
{
|
|
|
|
|
for (const obj of objectUpdateCompressed.ObjectData)
|
|
|
|
|
{
|
|
|
|
|
const flags = obj.UpdateFlags;
|
|
|
|
|
const buf = obj.Data;
|
|
|
|
|
let pos = 0;
|
|
|
|
|
|
|
|
|
|
const fullID = new UUID(buf, pos);
|
|
|
|
|
pos += 16;
|
|
|
|
|
const localID = buf.readUInt32LE(pos);
|
|
|
|
|
pos += 4;
|
|
|
|
|
const pcode = buf.readUInt8(pos++);
|
|
|
|
|
let newObj = false;
|
|
|
|
|
if (!this.objects[localID])
|
|
|
|
|
{
|
|
|
|
|
newObj = true;
|
|
|
|
|
this.objects[localID] = new GameObject();
|
- Add "GET" method to Caps
- New events: ObjectPhysicsDataEvent, ParcelPropertiesEvent, NewObjectEvent, ObjectUpdateEvent, ObjectKilledEvent
- Added getXML function to Color4, Vector2, Vector3, Vector4, GameObject, Region, Quaternion, UUID for opensim-compatible XML export
- Added TextureAnim and ParticleSystem decoding to the "full" ObjectStore
- Object store will automatically request missing "parent" prims
- "setPersist" - When persist is TRUE, the ObjectStore will not forget about "killed" prims - useful for region scanning
- Support for Flexible params, Light params, LightImage params, Mesh data, Sculpt maps
- Fixed object scale being incorrectly calculated
- Add terrain decoding (this was a ballache)
- Add parcel map decoding
- Add support for region windlight settings (region.environment)
- Add support for materials (normal / specular maps)
- Add getBuffer, getLong and bitwiseOr to UUID
- Added a circular-reference-safe JSONStringify to Utils
- Add XferFile capability to Circuit
PUBLIC API:
AssetCommands:
- Rework "downloadAsset" to detect failures
- NEW: downloadInventoryAsset() - uses TransferRequest for prim inventory items
- NEW: getMaterials() - resolves material UUIDs
RegionCommands:
- NEW: getTerrainTextures()
- NEW: exportSettings() - OpenSim XML export of region settings
- NEW: async getTerrain() - Get binary terrain heightmap, 256x256 float32
- resolveObjects() - now fetches task inventory contents too.
- resolveObjects() - fix calculation of land impact
- NEW: getObjectByLocalID(localID: number, timeout: number)
- NEW: getObjectByUUID(uuid: UUID, timeout: number)
- NEW: getParcels();
- NEW: pruneObjects - removes missing GameObjects from a list
- NEW: setPersist - prevent objectstore from forgetting about killed gameobjects
2018-10-31 11:28:24 +00:00
|
|
|
this.objects[localID].region = this.agent.currentRegion;
|
2018-10-19 16:30:09 +01:00
|
|
|
}
|
|
|
|
|
const o = this.objects[localID];
|
- Add "GET" method to Caps
- New events: ObjectPhysicsDataEvent, ParcelPropertiesEvent, NewObjectEvent, ObjectUpdateEvent, ObjectKilledEvent
- Added getXML function to Color4, Vector2, Vector3, Vector4, GameObject, Region, Quaternion, UUID for opensim-compatible XML export
- Added TextureAnim and ParticleSystem decoding to the "full" ObjectStore
- Object store will automatically request missing "parent" prims
- "setPersist" - When persist is TRUE, the ObjectStore will not forget about "killed" prims - useful for region scanning
- Support for Flexible params, Light params, LightImage params, Mesh data, Sculpt maps
- Fixed object scale being incorrectly calculated
- Add terrain decoding (this was a ballache)
- Add parcel map decoding
- Add support for region windlight settings (region.environment)
- Add support for materials (normal / specular maps)
- Add getBuffer, getLong and bitwiseOr to UUID
- Added a circular-reference-safe JSONStringify to Utils
- Add XferFile capability to Circuit
PUBLIC API:
AssetCommands:
- Rework "downloadAsset" to detect failures
- NEW: downloadInventoryAsset() - uses TransferRequest for prim inventory items
- NEW: getMaterials() - resolves material UUIDs
RegionCommands:
- NEW: getTerrainTextures()
- NEW: exportSettings() - OpenSim XML export of region settings
- NEW: async getTerrain() - Get binary terrain heightmap, 256x256 float32
- resolveObjects() - now fetches task inventory contents too.
- resolveObjects() - fix calculation of land impact
- NEW: getObjectByLocalID(localID: number, timeout: number)
- NEW: getObjectByUUID(uuid: UUID, timeout: number)
- NEW: getParcels();
- NEW: pruneObjects - removes missing GameObjects from a list
- NEW: setPersist - prevent objectstore from forgetting about killed gameobjects
2018-10-31 11:28:24 +00:00
|
|
|
o.deleted = false;
|
2018-10-19 16:30:09 +01:00
|
|
|
o.ID = localID;
|
|
|
|
|
o.PCode = pcode;
|
|
|
|
|
this.objectsByUUID[fullID.toString()] = localID;
|
|
|
|
|
o.FullID = fullID;
|
2017-11-30 04:11:59 +00:00
|
|
|
|
|
|
|
|
|
2018-10-19 16:30:09 +01:00
|
|
|
pos++;
|
|
|
|
|
|
- Add "GET" method to Caps
- New events: ObjectPhysicsDataEvent, ParcelPropertiesEvent, NewObjectEvent, ObjectUpdateEvent, ObjectKilledEvent
- Added getXML function to Color4, Vector2, Vector3, Vector4, GameObject, Region, Quaternion, UUID for opensim-compatible XML export
- Added TextureAnim and ParticleSystem decoding to the "full" ObjectStore
- Object store will automatically request missing "parent" prims
- "setPersist" - When persist is TRUE, the ObjectStore will not forget about "killed" prims - useful for region scanning
- Support for Flexible params, Light params, LightImage params, Mesh data, Sculpt maps
- Fixed object scale being incorrectly calculated
- Add terrain decoding (this was a ballache)
- Add parcel map decoding
- Add support for region windlight settings (region.environment)
- Add support for materials (normal / specular maps)
- Add getBuffer, getLong and bitwiseOr to UUID
- Added a circular-reference-safe JSONStringify to Utils
- Add XferFile capability to Circuit
PUBLIC API:
AssetCommands:
- Rework "downloadAsset" to detect failures
- NEW: downloadInventoryAsset() - uses TransferRequest for prim inventory items
- NEW: getMaterials() - resolves material UUIDs
RegionCommands:
- NEW: getTerrainTextures()
- NEW: exportSettings() - OpenSim XML export of region settings
- NEW: async getTerrain() - Get binary terrain heightmap, 256x256 float32
- resolveObjects() - now fetches task inventory contents too.
- resolveObjects() - fix calculation of land impact
- NEW: getObjectByLocalID(localID: number, timeout: number)
- NEW: getObjectByUUID(uuid: UUID, timeout: number)
- NEW: getParcels();
- NEW: pruneObjects - removes missing GameObjects from a list
- NEW: setPersist - prevent objectstore from forgetting about killed gameobjects
2018-10-31 11:28:24 +00:00
|
|
|
pos = pos + 42;
|
2018-10-19 16:30:09 +01:00
|
|
|
const compressedflags: CompressedFlags = buf.readUInt32LE(pos);
|
|
|
|
|
pos = pos + 4;
|
|
|
|
|
o.OwnerID = new UUID(buf, pos);
|
|
|
|
|
pos += 16;
|
|
|
|
|
|
|
|
|
|
if (compressedflags & CompressedFlags.HasAngularVelocity)
|
|
|
|
|
{
|
|
|
|
|
pos = pos + 12;
|
|
|
|
|
}
|
- Add "GET" method to Caps
- New events: ObjectPhysicsDataEvent, ParcelPropertiesEvent, NewObjectEvent, ObjectUpdateEvent, ObjectKilledEvent
- Added getXML function to Color4, Vector2, Vector3, Vector4, GameObject, Region, Quaternion, UUID for opensim-compatible XML export
- Added TextureAnim and ParticleSystem decoding to the "full" ObjectStore
- Object store will automatically request missing "parent" prims
- "setPersist" - When persist is TRUE, the ObjectStore will not forget about "killed" prims - useful for region scanning
- Support for Flexible params, Light params, LightImage params, Mesh data, Sculpt maps
- Fixed object scale being incorrectly calculated
- Add terrain decoding (this was a ballache)
- Add parcel map decoding
- Add support for region windlight settings (region.environment)
- Add support for materials (normal / specular maps)
- Add getBuffer, getLong and bitwiseOr to UUID
- Added a circular-reference-safe JSONStringify to Utils
- Add XferFile capability to Circuit
PUBLIC API:
AssetCommands:
- Rework "downloadAsset" to detect failures
- NEW: downloadInventoryAsset() - uses TransferRequest for prim inventory items
- NEW: getMaterials() - resolves material UUIDs
RegionCommands:
- NEW: getTerrainTextures()
- NEW: exportSettings() - OpenSim XML export of region settings
- NEW: async getTerrain() - Get binary terrain heightmap, 256x256 float32
- resolveObjects() - now fetches task inventory contents too.
- resolveObjects() - fix calculation of land impact
- NEW: getObjectByLocalID(localID: number, timeout: number)
- NEW: getObjectByUUID(uuid: UUID, timeout: number)
- NEW: getParcels();
- NEW: pruneObjects - removes missing GameObjects from a list
- NEW: setPersist - prevent objectstore from forgetting about killed gameobjects
2018-10-31 11:28:24 +00:00
|
|
|
let newParentID = 0;
|
2018-10-19 16:30:09 +01:00
|
|
|
if (compressedflags & CompressedFlags.HasParent)
|
|
|
|
|
{
|
- Add "GET" method to Caps
- New events: ObjectPhysicsDataEvent, ParcelPropertiesEvent, NewObjectEvent, ObjectUpdateEvent, ObjectKilledEvent
- Added getXML function to Color4, Vector2, Vector3, Vector4, GameObject, Region, Quaternion, UUID for opensim-compatible XML export
- Added TextureAnim and ParticleSystem decoding to the "full" ObjectStore
- Object store will automatically request missing "parent" prims
- "setPersist" - When persist is TRUE, the ObjectStore will not forget about "killed" prims - useful for region scanning
- Support for Flexible params, Light params, LightImage params, Mesh data, Sculpt maps
- Fixed object scale being incorrectly calculated
- Add terrain decoding (this was a ballache)
- Add parcel map decoding
- Add support for region windlight settings (region.environment)
- Add support for materials (normal / specular maps)
- Add getBuffer, getLong and bitwiseOr to UUID
- Added a circular-reference-safe JSONStringify to Utils
- Add XferFile capability to Circuit
PUBLIC API:
AssetCommands:
- Rework "downloadAsset" to detect failures
- NEW: downloadInventoryAsset() - uses TransferRequest for prim inventory items
- NEW: getMaterials() - resolves material UUIDs
RegionCommands:
- NEW: getTerrainTextures()
- NEW: exportSettings() - OpenSim XML export of region settings
- NEW: async getTerrain() - Get binary terrain heightmap, 256x256 float32
- resolveObjects() - now fetches task inventory contents too.
- resolveObjects() - fix calculation of land impact
- NEW: getObjectByLocalID(localID: number, timeout: number)
- NEW: getObjectByUUID(uuid: UUID, timeout: number)
- NEW: getParcels();
- NEW: pruneObjects - removes missing GameObjects from a list
- NEW: setPersist - prevent objectstore from forgetting about killed gameobjects
2018-10-31 11:28:24 +00:00
|
|
|
newParentID = buf.readUInt32LE(pos);
|
2018-10-19 16:30:09 +01:00
|
|
|
pos += 4;
|
- Add "GET" method to Caps
- New events: ObjectPhysicsDataEvent, ParcelPropertiesEvent, NewObjectEvent, ObjectUpdateEvent, ObjectKilledEvent
- Added getXML function to Color4, Vector2, Vector3, Vector4, GameObject, Region, Quaternion, UUID for opensim-compatible XML export
- Added TextureAnim and ParticleSystem decoding to the "full" ObjectStore
- Object store will automatically request missing "parent" prims
- "setPersist" - When persist is TRUE, the ObjectStore will not forget about "killed" prims - useful for region scanning
- Support for Flexible params, Light params, LightImage params, Mesh data, Sculpt maps
- Fixed object scale being incorrectly calculated
- Add terrain decoding (this was a ballache)
- Add parcel map decoding
- Add support for region windlight settings (region.environment)
- Add support for materials (normal / specular maps)
- Add getBuffer, getLong and bitwiseOr to UUID
- Added a circular-reference-safe JSONStringify to Utils
- Add XferFile capability to Circuit
PUBLIC API:
AssetCommands:
- Rework "downloadAsset" to detect failures
- NEW: downloadInventoryAsset() - uses TransferRequest for prim inventory items
- NEW: getMaterials() - resolves material UUIDs
RegionCommands:
- NEW: getTerrainTextures()
- NEW: exportSettings() - OpenSim XML export of region settings
- NEW: async getTerrain() - Get binary terrain heightmap, 256x256 float32
- resolveObjects() - now fetches task inventory contents too.
- resolveObjects() - fix calculation of land impact
- NEW: getObjectByLocalID(localID: number, timeout: number)
- NEW: getObjectByUUID(uuid: UUID, timeout: number)
- NEW: getParcels();
- NEW: pruneObjects - removes missing GameObjects from a list
- NEW: setPersist - prevent objectstore from forgetting about killed gameobjects
2018-10-31 11:28:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
o.ParentID = newParentID;
|
|
|
|
|
let add = true;
|
|
|
|
|
if (!newObj && o.ParentID !== undefined)
|
|
|
|
|
{
|
|
|
|
|
if (newParentID !== o.ParentID)
|
2018-10-19 16:30:09 +01:00
|
|
|
{
|
- Add "GET" method to Caps
- New events: ObjectPhysicsDataEvent, ParcelPropertiesEvent, NewObjectEvent, ObjectUpdateEvent, ObjectKilledEvent
- Added getXML function to Color4, Vector2, Vector3, Vector4, GameObject, Region, Quaternion, UUID for opensim-compatible XML export
- Added TextureAnim and ParticleSystem decoding to the "full" ObjectStore
- Object store will automatically request missing "parent" prims
- "setPersist" - When persist is TRUE, the ObjectStore will not forget about "killed" prims - useful for region scanning
- Support for Flexible params, Light params, LightImage params, Mesh data, Sculpt maps
- Fixed object scale being incorrectly calculated
- Add terrain decoding (this was a ballache)
- Add parcel map decoding
- Add support for region windlight settings (region.environment)
- Add support for materials (normal / specular maps)
- Add getBuffer, getLong and bitwiseOr to UUID
- Added a circular-reference-safe JSONStringify to Utils
- Add XferFile capability to Circuit
PUBLIC API:
AssetCommands:
- Rework "downloadAsset" to detect failures
- NEW: downloadInventoryAsset() - uses TransferRequest for prim inventory items
- NEW: getMaterials() - resolves material UUIDs
RegionCommands:
- NEW: getTerrainTextures()
- NEW: exportSettings() - OpenSim XML export of region settings
- NEW: async getTerrain() - Get binary terrain heightmap, 256x256 float32
- resolveObjects() - now fetches task inventory contents too.
- resolveObjects() - fix calculation of land impact
- NEW: getObjectByLocalID(localID: number, timeout: number)
- NEW: getObjectByUUID(uuid: UUID, timeout: number)
- NEW: getParcels();
- NEW: pruneObjects - removes missing GameObjects from a list
- NEW: setPersist - prevent objectstore from forgetting about killed gameobjects
2018-10-31 11:28:24 +00:00
|
|
|
const index = this.objectsByParent[o.ParentID].indexOf(localID);
|
|
|
|
|
if (index !== -1)
|
2018-10-19 16:30:09 +01:00
|
|
|
{
|
- Add "GET" method to Caps
- New events: ObjectPhysicsDataEvent, ParcelPropertiesEvent, NewObjectEvent, ObjectUpdateEvent, ObjectKilledEvent
- Added getXML function to Color4, Vector2, Vector3, Vector4, GameObject, Region, Quaternion, UUID for opensim-compatible XML export
- Added TextureAnim and ParticleSystem decoding to the "full" ObjectStore
- Object store will automatically request missing "parent" prims
- "setPersist" - When persist is TRUE, the ObjectStore will not forget about "killed" prims - useful for region scanning
- Support for Flexible params, Light params, LightImage params, Mesh data, Sculpt maps
- Fixed object scale being incorrectly calculated
- Add terrain decoding (this was a ballache)
- Add parcel map decoding
- Add support for region windlight settings (region.environment)
- Add support for materials (normal / specular maps)
- Add getBuffer, getLong and bitwiseOr to UUID
- Added a circular-reference-safe JSONStringify to Utils
- Add XferFile capability to Circuit
PUBLIC API:
AssetCommands:
- Rework "downloadAsset" to detect failures
- NEW: downloadInventoryAsset() - uses TransferRequest for prim inventory items
- NEW: getMaterials() - resolves material UUIDs
RegionCommands:
- NEW: getTerrainTextures()
- NEW: exportSettings() - OpenSim XML export of region settings
- NEW: async getTerrain() - Get binary terrain heightmap, 256x256 float32
- resolveObjects() - now fetches task inventory contents too.
- resolveObjects() - fix calculation of land impact
- NEW: getObjectByLocalID(localID: number, timeout: number)
- NEW: getObjectByUUID(uuid: UUID, timeout: number)
- NEW: getParcels();
- NEW: pruneObjects - removes missing GameObjects from a list
- NEW: setPersist - prevent objectstore from forgetting about killed gameobjects
2018-10-31 11:28:24 +00:00
|
|
|
this.objectsByParent[o.ParentID].splice(index, 1);
|
2018-10-19 16:30:09 +01:00
|
|
|
}
|
2017-11-30 04:11:59 +00:00
|
|
|
}
|
- Add "GET" method to Caps
- New events: ObjectPhysicsDataEvent, ParcelPropertiesEvent, NewObjectEvent, ObjectUpdateEvent, ObjectKilledEvent
- Added getXML function to Color4, Vector2, Vector3, Vector4, GameObject, Region, Quaternion, UUID for opensim-compatible XML export
- Added TextureAnim and ParticleSystem decoding to the "full" ObjectStore
- Object store will automatically request missing "parent" prims
- "setPersist" - When persist is TRUE, the ObjectStore will not forget about "killed" prims - useful for region scanning
- Support for Flexible params, Light params, LightImage params, Mesh data, Sculpt maps
- Fixed object scale being incorrectly calculated
- Add terrain decoding (this was a ballache)
- Add parcel map decoding
- Add support for region windlight settings (region.environment)
- Add support for materials (normal / specular maps)
- Add getBuffer, getLong and bitwiseOr to UUID
- Added a circular-reference-safe JSONStringify to Utils
- Add XferFile capability to Circuit
PUBLIC API:
AssetCommands:
- Rework "downloadAsset" to detect failures
- NEW: downloadInventoryAsset() - uses TransferRequest for prim inventory items
- NEW: getMaterials() - resolves material UUIDs
RegionCommands:
- NEW: getTerrainTextures()
- NEW: exportSettings() - OpenSim XML export of region settings
- NEW: async getTerrain() - Get binary terrain heightmap, 256x256 float32
- resolveObjects() - now fetches task inventory contents too.
- resolveObjects() - fix calculation of land impact
- NEW: getObjectByLocalID(localID: number, timeout: number)
- NEW: getObjectByUUID(uuid: UUID, timeout: number)
- NEW: getParcels();
- NEW: pruneObjects - removes missing GameObjects from a list
- NEW: setPersist - prevent objectstore from forgetting about killed gameobjects
2018-10-31 11:28:24 +00:00
|
|
|
else if (this.objectsByParent[o.ParentID])
|
2018-10-19 16:30:09 +01:00
|
|
|
{
|
- Add "GET" method to Caps
- New events: ObjectPhysicsDataEvent, ParcelPropertiesEvent, NewObjectEvent, ObjectUpdateEvent, ObjectKilledEvent
- Added getXML function to Color4, Vector2, Vector3, Vector4, GameObject, Region, Quaternion, UUID for opensim-compatible XML export
- Added TextureAnim and ParticleSystem decoding to the "full" ObjectStore
- Object store will automatically request missing "parent" prims
- "setPersist" - When persist is TRUE, the ObjectStore will not forget about "killed" prims - useful for region scanning
- Support for Flexible params, Light params, LightImage params, Mesh data, Sculpt maps
- Fixed object scale being incorrectly calculated
- Add terrain decoding (this was a ballache)
- Add parcel map decoding
- Add support for region windlight settings (region.environment)
- Add support for materials (normal / specular maps)
- Add getBuffer, getLong and bitwiseOr to UUID
- Added a circular-reference-safe JSONStringify to Utils
- Add XferFile capability to Circuit
PUBLIC API:
AssetCommands:
- Rework "downloadAsset" to detect failures
- NEW: downloadInventoryAsset() - uses TransferRequest for prim inventory items
- NEW: getMaterials() - resolves material UUIDs
RegionCommands:
- NEW: getTerrainTextures()
- NEW: exportSettings() - OpenSim XML export of region settings
- NEW: async getTerrain() - Get binary terrain heightmap, 256x256 float32
- resolveObjects() - now fetches task inventory contents too.
- resolveObjects() - fix calculation of land impact
- NEW: getObjectByLocalID(localID: number, timeout: number)
- NEW: getObjectByUUID(uuid: UUID, timeout: number)
- NEW: getParcels();
- NEW: pruneObjects - removes missing GameObjects from a list
- NEW: setPersist - prevent objectstore from forgetting about killed gameobjects
2018-10-31 11:28:24 +00:00
|
|
|
add = false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (add)
|
|
|
|
|
{
|
|
|
|
|
if (!this.objectsByParent[newParentID])
|
|
|
|
|
{
|
|
|
|
|
this.objectsByParent[newParentID] = [];
|
2018-10-19 16:30:09 +01:00
|
|
|
}
|
- Add "GET" method to Caps
- New events: ObjectPhysicsDataEvent, ParcelPropertiesEvent, NewObjectEvent, ObjectUpdateEvent, ObjectKilledEvent
- Added getXML function to Color4, Vector2, Vector3, Vector4, GameObject, Region, Quaternion, UUID for opensim-compatible XML export
- Added TextureAnim and ParticleSystem decoding to the "full" ObjectStore
- Object store will automatically request missing "parent" prims
- "setPersist" - When persist is TRUE, the ObjectStore will not forget about "killed" prims - useful for region scanning
- Support for Flexible params, Light params, LightImage params, Mesh data, Sculpt maps
- Fixed object scale being incorrectly calculated
- Add terrain decoding (this was a ballache)
- Add parcel map decoding
- Add support for region windlight settings (region.environment)
- Add support for materials (normal / specular maps)
- Add getBuffer, getLong and bitwiseOr to UUID
- Added a circular-reference-safe JSONStringify to Utils
- Add XferFile capability to Circuit
PUBLIC API:
AssetCommands:
- Rework "downloadAsset" to detect failures
- NEW: downloadInventoryAsset() - uses TransferRequest for prim inventory items
- NEW: getMaterials() - resolves material UUIDs
RegionCommands:
- NEW: getTerrainTextures()
- NEW: exportSettings() - OpenSim XML export of region settings
- NEW: async getTerrain() - Get binary terrain heightmap, 256x256 float32
- resolveObjects() - now fetches task inventory contents too.
- resolveObjects() - fix calculation of land impact
- NEW: getObjectByLocalID(localID: number, timeout: number)
- NEW: getObjectByUUID(uuid: UUID, timeout: number)
- NEW: getParcels();
- NEW: pruneObjects - removes missing GameObjects from a list
- NEW: setPersist - prevent objectstore from forgetting about killed gameobjects
2018-10-31 11:28:24 +00:00
|
|
|
this.objectsByParent[newParentID].push(localID);
|
2018-10-19 16:30:09 +01:00
|
|
|
}
|
|
|
|
|
if (pcode !== PCode.Avatar && newObj && this.options & BotOptionFlags.StoreMyAttachmentsOnly)
|
|
|
|
|
{
|
|
|
|
|
if (this.agent.localID !== 0 && o.ParentID !== this.agent.localID)
|
|
|
|
|
{
|
|
|
|
|
// Drop object
|
|
|
|
|
this.deleteObject(localID);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
- Add "GET" method to Caps
- New events: ObjectPhysicsDataEvent, ParcelPropertiesEvent, NewObjectEvent, ObjectUpdateEvent, ObjectKilledEvent
- Added getXML function to Color4, Vector2, Vector3, Vector4, GameObject, Region, Quaternion, UUID for opensim-compatible XML export
- Added TextureAnim and ParticleSystem decoding to the "full" ObjectStore
- Object store will automatically request missing "parent" prims
- "setPersist" - When persist is TRUE, the ObjectStore will not forget about "killed" prims - useful for region scanning
- Support for Flexible params, Light params, LightImage params, Mesh data, Sculpt maps
- Fixed object scale being incorrectly calculated
- Add terrain decoding (this was a ballache)
- Add parcel map decoding
- Add support for region windlight settings (region.environment)
- Add support for materials (normal / specular maps)
- Add getBuffer, getLong and bitwiseOr to UUID
- Added a circular-reference-safe JSONStringify to Utils
- Add XferFile capability to Circuit
PUBLIC API:
AssetCommands:
- Rework "downloadAsset" to detect failures
- NEW: downloadInventoryAsset() - uses TransferRequest for prim inventory items
- NEW: getMaterials() - resolves material UUIDs
RegionCommands:
- NEW: getTerrainTextures()
- NEW: exportSettings() - OpenSim XML export of region settings
- NEW: async getTerrain() - Get binary terrain heightmap, 256x256 float32
- resolveObjects() - now fetches task inventory contents too.
- resolveObjects() - fix calculation of land impact
- NEW: getObjectByLocalID(localID: number, timeout: number)
- NEW: getObjectByUUID(uuid: UUID, timeout: number)
- NEW: getParcels();
- NEW: pruneObjects - removes missing GameObjects from a list
- NEW: setPersist - prevent objectstore from forgetting about killed gameobjects
2018-10-31 11:28:24 +00:00
|
|
|
if (o.ParentID !== undefined && o.ParentID !== 0 && !this.objects[o.ParentID])
|
|
|
|
|
{
|
|
|
|
|
this.requestMissingObject(o.ParentID);
|
|
|
|
|
}
|
2018-10-19 16:30:09 +01:00
|
|
|
if (compressedflags & CompressedFlags.Tree)
|
|
|
|
|
{
|
|
|
|
|
pos++;
|
|
|
|
|
}
|
|
|
|
|
else if (compressedflags & CompressedFlags.ScratchPad)
|
|
|
|
|
{
|
|
|
|
|
const scratchPadSize = buf.readUInt8(pos++);
|
|
|
|
|
// Ignore this data
|
|
|
|
|
pos = pos + scratchPadSize;
|
|
|
|
|
}
|
|
|
|
|
if (compressedflags & CompressedFlags.HasText)
|
|
|
|
|
{
|
|
|
|
|
// Read null terminated string
|
|
|
|
|
const result = Utils.BufferToString(buf, pos);
|
|
|
|
|
|
|
|
|
|
pos += result.readLength;
|
|
|
|
|
pos = pos + 4;
|
|
|
|
|
}
|
|
|
|
|
if (compressedflags & CompressedFlags.MediaURL)
|
|
|
|
|
{
|
|
|
|
|
const result = Utils.BufferToString(buf, pos);
|
|
|
|
|
|
|
|
|
|
pos += result.readLength;
|
|
|
|
|
}
|
|
|
|
|
if (compressedflags & CompressedFlags.HasParticles)
|
|
|
|
|
{
|
|
|
|
|
pos += 86;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Extra params
|
2018-11-05 11:45:04 +00:00
|
|
|
const extraParamsLength = ExtraParams.getLengthOfParams(buf, pos);
|
|
|
|
|
o.extraParams = ExtraParams.from(buf.slice(pos, pos + extraParamsLength));
|
|
|
|
|
pos = pos + extraParamsLength;
|
2018-10-19 16:30:09 +01:00
|
|
|
|
|
|
|
|
if (compressedflags & CompressedFlags.HasSound)
|
|
|
|
|
{
|
- Add "GET" method to Caps
- New events: ObjectPhysicsDataEvent, ParcelPropertiesEvent, NewObjectEvent, ObjectUpdateEvent, ObjectKilledEvent
- Added getXML function to Color4, Vector2, Vector3, Vector4, GameObject, Region, Quaternion, UUID for opensim-compatible XML export
- Added TextureAnim and ParticleSystem decoding to the "full" ObjectStore
- Object store will automatically request missing "parent" prims
- "setPersist" - When persist is TRUE, the ObjectStore will not forget about "killed" prims - useful for region scanning
- Support for Flexible params, Light params, LightImage params, Mesh data, Sculpt maps
- Fixed object scale being incorrectly calculated
- Add terrain decoding (this was a ballache)
- Add parcel map decoding
- Add support for region windlight settings (region.environment)
- Add support for materials (normal / specular maps)
- Add getBuffer, getLong and bitwiseOr to UUID
- Added a circular-reference-safe JSONStringify to Utils
- Add XferFile capability to Circuit
PUBLIC API:
AssetCommands:
- Rework "downloadAsset" to detect failures
- NEW: downloadInventoryAsset() - uses TransferRequest for prim inventory items
- NEW: getMaterials() - resolves material UUIDs
RegionCommands:
- NEW: getTerrainTextures()
- NEW: exportSettings() - OpenSim XML export of region settings
- NEW: async getTerrain() - Get binary terrain heightmap, 256x256 float32
- resolveObjects() - now fetches task inventory contents too.
- resolveObjects() - fix calculation of land impact
- NEW: getObjectByLocalID(localID: number, timeout: number)
- NEW: getObjectByUUID(uuid: UUID, timeout: number)
- NEW: getParcels();
- NEW: pruneObjects - removes missing GameObjects from a list
- NEW: setPersist - prevent objectstore from forgetting about killed gameobjects
2018-10-31 11:28:24 +00:00
|
|
|
pos = pos + 25
|
2018-10-19 16:30:09 +01:00
|
|
|
}
|
|
|
|
|
if (compressedflags & CompressedFlags.HasNameValues)
|
|
|
|
|
{
|
|
|
|
|
const result = Utils.BufferToString(buf, pos);
|
|
|
|
|
o.NameValue = this.parseNameValues(result.result);
|
|
|
|
|
pos += result.readLength;
|
|
|
|
|
}
|
|
|
|
|
pos++;
|
- Add "GET" method to Caps
- New events: ObjectPhysicsDataEvent, ParcelPropertiesEvent, NewObjectEvent, ObjectUpdateEvent, ObjectKilledEvent
- Added getXML function to Color4, Vector2, Vector3, Vector4, GameObject, Region, Quaternion, UUID for opensim-compatible XML export
- Added TextureAnim and ParticleSystem decoding to the "full" ObjectStore
- Object store will automatically request missing "parent" prims
- "setPersist" - When persist is TRUE, the ObjectStore will not forget about "killed" prims - useful for region scanning
- Support for Flexible params, Light params, LightImage params, Mesh data, Sculpt maps
- Fixed object scale being incorrectly calculated
- Add terrain decoding (this was a ballache)
- Add parcel map decoding
- Add support for region windlight settings (region.environment)
- Add support for materials (normal / specular maps)
- Add getBuffer, getLong and bitwiseOr to UUID
- Added a circular-reference-safe JSONStringify to Utils
- Add XferFile capability to Circuit
PUBLIC API:
AssetCommands:
- Rework "downloadAsset" to detect failures
- NEW: downloadInventoryAsset() - uses TransferRequest for prim inventory items
- NEW: getMaterials() - resolves material UUIDs
RegionCommands:
- NEW: getTerrainTextures()
- NEW: exportSettings() - OpenSim XML export of region settings
- NEW: async getTerrain() - Get binary terrain heightmap, 256x256 float32
- resolveObjects() - now fetches task inventory contents too.
- resolveObjects() - fix calculation of land impact
- NEW: getObjectByLocalID(localID: number, timeout: number)
- NEW: getObjectByUUID(uuid: UUID, timeout: number)
- NEW: getParcels();
- NEW: pruneObjects - removes missing GameObjects from a list
- NEW: setPersist - prevent objectstore from forgetting about killed gameobjects
2018-10-31 11:28:24 +00:00
|
|
|
pos = pos + 22;
|
2018-10-19 16:30:09 +01:00
|
|
|
const textureEntryLength = buf.readUInt32LE(pos);
|
|
|
|
|
pos = pos + 4;
|
|
|
|
|
pos = pos + textureEntryLength;
|
|
|
|
|
if (compressedflags & CompressedFlags.TextureAnimation)
|
|
|
|
|
{
|
|
|
|
|
pos = pos + 4;
|
2017-11-30 04:11:59 +00:00
|
|
|
}
|
2018-10-19 16:30:09 +01:00
|
|
|
|
|
|
|
|
o.IsAttachment = (compressedflags & CompressedFlags.HasNameValues) !== 0 && o.ParentID !== 0;
|
- Add "GET" method to Caps
- New events: ObjectPhysicsDataEvent, ParcelPropertiesEvent, NewObjectEvent, ObjectUpdateEvent, ObjectKilledEvent
- Added getXML function to Color4, Vector2, Vector3, Vector4, GameObject, Region, Quaternion, UUID for opensim-compatible XML export
- Added TextureAnim and ParticleSystem decoding to the "full" ObjectStore
- Object store will automatically request missing "parent" prims
- "setPersist" - When persist is TRUE, the ObjectStore will not forget about "killed" prims - useful for region scanning
- Support for Flexible params, Light params, LightImage params, Mesh data, Sculpt maps
- Fixed object scale being incorrectly calculated
- Add terrain decoding (this was a ballache)
- Add parcel map decoding
- Add support for region windlight settings (region.environment)
- Add support for materials (normal / specular maps)
- Add getBuffer, getLong and bitwiseOr to UUID
- Added a circular-reference-safe JSONStringify to Utils
- Add XferFile capability to Circuit
PUBLIC API:
AssetCommands:
- Rework "downloadAsset" to detect failures
- NEW: downloadInventoryAsset() - uses TransferRequest for prim inventory items
- NEW: getMaterials() - resolves material UUIDs
RegionCommands:
- NEW: getTerrainTextures()
- NEW: exportSettings() - OpenSim XML export of region settings
- NEW: async getTerrain() - Get binary terrain heightmap, 256x256 float32
- resolveObjects() - now fetches task inventory contents too.
- resolveObjects() - fix calculation of land impact
- NEW: getObjectByLocalID(localID: number, timeout: number)
- NEW: getObjectByUUID(uuid: UUID, timeout: number)
- NEW: getParcels();
- NEW: pruneObjects - removes missing GameObjects from a list
- NEW: setPersist - prevent objectstore from forgetting about killed gameobjects
2018-10-31 11:28:24 +00:00
|
|
|
|
|
|
|
|
if (o.ParentID === 0)
|
|
|
|
|
{
|
|
|
|
|
this.notifyObjectUpdate(newObj, o);
|
|
|
|
|
}
|
2018-10-19 16:30:09 +01:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected objectUpdateTerse(objectUpdateTerse: ImprovedTerseObjectUpdateMessage)
|
|
|
|
|
{ }
|
|
|
|
|
|
|
|
|
|
protected killObject(killObj: KillObjectMessage)
|
|
|
|
|
{
|
|
|
|
|
killObj.ObjectData.forEach((obj) =>
|
|
|
|
|
{
|
|
|
|
|
const objectID = obj.ID;
|
2018-10-20 14:32:33 +01:00
|
|
|
if (this.objects[objectID])
|
|
|
|
|
{
|
|
|
|
|
this.deleteObject(objectID);
|
|
|
|
|
}
|
2017-11-30 04:11:59 +00:00
|
|
|
});
|
|
|
|
|
}
|
2017-12-14 01:21:18 +00:00
|
|
|
|
- Add "GET" method to Caps
- New events: ObjectPhysicsDataEvent, ParcelPropertiesEvent, NewObjectEvent, ObjectUpdateEvent, ObjectKilledEvent
- Added getXML function to Color4, Vector2, Vector3, Vector4, GameObject, Region, Quaternion, UUID for opensim-compatible XML export
- Added TextureAnim and ParticleSystem decoding to the "full" ObjectStore
- Object store will automatically request missing "parent" prims
- "setPersist" - When persist is TRUE, the ObjectStore will not forget about "killed" prims - useful for region scanning
- Support for Flexible params, Light params, LightImage params, Mesh data, Sculpt maps
- Fixed object scale being incorrectly calculated
- Add terrain decoding (this was a ballache)
- Add parcel map decoding
- Add support for region windlight settings (region.environment)
- Add support for materials (normal / specular maps)
- Add getBuffer, getLong and bitwiseOr to UUID
- Added a circular-reference-safe JSONStringify to Utils
- Add XferFile capability to Circuit
PUBLIC API:
AssetCommands:
- Rework "downloadAsset" to detect failures
- NEW: downloadInventoryAsset() - uses TransferRequest for prim inventory items
- NEW: getMaterials() - resolves material UUIDs
RegionCommands:
- NEW: getTerrainTextures()
- NEW: exportSettings() - OpenSim XML export of region settings
- NEW: async getTerrain() - Get binary terrain heightmap, 256x256 float32
- resolveObjects() - now fetches task inventory contents too.
- resolveObjects() - fix calculation of land impact
- NEW: getObjectByLocalID(localID: number, timeout: number)
- NEW: getObjectByUUID(uuid: UUID, timeout: number)
- NEW: getParcels();
- NEW: pruneObjects - removes missing GameObjects from a list
- NEW: setPersist - prevent objectstore from forgetting about killed gameobjects
2018-10-31 11:28:24 +00:00
|
|
|
setPersist(persist: boolean): void
|
|
|
|
|
{
|
|
|
|
|
this.persist = persist;
|
|
|
|
|
if (!this.persist)
|
|
|
|
|
{
|
|
|
|
|
for (const d of this.deadObjects)
|
|
|
|
|
{
|
|
|
|
|
this.deleteObject(d);
|
|
|
|
|
}
|
|
|
|
|
this.deadObjects = [];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2017-12-14 01:21:18 +00:00
|
|
|
deleteObject(objectID: number)
|
|
|
|
|
{
|
|
|
|
|
if (this.objects[objectID])
|
|
|
|
|
{
|
- Add "GET" method to Caps
- New events: ObjectPhysicsDataEvent, ParcelPropertiesEvent, NewObjectEvent, ObjectUpdateEvent, ObjectKilledEvent
- Added getXML function to Color4, Vector2, Vector3, Vector4, GameObject, Region, Quaternion, UUID for opensim-compatible XML export
- Added TextureAnim and ParticleSystem decoding to the "full" ObjectStore
- Object store will automatically request missing "parent" prims
- "setPersist" - When persist is TRUE, the ObjectStore will not forget about "killed" prims - useful for region scanning
- Support for Flexible params, Light params, LightImage params, Mesh data, Sculpt maps
- Fixed object scale being incorrectly calculated
- Add terrain decoding (this was a ballache)
- Add parcel map decoding
- Add support for region windlight settings (region.environment)
- Add support for materials (normal / specular maps)
- Add getBuffer, getLong and bitwiseOr to UUID
- Added a circular-reference-safe JSONStringify to Utils
- Add XferFile capability to Circuit
PUBLIC API:
AssetCommands:
- Rework "downloadAsset" to detect failures
- NEW: downloadInventoryAsset() - uses TransferRequest for prim inventory items
- NEW: getMaterials() - resolves material UUIDs
RegionCommands:
- NEW: getTerrainTextures()
- NEW: exportSettings() - OpenSim XML export of region settings
- NEW: async getTerrain() - Get binary terrain heightmap, 256x256 float32
- resolveObjects() - now fetches task inventory contents too.
- resolveObjects() - fix calculation of land impact
- NEW: getObjectByLocalID(localID: number, timeout: number)
- NEW: getObjectByUUID(uuid: UUID, timeout: number)
- NEW: getParcels();
- NEW: pruneObjects - removes missing GameObjects from a list
- NEW: setPersist - prevent objectstore from forgetting about killed gameobjects
2018-10-31 11:28:24 +00:00
|
|
|
this.objects[objectID].deleted = true;
|
|
|
|
|
|
|
|
|
|
if (this.persist)
|
|
|
|
|
{
|
|
|
|
|
this.deadObjects.push(objectID);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
2017-12-14 01:21:18 +00:00
|
|
|
// First, kill all children
|
|
|
|
|
if (this.objectsByParent[objectID])
|
|
|
|
|
{
|
- Add "GET" method to Caps
- New events: ObjectPhysicsDataEvent, ParcelPropertiesEvent, NewObjectEvent, ObjectUpdateEvent, ObjectKilledEvent
- Added getXML function to Color4, Vector2, Vector3, Vector4, GameObject, Region, Quaternion, UUID for opensim-compatible XML export
- Added TextureAnim and ParticleSystem decoding to the "full" ObjectStore
- Object store will automatically request missing "parent" prims
- "setPersist" - When persist is TRUE, the ObjectStore will not forget about "killed" prims - useful for region scanning
- Support for Flexible params, Light params, LightImage params, Mesh data, Sculpt maps
- Fixed object scale being incorrectly calculated
- Add terrain decoding (this was a ballache)
- Add parcel map decoding
- Add support for region windlight settings (region.environment)
- Add support for materials (normal / specular maps)
- Add getBuffer, getLong and bitwiseOr to UUID
- Added a circular-reference-safe JSONStringify to Utils
- Add XferFile capability to Circuit
PUBLIC API:
AssetCommands:
- Rework "downloadAsset" to detect failures
- NEW: downloadInventoryAsset() - uses TransferRequest for prim inventory items
- NEW: getMaterials() - resolves material UUIDs
RegionCommands:
- NEW: getTerrainTextures()
- NEW: exportSettings() - OpenSim XML export of region settings
- NEW: async getTerrain() - Get binary terrain heightmap, 256x256 float32
- resolveObjects() - now fetches task inventory contents too.
- resolveObjects() - fix calculation of land impact
- NEW: getObjectByLocalID(localID: number, timeout: number)
- NEW: getObjectByUUID(uuid: UUID, timeout: number)
- NEW: getParcels();
- NEW: pruneObjects - removes missing GameObjects from a list
- NEW: setPersist - prevent objectstore from forgetting about killed gameobjects
2018-10-31 11:28:24 +00:00
|
|
|
for (const childObjID of this.objectsByParent[objectID])
|
2017-12-14 01:21:18 +00:00
|
|
|
{
|
|
|
|
|
this.deleteObject(childObjID);
|
- Add "GET" method to Caps
- New events: ObjectPhysicsDataEvent, ParcelPropertiesEvent, NewObjectEvent, ObjectUpdateEvent, ObjectKilledEvent
- Added getXML function to Color4, Vector2, Vector3, Vector4, GameObject, Region, Quaternion, UUID for opensim-compatible XML export
- Added TextureAnim and ParticleSystem decoding to the "full" ObjectStore
- Object store will automatically request missing "parent" prims
- "setPersist" - When persist is TRUE, the ObjectStore will not forget about "killed" prims - useful for region scanning
- Support for Flexible params, Light params, LightImage params, Mesh data, Sculpt maps
- Fixed object scale being incorrectly calculated
- Add terrain decoding (this was a ballache)
- Add parcel map decoding
- Add support for region windlight settings (region.environment)
- Add support for materials (normal / specular maps)
- Add getBuffer, getLong and bitwiseOr to UUID
- Added a circular-reference-safe JSONStringify to Utils
- Add XferFile capability to Circuit
PUBLIC API:
AssetCommands:
- Rework "downloadAsset" to detect failures
- NEW: downloadInventoryAsset() - uses TransferRequest for prim inventory items
- NEW: getMaterials() - resolves material UUIDs
RegionCommands:
- NEW: getTerrainTextures()
- NEW: exportSettings() - OpenSim XML export of region settings
- NEW: async getTerrain() - Get binary terrain heightmap, 256x256 float32
- resolveObjects() - now fetches task inventory contents too.
- resolveObjects() - fix calculation of land impact
- NEW: getObjectByLocalID(localID: number, timeout: number)
- NEW: getObjectByUUID(uuid: UUID, timeout: number)
- NEW: getParcels();
- NEW: pruneObjects - removes missing GameObjects from a list
- NEW: setPersist - prevent objectstore from forgetting about killed gameobjects
2018-10-31 11:28:24 +00:00
|
|
|
}
|
2017-12-14 01:21:18 +00:00
|
|
|
}
|
|
|
|
|
delete this.objectsByParent[objectID];
|
|
|
|
|
|
|
|
|
|
// Now delete this object
|
|
|
|
|
const objct = this.objects[objectID];
|
|
|
|
|
const uuid = objct.FullID.toString();
|
|
|
|
|
|
|
|
|
|
if (this.objectsByUUID[uuid])
|
|
|
|
|
{
|
|
|
|
|
delete this.objectsByUUID[uuid];
|
|
|
|
|
}
|
- Add "GET" method to Caps
- New events: ObjectPhysicsDataEvent, ParcelPropertiesEvent, NewObjectEvent, ObjectUpdateEvent, ObjectKilledEvent
- Added getXML function to Color4, Vector2, Vector3, Vector4, GameObject, Region, Quaternion, UUID for opensim-compatible XML export
- Added TextureAnim and ParticleSystem decoding to the "full" ObjectStore
- Object store will automatically request missing "parent" prims
- "setPersist" - When persist is TRUE, the ObjectStore will not forget about "killed" prims - useful for region scanning
- Support for Flexible params, Light params, LightImage params, Mesh data, Sculpt maps
- Fixed object scale being incorrectly calculated
- Add terrain decoding (this was a ballache)
- Add parcel map decoding
- Add support for region windlight settings (region.environment)
- Add support for materials (normal / specular maps)
- Add getBuffer, getLong and bitwiseOr to UUID
- Added a circular-reference-safe JSONStringify to Utils
- Add XferFile capability to Circuit
PUBLIC API:
AssetCommands:
- Rework "downloadAsset" to detect failures
- NEW: downloadInventoryAsset() - uses TransferRequest for prim inventory items
- NEW: getMaterials() - resolves material UUIDs
RegionCommands:
- NEW: getTerrainTextures()
- NEW: exportSettings() - OpenSim XML export of region settings
- NEW: async getTerrain() - Get binary terrain heightmap, 256x256 float32
- resolveObjects() - now fetches task inventory contents too.
- resolveObjects() - fix calculation of land impact
- NEW: getObjectByLocalID(localID: number, timeout: number)
- NEW: getObjectByUUID(uuid: UUID, timeout: number)
- NEW: getParcels();
- NEW: pruneObjects - removes missing GameObjects from a list
- NEW: setPersist - prevent objectstore from forgetting about killed gameobjects
2018-10-31 11:28:24 +00:00
|
|
|
if (objct.ParentID !== undefined)
|
2017-12-14 01:21:18 +00:00
|
|
|
{
|
- Add "GET" method to Caps
- New events: ObjectPhysicsDataEvent, ParcelPropertiesEvent, NewObjectEvent, ObjectUpdateEvent, ObjectKilledEvent
- Added getXML function to Color4, Vector2, Vector3, Vector4, GameObject, Region, Quaternion, UUID for opensim-compatible XML export
- Added TextureAnim and ParticleSystem decoding to the "full" ObjectStore
- Object store will automatically request missing "parent" prims
- "setPersist" - When persist is TRUE, the ObjectStore will not forget about "killed" prims - useful for region scanning
- Support for Flexible params, Light params, LightImage params, Mesh data, Sculpt maps
- Fixed object scale being incorrectly calculated
- Add terrain decoding (this was a ballache)
- Add parcel map decoding
- Add support for region windlight settings (region.environment)
- Add support for materials (normal / specular maps)
- Add getBuffer, getLong and bitwiseOr to UUID
- Added a circular-reference-safe JSONStringify to Utils
- Add XferFile capability to Circuit
PUBLIC API:
AssetCommands:
- Rework "downloadAsset" to detect failures
- NEW: downloadInventoryAsset() - uses TransferRequest for prim inventory items
- NEW: getMaterials() - resolves material UUIDs
RegionCommands:
- NEW: getTerrainTextures()
- NEW: exportSettings() - OpenSim XML export of region settings
- NEW: async getTerrain() - Get binary terrain heightmap, 256x256 float32
- resolveObjects() - now fetches task inventory contents too.
- resolveObjects() - fix calculation of land impact
- NEW: getObjectByLocalID(localID: number, timeout: number)
- NEW: getObjectByUUID(uuid: UUID, timeout: number)
- NEW: getParcels();
- NEW: pruneObjects - removes missing GameObjects from a list
- NEW: setPersist - prevent objectstore from forgetting about killed gameobjects
2018-10-31 11:28:24 +00:00
|
|
|
const parentID = objct.ParentID;
|
|
|
|
|
if (this.objectsByParent[parentID])
|
2017-12-14 01:21:18 +00:00
|
|
|
{
|
- Add "GET" method to Caps
- New events: ObjectPhysicsDataEvent, ParcelPropertiesEvent, NewObjectEvent, ObjectUpdateEvent, ObjectKilledEvent
- Added getXML function to Color4, Vector2, Vector3, Vector4, GameObject, Region, Quaternion, UUID for opensim-compatible XML export
- Added TextureAnim and ParticleSystem decoding to the "full" ObjectStore
- Object store will automatically request missing "parent" prims
- "setPersist" - When persist is TRUE, the ObjectStore will not forget about "killed" prims - useful for region scanning
- Support for Flexible params, Light params, LightImage params, Mesh data, Sculpt maps
- Fixed object scale being incorrectly calculated
- Add terrain decoding (this was a ballache)
- Add parcel map decoding
- Add support for region windlight settings (region.environment)
- Add support for materials (normal / specular maps)
- Add getBuffer, getLong and bitwiseOr to UUID
- Added a circular-reference-safe JSONStringify to Utils
- Add XferFile capability to Circuit
PUBLIC API:
AssetCommands:
- Rework "downloadAsset" to detect failures
- NEW: downloadInventoryAsset() - uses TransferRequest for prim inventory items
- NEW: getMaterials() - resolves material UUIDs
RegionCommands:
- NEW: getTerrainTextures()
- NEW: exportSettings() - OpenSim XML export of region settings
- NEW: async getTerrain() - Get binary terrain heightmap, 256x256 float32
- resolveObjects() - now fetches task inventory contents too.
- resolveObjects() - fix calculation of land impact
- NEW: getObjectByLocalID(localID: number, timeout: number)
- NEW: getObjectByUUID(uuid: UUID, timeout: number)
- NEW: getParcels();
- NEW: pruneObjects - removes missing GameObjects from a list
- NEW: setPersist - prevent objectstore from forgetting about killed gameobjects
2018-10-31 11:28:24 +00:00
|
|
|
const ind = this.objectsByParent[parentID].indexOf(objectID);
|
|
|
|
|
if (ind !== -1)
|
|
|
|
|
{
|
|
|
|
|
this.objectsByParent[parentID].splice(ind, 1);
|
|
|
|
|
}
|
2017-12-14 01:21:18 +00:00
|
|
|
}
|
|
|
|
|
}
|
2018-10-19 16:30:09 +01:00
|
|
|
if (this.rtree && this.objects[objectID].rtreeEntry !== undefined)
|
|
|
|
|
{
|
|
|
|
|
this.rtree.remove(this.objects[objectID].rtreeEntry);
|
|
|
|
|
}
|
2017-12-14 01:21:18 +00:00
|
|
|
delete this.objects[objectID];
|
|
|
|
|
}
|
|
|
|
|
}
|
2018-10-19 16:30:09 +01:00
|
|
|
getObjectsByParent(parentID: number): GameObject[]
|
2017-11-30 04:11:59 +00:00
|
|
|
{
|
|
|
|
|
const list = this.objectsByParent[parentID];
|
|
|
|
|
if (list === undefined)
|
|
|
|
|
{
|
|
|
|
|
return [];
|
|
|
|
|
}
|
2018-10-19 16:30:09 +01:00
|
|
|
const result: GameObject[] = [];
|
2017-11-30 04:11:59 +00:00
|
|
|
list.forEach((localID) =>
|
|
|
|
|
{
|
- Add "GET" method to Caps
- New events: ObjectPhysicsDataEvent, ParcelPropertiesEvent, NewObjectEvent, ObjectUpdateEvent, ObjectKilledEvent
- Added getXML function to Color4, Vector2, Vector3, Vector4, GameObject, Region, Quaternion, UUID for opensim-compatible XML export
- Added TextureAnim and ParticleSystem decoding to the "full" ObjectStore
- Object store will automatically request missing "parent" prims
- "setPersist" - When persist is TRUE, the ObjectStore will not forget about "killed" prims - useful for region scanning
- Support for Flexible params, Light params, LightImage params, Mesh data, Sculpt maps
- Fixed object scale being incorrectly calculated
- Add terrain decoding (this was a ballache)
- Add parcel map decoding
- Add support for region windlight settings (region.environment)
- Add support for materials (normal / specular maps)
- Add getBuffer, getLong and bitwiseOr to UUID
- Added a circular-reference-safe JSONStringify to Utils
- Add XferFile capability to Circuit
PUBLIC API:
AssetCommands:
- Rework "downloadAsset" to detect failures
- NEW: downloadInventoryAsset() - uses TransferRequest for prim inventory items
- NEW: getMaterials() - resolves material UUIDs
RegionCommands:
- NEW: getTerrainTextures()
- NEW: exportSettings() - OpenSim XML export of region settings
- NEW: async getTerrain() - Get binary terrain heightmap, 256x256 float32
- resolveObjects() - now fetches task inventory contents too.
- resolveObjects() - fix calculation of land impact
- NEW: getObjectByLocalID(localID: number, timeout: number)
- NEW: getObjectByUUID(uuid: UUID, timeout: number)
- NEW: getParcels();
- NEW: pruneObjects - removes missing GameObjects from a list
- NEW: setPersist - prevent objectstore from forgetting about killed gameobjects
2018-10-31 11:28:24 +00:00
|
|
|
if (this.objects[localID])
|
|
|
|
|
{
|
|
|
|
|
result.push(this.objects[localID]);
|
|
|
|
|
}
|
2017-11-30 04:11:59 +00:00
|
|
|
});
|
|
|
|
|
return result;
|
|
|
|
|
}
|
2017-12-14 01:21:18 +00:00
|
|
|
|
|
|
|
|
parseNameValues(str: string): { [key: string]: NameValue }
|
2017-11-30 04:11:59 +00:00
|
|
|
{
|
2017-12-14 01:21:18 +00:00
|
|
|
const nv: { [key: string]: NameValue } = {};
|
2017-11-30 04:11:59 +00:00
|
|
|
const lines = str.split('\n');
|
|
|
|
|
lines.forEach((line) =>
|
|
|
|
|
{
|
|
|
|
|
if (line.length > 0)
|
|
|
|
|
{
|
|
|
|
|
let kv = line.split(/[\t ]/);
|
|
|
|
|
if (kv.length > 5)
|
|
|
|
|
{
|
2017-12-14 01:21:18 +00:00
|
|
|
for (let x = 5; x < kv.length; x++)
|
2017-11-30 04:11:59 +00:00
|
|
|
{
|
|
|
|
|
kv[4] += ' ' + kv[x];
|
|
|
|
|
}
|
|
|
|
|
kv = kv.slice(0, 5);
|
|
|
|
|
}
|
|
|
|
|
if (kv.length === 5)
|
|
|
|
|
{
|
|
|
|
|
const namevalue = new NameValue();
|
|
|
|
|
namevalue.type = kv[1];
|
|
|
|
|
namevalue.class = kv[2];
|
|
|
|
|
namevalue.sendTo = kv[3];
|
|
|
|
|
namevalue.value = kv[4];
|
|
|
|
|
nv[kv[0]] = namevalue;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2017-12-14 02:06:28 +00:00
|
|
|
console.log('namevalue unexpected length: ' + kv.length);
|
2017-11-30 04:11:59 +00:00
|
|
|
console.log(kv);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
return nv;
|
|
|
|
|
}
|
2017-12-14 01:21:18 +00:00
|
|
|
|
2017-11-30 04:11:59 +00:00
|
|
|
shutdown()
|
|
|
|
|
{
|
- Add "GET" method to Caps
- New events: ObjectPhysicsDataEvent, ParcelPropertiesEvent, NewObjectEvent, ObjectUpdateEvent, ObjectKilledEvent
- Added getXML function to Color4, Vector2, Vector3, Vector4, GameObject, Region, Quaternion, UUID for opensim-compatible XML export
- Added TextureAnim and ParticleSystem decoding to the "full" ObjectStore
- Object store will automatically request missing "parent" prims
- "setPersist" - When persist is TRUE, the ObjectStore will not forget about "killed" prims - useful for region scanning
- Support for Flexible params, Light params, LightImage params, Mesh data, Sculpt maps
- Fixed object scale being incorrectly calculated
- Add terrain decoding (this was a ballache)
- Add parcel map decoding
- Add support for region windlight settings (region.environment)
- Add support for materials (normal / specular maps)
- Add getBuffer, getLong and bitwiseOr to UUID
- Added a circular-reference-safe JSONStringify to Utils
- Add XferFile capability to Circuit
PUBLIC API:
AssetCommands:
- Rework "downloadAsset" to detect failures
- NEW: downloadInventoryAsset() - uses TransferRequest for prim inventory items
- NEW: getMaterials() - resolves material UUIDs
RegionCommands:
- NEW: getTerrainTextures()
- NEW: exportSettings() - OpenSim XML export of region settings
- NEW: async getTerrain() - Get binary terrain heightmap, 256x256 float32
- resolveObjects() - now fetches task inventory contents too.
- resolveObjects() - fix calculation of land impact
- NEW: getObjectByLocalID(localID: number, timeout: number)
- NEW: getObjectByUUID(uuid: UUID, timeout: number)
- NEW: getParcels();
- NEW: pruneObjects - removes missing GameObjects from a list
- NEW: setPersist - prevent objectstore from forgetting about killed gameobjects
2018-10-31 11:28:24 +00:00
|
|
|
this.physicsSubscription.unsubscribe();
|
2017-11-30 04:11:59 +00:00
|
|
|
this.objects = {};
|
2018-10-19 16:30:09 +01:00
|
|
|
if (this.rtree)
|
|
|
|
|
{
|
|
|
|
|
this.rtree.clear();
|
|
|
|
|
}
|
2017-11-30 04:11:59 +00:00
|
|
|
this.objectsByUUID = {};
|
|
|
|
|
this.objectsByParent = {};
|
|
|
|
|
}
|
2018-10-12 17:31:14 +01:00
|
|
|
|
2018-10-19 16:30:09 +01:00
|
|
|
protected findParent(go: GameObject): GameObject
|
|
|
|
|
{
|
- Add "GET" method to Caps
- New events: ObjectPhysicsDataEvent, ParcelPropertiesEvent, NewObjectEvent, ObjectUpdateEvent, ObjectKilledEvent
- Added getXML function to Color4, Vector2, Vector3, Vector4, GameObject, Region, Quaternion, UUID for opensim-compatible XML export
- Added TextureAnim and ParticleSystem decoding to the "full" ObjectStore
- Object store will automatically request missing "parent" prims
- "setPersist" - When persist is TRUE, the ObjectStore will not forget about "killed" prims - useful for region scanning
- Support for Flexible params, Light params, LightImage params, Mesh data, Sculpt maps
- Fixed object scale being incorrectly calculated
- Add terrain decoding (this was a ballache)
- Add parcel map decoding
- Add support for region windlight settings (region.environment)
- Add support for materials (normal / specular maps)
- Add getBuffer, getLong and bitwiseOr to UUID
- Added a circular-reference-safe JSONStringify to Utils
- Add XferFile capability to Circuit
PUBLIC API:
AssetCommands:
- Rework "downloadAsset" to detect failures
- NEW: downloadInventoryAsset() - uses TransferRequest for prim inventory items
- NEW: getMaterials() - resolves material UUIDs
RegionCommands:
- NEW: getTerrainTextures()
- NEW: exportSettings() - OpenSim XML export of region settings
- NEW: async getTerrain() - Get binary terrain heightmap, 256x256 float32
- resolveObjects() - now fetches task inventory contents too.
- resolveObjects() - fix calculation of land impact
- NEW: getObjectByLocalID(localID: number, timeout: number)
- NEW: getObjectByUUID(uuid: UUID, timeout: number)
- NEW: getParcels();
- NEW: pruneObjects - removes missing GameObjects from a list
- NEW: setPersist - prevent objectstore from forgetting about killed gameobjects
2018-10-31 11:28:24 +00:00
|
|
|
if (go.ParentID !== undefined && go.ParentID !== 0 && this.objects[go.ParentID])
|
2018-10-19 16:30:09 +01:00
|
|
|
{
|
|
|
|
|
return this.findParent(this.objects[go.ParentID]);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
- Add "GET" method to Caps
- New events: ObjectPhysicsDataEvent, ParcelPropertiesEvent, NewObjectEvent, ObjectUpdateEvent, ObjectKilledEvent
- Added getXML function to Color4, Vector2, Vector3, Vector4, GameObject, Region, Quaternion, UUID for opensim-compatible XML export
- Added TextureAnim and ParticleSystem decoding to the "full" ObjectStore
- Object store will automatically request missing "parent" prims
- "setPersist" - When persist is TRUE, the ObjectStore will not forget about "killed" prims - useful for region scanning
- Support for Flexible params, Light params, LightImage params, Mesh data, Sculpt maps
- Fixed object scale being incorrectly calculated
- Add terrain decoding (this was a ballache)
- Add parcel map decoding
- Add support for region windlight settings (region.environment)
- Add support for materials (normal / specular maps)
- Add getBuffer, getLong and bitwiseOr to UUID
- Added a circular-reference-safe JSONStringify to Utils
- Add XferFile capability to Circuit
PUBLIC API:
AssetCommands:
- Rework "downloadAsset" to detect failures
- NEW: downloadInventoryAsset() - uses TransferRequest for prim inventory items
- NEW: getMaterials() - resolves material UUIDs
RegionCommands:
- NEW: getTerrainTextures()
- NEW: exportSettings() - OpenSim XML export of region settings
- NEW: async getTerrain() - Get binary terrain heightmap, 256x256 float32
- resolveObjects() - now fetches task inventory contents too.
- resolveObjects() - fix calculation of land impact
- NEW: getObjectByLocalID(localID: number, timeout: number)
- NEW: getObjectByUUID(uuid: UUID, timeout: number)
- NEW: getParcels();
- NEW: pruneObjects - removes missing GameObjects from a list
- NEW: setPersist - prevent objectstore from forgetting about killed gameobjects
2018-10-31 11:28:24 +00:00
|
|
|
if (go.ParentID !== undefined && go.ParentID !== 0 && !this.objects[go.ParentID])
|
|
|
|
|
{
|
|
|
|
|
this.requestMissingObject(go.ParentID);
|
|
|
|
|
}
|
2018-10-19 16:30:09 +01:00
|
|
|
return go;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private populateChildren(obj: GameObject)
|
|
|
|
|
{
|
- Add "GET" method to Caps
- New events: ObjectPhysicsDataEvent, ParcelPropertiesEvent, NewObjectEvent, ObjectUpdateEvent, ObjectKilledEvent
- Added getXML function to Color4, Vector2, Vector3, Vector4, GameObject, Region, Quaternion, UUID for opensim-compatible XML export
- Added TextureAnim and ParticleSystem decoding to the "full" ObjectStore
- Object store will automatically request missing "parent" prims
- "setPersist" - When persist is TRUE, the ObjectStore will not forget about "killed" prims - useful for region scanning
- Support for Flexible params, Light params, LightImage params, Mesh data, Sculpt maps
- Fixed object scale being incorrectly calculated
- Add terrain decoding (this was a ballache)
- Add parcel map decoding
- Add support for region windlight settings (region.environment)
- Add support for materials (normal / specular maps)
- Add getBuffer, getLong and bitwiseOr to UUID
- Added a circular-reference-safe JSONStringify to Utils
- Add XferFile capability to Circuit
PUBLIC API:
AssetCommands:
- Rework "downloadAsset" to detect failures
- NEW: downloadInventoryAsset() - uses TransferRequest for prim inventory items
- NEW: getMaterials() - resolves material UUIDs
RegionCommands:
- NEW: getTerrainTextures()
- NEW: exportSettings() - OpenSim XML export of region settings
- NEW: async getTerrain() - Get binary terrain heightmap, 256x256 float32
- resolveObjects() - now fetches task inventory contents too.
- resolveObjects() - fix calculation of land impact
- NEW: getObjectByLocalID(localID: number, timeout: number)
- NEW: getObjectByUUID(uuid: UUID, timeout: number)
- NEW: getParcels();
- NEW: pruneObjects - removes missing GameObjects from a list
- NEW: setPersist - prevent objectstore from forgetting about killed gameobjects
2018-10-31 11:28:24 +00:00
|
|
|
if (obj !== undefined)
|
2018-10-19 16:30:09 +01:00
|
|
|
{
|
- Add "GET" method to Caps
- New events: ObjectPhysicsDataEvent, ParcelPropertiesEvent, NewObjectEvent, ObjectUpdateEvent, ObjectKilledEvent
- Added getXML function to Color4, Vector2, Vector3, Vector4, GameObject, Region, Quaternion, UUID for opensim-compatible XML export
- Added TextureAnim and ParticleSystem decoding to the "full" ObjectStore
- Object store will automatically request missing "parent" prims
- "setPersist" - When persist is TRUE, the ObjectStore will not forget about "killed" prims - useful for region scanning
- Support for Flexible params, Light params, LightImage params, Mesh data, Sculpt maps
- Fixed object scale being incorrectly calculated
- Add terrain decoding (this was a ballache)
- Add parcel map decoding
- Add support for region windlight settings (region.environment)
- Add support for materials (normal / specular maps)
- Add getBuffer, getLong and bitwiseOr to UUID
- Added a circular-reference-safe JSONStringify to Utils
- Add XferFile capability to Circuit
PUBLIC API:
AssetCommands:
- Rework "downloadAsset" to detect failures
- NEW: downloadInventoryAsset() - uses TransferRequest for prim inventory items
- NEW: getMaterials() - resolves material UUIDs
RegionCommands:
- NEW: getTerrainTextures()
- NEW: exportSettings() - OpenSim XML export of region settings
- NEW: async getTerrain() - Get binary terrain heightmap, 256x256 float32
- resolveObjects() - now fetches task inventory contents too.
- resolveObjects() - fix calculation of land impact
- NEW: getObjectByLocalID(localID: number, timeout: number)
- NEW: getObjectByUUID(uuid: UUID, timeout: number)
- NEW: getParcels();
- NEW: pruneObjects - removes missing GameObjects from a list
- NEW: setPersist - prevent objectstore from forgetting about killed gameobjects
2018-10-31 11:28:24 +00:00
|
|
|
obj.children = [];
|
|
|
|
|
obj.totalChildren = 0;
|
|
|
|
|
for (const child of this.getObjectsByParent(obj.ID))
|
2018-10-19 16:30:09 +01:00
|
|
|
{
|
- Add "GET" method to Caps
- New events: ObjectPhysicsDataEvent, ParcelPropertiesEvent, NewObjectEvent, ObjectUpdateEvent, ObjectKilledEvent
- Added getXML function to Color4, Vector2, Vector3, Vector4, GameObject, Region, Quaternion, UUID for opensim-compatible XML export
- Added TextureAnim and ParticleSystem decoding to the "full" ObjectStore
- Object store will automatically request missing "parent" prims
- "setPersist" - When persist is TRUE, the ObjectStore will not forget about "killed" prims - useful for region scanning
- Support for Flexible params, Light params, LightImage params, Mesh data, Sculpt maps
- Fixed object scale being incorrectly calculated
- Add terrain decoding (this was a ballache)
- Add parcel map decoding
- Add support for region windlight settings (region.environment)
- Add support for materials (normal / specular maps)
- Add getBuffer, getLong and bitwiseOr to UUID
- Added a circular-reference-safe JSONStringify to Utils
- Add XferFile capability to Circuit
PUBLIC API:
AssetCommands:
- Rework "downloadAsset" to detect failures
- NEW: downloadInventoryAsset() - uses TransferRequest for prim inventory items
- NEW: getMaterials() - resolves material UUIDs
RegionCommands:
- NEW: getTerrainTextures()
- NEW: exportSettings() - OpenSim XML export of region settings
- NEW: async getTerrain() - Get binary terrain heightmap, 256x256 float32
- resolveObjects() - now fetches task inventory contents too.
- resolveObjects() - fix calculation of land impact
- NEW: getObjectByLocalID(localID: number, timeout: number)
- NEW: getObjectByUUID(uuid: UUID, timeout: number)
- NEW: getParcels();
- NEW: pruneObjects - removes missing GameObjects from a list
- NEW: setPersist - prevent objectstore from forgetting about killed gameobjects
2018-10-31 11:28:24 +00:00
|
|
|
if (child.PCode !== PCode.Avatar)
|
|
|
|
|
{
|
|
|
|
|
obj.totalChildren++;
|
|
|
|
|
this.populateChildren(child);
|
|
|
|
|
if (child.totalChildren !== undefined)
|
|
|
|
|
{
|
|
|
|
|
obj.totalChildren += child.totalChildren;
|
|
|
|
|
}
|
|
|
|
|
obj.children.push(child);
|
|
|
|
|
}
|
2018-10-19 16:30:09 +01:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
- Add "GET" method to Caps
- New events: ObjectPhysicsDataEvent, ParcelPropertiesEvent, NewObjectEvent, ObjectUpdateEvent, ObjectKilledEvent
- Added getXML function to Color4, Vector2, Vector3, Vector4, GameObject, Region, Quaternion, UUID for opensim-compatible XML export
- Added TextureAnim and ParticleSystem decoding to the "full" ObjectStore
- Object store will automatically request missing "parent" prims
- "setPersist" - When persist is TRUE, the ObjectStore will not forget about "killed" prims - useful for region scanning
- Support for Flexible params, Light params, LightImage params, Mesh data, Sculpt maps
- Fixed object scale being incorrectly calculated
- Add terrain decoding (this was a ballache)
- Add parcel map decoding
- Add support for region windlight settings (region.environment)
- Add support for materials (normal / specular maps)
- Add getBuffer, getLong and bitwiseOr to UUID
- Added a circular-reference-safe JSONStringify to Utils
- Add XferFile capability to Circuit
PUBLIC API:
AssetCommands:
- Rework "downloadAsset" to detect failures
- NEW: downloadInventoryAsset() - uses TransferRequest for prim inventory items
- NEW: getMaterials() - resolves material UUIDs
RegionCommands:
- NEW: getTerrainTextures()
- NEW: exportSettings() - OpenSim XML export of region settings
- NEW: async getTerrain() - Get binary terrain heightmap, 256x256 float32
- resolveObjects() - now fetches task inventory contents too.
- resolveObjects() - fix calculation of land impact
- NEW: getObjectByLocalID(localID: number, timeout: number)
- NEW: getObjectByUUID(uuid: UUID, timeout: number)
- NEW: getParcels();
- NEW: pruneObjects - removes missing GameObjects from a list
- NEW: setPersist - prevent objectstore from forgetting about killed gameobjects
2018-10-31 11:28:24 +00:00
|
|
|
async getAllObjects(): Promise<GameObject[]>
|
2018-10-19 16:39:24 +01:00
|
|
|
{
|
|
|
|
|
const results = [];
|
|
|
|
|
const found: {[key: string]: GameObject} = {};
|
|
|
|
|
for (const k of Object.keys(this.objects))
|
|
|
|
|
{
|
|
|
|
|
const go = this.objects[parseInt(k, 10)];
|
|
|
|
|
if (go.PCode !== PCode.Avatar && (go.IsAttachment === undefined || go.IsAttachment === false))
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
const parent = this.findParent(go);
|
- Add "GET" method to Caps
- New events: ObjectPhysicsDataEvent, ParcelPropertiesEvent, NewObjectEvent, ObjectUpdateEvent, ObjectKilledEvent
- Added getXML function to Color4, Vector2, Vector3, Vector4, GameObject, Region, Quaternion, UUID for opensim-compatible XML export
- Added TextureAnim and ParticleSystem decoding to the "full" ObjectStore
- Object store will automatically request missing "parent" prims
- "setPersist" - When persist is TRUE, the ObjectStore will not forget about "killed" prims - useful for region scanning
- Support for Flexible params, Light params, LightImage params, Mesh data, Sculpt maps
- Fixed object scale being incorrectly calculated
- Add terrain decoding (this was a ballache)
- Add parcel map decoding
- Add support for region windlight settings (region.environment)
- Add support for materials (normal / specular maps)
- Add getBuffer, getLong and bitwiseOr to UUID
- Added a circular-reference-safe JSONStringify to Utils
- Add XferFile capability to Circuit
PUBLIC API:
AssetCommands:
- Rework "downloadAsset" to detect failures
- NEW: downloadInventoryAsset() - uses TransferRequest for prim inventory items
- NEW: getMaterials() - resolves material UUIDs
RegionCommands:
- NEW: getTerrainTextures()
- NEW: exportSettings() - OpenSim XML export of region settings
- NEW: async getTerrain() - Get binary terrain heightmap, 256x256 float32
- resolveObjects() - now fetches task inventory contents too.
- resolveObjects() - fix calculation of land impact
- NEW: getObjectByLocalID(localID: number, timeout: number)
- NEW: getObjectByUUID(uuid: UUID, timeout: number)
- NEW: getParcels();
- NEW: pruneObjects - removes missing GameObjects from a list
- NEW: setPersist - prevent objectstore from forgetting about killed gameobjects
2018-10-31 11:28:24 +00:00
|
|
|
if (parent.PCode !== PCode.Avatar && (parent.IsAttachment === undefined || parent.IsAttachment === false) && parent.ParentID === 0)
|
2018-10-19 16:39:24 +01:00
|
|
|
{
|
|
|
|
|
const uuid = parent.FullID.toString();
|
|
|
|
|
|
|
|
|
|
if (found[uuid] === undefined)
|
|
|
|
|
{
|
|
|
|
|
found[uuid] = parent;
|
|
|
|
|
results.push(parent);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
catch (error)
|
|
|
|
|
{
|
|
|
|
|
console.log('Failed to find parent for ' + go.FullID.toString());
|
|
|
|
|
console.error(error);
|
|
|
|
|
// Unable to find parent, full object probably not fully loaded yet
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Now populate children of each found object
|
|
|
|
|
for (const obj of results)
|
|
|
|
|
{
|
|
|
|
|
this.populateChildren(obj);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return results;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getNumberOfObjects(): number
|
2018-10-19 16:30:09 +01:00
|
|
|
{
|
|
|
|
|
return Object.keys(this.objects).length;
|
|
|
|
|
}
|
|
|
|
|
|
- Add "GET" method to Caps
- New events: ObjectPhysicsDataEvent, ParcelPropertiesEvent, NewObjectEvent, ObjectUpdateEvent, ObjectKilledEvent
- Added getXML function to Color4, Vector2, Vector3, Vector4, GameObject, Region, Quaternion, UUID for opensim-compatible XML export
- Added TextureAnim and ParticleSystem decoding to the "full" ObjectStore
- Object store will automatically request missing "parent" prims
- "setPersist" - When persist is TRUE, the ObjectStore will not forget about "killed" prims - useful for region scanning
- Support for Flexible params, Light params, LightImage params, Mesh data, Sculpt maps
- Fixed object scale being incorrectly calculated
- Add terrain decoding (this was a ballache)
- Add parcel map decoding
- Add support for region windlight settings (region.environment)
- Add support for materials (normal / specular maps)
- Add getBuffer, getLong and bitwiseOr to UUID
- Added a circular-reference-safe JSONStringify to Utils
- Add XferFile capability to Circuit
PUBLIC API:
AssetCommands:
- Rework "downloadAsset" to detect failures
- NEW: downloadInventoryAsset() - uses TransferRequest for prim inventory items
- NEW: getMaterials() - resolves material UUIDs
RegionCommands:
- NEW: getTerrainTextures()
- NEW: exportSettings() - OpenSim XML export of region settings
- NEW: async getTerrain() - Get binary terrain heightmap, 256x256 float32
- resolveObjects() - now fetches task inventory contents too.
- resolveObjects() - fix calculation of land impact
- NEW: getObjectByLocalID(localID: number, timeout: number)
- NEW: getObjectByUUID(uuid: UUID, timeout: number)
- NEW: getParcels();
- NEW: pruneObjects - removes missing GameObjects from a list
- NEW: setPersist - prevent objectstore from forgetting about killed gameobjects
2018-10-31 11:28:24 +00:00
|
|
|
async getObjectsInArea(minX: number, maxX: number, minY: number, maxY: number, minZ: number, maxZ: number): Promise<GameObject[]>
|
2018-10-12 17:31:14 +01:00
|
|
|
{
|
2018-10-19 16:30:09 +01:00
|
|
|
if (!this.rtree)
|
|
|
|
|
{
|
|
|
|
|
throw new Error('GetObjectsInArea not available with the Lite object store');
|
|
|
|
|
}
|
|
|
|
|
const result = this.rtree.search({
|
|
|
|
|
minX: minX,
|
|
|
|
|
maxX: maxX,
|
|
|
|
|
minY: minY,
|
|
|
|
|
maxY: maxY,
|
|
|
|
|
minZ: minZ,
|
|
|
|
|
maxZ: maxZ
|
|
|
|
|
});
|
|
|
|
|
const found: {[key: string]: GameObject} = {};
|
|
|
|
|
const objs: GameObject[] = [];
|
|
|
|
|
for (const obj of result)
|
|
|
|
|
{
|
|
|
|
|
const o = obj as ITreeBoundingBox;
|
|
|
|
|
const go = o.gameObject as GameObject;
|
|
|
|
|
if (go.PCode !== PCode.Avatar && (go.IsAttachment === undefined || go.IsAttachment === false))
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
const parent = this.findParent(go);
|
- Add "GET" method to Caps
- New events: ObjectPhysicsDataEvent, ParcelPropertiesEvent, NewObjectEvent, ObjectUpdateEvent, ObjectKilledEvent
- Added getXML function to Color4, Vector2, Vector3, Vector4, GameObject, Region, Quaternion, UUID for opensim-compatible XML export
- Added TextureAnim and ParticleSystem decoding to the "full" ObjectStore
- Object store will automatically request missing "parent" prims
- "setPersist" - When persist is TRUE, the ObjectStore will not forget about "killed" prims - useful for region scanning
- Support for Flexible params, Light params, LightImage params, Mesh data, Sculpt maps
- Fixed object scale being incorrectly calculated
- Add terrain decoding (this was a ballache)
- Add parcel map decoding
- Add support for region windlight settings (region.environment)
- Add support for materials (normal / specular maps)
- Add getBuffer, getLong and bitwiseOr to UUID
- Added a circular-reference-safe JSONStringify to Utils
- Add XferFile capability to Circuit
PUBLIC API:
AssetCommands:
- Rework "downloadAsset" to detect failures
- NEW: downloadInventoryAsset() - uses TransferRequest for prim inventory items
- NEW: getMaterials() - resolves material UUIDs
RegionCommands:
- NEW: getTerrainTextures()
- NEW: exportSettings() - OpenSim XML export of region settings
- NEW: async getTerrain() - Get binary terrain heightmap, 256x256 float32
- resolveObjects() - now fetches task inventory contents too.
- resolveObjects() - fix calculation of land impact
- NEW: getObjectByLocalID(localID: number, timeout: number)
- NEW: getObjectByUUID(uuid: UUID, timeout: number)
- NEW: getParcels();
- NEW: pruneObjects - removes missing GameObjects from a list
- NEW: setPersist - prevent objectstore from forgetting about killed gameobjects
2018-10-31 11:28:24 +00:00
|
|
|
if (parent.PCode !== PCode.Avatar && (parent.IsAttachment === undefined || parent.IsAttachment === false) && parent.ParentID === 0)
|
2018-10-19 16:30:09 +01:00
|
|
|
{
|
|
|
|
|
const uuid = parent.FullID.toString();
|
|
|
|
|
|
|
|
|
|
if (found[uuid] === undefined)
|
|
|
|
|
{
|
|
|
|
|
found[uuid] = parent;
|
|
|
|
|
objs.push(parent);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
catch (error)
|
|
|
|
|
{
|
|
|
|
|
console.log('Failed to find parent for ' + go.FullID.toString());
|
|
|
|
|
console.error(error);
|
|
|
|
|
// Unable to find parent, full object probably not fully loaded yet
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Now populate children of each found object
|
|
|
|
|
for (const obj of objs)
|
|
|
|
|
{
|
|
|
|
|
this.populateChildren(obj);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return objs;
|
2018-10-12 17:31:14 +01:00
|
|
|
}
|
2018-10-16 16:46:58 +01:00
|
|
|
|
2018-10-19 16:30:09 +01:00
|
|
|
getObjectByUUID(fullID: UUID | string): GameObject
|
2018-10-16 16:46:58 +01:00
|
|
|
{
|
|
|
|
|
if (fullID instanceof UUID)
|
|
|
|
|
{
|
|
|
|
|
fullID = fullID.toString();
|
|
|
|
|
}
|
|
|
|
|
if (!this.objectsByUUID[fullID])
|
|
|
|
|
{
|
|
|
|
|
throw new Error('No object found with that UUID');
|
|
|
|
|
}
|
|
|
|
|
const localID: number = this.objectsByUUID[fullID];
|
|
|
|
|
return this.objects[localID];
|
|
|
|
|
}
|
|
|
|
|
|
2018-10-19 16:30:09 +01:00
|
|
|
getObjectByLocalID(localID: number): GameObject
|
2018-10-16 16:46:58 +01:00
|
|
|
{
|
|
|
|
|
if (!this.objects[localID])
|
|
|
|
|
{
|
|
|
|
|
throw new Error('No object found with that UUID');
|
|
|
|
|
}
|
|
|
|
|
return this.objects[localID];
|
|
|
|
|
}
|
2018-10-19 16:30:09 +01:00
|
|
|
|
|
|
|
|
insertIntoRtree(obj: GameObject)
|
|
|
|
|
{
|
|
|
|
|
if (!this.rtree)
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (obj.rtreeEntry !== undefined)
|
|
|
|
|
{
|
|
|
|
|
this.rtree.remove(obj.rtreeEntry);
|
|
|
|
|
}
|
|
|
|
|
if (!obj.Scale || !obj.Position || !obj.Rotation)
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
- Add "GET" method to Caps
- New events: ObjectPhysicsDataEvent, ParcelPropertiesEvent, NewObjectEvent, ObjectUpdateEvent, ObjectKilledEvent
- Added getXML function to Color4, Vector2, Vector3, Vector4, GameObject, Region, Quaternion, UUID for opensim-compatible XML export
- Added TextureAnim and ParticleSystem decoding to the "full" ObjectStore
- Object store will automatically request missing "parent" prims
- "setPersist" - When persist is TRUE, the ObjectStore will not forget about "killed" prims - useful for region scanning
- Support for Flexible params, Light params, LightImage params, Mesh data, Sculpt maps
- Fixed object scale being incorrectly calculated
- Add terrain decoding (this was a ballache)
- Add parcel map decoding
- Add support for region windlight settings (region.environment)
- Add support for materials (normal / specular maps)
- Add getBuffer, getLong and bitwiseOr to UUID
- Added a circular-reference-safe JSONStringify to Utils
- Add XferFile capability to Circuit
PUBLIC API:
AssetCommands:
- Rework "downloadAsset" to detect failures
- NEW: downloadInventoryAsset() - uses TransferRequest for prim inventory items
- NEW: getMaterials() - resolves material UUIDs
RegionCommands:
- NEW: getTerrainTextures()
- NEW: exportSettings() - OpenSim XML export of region settings
- NEW: async getTerrain() - Get binary terrain heightmap, 256x256 float32
- resolveObjects() - now fetches task inventory contents too.
- resolveObjects() - fix calculation of land impact
- NEW: getObjectByLocalID(localID: number, timeout: number)
- NEW: getObjectByUUID(uuid: UUID, timeout: number)
- NEW: getParcels();
- NEW: pruneObjects - removes missing GameObjects from a list
- NEW: setPersist - prevent objectstore from forgetting about killed gameobjects
2018-10-31 11:28:24 +00:00
|
|
|
const normalizedScale = new Vector3(obj.Scale).multiplyByQuat(new Quaternion(obj.Rotation));
|
|
|
|
|
|
2018-10-19 16:30:09 +01:00
|
|
|
const bounds: ITreeBoundingBox = {
|
|
|
|
|
minX: obj.Position.x - (normalizedScale.x / 2),
|
|
|
|
|
maxX: obj.Position.x + (normalizedScale.x / 2),
|
|
|
|
|
minY: obj.Position.y - (normalizedScale.y / 2),
|
|
|
|
|
maxY: obj.Position.y + (normalizedScale.y / 2),
|
|
|
|
|
minZ: obj.Position.z - (normalizedScale.z / 2),
|
|
|
|
|
maxZ: obj.Position.z + (normalizedScale.z / 2),
|
|
|
|
|
gameObject: obj
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
obj.rtreeEntry = bounds;
|
|
|
|
|
this.rtree.insert(bounds);
|
|
|
|
|
}
|
2017-11-30 04:11:59 +00:00
|
|
|
}
|