Skip to content

Commit

Permalink
context menu doesn't spill over, camera transform avoids NaNs, produc…
Browse files Browse the repository at this point in the history
…er changes updated model version
  • Loading branch information
EliCDavis committed Jan 24, 2025
1 parent ec78696 commit 90470da
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 11 deletions.
1 change: 1 addition & 0 deletions generator/app_server_producer.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ func producerNameEndpoint(as *AppServer) endpoint.Handler {

as.app.Producers[req.Body] = ref

as.incModelVersion()
as.AutosaveGraph()

return nil
Expand Down
8 changes: 4 additions & 4 deletions generator/html/js/NodeFlow.js

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions generator/html/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,10 @@ class SchemaRefreshManager {

// progressiveSurfacemap.addObjectsToLightMap(objects);

if (firstTimeLoadingScene) {
if (firstTimeLoadingScene && isFinite(aabbWidth) && isFinite(aabbDepth) && isFinite(aabbHeight)) {
// console.log("Camera position intialized", aabbWidth, aabbDepth, aabbHeight);


firstTimeLoadingScene = false;

camera.position.y = (- mid + aabbHalfHeight) * (3 / 2);
Expand Down Expand Up @@ -356,7 +359,7 @@ class SchemaRefreshManager {
}

guassianSplatViewer = new GaussianSplats3D.Viewer(splatViewerOptions);

// getSplatCenter
guassianSplatViewer.addSplatScene(producerURL, {
// rotation: [1, 0, 0, 0],
Expand Down
7 changes: 4 additions & 3 deletions generator/html/js/node_manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export class NodeManager {
this.guiFolderData = {};
this.nodeIdToNode = new Map();
this.nodeTypeToLitePath = new Map();
this.producerTypes = new Map();
this.subscribers = [];
this.initializedNodeTypes = false
// this.registerSpecialParameterPolyformNodes();
Expand Down Expand Up @@ -34,7 +35,7 @@ export class NodeManager {
// console.log(nodeType, flowNode)

this.app.RequestManager.createNode(nodeType, (resp) => {
const isProducer = false;
const isProducer = this.producerTypes.get(nodeType);
const nodeID = resp.nodeID
const nodeData = resp.data;

Expand Down Expand Up @@ -122,7 +123,6 @@ export class NodeManager {
}

registerCustomNodeType(typeData) {
console.log(typeData)
const nodeConfig = {
title: camelCaseToWords(typeData.displayName),
subTitle: typeData.path,
Expand All @@ -143,6 +143,7 @@ export class NodeManager {
}

const isProducer = this.nodeTypeIsProducer(typeData);
this.producerTypes.set(typeData.type, isProducer);

if (typeData.outputs) {
typeData.outputs.forEach((o) => {
Expand Down Expand Up @@ -230,7 +231,7 @@ export class NodeManager {
} else {
const flowNode = this.newNode(nodeData);

const isProducer = this.nodeTypeIsProducer(this.findNodeTypeData(nodeData, newSchema));
const isProducer = this.producerTypes.get(nodeData.type);;
for (const [key, value] of Object.entries(newSchema.producers)) {
if (value.nodeID === nodeID) {
flowNode.setTitle(key);
Expand Down
4 changes: 2 additions & 2 deletions generator/html/server.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<script type="importmap">
{
"imports": {
"three": "https://unpkg.com/three@0.167.0/build/three.module.js",
"three/addons/": "https://unpkg.com/three@0.167.0/examples/jsm/",
"three": "https://unpkg.com/three@0.172.0/build/three.module.js",
"three/addons/": "https://unpkg.com/three@0.172.0/examples/jsm/",
"@mkkellogg/gaussian-splats-3d": "/js/gaussian-splats-3d.module.min.js",
"node": "/js/node.js",
"xr": "/js/xr.js",
Expand Down

0 comments on commit 90470da

Please sign in to comment.