@webspatial/builder 0.0.9 → 0.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/dist/index.js +1 -1
  2. package/dist/lib/Cli.js +1 -1
  3. package/dist/lib/cmds/build.d.ts +1 -1
  4. package/dist/lib/cmds/build.js +1 -1
  5. package/dist/lib/cmds/check.js +1 -1
  6. package/dist/lib/cmds/help.js +1 -1
  7. package/dist/lib/cmds/version.js +1 -1
  8. package/dist/lib/pwa/config.js +1 -1
  9. package/dist/lib/pwa/index.js +1 -1
  10. package/dist/lib/pwa/validate.js +1 -1
  11. package/dist/lib/resource/file.js +1 -1
  12. package/dist/lib/resource/imageHelper.js +1 -1
  13. package/dist/lib/resource/index.d.ts +10 -3
  14. package/dist/lib/resource/index.js +1 -1
  15. package/dist/lib/resource/load.js +1 -1
  16. package/dist/lib/utils/CustomError.js +1 -1
  17. package/dist/lib/utils/FetchUtils-1.js +1 -1
  18. package/dist/lib/utils/Log.js +1 -1
  19. package/dist/lib/utils/fetch.js +1 -1
  20. package/dist/lib/utils/messages.js +1 -1
  21. package/dist/lib/utils/utils.d.ts +9 -0
  22. package/dist/lib/utils/utils.js +1 -1
  23. package/dist/lib/xcode/index.js +1 -1
  24. package/dist/lib/xcode/manifestSwiftTemplate.d.ts +1 -1
  25. package/dist/lib/xcode/manifestSwiftTemplate.js +1 -1
  26. package/dist/lib/xcode/xcodebuild.js +1 -1
  27. package/dist/lib/xcode/xcodeproject.js +1 -1
  28. package/dist/lib/xcode/xcrun.js +1 -1
  29. package/package.json +3 -2
  30. package/template/visionOSApp/Packages/RealityKitContent/.build/workspace-state.json +0 -7
  31. package/template/visionOSApp/Packages/RealityKitContent/.swiftpm/xcode/xcuserdata/bytedance.xcuserdatad/xcschemes/xcschememanagement.plist +0 -14
  32. package/template/visionOSApp/Packages/RealityKitContent/Package.realitycomposerpro/ProjectData/main.json +0 -11
  33. package/template/visionOSApp/Packages/RealityKitContent/Package.realitycomposerpro/WorkspaceData/SceneMetadataList.json +0 -112
  34. package/template/visionOSApp/Packages/RealityKitContent/Package.realitycomposerpro/WorkspaceData/Settings.rcprojectdata +0 -17
  35. package/template/visionOSApp/Packages/RealityKitContent/Package.swift +0 -27
  36. package/template/visionOSApp/Packages/RealityKitContent/README.md +0 -3
  37. package/template/visionOSApp/Packages/RealityKitContent/Sources/RealityKitContent/RealityKitContent.rkassets/Immersive.usda +0 -50
  38. package/template/visionOSApp/Packages/RealityKitContent/Sources/RealityKitContent/RealityKitContent.rkassets/Materials/GridMaterial.usda +0 -216
  39. package/template/visionOSApp/Packages/RealityKitContent/Sources/RealityKitContent/RealityKitContent.rkassets/Scene.usda +0 -59
  40. package/template/visionOSApp/Packages/RealityKitContent/Sources/RealityKitContent/RealityKitContent.swift +0 -4
  41. package/template/visionOSApp/web-spatial/Assets.xcassets/AppIcon.solidimagestack/Back.solidimagestacklayer/Content.imageset/Contents.json +0 -12
  42. package/template/visionOSApp/web-spatial/Assets.xcassets/AppIcon.solidimagestack/Back.solidimagestacklayer/Contents.json +0 -6
  43. package/template/visionOSApp/web-spatial/Assets.xcassets/AppIcon.solidimagestack/Contents.json +0 -17
  44. package/template/visionOSApp/web-spatial/Assets.xcassets/AppIcon.solidimagestack/Front.solidimagestacklayer/Content.imageset/Contents.json +0 -12
  45. package/template/visionOSApp/web-spatial/Assets.xcassets/AppIcon.solidimagestack/Front.solidimagestacklayer/Contents.json +0 -6
  46. package/template/visionOSApp/web-spatial/Assets.xcassets/AppIcon.solidimagestack/Middle.solidimagestacklayer/Content.imageset/Contents.json +0 -12
  47. package/template/visionOSApp/web-spatial/Assets.xcassets/AppIcon.solidimagestack/Middle.solidimagestacklayer/Contents.json +0 -6
  48. package/template/visionOSApp/web-spatial/Assets.xcassets/Contents.json +0 -6
  49. package/template/visionOSApp/web-spatial/Info.plist +0 -33
  50. package/template/visionOSApp/web-spatial/Preview Content/Preview Assets.xcassets/Contents.json +0 -6
  51. package/template/visionOSApp/web-spatial/libs/EventEmitter.swift +0 -32
  52. package/template/visionOSApp/web-spatial/libs/SpatialComponent.swift +0 -31
  53. package/template/visionOSApp/web-spatial/libs/SpatialEntity.swift +0 -179
  54. package/template/visionOSApp/web-spatial/libs/SpatialInputComponent.swift +0 -26
  55. package/template/visionOSApp/web-spatial/libs/SpatialMeshResource.swift +0 -19
  56. package/template/visionOSApp/web-spatial/libs/SpatialModel3DComponent.swift +0 -51
  57. package/template/visionOSApp/web-spatial/libs/SpatialModelComponent.swift +0 -32
  58. package/template/visionOSApp/web-spatial/libs/SpatialObject.swift +0 -144
  59. package/template/visionOSApp/web-spatial/libs/SpatialPhysicallyBasedMaterial.swift +0 -19
  60. package/template/visionOSApp/web-spatial/libs/SpatialViewComponent.swift +0 -15
  61. package/template/visionOSApp/web-spatial/libs/SpatialWindowComponent.swift +0 -420
  62. package/template/visionOSApp/web-spatial/libs/SpatialWindowContainer.swift +0 -149
  63. package/template/visionOSApp/web-spatial/libs/Utils/CommandManager.swift +0 -800
  64. package/template/visionOSApp/web-spatial/libs/Utils/Logger.swift +0 -36
  65. package/template/visionOSApp/web-spatial/libs/Utils/SceneManager.swift +0 -108
  66. package/template/visionOSApp/web-spatial/libs/Utils/WindowContainerMgr.swift +0 -113
  67. package/template/visionOSApp/web-spatial/libs/json/JsonParser.swift +0 -52
  68. package/template/visionOSApp/web-spatial/libs/uiKitDelegate/Window.swift +0 -34
  69. package/template/visionOSApp/web-spatial/libs/webView/UpdateSystem.swift +0 -33
  70. package/template/visionOSApp/web-spatial/libs/webView/backend/NativeWebView.swift +0 -319
  71. package/template/visionOSApp/web-spatial/libs/webView/manifest.swift +0 -92
  72. package/template/visionOSApp/web-spatial/static-web/index.html +0 -9
  73. package/template/visionOSApp/web-spatial/views/HideViewModifier.swift +0 -17
  74. package/template/visionOSApp/web-spatial/views/ImmersiveView.swift +0 -24
  75. package/template/visionOSApp/web-spatial/views/LoadingView.swift +0 -25
  76. package/template/visionOSApp/web-spatial/views/MaterialWithBorderCornerModifier.swift +0 -82
  77. package/template/visionOSApp/web-spatial/views/OpenDismissHandlerUI.swift +0 -52
  78. package/template/visionOSApp/web-spatial/views/PlainWindowContainerView.swift +0 -84
  79. package/template/visionOSApp/web-spatial/views/SpatialModel3DView.swift +0 -193
  80. package/template/visionOSApp/web-spatial/views/SpatialViewUI.swift +0 -168
  81. package/template/visionOSApp/web-spatial/views/SpatialWebViewUI.swift +0 -186
  82. package/template/visionOSApp/web-spatial/views/VolumetricWindowContainerView.swift +0 -38
  83. package/template/visionOSApp/web-spatial/views/ui/NavView.swift +0 -125
  84. package/template/visionOSApp/web-spatial/web_spatialApp.swift +0 -158
  85. package/template/visionOSApp/web-spatial.xcodeproj/project.pbxproj +0 -686
  86. package/template/visionOSApp/web-spatial.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
  87. package/template/visionOSApp/web-spatial.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
  88. package/template/visionOSApp/web-spatial.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +0 -5
  89. package/template/visionOSApp/web-spatial.xcodeproj/project.xcworkspace/xcuserdata/bytedance.xcuserdatad/WorkspaceSettings.xcsettings +0 -14
  90. package/template/visionOSApp/web-spatial.xcodeproj/xcshareddata/xcschemes/web-spatial.xcscheme +0 -115
  91. package/template/visionOSApp/web-spatial.xcodeproj/xcuserdata/bytedance.xcuserdatad/xcschemes/xcschememanagement.plist +0 -27
  92. package/template/visionOSApp/web-spatialTests/web_spatialTests.swift +0 -34
