|
@@ -2,25 +2,42 @@ import { defineComponent } from 'vue'
|
|
import { useGLTF } from '.'
|
|
import { useGLTF } from '.'
|
|
import { useCientos } from '../useCientos'
|
|
import { useCientos } from '../useCientos'
|
|
|
|
|
|
-export const GLTFModel = defineComponent({
|
|
|
|
|
|
+export interface GLTFModelProps {
|
|
|
|
+ /**
|
|
|
|
+ *
|
|
|
|
+ * The path to the GLTF file.
|
|
|
|
+ *
|
|
|
|
+ * @type {string}
|
|
|
|
+ * @required
|
|
|
|
+ * @memberof GLTFModelProps
|
|
|
|
+ *
|
|
|
|
+ **/
|
|
|
|
+ path: string
|
|
|
|
+ /**
|
|
|
|
+ *
|
|
|
|
+ * Whether to use Draco compression.
|
|
|
|
+ *
|
|
|
|
+ * @type {boolean}
|
|
|
|
+ * @default false
|
|
|
|
+ * @memberof GLTFModelProps
|
|
|
|
+ *
|
|
|
|
+ **/
|
|
|
|
+ draco?: boolean
|
|
|
|
+ /**
|
|
|
|
+ *
|
|
|
|
+ * The path to the Draco decoder.
|
|
|
|
+ *
|
|
|
|
+ * @type {string}
|
|
|
|
+ * @default 'https://www.gstatic.com/draco/versioned/decoders/1.4.1/'
|
|
|
|
+ * @memberof GLTFModelProps
|
|
|
|
+ *
|
|
|
|
+ **/
|
|
|
|
+ decoderPath?: string
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+export const GLTFModel = defineComponent<GLTFModelProps>({
|
|
name: 'GLTFModel',
|
|
name: 'GLTFModel',
|
|
- props: {
|
|
|
|
- /**
|
|
|
|
- * The path to the GLTF file.
|
|
|
|
- *
|
|
|
|
- */
|
|
|
|
- path: String,
|
|
|
|
- /**
|
|
|
|
- * Whether to use Draco compression.
|
|
|
|
- *
|
|
|
|
- */
|
|
|
|
- draco: Boolean,
|
|
|
|
- /**
|
|
|
|
- * The path to the Draco decoder.
|
|
|
|
- *
|
|
|
|
- */
|
|
|
|
- decoderPath: String,
|
|
|
|
- },
|
|
|
|
|
|
+ props: ['path', 'draco', 'decoderPath'] as unknown as undefined,
|
|
|
|
|
|
async setup(props, { expose }) {
|
|
async setup(props, { expose }) {
|
|
const { state } = useCientos()
|
|
const { state } = useCientos()
|