sceneview-mcp 3.6.1 → 3.6.2

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 (2) hide show
  1. package/llms.txt +67 -5
  2. package/package.json +1 -1
package/llms.txt CHANGED
@@ -2,9 +2,9 @@
2
2
 
3
3
  SceneView is a declarative 3D and AR SDK for Android (Jetpack Compose, Filament, ARCore) and Apple platforms — iOS, macOS, visionOS (SwiftUI, RealityKit, ARKit) — with shared core logic via Kotlin Multiplatform. Each platform uses its native renderer: Filament on Android, RealityKit on Apple.
4
4
 
5
- **Android — Maven artifacts (version 3.6.0):**
6
- - 3D only: `io.github.sceneview:sceneview:3.6.1`
7
- - AR + 3D: `io.github.sceneview:arsceneview:3.6.1`
5
+ **Android — Maven artifacts (version 3.6.2):**
6
+ - 3D only: `io.github.sceneview:sceneview:3.6.2`
7
+ - AR + 3D: `io.github.sceneview:arsceneview:3.6.2`
8
8
 
9
9
  **Apple (iOS 17+ / macOS 14+ / visionOS 1+) — Swift Package:**
10
10
  - `https://github.com/sceneview/sceneview-swift.git` (from: "3.6.0")
@@ -18,8 +18,8 @@ SceneView is a declarative 3D and AR SDK for Android (Jetpack Compose, Filament,
18
18
  ### build.gradle (app module)
19
19
  ```kotlin
20
20
  dependencies {
21
- implementation("io.github.sceneview:sceneview:3.6.1") // 3D only
22
- implementation("io.github.sceneview:arsceneview:3.6.1") // AR (includes sceneview)
21
+ implementation("io.github.sceneview:sceneview:3.6.2") // 3D only
22
+ implementation("io.github.sceneview:arsceneview:3.6.2") // AR (includes sceneview)
23
23
  }
24
24
  ```
25
25
 
@@ -253,6 +253,7 @@ ModelNode class properties (available via `apply` block):
253
253
  - `setAnimationSpeed(index: Int, speed: Float)`
254
254
  - `scaleToUnitCube(units: Float = 1.0f)`
255
255
  - `centerOrigin(origin: Position = Position(0f, 0f, 0f))`
256
+ - `onFrameError: ((Exception) -> Unit)?` — callback for frame errors (default: logs via Log.e)
256
257
 
257
258
  ### LightNode — light source
258
259
  **CRITICAL: `apply` is a named parameter (`apply = { ... }`), NOT a trailing lambda.**
@@ -590,6 +591,26 @@ SceneView {
590
591
  }
591
592
  ```
592
593
 
594
+ ### DynamicSkyNode — time-of-day sun lighting
595
+
596
+ ```kotlin
597
+ @Composable fun SceneScope.DynamicSkyNode(
598
+ timeOfDay: Float = 12f, // 0-24: 0=midnight, 6=sunrise, 12=noon, 18=sunset
599
+ turbidity: Float = 2f, // atmospheric haze [1.0, 10.0]
600
+ sunIntensity: Float = 110_000f // lux at solar noon
601
+ )
602
+ ```
603
+
604
+ Creates a SUN light whose colour, intensity and direction update with `timeOfDay`.
605
+ Sun rises at 6h, peaks at 12h, sets at 18h. Colour: cool blue (night) → warm orange (horizon) → white-yellow (noon).
606
+
607
+ ```kotlin
608
+ SceneView {
609
+ DynamicSkyNode(timeOfDay = 14.5f)
610
+ ModelNode(modelInstance = instance!!)
611
+ }
612
+ ```
613
+
593
614
  ### SecondaryCamera — secondary camera (formerly CameraNode)
594
615
  ```kotlin
595
616
  @Composable fun SecondaryCamera(
@@ -1615,6 +1636,10 @@ collisionSystem.hitTest(ray: Ray): List<HitResult> // explicit ray
1615
1636
  // @Deprecated — use hitTest() instead
1616
1637
  @Deprecated collisionSystem.raycast(ray): HitResult? // → hitTest(ray).firstOrNull()
1617
1638
  @Deprecated collisionSystem.raycastAll(ray): List<HitResult> // → hitTest(ray)
1639
+
1640
+ // HitResult properties
1641
+ hitResult.node: Node // throws IllegalStateException if reset — use nodeOrNull for safe access
1642
+ hitResult.nodeOrNull: Node? // safe alternative — returns null instead of throwing
1618
1643
  ```
1619
1644
 
1620
1645
  ### Triangulation
@@ -2021,3 +2046,40 @@ SceneView Web (sceneview.js v3.6.0) — JavaScript API:
2021
2046
  | Desktop | Software renderer | Compose Desktop | `samples/desktop-demo` | Alpha |
2022
2047
  | Flutter | Filament/RealityKit | PlatformView | `samples/flutter-demo` | Alpha |
2023
2048
  | React Native | Filament/RealityKit | Fabric | `samples/react-native-demo` | Alpha |
2049
+
2050
+ ### Flutter Bridge API
2051
+ ```dart
2052
+ // 3D Scene
2053
+ SceneView(onTap: (nodeName) => print(nodeName))
2054
+ // AR Scene
2055
+ ARSceneView(onTap: (nodeName) => ..., onPlaneDetected: (planeType) => ...)
2056
+ // Model with rotation
2057
+ ModelNode(url: "model.glb", position: [0, 0, -2], scale: 1.0,
2058
+ rotationX: 45.0, rotationY: 0.0, rotationZ: 0.0)
2059
+ ```
2060
+
2061
+ ### React Native Bridge API
2062
+ ```tsx
2063
+ // 3D Scene with geometry + lights
2064
+ <SceneView
2065
+ modelNodes={[{ url: "model.glb", position: [0, 0, -2] }]}
2066
+ geometryNodes={[{ type: "cube", size: [1,1,1], color: "#FF0000", position: [0, 0.5, -2] }]}
2067
+ lightNodes={[{ type: "directional", intensity: 100000 }]}
2068
+ />
2069
+ // AR Scene
2070
+ <ARSceneView
2071
+ planeDetection={true}
2072
+ onTap={(e) => console.log(e.nativeEvent)}
2073
+ onPlaneDetected={(e) => console.log(e.nativeEvent)}
2074
+ />
2075
+ // Geometry types: "cube", "sphere", "cylinder", "plane"
2076
+ // Light types: "directional", "point", "spot"
2077
+ ```
2078
+
2079
+ ### Web Geometry DSL (Kotlin/JS)
2080
+ ```kotlin
2081
+ SceneView.create(canvas) {
2082
+ geometry { cube(); size(1.0, 1.0, 1.0); color(1.0, 0.0, 0.0, 1.0); position(0.0, 0.5, -2.0) }
2083
+ geometry { sphere(); radius(0.5); color(0.0, 0.5, 1.0, 1.0) }
2084
+ }
2085
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sceneview-mcp",
3
- "version": "3.6.1",
3
+ "version": "3.6.2",
4
4
  "mcpName": "io.github.sceneview/mcp",
5
5
  "description": "MCP server for SceneView — cross-platform 3D & AR SDK for Android and iOS. Give Claude the full SceneView SDK so it writes correct, compilable code.",
6
6
  "keywords": [