MCPcopy Create free account
hub / github.com/galacean/engine / parse

Method parse

tests/src/loader/GLTFLoader.test.ts:41–355  ·  view source on GitHub ↗
(context: GLTFParserContext)

Source from the content-addressed store, hash-verified

39 @registerGLTFParser(GLTFParserType.Schema)
40 class GLTFCustomJSONParser extends GLTFParser {
41 parse(context: GLTFParserContext) {
42 const glTF = <any>{
43 buffers: [
44 {
45 byteLength: 1000
46 }
47 ],
48 bufferViews: [
49 {
50 buffer: 0,
51 byteLength: 1000
52 }
53 ],
54 accessors: [
55 {
56 bufferView: 0,
57 byteOffset: 0,
58 componentType: 5126,
59 count: 3,
60 max: [2.0],
61 min: [0.0],
62 type: "SCALAR",
63 normalized: true
64 },
65 {
66 bufferView: 0,
67 componentType: 5126,
68 count: 3,
69 type: "VEC3"
70 }
71 ],
72 images: [
73 {
74 bufferView: 0,
75 mimeType: "image/jpeg"
76 }
77 ],
78 textures: [
79 {
80 sampler: 0,
81 source: 0,
82 name: "test"
83 },
84 {
85 sampler: 0,
86 source: 0,
87 name: "test"
88 },
89 {
90 sampler: 0,
91 source: 0,
92 name: "test"
93 },
94 {
95 sampler: 0,
96 source: 0,
97 name: "test"
98 },

Callers 1

Calls 2

resolveMethod · 0.80
setMethod · 0.45

Tested by

no test coverage detected