@@ -1,50 +0,0 @@
1
- #usda 1.0
2
- (
3
- defaultPrim = "Root"
4
- metersPerUnit = 1
5
- upAxis = "Y"
6
- )
7
-
8
- def Xform "Root"
9
- {
10
- reorder nameChildren = ["Sphere_Left", "Sphere_Right", "GridMaterial"]
11
- def Sphere "Sphere_Right" (
12
- active = true
13
- prepend apiSchemas = ["MaterialBindingAPI"]
14
- )
15
- {
16
- rel material:binding = </Root/GridMaterial/GridMaterial> (
17
- bindMaterialAs = "weakerThanDescendants"
18
- )
19
- double radius = 0.1
20
- quatf xformOp:orient = (1, 0, 0, 0)
21
- float3 xformOp:scale = (1, 1, 1)
22
- float3 xformOp:translate = (0.5, 1.5, -1.5)
23
- uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"]
24
- }
25
-
26
- def Sphere "Sphere_Left" (
27
- active = true
28
- prepend apiSchemas = ["MaterialBindingAPI"]
29
- )
30
- {
31
- rel material:binding = </Root/GridMaterial/GridMaterial> (
32
- bindMaterialAs = "weakerThanDescendants"
33
- )
34
- double radius = 0.1
35
- quatf xformOp:orient = (1, 0, 0, 0)
36
- float3 xformOp:scale = (1, 1, 1)
37
- float3 xformOp:translate = (-0.5, 1.5, -1.5)
38
- uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"]
39
- }
40
-
41
- def "GridMaterial" (
42
- active = true
43
- prepend references = @Materials/GridMaterial.usda@
44
- )
45
- {
46
- float3 xformOp:scale = (1, 1, 1)
47
- uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"]
48
- }
49
- }
50
-
@@ -1,216 +0,0 @@
1
- #usda 1.0
2
- (
3
- defaultPrim = "Root"
4
- metersPerUnit = 1
5
- upAxis = "Y"
6
- )
7
-
8
- def Xform "Root"
9
- {
10
- def Material "GridMaterial"
11
- {
12
- reorder nameChildren = ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "DefaultSurfaceShader", "MaterialXPreviewSurface", "Texcoord", "Add", "Multiply", "Fractional", "LineCounts", "Multiply_1", "Separate2", "Separate2_1", "Ifgreater", "Ifgreater_1", "Max", "Background_Color"]
13
- token outputs:mtlx:surface.connect = </Root/GridMaterial/MaterialXPreviewSurface.outputs:out>
14
- token outputs:realitykit:vertex
15
- token outputs:surface
16
- float2 ui:nodegraph:realitykit:subgraphOutputs:pos = (2222, 300.5)
17
- float2 ui:nodegraph:realitykit:subgraphOutputs:size = (182, 89)
18
- int ui:nodegraph:realitykit:subgraphOutputs:stackingOrder = 749
19
-
20
- def Shader "DefaultSurfaceShader"
21
- {
22
- uniform token info:id = "UsdPreviewSurface"
23
- color3f inputs:diffuseColor = (1, 1, 1)
24
- float inputs:roughness = 0.75
25
- token outputs:surface
26
- }
27
-
28
- def Shader "MaterialXPreviewSurface"
29
- {
30
- uniform token info:id = "ND_UsdPreviewSurface_surfaceshader"
31
- float inputs:clearcoat
32
- float inputs:clearcoatRoughness
33
- color3f inputs:diffuseColor.connect = </Root/GridMaterial/Remap.outputs:out>
34
- color3f inputs:emissiveColor
35
- float inputs:ior
36
- float inputs:metallic = 0.15
37
- float3 inputs:normal
38
- float inputs:occlusion
39
- float inputs:opacity
40
- float inputs:opacityThreshold
41
- float inputs:roughness = 0.5
42
- token outputs:out
43
- float2 ui:nodegraph:node:pos = (1967, 300.5)
44
- float2 ui:nodegraph:node:size = (208, 297)
45
- int ui:nodegraph:node:stackingOrder = 870
46
- string[] ui:nodegraph:realitykit:node:attributesShowingChildren = ["Advanced"]
47
- }
48
-
49
- def Shader "Texcoord"
50
- {
51
- uniform token info:id = "ND_texcoord_vector2"
52
- float2 outputs:out
53
- float2 ui:nodegraph:node:pos = (94.14453, 35.29297)
54
- float2 ui:nodegraph:node:size = (182, 43)
55
- int ui:nodegraph:node:stackingOrder = 1358
56
- }
57
-
58
- def Shader "Multiply"
59
- {
60
- uniform token info:id = "ND_multiply_vector2"
61
- float2 inputs:in1.connect = </Root/GridMaterial/Texcoord.outputs:out>
62
- float2 inputs:in2 = (32, 15)
63
- float2 inputs:in2.connect = </Root/GridMaterial/LineCounts.outputs:out>
64
- float2 outputs:out
65
- float2 ui:nodegraph:node:pos = (275.64453, 47.29297)
66
- float2 ui:nodegraph:node:size = (61, 36)
67
- int ui:nodegraph:node:stackingOrder = 1348
68
- string[] ui:nodegraph:realitykit:node:attributesShowingChildren = ["inputs:in2"]
69
- }
70
-
71
- def Shader "Fractional"
72
- {
73
- uniform token info:id = "ND_realitykit_fractional_vector2"
74
- float2 inputs:in.connect = </Root/GridMaterial/Multiply.outputs:out>
75
- float2 outputs:out
76
- float2 ui:nodegraph:node:pos = (440.5, 49.5)
77
- float2 ui:nodegraph:node:size = (155, 99)
78
- int ui:nodegraph:node:stackingOrder = 1345
79
- }
80
-
81
- def Shader "BaseColor"
82
- {
83
- uniform token info:id = "ND_constant_color3"
84
- color3f inputs:value = (0.89737034, 0.89737034, 0.89737034) (
85
- colorSpace = "Input - Texture - sRGB - sRGB"
86
- )
87
- color3f inputs:value.connect = None
88
- color3f outputs:out
89
- float2 ui:nodegraph:node:pos = (1537.5977, 363.07812)
90
- float2 ui:nodegraph:node:size = (150, 43)
91
- int ui:nodegraph:node:stackingOrder = 1353
92
- }
93
-
94
- def Shader "LineColor"
95
- {
96
- uniform token info:id = "ND_constant_color3"
97
- color3f inputs:value = (0.55945957, 0.55945957, 0.55945957) (
98
- colorSpace = "Input - Texture - sRGB - sRGB"
99
- )
100
- color3f inputs:value.connect = None
101
- color3f outputs:out
102
- float2 ui:nodegraph:node:pos = (1536.9844, 287.86328)
103
- float2 ui:nodegraph:node:size = (146, 43)
104
- int ui:nodegraph:node:stackingOrder = 1355
105
- }
106
-
107
- def Shader "LineWidths"
108
- {
109
- uniform token info:id = "ND_combine2_vector2"
110
- float inputs:in1 = 0.1
111
- float inputs:in2 = 0.1
112
- float2 outputs:out
113
- float2 ui:nodegraph:node:pos = (443.64453, 233.79297)
114
- float2 ui:nodegraph:node:size = (151, 43)
115
- int ui:nodegraph:node:stackingOrder = 1361
116
- }
117
-
118
- def Shader "LineCounts"
119
- {
120
- uniform token info:id = "ND_combine2_vector2"
121
- float inputs:in1 = 24
122
- float inputs:in2 = 12
123
- float2 outputs:out
124
- float2 ui:nodegraph:node:pos = (94.14453, 138.29297)
125
- float2 ui:nodegraph:node:size = (153, 43)
126
- int ui:nodegraph:node:stackingOrder = 1359
127
- }
128
-
129
- def Shader "Remap"
130
- {
131
- uniform token info:id = "ND_remap_color3"
132
- color3f inputs:in.connect = </Root/GridMaterial/Combine3.outputs:out>
133
- color3f inputs:inhigh.connect = None
134
- color3f inputs:inlow.connect = None
135
- color3f inputs:outhigh.connect = </Root/GridMaterial/BaseColor.outputs:out>
136
- color3f inputs:outlow.connect = </Root/GridMaterial/LineColor.outputs:out>
137
- color3f outputs:out
138
- float2 ui:nodegraph:node:pos = (1755.5, 300.5)
139
- float2 ui:nodegraph:node:size = (95, 171)
140
- int ui:nodegraph:node:stackingOrder = 1282
141
- string[] ui:nodegraph:realitykit:node:attributesShowingChildren = ["inputs:outlow"]
142
- }
143
-
144
- def Shader "Separate2"
145
- {
146
- uniform token info:id = "ND_separate2_vector2"
147
- float2 inputs:in.connect = </Root/GridMaterial/Range.outputs:out>
148
- float outputs:outx
149
- float outputs:outy
150
- float2 ui:nodegraph:node:pos = (1212.6445, 128.91797)
151
- float2 ui:nodegraph:node:size = (116, 117)
152
- int ui:nodegraph:node:stackingOrder = 1363
153
- }
154
-
155
- def Shader "Combine3"
156
- {
157
- uniform token info:id = "ND_combine3_color3"
158
- float inputs:in1.connect = </Root/GridMaterial/Min.outputs:out>
159
- float inputs:in2.connect = </Root/GridMaterial/Min.outputs:out>
160
- float inputs:in3.connect = </Root/GridMaterial/Min.outputs:out>
161
- color3f outputs:out
162
- float2 ui:nodegraph:node:pos = (1578.1445, 128.91797)
163
- float2 ui:nodegraph:node:size = (146, 54)
164
- int ui:nodegraph:node:stackingOrder = 1348
165
- }
166
-
167
- def Shader "Range"
168
- {
169
- uniform token info:id = "ND_range_vector2"
170
- bool inputs:doclamp = 1
171
- float2 inputs:gamma = (2, 2)
172
- float2 inputs:in.connect = </Root/GridMaterial/Absval.outputs:out>
173
- float2 inputs:inhigh.connect = </Root/GridMaterial/LineWidths.outputs:out>
174
- float2 inputs:inlow = (0.02, 0.02)
175
- float2 inputs:outhigh
176
- float2 inputs:outlow
177
- float2 outputs:out
178
- float2 ui:nodegraph:node:pos = (990.64453, 128.91797)
179
- float2 ui:nodegraph:node:size = (98, 207)
180
- int ui:nodegraph:node:stackingOrder = 1364
181
- }
182
-
183
- def Shader "Subtract"
184
- {
185
- uniform token info:id = "ND_subtract_vector2"
186
- float2 inputs:in1.connect = </Root/GridMaterial/Fractional.outputs:out>
187
- float2 inputs:in2.connect = </Root/GridMaterial/LineWidths.outputs:out>
188
- float2 outputs:out
189
- float2 ui:nodegraph:node:pos = (612.64453, 87.04297)
190
- float2 ui:nodegraph:node:size = (63, 36)
191
- int ui:nodegraph:node:stackingOrder = 1348
192
- }
193
-
194
- def Shader "Absval"
195
- {
196
- uniform token info:id = "ND_absval_vector2"
197
- float2 inputs:in.connect = </Root/GridMaterial/Subtract.outputs:out>
198
- float2 outputs:out
199
- float2 ui:nodegraph:node:pos = (765.64453, 87.04297)
200
- float2 ui:nodegraph:node:size = (123, 43)
201
- int ui:nodegraph:node:stackingOrder = 1348
202
- }
203
-
204
- def Shader "Min"
205
- {
206
- uniform token info:id = "ND_min_float"
207
- float inputs:in1.connect = </Root/GridMaterial/Separate2.outputs:outx>
208
- float inputs:in2.connect = </Root/GridMaterial/Separate2.outputs:outy>
209
- float outputs:out
210
- float2 ui:nodegraph:node:pos = (1388.1445, 128.91797)
211
- float2 ui:nodegraph:node:size = (114, 36)
212
- int ui:nodegraph:node:stackingOrder = 1363
213
- }
214
- }
215
- }
216
-
@@ -1,59 +0,0 @@
1
- #usda 1.0
2
- (
3
- defaultPrim = "Root"
4
- metersPerUnit = 1
5
- upAxis = "Y"
6
- )
7
-
8
- def Xform "Root"
9
- {
10
- reorder nameChildren = ["GridMaterial", "Sphere"]
11
- rel material:binding = None (
12
- bindMaterialAs = "weakerThanDescendants"
13
- )
14
-
15
- def Sphere "Sphere" (
16
- active = true
17
- prepend apiSchemas = ["MaterialBindingAPI"]
18
- )
19
- {
20
- rel material:binding = </Root/GridMaterial/GridMaterial> (
21
- bindMaterialAs = "weakerThanDescendants"
22
- )
23
- double radius = 0.05
24
- quatf xformOp:orient = (1, 0, 0, 0)
25
- float3 xformOp:scale = (1, 1, 1)
26
- float3 xformOp:translate = (0, 0, 0.0004)
27
- uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"]
28
-
29
- def RealityKitComponent "Collider"
30
- {
31
- uint group = 1
32
- uniform token info:id = "RealityKit.Collider"
33
- uint mask = 4294967295
34
- token type = "Default"
35
-
36
- def RealityKitStruct "Shape"
37
- {
38
- float3 extent = (0.2, 0.2, 0.2)
39
- float radius = 0.05
40
- token shapeType = "Sphere"
41
- }
42
- }
43
-
44
- def RealityKitComponent "InputTarget"
45
- {
46
- uniform token info:id = "RealityKit.InputTarget"
47
- }
48
- }
49
-
50
- def "GridMaterial" (
51
- active = true
52
- prepend references = @Materials/GridMaterial.usda@
53
- )
54
- {
55
- float3 xformOp:scale = (1, 1, 1)
56
- uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"]
57
- }
58
- }
59
-
@@ -1,4 +0,0 @@
1
- import Foundation
2
-
3
- /// Bundle for the RealityKitContent project
4
- public let realityKitContentBundle = Bundle.module
@@ -1,12 +0,0 @@
1
- {
2
- "images": [
3
- {
4
- "idiom": "vision",
5
- "scale": "2x"
6
- }
7
- ],
8
- "info": {
9
- "author": "xcode",
10
- "version": 1
11
- }
12
- }
@@ -1,17 +0,0 @@
1
- {
2
- "info": {
3
- "author": "xcode",
4
- "version": 1
5
- },
6
- "layers": [
7
- {
8
- "filename": "Front.solidimagestacklayer"
9
- },
10
- {
11
- "filename": "Middle.solidimagestacklayer"
12
- },
13
- {
14
- "filename": "Back.solidimagestacklayer"
15
- }
16
- ]
17
- }
@@ -1,12 +0,0 @@
1
- {
2
- "images": [
3
- {
4
- "idiom": "vision",
5
- "scale": "2x"
6
- }
7
- ],
8
- "info": {
9
- "author": "xcode",
10
- "version": 1
11
- }
12
- }
@@ -1,12 +0,0 @@
1
- {
2
- "images": [
3
- {
4
- "idiom": "vision",
5
- "scale": "2x"
6
- }
7
- ],
8
- "info": {
9
- "author": "xcode",
10
- "version": 1
11
- }
12
- }
@@ -1,6 +0,0 @@
1
- {
2
- "info": {
3
- "version": 1,
4
- "author": "xcode"
5
- }
6
- }
@@ -1,33 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
- <plist version="1.0">
4
- <dict>
5
- <key>ITSAppUsesNonExemptEncryption</key>
6
- <false/>
7
- <key>CFBundleURLTypes</key>
8
- <array>
9
- <dict>
10
- <key>CFBundleURLName</key>
11
- <string>web-spatial</string>
12
- <key>CFBundleURLSchemes</key>
13
- <array>
14
- <string>web+spatial</string>
15
- </array>
16
- </dict>
17
- </array>
18
- <key>NSAppTransportSecurity</key>
19
- <dict>
20
- <key>NSAllowsArbitraryLoads</key>
21
- <true/>
22
- </dict>
23
- <key>UIApplicationSceneManifest</key>
24
- <dict>
25
- <key>UIApplicationPreferredDefaultSceneSessionRole</key>
26
- <string>UIWindowSceneSessionRoleApplication</string>
27
- <key>UIApplicationSupportsMultipleScenes</key>
28
- <true/>
29
- <key>UISceneConfigurations</key>
30
- <dict/>
31
- </dict>
32
- </dict>
33
- </plist>
@@ -1,6 +0,0 @@
1
- {
2
- "info": {
3
- "author": "xcode",
4
- "version": 1
5
- }
6
- }
@@ -1,32 +0,0 @@
1
- //
2
- // EventEmitter.swift
3
- // web-spatial
4
- //
5
- // Created by ByteDance on 9/10/24.
6
- //
7
-
8
- class EventEmitter {
9
- private var listeners: [String: [(_ object: Any, _ data: Any) -> Void]] = [:]
10
-
11
- public func on(event: String, listener: @escaping (_ object: Any, _ data: Any) -> Void) {
12
- if listeners[event] == nil {
13
- listeners[event] = []
14
- }
15
- listeners[event]?.append(listener)
16
- }
17
-
18
- public func emit(event: String, data: Any) {
19
- listeners[event]?.forEach { listener in
20
- listener(self, data)
21
- }
22
- }
23
-
24
- public func off(event: String, listener: @escaping (_ object: Any, _ data: Any) -> Void) {
25
- listeners[event]?.removeAll(where: { $0 as AnyObject === listener as AnyObject })
26
- }
27
-
28
- // protected function
29
- func reset() {
30
- listeners = [:]
31
- }
32
- }
@@ -1,31 +0,0 @@
1
- //
2
- // SpatialComponent.swift
3
- // web-spatial
4
- //
5
- // Created by ByteDance on 9/10/24.
6
- //
7
-
8
- import Foundation
9
-
10
- class SpatialComponent: SpatialObject {
11
- weak var entity: SpatialEntity? = nil
12
-
13
- func onAddToEntity() {}
14
-
15
- override func onDestroy() {
16
- entity = nil
17
- }
18
-
19
- override func inspect() -> [String: Any] {
20
- var inspectInfo: [String: Any] = [
21
- "entity": entity?.id,
22
- "type": String(describing: type(of: self)),
23
- ]
24
-
25
- let baseInspectInfo = super.inspect()
26
- for (key, value) in baseInspectInfo {
27
- inspectInfo[key] = value
28
- }
29
- return inspectInfo
30
- }
31
- }