Skip to content
This repository was archived by the owner on Jan 6, 2025. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/utilities/simulation.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@ import * as CursorShim from './shims/cursor';
* @class Simulation
* @param {Object} [config] Optional parameters.
* @param {Boolean} [config.auto=true] Automatically start the render loop.
* @param {Boolean} [config.profile=false] Enable profiling of serialization buffer memory usage.
* @param {Number} [config.initialSerializationBufferSize=1024] Size in bytes to initially expand serialization buffer by to optimize performance. (Minimum: 1,024 bytes, Maximum: 67,108,864 bytes)
* @memberof module:altspace/utilities
*/
class Simulation
{
constructor(config = {auto: true})
constructor(config = {auto: true, profile: false, initialSerializationBufferSize: 1024})
{
this._scene = null;
this._renderer = null;
Expand All @@ -37,7 +39,7 @@ class Simulation
else if (window.altspace && altspace.inClient)
{
this._scene = new THREE.Scene();
this._renderer = altspace.getThreeJSRenderer();
this._renderer = altspace.getThreeJSRenderer({profile: config.profile, initialSerializationBufferSize: config.initialSerializationBufferSize});
this._camera = new THREE.PerspectiveCamera(); // TODO: change from shim to symbolic
}
else {
Expand Down