Skip to content

Commit d6cf7c8

Browse files
committed
Revert "imp: support file field shortcuts"
This reverts commit 0e15051.
1 parent 8e1a5a4 commit d6cf7c8

File tree

2 files changed

+1
-39
lines changed

2 files changed

+1
-39
lines changed

src/client/components/Fields.js

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -449,41 +449,6 @@ export const fileKinds = {
449449
},
450450
}
451451

452-
export const fileRemaps = {
453-
avatar: field => {
454-
field.type = 'file'
455-
field.kind = 'avatar'
456-
},
457-
emote: field => {
458-
field.type = 'file'
459-
field.kind = 'emote'
460-
},
461-
model: field => {
462-
field.type = 'file'
463-
field.kind = 'model'
464-
},
465-
texture: field => {
466-
field.type = 'file'
467-
field.kind = 'texture'
468-
},
469-
image: field => {
470-
field.type = 'file'
471-
field.kind = 'image'
472-
},
473-
video: field => {
474-
field.type = 'file'
475-
field.kind = 'video'
476-
},
477-
hdr: field => {
478-
field.type = 'file'
479-
field.kind = 'hdr'
480-
},
481-
audio: field => {
482-
field.type = 'file'
483-
field.kind = 'audio'
484-
},
485-
}
486-
487452
export function FieldFile({ world, label, hint, kind: kindName, value, onChange }) {
488453
const { setHint } = useContext(HintContext)
489454
const nRef = useRef(0)

src/core/systems/Apps.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import { getRef } from '../nodes/Node'
77
import { Layers } from '../extras/Layers'
88
import { ControlPriorities } from '../extras/ControlPriorities'
99
import { warn } from '../extras/warn'
10-
import { fileRemaps } from '../../client/components/Fields'
1110

1211
const isBrowser = typeof window !== 'undefined'
1312

@@ -332,11 +331,9 @@ export class Apps extends System {
332331
if (!isArray(entity.fields)) {
333332
entity.fields = []
334333
}
334+
// apply any initial values
335335
const props = entity.blueprint.props
336336
for (const field of entity.fields) {
337-
// apply file shortcuts
338-
fileRemaps[field.type]?.(field)
339-
// apply any initial values
340337
if (field.initial !== undefined && props[field.key] === undefined) {
341338
props[field.key] = field.initial
342339
}

0 commit comments

Comments
 (0)