Skip to content

Commit

Permalink
prototype for central management of derivatives quality
Browse files Browse the repository at this point in the history
  • Loading branch information
sdumetz committed Dec 17, 2024
1 parent 4dcbe8b commit 5b845b6
Show file tree
Hide file tree
Showing 14 changed files with 157,612 additions and 116 deletions.
5 changes: 4 additions & 1 deletion libs/ff-scene/source/components/CRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

import { Mesh } from "three";
import * as constants from "three/src/constants";
import * as constants from "three/src/constants.js";

import Component, { Node, ITypedEvent, types } from "@ff/graph/Component";
import CPulse, { IPulseEvent } from "@ff/graph/components/CPulse";
Expand Down Expand Up @@ -66,6 +66,7 @@ export default class CRenderer extends Component
static readonly outs = {
maxTextureSize: types.Integer("Caps.MaxTextureSize"),
maxCubemapSize: types.Integer("Caps.MaxCubemapSize"),
framerate: types.Integer("Renderer.Framerate"),
};

ins = this.addInputs(CRenderer.ins);
Expand Down Expand Up @@ -221,7 +222,9 @@ export default class CRenderer extends Component

this.views.forEach(view => {
if(!view.renderer.xr.isPresenting) {
const start = (performance || Date).now();
view.render();
this.outs.framerate.value = this.outs.framerate.value *0.9 + 0.1*1000/((performance || Date).now() -start);
}
});

Expand Down
149 changes: 77 additions & 72 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions source/client/applications/coreTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ import NVNode from "../nodes/NVNode";
import CVAmbientLight from "client/components/lights/CVAmbientLight";
import CVHemisphereLight from "client/components/lights/CVHemisphereLight";
import CVRectLight from "client/components/lights/CVRectLight";
import CVDerivativesController from "client/components/CVDerivativesController";


////////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -129,6 +130,7 @@ const types = [
CVViewer,
CVReader,
CVOrbitNavigation,
CVDerivativesController,
CVBackground,
CVFloor,
CVGrid,
Expand Down
Loading

0 comments on commit 5b845b6

Please sign in to comment.