mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 03:59:50 +02:00
feat: i am sleepy
This commit is contained in:
1 parent
d0d28baee0
commit
b243b12d1c
1 file changed
+8
-5
@@ -165,6 +165,11 @@ export async function extractModel(
|
|||||||
|
|
||||||
components.forEach((component) => {
|
components.forEach((component) => {
|
||||||
switch (component['comp.typename']) {
|
switch (component['comp.typename']) {
|
||||||
|
case 'LodComponent':
|
||||||
|
// found and used later by transform component
|
||||||
|
// TODO: lod component always shows up before transform component; cache it before parsing transform
|
||||||
|
break;
|
||||||
|
|
||||||
case 'TransformComponent': {
|
case 'TransformComponent': {
|
||||||
const translation = new Vector3();
|
const translation = new Vector3();
|
||||||
const rotation = new Quaternion();
|
const rotation = new Quaternion();
|
||||||
@@ -323,12 +328,10 @@ export async function extractModel(
|
|||||||
}
|
}
|
||||||
|
|
||||||
default: {
|
default: {
|
||||||
const message = `Unhandled component type: ${component['comp.typename']}`;
|
|
||||||
|
|
||||||
if (ERROR_ON_UNKNOWN_COMPONENT) {
|
if (ERROR_ON_UNKNOWN_COMPONENT) {
|
||||||
throw new Error(message);
|
throw new Error(
|
||||||
} else {
|
`Unhandled component type: ${component['comp.typename']}`,
|
||||||
console.warn(`${message}; skipping...`);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user