Skip to content

Commit

Permalink
Improved memory usage in Rhodonite samples
Browse files Browse the repository at this point in the history
  • Loading branch information
cx20 committed Jun 23, 2024
1 parent 3eb1f77 commit 8222373
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions examples/rhodonite/oimo/domino/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ function getRgbColor( c )

const load = async function() {
Rn.Config.maxCameraNumber = 20;
Rn.Config.dataTextureWidth = 2 ** 9; // default: 2 ** 11;
Rn.Config.dataTextureHeight = 2 ** 9; // default: 2 ** 11;

await Rn.ModuleManager.getInstance().loadModule('webgl');
await Rn.ModuleManager.getInstance().loadModule('pbr');

Expand Down
3 changes: 3 additions & 0 deletions examples/rhodonite/oimo/minimum/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ import Rn from 'rhodonite';
const PHYSICS_SCALE = 1/10;

const load = async function() {
Rn.Config.dataTextureWidth = 2 ** 9; // default: 2 ** 11;
Rn.Config.dataTextureHeight = 2 ** 9; // default: 2 ** 11;

await Rn.ModuleManager.getInstance().loadModule('webgl');
await Rn.ModuleManager.getInstance().loadModule('pbr');
const c = document.getElementById('world');
Expand Down

0 comments on commit 8222373

Please sign in to comment.