UNPKG

lingo3d

Version:

Lingo3D is a React/Vue 3d game development framework that ships with a complete visual editor

30 lines 1.02 kB
import { spawnPointDefaults, spawnPointSchema } from "../interface/ISpawnPoint"; import ObjectManager from "./core/ObjectManager"; import scene from "../engine/scene"; import HelperCylinder from "./core/utils/HelperCylinder"; import { getEditorHelper } from "../states/useEditorHelper"; class SpawnPoint extends ObjectManager { static componentName = "spawnPoint"; static defaults = spawnPointDefaults; static schema = spawnPointSchema; isSpawnPoint = true; constructor() { super(); this.createEffect(() => { if (!getEditorHelper() || this.$disableSceneGraph) return; const helper = new HelperCylinder(this); helper.height = 10; return () => { helper.dispose(); }; }, [getEditorHelper]); } append(child) { this.$appendNode(child); scene.add(child.outerObject3d); child.placeAt(this); } } export default SpawnPoint; //# sourceMappingURL=SpawnPoint.js.map