🧼 Removes embedded build flag
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
import { onDestroy, onMount } from 'svelte';
|
import { onDestroy, onMount } from 'svelte';
|
||||||
import { BufferGeometry, Line, LineBasicMaterial, Mesh, MeshBasicMaterial, Object3D, SphereGeometry, Vector3, type NormalBufferAttributes, type Object3DEventMap } from 'three';
|
import { BufferGeometry, Line, LineBasicMaterial, Mesh, MeshBasicMaterial, Object3D, SphereGeometry, Vector3, type NormalBufferAttributes, type Object3DEventMap } from 'three';
|
||||||
import { ModesEnum, kinematicData, mode, model, outControllerData, servoAnglesOut, servoAngles, mpu, jointNames } from '$lib/stores';
|
import { ModesEnum, kinematicData, mode, model, outControllerData, servoAnglesOut, servoAngles, mpu, jointNames } from '$lib/stores';
|
||||||
import { footColor, isEmbeddedApp, populateModelCache, throttler, toeWorldPositions } from '$lib/utilities';
|
import { footColor, populateModelCache, throttler, toeWorldPositions } from '$lib/utilities';
|
||||||
import SceneBuilder from '$lib/sceneBuilder';
|
import SceneBuilder from '$lib/sceneBuilder';
|
||||||
import { lerp, degToRad } from 'three/src/math/MathUtils';
|
import { lerp, degToRad } from 'three/src/math/MathUtils';
|
||||||
import { GUI } from 'three/addons/libs/lil-gui.module.min.js';
|
import { GUI } from 'three/addons/libs/lil-gui.module.min.js';
|
||||||
@@ -78,8 +78,8 @@
|
|||||||
onMount(async () => {
|
onMount(async () => {
|
||||||
await populateModelCache();
|
await populateModelCache();
|
||||||
await createScene();
|
await createScene();
|
||||||
if (!isEmbeddedApp && panel) createPanel();
|
|
||||||
servoAngles.subscribe(updateAnglesFromStore)
|
servoAngles.subscribe(updateAnglesFromStore)
|
||||||
|
if (!panel) createPanel();
|
||||||
});
|
});
|
||||||
|
|
||||||
onDestroy(() => {
|
onDestroy(() => {
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
import { writable } from 'svelte/store';
|
import { writable } from 'svelte/store';
|
||||||
import { browser } from '$app/environment';
|
import { browser } from '$app/environment';
|
||||||
|
|
||||||
export const isEmbeddedApp = import.meta.env.VITE_EMBEDDED_BUILD === 'true';
|
|
||||||
|
|
||||||
export const persistentStore = <T>(key: string, initialValue: T) => {
|
export const persistentStore = <T>(key: string, initialValue: T) => {
|
||||||
const savedValue = browser ? localStorage.getItem(key) : null;
|
const savedValue = browser ? localStorage.getItem(key) : null;
|
||||||
const data: T = savedValue !== null ? JSON.parse(savedValue) : initialValue;
|
const data: T = savedValue !== null ? JSON.parse(savedValue) : initialValue;
|
||||||
|
|||||||
Reference in New Issue
Block a user