@webspatial/platform-visionos 0.0.1
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.
- package/LICENSE +21 -0
- package/Packages/RealityKitContent/.build/workspace-state.json +7 -0
- package/Packages/RealityKitContent/.swiftpm/xcode/xcuserdata/bytedance.xcuserdatad/xcschemes/xcschememanagement.plist +14 -0
- package/Packages/RealityKitContent/Package.realitycomposerpro/ProjectData/main.json +11 -0
- package/Packages/RealityKitContent/Package.realitycomposerpro/WorkspaceData/SceneMetadataList.json +112 -0
- package/Packages/RealityKitContent/Package.realitycomposerpro/WorkspaceData/Settings.rcprojectdata +17 -0
- package/Packages/RealityKitContent/Package.swift +27 -0
- package/Packages/RealityKitContent/README.md +3 -0
- package/Packages/RealityKitContent/Sources/RealityKitContent/RealityKitContent.rkassets/Immersive.usda +50 -0
- package/Packages/RealityKitContent/Sources/RealityKitContent/RealityKitContent.rkassets/Materials/GridMaterial.usda +216 -0
- package/Packages/RealityKitContent/Sources/RealityKitContent/RealityKitContent.rkassets/Scene.usda +59 -0
- package/Packages/RealityKitContent/Sources/RealityKitContent/RealityKitContent.swift +4 -0
- package/package.json +27 -0
- package/web-spatial/Assets.xcassets/AppIcon.solidimagestack/Back.solidimagestacklayer/Content.imageset/Contents.json +12 -0
- package/web-spatial/Assets.xcassets/AppIcon.solidimagestack/Back.solidimagestacklayer/Contents.json +6 -0
- package/web-spatial/Assets.xcassets/AppIcon.solidimagestack/Contents.json +17 -0
- package/web-spatial/Assets.xcassets/AppIcon.solidimagestack/Front.solidimagestacklayer/Content.imageset/Contents.json +12 -0
- package/web-spatial/Assets.xcassets/AppIcon.solidimagestack/Front.solidimagestacklayer/Contents.json +6 -0
- package/web-spatial/Assets.xcassets/AppIcon.solidimagestack/Middle.solidimagestacklayer/Content.imageset/Contents.json +12 -0
- package/web-spatial/Assets.xcassets/AppIcon.solidimagestack/Middle.solidimagestacklayer/Contents.json +6 -0
- package/web-spatial/Assets.xcassets/Contents.json +6 -0
- package/web-spatial/Info.plist +33 -0
- package/web-spatial/Preview Content/Preview Assets.xcassets/Contents.json +6 -0
- package/web-spatial/libs/EventEmitter.swift +32 -0
- package/web-spatial/libs/SpatialComponent.swift +31 -0
- package/web-spatial/libs/SpatialEntity.swift +179 -0
- package/web-spatial/libs/SpatialInputComponent.swift +26 -0
- package/web-spatial/libs/SpatialMeshResource.swift +19 -0
- package/web-spatial/libs/SpatialModel3DComponent.swift +51 -0
- package/web-spatial/libs/SpatialModelComponent.swift +32 -0
- package/web-spatial/libs/SpatialObject.swift +144 -0
- package/web-spatial/libs/SpatialPhysicallyBasedMaterial.swift +19 -0
- package/web-spatial/libs/SpatialViewComponent.swift +15 -0
- package/web-spatial/libs/SpatialWindowComponent.swift +443 -0
- package/web-spatial/libs/SpatialWindowContainer.swift +149 -0
- package/web-spatial/libs/Utils/CommandManager.swift +800 -0
- package/web-spatial/libs/Utils/Logger.swift +36 -0
- package/web-spatial/libs/Utils/SceneManager.swift +108 -0
- package/web-spatial/libs/Utils/WindowContainerMgr.swift +117 -0
- package/web-spatial/libs/json/JsonParser.swift +52 -0
- package/web-spatial/libs/uiKitDelegate/Window.swift +34 -0
- package/web-spatial/libs/webView/UpdateSystem.swift +33 -0
- package/web-spatial/libs/webView/backend/NativeWebView.swift +319 -0
- package/web-spatial/libs/webView/manifest.swift +92 -0
- package/web-spatial/static-web/index.html +9 -0
- package/web-spatial/views/HideViewModifier.swift +17 -0
- package/web-spatial/views/ImmersiveView.swift +24 -0
- package/web-spatial/views/LoadingView.swift +29 -0
- package/web-spatial/views/MaterialWithBorderCornerModifier.swift +82 -0
- package/web-spatial/views/OpenDismissHandlerUI.swift +52 -0
- package/web-spatial/views/PlainWindowContainerView.swift +84 -0
- package/web-spatial/views/SpatialModel3DView.swift +193 -0
- package/web-spatial/views/SpatialViewUI.swift +168 -0
- package/web-spatial/views/SpatialWebViewUI.swift +193 -0
- package/web-spatial/views/VolumetricWindowContainerView.swift +38 -0
- package/web-spatial/views/ui/NavView.swift +125 -0
- package/web-spatial/web_spatialApp.swift +158 -0
- package/web-spatial.xcodeproj/project.pbxproj +686 -0
- package/web-spatial.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- package/web-spatial.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/web-spatial.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +5 -0
- package/web-spatial.xcodeproj/project.xcworkspace/xcuserdata/bytedance.xcuserdatad/WorkspaceSettings.xcsettings +14 -0
- package/web-spatial.xcodeproj/xcshareddata/xcschemes/web-spatial.xcscheme +115 -0
- package/web-spatialTests/web_spatialTests.swift +34 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Spatial Web
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,14 @@
|
|
|
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>SchemeUserState</key>
|
|
6
|
+
<dict>
|
|
7
|
+
<key>RealityKitContent.xcscheme_^#shared#^_</key>
|
|
8
|
+
<dict>
|
|
9
|
+
<key>orderHint</key>
|
|
10
|
+
<integer>1</integer>
|
|
11
|
+
</dict>
|
|
12
|
+
</dict>
|
|
13
|
+
</dict>
|
|
14
|
+
</plist>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"pathsToIds": {
|
|
3
|
+
"/RealityKitContent/Sources/RealityKitContent/RealityKitContent.rkassets/GridMaterial.usda": "CB766F92-EE55-4A63-9401-E7B8C009764D",
|
|
4
|
+
"/RealityKitContent/Sources/RealityKitContent/RealityKitContent.rkassets/Immersive.usda": "65F6F990-A780-4474-B78B-572E0E4E273D",
|
|
5
|
+
"/RealityKitContent/Sources/RealityKitContent/RealityKitContent.rkassets/Scene.usda": "0A9B4653-B11E-4D6A-850E-C6FCB621626C",
|
|
6
|
+
"/RealityKitContent/Sources/RealityKitContent/RealityKitContent.rkassets/Untitled Scene.usda": "D560BB77-AAF3-4BDE-B7C4-989332A4688B",
|
|
7
|
+
"RealityKitContent/Sources/RealityKitContent/RealityKitContent.rkassets/GridMaterial.usda": "66168B71-AB05-424E-8B6C-D33D6E61B08F",
|
|
8
|
+
"RealityKitContent/Sources/RealityKitContent/RealityKitContent.rkassets/Immersive.usda": "AF09ED6F-1707-48FD-8720-65B998362C09",
|
|
9
|
+
"RealityKitContent/Sources/RealityKitContent/RealityKitContent.rkassets/Scene.usda": "D66134B1-3681-4A8E-AFE5-29F257229F3B"
|
|
10
|
+
}
|
|
11
|
+
}
|
package/Packages/RealityKitContent/Package.realitycomposerpro/WorkspaceData/SceneMetadataList.json
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
{
|
|
2
|
+
"0A9B4653-B11E-4D6A-850E-C6FCB621626C": {
|
|
3
|
+
"cameraTransform": [
|
|
4
|
+
1, 0, 0, 0, 0, 0.86602545, -0.49999994, 0, 0, 0.49999994, 0.86602545, 0,
|
|
5
|
+
0.0035969093, 0.35542378, 0.62919164, 1
|
|
6
|
+
],
|
|
7
|
+
"objectMetadataList": [
|
|
8
|
+
["0A9B4653-B11E-4D6A-850E-C6FCB621626C", "Root"],
|
|
9
|
+
{
|
|
10
|
+
"isExpanded": true,
|
|
11
|
+
"isLocked": false
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
},
|
|
15
|
+
"65F6F990-A780-4474-B78B-572E0E4E273D": {
|
|
16
|
+
"cameraTransform": [
|
|
17
|
+
1, 0, -0, 0, -0, 0.86602545, -0.49999988, 0, 0, 0.49999988, 0.86602545, 0,
|
|
18
|
+
1.1972517e-8, 2.6179132, 0.43191218, 1
|
|
19
|
+
],
|
|
20
|
+
"objectMetadataList": [
|
|
21
|
+
["65F6F990-A780-4474-B78B-572E0E4E273D", "Root"],
|
|
22
|
+
{
|
|
23
|
+
"isExpanded": true,
|
|
24
|
+
"isLocked": false
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
"66168B71-AB05-424E-8B6C-D33D6E61B08F": {
|
|
29
|
+
"cameraTransform": [
|
|
30
|
+
1, 0, -0, 0, -0, 0.8660254, -0.5, 0, 0, 0.5, 0.8660254, 0, 0, 0.23875366,
|
|
31
|
+
0.4135335, 1
|
|
32
|
+
],
|
|
33
|
+
"objectMetadataList": [
|
|
34
|
+
["66168B71-AB05-424E-8B6C-D33D6E61B08F", "Root"],
|
|
35
|
+
{
|
|
36
|
+
"isExpanded": true,
|
|
37
|
+
"isLocked": false
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
|
+
},
|
|
41
|
+
"AF09ED6F-1707-48FD-8720-65B998362C09": {
|
|
42
|
+
"cameraTransform": [
|
|
43
|
+
1, 0, -0, 0, -0, 0.7071069, -0.7071067, 0, 0, 0.7071067, 0.7071069, 0, 0,
|
|
44
|
+
2.8836339, -0.107588194, 1
|
|
45
|
+
],
|
|
46
|
+
"objectMetadataList": [
|
|
47
|
+
["AF09ED6F-1707-48FD-8720-65B998362C09", "Root"],
|
|
48
|
+
{
|
|
49
|
+
"isExpanded": true,
|
|
50
|
+
"isLocked": false
|
|
51
|
+
},
|
|
52
|
+
["AF09ED6F-1707-48FD-8720-65B998362C09", "Root", "Sphere_Left"],
|
|
53
|
+
{
|
|
54
|
+
"isExpanded": true,
|
|
55
|
+
"isLocked": false
|
|
56
|
+
},
|
|
57
|
+
["AF09ED6F-1707-48FD-8720-65B998362C09", "Root", "Sphere_Right"],
|
|
58
|
+
{
|
|
59
|
+
"isExpanded": true,
|
|
60
|
+
"isLocked": false
|
|
61
|
+
}
|
|
62
|
+
]
|
|
63
|
+
},
|
|
64
|
+
"CB766F92-EE55-4A63-9401-E7B8C009764D": {
|
|
65
|
+
"cameraTransform": [
|
|
66
|
+
1, 0, -0, 0, -0, 0.8660253, -0.5000001, 0, 0, 0.5000001, 0.8660253, 0, 0,
|
|
67
|
+
0.27093494, 0.4692731, 1
|
|
68
|
+
],
|
|
69
|
+
"objectMetadataList": [
|
|
70
|
+
["CB766F92-EE55-4A63-9401-E7B8C009764D", "Root", "GridMaterial"],
|
|
71
|
+
{
|
|
72
|
+
"isExpanded": true,
|
|
73
|
+
"isLocked": false
|
|
74
|
+
},
|
|
75
|
+
["CB766F92-EE55-4A63-9401-E7B8C009764D", "Root"],
|
|
76
|
+
{
|
|
77
|
+
"isExpanded": true,
|
|
78
|
+
"isLocked": false
|
|
79
|
+
}
|
|
80
|
+
]
|
|
81
|
+
},
|
|
82
|
+
"D560BB77-AAF3-4BDE-B7C4-989332A4688B": {
|
|
83
|
+
"cameraTransform": [
|
|
84
|
+
1, 0, -0, 0, -0, 0.8660253, -0.5000001, 0, 0, 0.5000001, 0.8660253, 0, 0,
|
|
85
|
+
0.27093494, 0.4692731, 1
|
|
86
|
+
],
|
|
87
|
+
"objectMetadataList": []
|
|
88
|
+
},
|
|
89
|
+
"D66134B1-3681-4A8E-AFE5-29F257229F3B": {
|
|
90
|
+
"cameraTransform": [
|
|
91
|
+
1, 0, -0, 0, -0, 0.7071069, -0.7071067, 0, 0, 0.7071067, 0.7071069, 0, 0,
|
|
92
|
+
0.26894823, 0.26934713, 1
|
|
93
|
+
],
|
|
94
|
+
"objectMetadataList": [
|
|
95
|
+
[
|
|
96
|
+
"D66134B1-3681-4A8E-AFE5-29F257229F3B",
|
|
97
|
+
"Root",
|
|
98
|
+
"GridMaterial",
|
|
99
|
+
"GridMaterial"
|
|
100
|
+
],
|
|
101
|
+
{
|
|
102
|
+
"isExpanded": true,
|
|
103
|
+
"isLocked": false
|
|
104
|
+
},
|
|
105
|
+
["D66134B1-3681-4A8E-AFE5-29F257229F3B", "Root"],
|
|
106
|
+
{
|
|
107
|
+
"isExpanded": true,
|
|
108
|
+
"isLocked": false
|
|
109
|
+
}
|
|
110
|
+
]
|
|
111
|
+
}
|
|
112
|
+
}
|
package/Packages/RealityKitContent/Package.realitycomposerpro/WorkspaceData/Settings.rcprojectdata
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"cameraPresets" : {
|
|
3
|
+
|
|
4
|
+
},
|
|
5
|
+
"secondaryToolbarData" : {
|
|
6
|
+
"isGridVisible" : true,
|
|
7
|
+
"sceneReverbPreset" : -1
|
|
8
|
+
},
|
|
9
|
+
"unitDefaults" : {
|
|
10
|
+
"°" : "°",
|
|
11
|
+
"kg" : "g",
|
|
12
|
+
"m" : "cm",
|
|
13
|
+
"m\/s" : "m\/s",
|
|
14
|
+
"m\/s²" : "m\/s²",
|
|
15
|
+
"s" : "s"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// swift-tools-version:5.9
|
|
2
|
+
// The swift-tools-version declares the minimum version of Swift required to build this package.
|
|
3
|
+
|
|
4
|
+
import PackageDescription
|
|
5
|
+
|
|
6
|
+
let package = Package(
|
|
7
|
+
name: "RealityKitContent",
|
|
8
|
+
products: [
|
|
9
|
+
// Products define the executables and libraries a package produces, and make them visible to other packages.
|
|
10
|
+
.library(
|
|
11
|
+
name: "RealityKitContent",
|
|
12
|
+
targets: ["RealityKitContent"]
|
|
13
|
+
),
|
|
14
|
+
],
|
|
15
|
+
dependencies: [
|
|
16
|
+
// Dependencies declare other packages that this package depends on.
|
|
17
|
+
// .package(url: /* package url */, from: "1.0.0"),
|
|
18
|
+
],
|
|
19
|
+
targets: [
|
|
20
|
+
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
|
|
21
|
+
// Targets can depend on other targets in this package, and on products in packages this package depends on.
|
|
22
|
+
.target(
|
|
23
|
+
name: "RealityKitContent",
|
|
24
|
+
dependencies: []
|
|
25
|
+
),
|
|
26
|
+
]
|
|
27
|
+
)
|
|
@@ -0,0 +1,50 @@
|
|
|
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
|
+
|
|
@@ -0,0 +1,216 @@
|
|
|
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
|
+
|
package/Packages/RealityKitContent/Sources/RealityKitContent/RealityKitContent.rkassets/Scene.usda
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
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
|
+
|
package/package.json
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@webspatial/platform-visionos",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "Used to publish WebSpatial projects to Apple Vision Pro",
|
|
5
|
+
"type": "commonjs",
|
|
6
|
+
"engines": {
|
|
7
|
+
"node": ">=14.15.0"
|
|
8
|
+
},
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": ""
|
|
12
|
+
},
|
|
13
|
+
"files": [
|
|
14
|
+
"Packages",
|
|
15
|
+
"web-spatial",
|
|
16
|
+
"web-spatialTests",
|
|
17
|
+
"web-spatial.xcodeproj",
|
|
18
|
+
"package.json"
|
|
19
|
+
],
|
|
20
|
+
"author": "",
|
|
21
|
+
"license": "ISC",
|
|
22
|
+
"dependencies": {},
|
|
23
|
+
"devDependencies": {},
|
|
24
|
+
"publishConfig": {
|
|
25
|
+
"registry": "https://registry.npmjs.org"
|
|
26
|
+
}
|
|
27
|
+
}
|