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

Quick Fix in dev #1020

Merged
merged 3 commits into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 4 additions & 0 deletions fission/src/mirabuf/MirabufSceneObject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,10 @@ class MirabufSceneObject extends SceneObject {

return mesh
}

public GetRootNodeId(): Jolt.BodyID | undefined {
return this._mechanism.GetBodyByNodeId(this._mechanism.rootBody)
}
}

export async function CreateMirabuf(assembly: mirabuf.Assembly): Promise<MirabufSceneObject | null | undefined> {
Expand Down
3 changes: 1 addition & 2 deletions fission/src/systems/scene/SceneRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { TransformControls } from "three/examples/jsm/controls/TransformControls
import SceneObject from "./SceneObject"
import WorldSystem from "../WorldSystem"
import { OrbitControls } from "three/examples/jsm/controls/OrbitControls.js"
import MirabufSceneObject from "@/mirabuf/MirabufSceneObject"

import vertexShader from '@/shaders/vertex.glsl';
import fragmentShader from '@/shaders/fragment.glsl';
Expand Down Expand Up @@ -155,7 +154,7 @@ class SceneRenderer extends WorldSystem {
this.RemoveAllSceneObjects()
}

public RegisterSceneObject<T extends MirabufSceneObject>(obj: T): number {
public RegisterSceneObject<T extends SceneObject>(obj: T): number {
const id = nextSceneObjectId++
obj.id = id
this._sceneObjects.set(id, obj)
Expand Down
Loading