1
0
mirror of https://github.com/troisjs/trois.git synced 2024-11-23 20:02:32 +08:00

improve material

This commit is contained in:
Kevin Levron 2021-04-29 18:23:43 +02:00
parent 7f79759866
commit 73425177e5

View File

@ -1,5 +1,5 @@
import { defineComponent, InjectionKey, watch } from 'vue'
import { FrontSide, Material, Texture } from 'three'
import { defineComponent, InjectionKey, PropType, watch } from 'vue'
import { FrontSide, Material, NormalBlending, Texture } from 'three'
import { MeshInjectionKey, MeshInterface } from '../meshes/Mesh'
export interface MaterialSetupInterface {
@ -21,7 +21,8 @@ export default defineComponent({
mesh: MeshInjectionKey as symbol,
},
props: {
color: { type: [String, Number], default: '#ffffff' },
color: { type: [String, Number] as PropType<string | number>, default: '#ffffff' },
blending: { type: Number, default: NormalBlending },
alphaTest: { type: Number, default: 0 },
depthTest: { type: Boolean, default: true },
depthWrite: { type: Boolean, default: true },