|
@@ -1,27 +1,13 @@
|
|
-import { EnvironmentOptions, EnvironmentPresetsType } from './const'
|
|
|
|
-import { CubeTexture, Texture, TextureEncoding } from 'three'
|
|
|
|
-import { defineComponent, PropType } from 'vue'
|
|
|
|
|
|
+import { EnvironmentOptions } from './const'
|
|
|
|
+import { CubeTexture, Texture } from 'three'
|
|
|
|
+import { defineComponent } from 'vue'
|
|
|
|
|
|
import { useEnvironment } from '.'
|
|
import { useEnvironment } from '.'
|
|
|
|
|
|
-export const Environment = defineComponent({
|
|
|
|
|
|
+export const Environment = defineComponent<EnvironmentOptions>({
|
|
name: 'Environment',
|
|
name: 'Environment',
|
|
- props: {
|
|
|
|
- background: {
|
|
|
|
- type: Boolean,
|
|
|
|
- default: false,
|
|
|
|
- },
|
|
|
|
- blur: {
|
|
|
|
- type: Number,
|
|
|
|
- default: 0,
|
|
|
|
- },
|
|
|
|
- files: {
|
|
|
|
- type: [String, Array],
|
|
|
|
- },
|
|
|
|
- encoding: Object as PropType<TextureEncoding>,
|
|
|
|
- path: String,
|
|
|
|
- preset: Object as PropType<EnvironmentPresetsType>,
|
|
|
|
- },
|
|
|
|
|
|
+ props: ['background', 'blur', 'files', 'encoding', 'path', 'preset'] as unknown as undefined,
|
|
|
|
+
|
|
async setup(props, { expose }) {
|
|
async setup(props, { expose }) {
|
|
let texture: Texture | CubeTexture | null = null
|
|
let texture: Texture | CubeTexture | null = null
|
|
|
|
|