Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support dynamic create/update of entities using gaussian_splatting #27

Open
arvind-iyer opened this issue Aug 7, 2024 · 2 comments
Open

Comments

@arvind-iyer
Copy link

arvind-iyer commented Aug 7, 2024

If I create and insert an element into the DOM using the gaussian_splatting component during run-time rather than at the beginning, it is not loaded into the scene since it only runs loadData(...) on page load.

Likewise, if I update the src attribute of an existing element, it will not immediately update the scene with the new splat, that needs loadData to be run manually somehow

@Kevin-Miao
Copy link

Kevin-Miao commented Dec 7, 2024

+1. Just curious if you have been able to find any workarounds.

@arvind-iyer
Copy link
Author

I think it might work if you add an update function to the component, something like this:

update: function(oldData) {
        this.loadData(this.el.sceneEl.camera.el.components.camera.camera, this.el.object3D, this.el.sceneEl.renderer, this.data.src);
	if (!!this.data.cutoutEntity) {
		this.cutout = this.data.cutoutEntity.object3D;
	}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants