sceneview-mcp 4.0.15 → 4.0.16
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/README.md +2 -2
- package/dist/generated/llms-txt.js +1 -1
- package/dist/generated/symbols.js +17 -1
- package/dist/generated/version.js +6 -2
- package/dist/guides.js +1 -1
- package/dist/platform-setup.js +121 -45
- package/package.json +1 -1
|
@@ -2321,7 +2321,8 @@ export const SYMBOLS = {
|
|
|
2321
2321
|
"setFrame",
|
|
2322
2322
|
"setSession",
|
|
2323
2323
|
"trackingState",
|
|
2324
|
-
"update"
|
|
2324
|
+
"update",
|
|
2325
|
+
"updateProjection"
|
|
2325
2326
|
]
|
|
2326
2327
|
},
|
|
2327
2328
|
"io.github.sceneview.ar.node.ARFogConfig": {
|
|
@@ -6823,6 +6824,9 @@ export const SYMBOLS = {
|
|
|
6823
6824
|
"HALF_PI": [
|
|
6824
6825
|
"sceneview-core"
|
|
6825
6826
|
],
|
|
6827
|
+
"NULL_ENTITY": [
|
|
6828
|
+
"sceneview"
|
|
6829
|
+
],
|
|
6826
6830
|
"PRIORITY_DEFAULT": [
|
|
6827
6831
|
"sceneview",
|
|
6828
6832
|
"sceneview-core"
|
|
@@ -7215,6 +7219,9 @@ export const SYMBOLS = {
|
|
|
7215
7219
|
"destroyGeometry": [
|
|
7216
7220
|
"sceneview"
|
|
7217
7221
|
],
|
|
7222
|
+
"destroyLight": [
|
|
7223
|
+
"sceneview"
|
|
7224
|
+
],
|
|
7218
7225
|
"destroyRenderable": [
|
|
7219
7226
|
"sceneview"
|
|
7220
7227
|
],
|
|
@@ -8030,6 +8037,9 @@ export const SYMBOLS = {
|
|
|
8030
8037
|
"renderableEntities": [
|
|
8031
8038
|
"sceneview"
|
|
8032
8039
|
],
|
|
8040
|
+
"renderableGeneration": [
|
|
8041
|
+
"sceneview"
|
|
8042
|
+
],
|
|
8033
8043
|
"renderableInstances": [
|
|
8034
8044
|
"sceneview"
|
|
8035
8045
|
],
|
|
@@ -8081,6 +8091,9 @@ export const SYMBOLS = {
|
|
|
8081
8091
|
"safeDestroyIndirectLight": [
|
|
8082
8092
|
"sceneview"
|
|
8083
8093
|
],
|
|
8094
|
+
"safeDestroyLight": [
|
|
8095
|
+
"sceneview"
|
|
8096
|
+
],
|
|
8084
8097
|
"safeDestroyMaterial": [
|
|
8085
8098
|
"sceneview"
|
|
8086
8099
|
],
|
|
@@ -8123,6 +8136,9 @@ export const SYMBOLS = {
|
|
|
8123
8136
|
"safeDestroyView": [
|
|
8124
8137
|
"sceneview"
|
|
8125
8138
|
],
|
|
8139
|
+
"safeRecycleEntity": [
|
|
8140
|
+
"sceneview"
|
|
8141
|
+
],
|
|
8126
8142
|
"scaleToFitUnits": [
|
|
8127
8143
|
"sceneview-core"
|
|
8128
8144
|
],
|
|
@@ -4,5 +4,9 @@
|
|
|
4
4
|
// build time so the MCP server, telemetry, and the install-snippet
|
|
5
5
|
// generators all report the actually-published versions instead of
|
|
6
6
|
// stale hardcoded constants. See #941.
|
|
7
|
-
export const PACKAGE_VERSION = "4.0.
|
|
8
|
-
export const LATEST_SCENEVIEW_RELEASE = "4.
|
|
7
|
+
export const PACKAGE_VERSION = "4.0.16";
|
|
8
|
+
export const LATEST_SCENEVIEW_RELEASE = "4.30.0";
|
|
9
|
+
// The pub.dev coordinate for `flutter_sceneview`, read from the plugin's
|
|
10
|
+
// README. Deliberately NOT LATEST_SCENEVIEW_RELEASE: pub.dev lags the SDK,
|
|
11
|
+
// and a caret range against an unpublished version cannot be resolved.
|
|
12
|
+
export const LATEST_FLUTTER_PUB_RELEASE = "4.24.0";
|
package/dist/guides.js
CHANGED
|
@@ -33,7 +33,7 @@ KMP shares **logic**, not **rendering**. Each platform uses its native renderer.
|
|
|
33
33
|
- **3D rendering** via Google Filament: PBR materials, HDR environments, glTF/GLB models, post-processing.
|
|
34
34
|
- **AR** via ARCore: plane detection, hit testing, anchors, cloud anchors, augmented images, depth, light estimation, point cloud.
|
|
35
35
|
- **Compose-native DSL**: all nodes are \`@Composable\` functions inside \`SceneView { }\` or \`ARSceneView { }\`.
|
|
36
|
-
- **
|
|
36
|
+
- **46+ node types**: ModelNode, LightNode, AnchorNode, CameraNode, TextNode, PathNode, ViewNode, PlaneNode, SphereNode, CylinderNode, CubeNode, DynamicSkyNode, FogNode, ReflectionProbeNode, PhysicsNode, BillboardNode, LineNode, and more.
|
|
37
37
|
|
|
38
38
|
## Apple — Alpha (SceneViewSwift)
|
|
39
39
|
|
package/dist/platform-setup.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Setup guides for every supported SceneView platform.
|
|
5
5
|
* Consolidates Android, iOS, Web, Flutter, React Native, Desktop, and TV.
|
|
6
6
|
*/
|
|
7
|
-
import { LATEST_SCENEVIEW_RELEASE } from "./generated/version.js";
|
|
7
|
+
import { LATEST_FLUTTER_PUB_RELEASE, LATEST_SCENEVIEW_RELEASE } from "./generated/version.js";
|
|
8
8
|
export const PLATFORM_IDS = ["android", "ios", "web", "flutter", "react-native", "desktop", "tv"];
|
|
9
9
|
const ANDROID_3D = `## SceneView Android — 3D Setup
|
|
10
10
|
|
|
@@ -421,7 +421,7 @@ SceneView Flutter uses **PlatformView** to embed native SceneView (Android: Fila
|
|
|
421
421
|
\`\`\`yaml
|
|
422
422
|
# pubspec.yaml
|
|
423
423
|
dependencies:
|
|
424
|
-
flutter_sceneview: ^${
|
|
424
|
+
flutter_sceneview: ^${LATEST_FLUTTER_PUB_RELEASE}
|
|
425
425
|
\`\`\`
|
|
426
426
|
|
|
427
427
|
### 2. Android Setup
|
|
@@ -441,32 +441,60 @@ android {
|
|
|
441
441
|
|
|
442
442
|
### 3. iOS Setup
|
|
443
443
|
|
|
444
|
-
|
|
444
|
+
Both lines in \`ios/Podfile\` are required — skipping the second one fails the
|
|
445
|
+
build with \`Unable to find a specification for 'SceneViewSwift'\`:
|
|
446
|
+
|
|
445
447
|
\`\`\`ruby
|
|
446
448
|
platform :ios, '18.0'
|
|
449
|
+
|
|
450
|
+
target 'Runner' do
|
|
451
|
+
use_frameworks!
|
|
452
|
+
pod 'SceneViewSwift',
|
|
453
|
+
:podspec => 'https://raw.githubusercontent.com/sceneview/sceneview/main/SceneViewSwift.podspec'
|
|
454
|
+
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
|
|
455
|
+
end
|
|
447
456
|
\`\`\`
|
|
448
457
|
|
|
458
|
+
Adding \`SceneViewSwift\` as a **Swift package** in Xcode does not work: the bridge
|
|
459
|
+
is itself a pod and compiles inside the generated \`Pods.xcodeproj\`, which cannot
|
|
460
|
+
see a package added to \`Runner.xcodeproj\`. \`:podspec\` reads from the mutable
|
|
461
|
+
\`main\` branch because no released tag carries the root podspec yet; the sources
|
|
462
|
+
it pulls are tag-pinned via \`s.source\`, and this becomes a tagged coordinate once
|
|
463
|
+
a release includes it.
|
|
464
|
+
|
|
449
465
|
### 4. Basic 3D Scene
|
|
450
466
|
|
|
451
467
|
\`\`\`dart
|
|
452
|
-
import 'package:
|
|
468
|
+
import 'package:flutter/foundation.dart' show TargetPlatform, defaultTargetPlatform;
|
|
469
|
+
import 'package:flutter_sceneview/flutter_sceneview.dart';
|
|
453
470
|
|
|
454
471
|
class My3DScreen extends StatelessWidget {
|
|
455
472
|
@override
|
|
456
473
|
Widget build(BuildContext context) {
|
|
474
|
+
// Not one path for both: Filament reads glTF/GLB, RealityKit reads USDZ and
|
|
475
|
+
// cannot read glTF at all. A hardcoded .glb compiles and renders nothing on iOS.
|
|
476
|
+
// Branch on defaultTargetPlatform, never on dart:io's Platform — importing
|
|
477
|
+
// dart:io makes the file uncompilable on Flutter web.
|
|
478
|
+
final model = defaultTargetPlatform == TargetPlatform.iOS
|
|
479
|
+
? 'models/chair.usdz'
|
|
480
|
+
: 'models/chair.glb';
|
|
481
|
+
|
|
457
482
|
return SceneView(
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
483
|
+
initialModels: [
|
|
484
|
+
ModelNode(modelPath: model, x: 0, y: 0, z: -2, scale: 1.0),
|
|
485
|
+
],
|
|
486
|
+
// Android only today — the iOS path is wired but no entity resolves, so
|
|
487
|
+
// this never fires (#3045). Not the shared RealityKit hit test: React
|
|
488
|
+
// Native reaches the same hook and fires on iOS (#3086).
|
|
489
|
+
onTap: (nodeName) => print('tapped: \$nodeName'),
|
|
465
490
|
);
|
|
466
491
|
}
|
|
467
492
|
}
|
|
468
493
|
\`\`\`
|
|
469
494
|
|
|
495
|
+
For imperative loading, attach a \`SceneViewController\` via \`onViewCreated\` and
|
|
496
|
+
call \`loadModel\` / \`setEnvironment\` / \`clearScene\` on it.
|
|
497
|
+
|
|
470
498
|
### 5. Platform Differences
|
|
471
499
|
|
|
472
500
|
| Feature | Android | iOS |
|
|
@@ -481,7 +509,7 @@ const FLUTTER_AR = `## SceneView Flutter — AR Setup
|
|
|
481
509
|
\`\`\`yaml
|
|
482
510
|
# pubspec.yaml — published on pub.dev (the names sceneview / sceneview_flutter are unrelated third-party uploads)
|
|
483
511
|
dependencies:
|
|
484
|
-
flutter_sceneview: ^${
|
|
512
|
+
flutter_sceneview: ^${LATEST_FLUTTER_PUB_RELEASE}
|
|
485
513
|
\`\`\`
|
|
486
514
|
|
|
487
515
|
### 2. Android Manifest
|
|
@@ -494,29 +522,50 @@ dependencies:
|
|
|
494
522
|
</application>
|
|
495
523
|
\`\`\`
|
|
496
524
|
|
|
497
|
-
### 3. iOS
|
|
525
|
+
### 3. iOS Setup
|
|
526
|
+
|
|
527
|
+
Both lines in \`ios/Podfile\` are required — skipping the second one fails the
|
|
528
|
+
build with \`Unable to find a specification for 'SceneViewSwift'\`:
|
|
529
|
+
|
|
530
|
+
\`\`\`ruby
|
|
531
|
+
platform :ios, '18.0'
|
|
532
|
+
|
|
533
|
+
target 'Runner' do
|
|
534
|
+
use_frameworks!
|
|
535
|
+
pod 'SceneViewSwift',
|
|
536
|
+
:podspec => 'https://raw.githubusercontent.com/sceneview/sceneview/main/SceneViewSwift.podspec'
|
|
537
|
+
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
|
|
538
|
+
end
|
|
539
|
+
\`\`\`
|
|
540
|
+
|
|
541
|
+
Adding \`SceneViewSwift\` as a **Swift package** in Xcode does not work: the bridge
|
|
542
|
+
is itself a pod and compiles inside the generated \`Pods.xcodeproj\`, which cannot
|
|
543
|
+
see a package added to \`Runner.xcodeproj\`. \`:podspec\` reads from the mutable
|
|
544
|
+
\`main\` branch because no released tag carries the root podspec yet; the sources
|
|
545
|
+
it pulls are tag-pinned via \`s.source\`, and this becomes a tagged coordinate once
|
|
546
|
+
a release includes it.
|
|
547
|
+
|
|
548
|
+
### 4. iOS Info.plist
|
|
498
549
|
|
|
499
550
|
\`\`\`xml
|
|
500
551
|
<key>NSCameraUsageDescription</key>
|
|
501
552
|
<string>This app uses the camera for augmented reality.</string>
|
|
502
553
|
\`\`\`
|
|
503
554
|
|
|
504
|
-
###
|
|
555
|
+
### 5. Basic AR Scene
|
|
505
556
|
|
|
506
557
|
\`\`\`dart
|
|
507
|
-
import 'package:
|
|
558
|
+
import 'package:flutter_sceneview/flutter_sceneview.dart';
|
|
508
559
|
|
|
509
560
|
class MyARScreen extends StatelessWidget {
|
|
510
561
|
@override
|
|
511
562
|
Widget build(BuildContext context) {
|
|
512
563
|
return ARSceneView(
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
print('Object placed at: \${anchor.position}');
|
|
519
|
-
},
|
|
564
|
+
planeDetection: true,
|
|
565
|
+
onPlaneDetected: (planeType) => print('plane: \$planeType'),
|
|
566
|
+
// Android only: SceneViewSwift's ARSceneView exposes no entity
|
|
567
|
+
// hit-test hook, so on iOS this never fires (#2051).
|
|
568
|
+
onTap: (nodeName) => print('tapped: \$nodeName'),
|
|
520
569
|
);
|
|
521
570
|
}
|
|
522
571
|
}
|
|
@@ -529,6 +578,8 @@ SceneView React Native uses **Fabric/Turbo** to bridge to native SceneView.
|
|
|
529
578
|
|
|
530
579
|
\`\`\`bash
|
|
531
580
|
npm install @sceneview/react-native
|
|
581
|
+
# iOS: edit ios/Podfile as in step 3 FIRST — a stock Podfile makes this
|
|
582
|
+
# \`pod install\` fail with "Unable to find a specification for 'SceneViewSwift'"
|
|
532
583
|
cd ios && pod install
|
|
533
584
|
\`\`\`
|
|
534
585
|
|
|
@@ -545,9 +596,16 @@ android {
|
|
|
545
596
|
|
|
546
597
|
### 3. iOS Setup
|
|
547
598
|
|
|
548
|
-
In \`ios/Podfile
|
|
599
|
+
In \`ios/Podfile\` — both lines, before \`pod install\`. \`SceneViewSwift\` is not on
|
|
600
|
+
the CocoaPods trunk, so the module's \`s.dependency\` on it cannot resolve without
|
|
601
|
+
an explicit coordinate (use \`:path => '<repo-root>'\` from a checkout), and a
|
|
602
|
+
stock React Native Podfile's 13.4 target is below its iOS 18.0 floor. A Swift
|
|
603
|
+
package added in Xcode does not work here: this module compiles inside
|
|
604
|
+
\`Pods.xcodeproj\`, which cannot see the host project's packages.
|
|
549
605
|
\`\`\`ruby
|
|
550
606
|
platform :ios, '18.0'
|
|
607
|
+
pod 'SceneViewSwift',
|
|
608
|
+
:podspec => 'https://raw.githubusercontent.com/sceneview/sceneview/main/SceneViewSwift.podspec'
|
|
551
609
|
\`\`\`
|
|
552
610
|
|
|
553
611
|
### 4. Basic 3D Scene
|
|
@@ -559,11 +617,12 @@ export default function My3DScreen() {
|
|
|
559
617
|
return (
|
|
560
618
|
<SceneView
|
|
561
619
|
style={{ flex: 1 }}
|
|
562
|
-
|
|
563
|
-
environment=
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
620
|
+
modelNodes={[{ src: 'models/chair.glb', position: [0, 0, -1], scale: 1.0 }]}
|
|
621
|
+
environment="environments/sky_2k.hdr"
|
|
622
|
+
cameraControlMode="orbit"
|
|
623
|
+
// Fires on Android and iOS — the iOS half is measured (#3086). Only the
|
|
624
|
+
// Flutter bridge's 3D onTap is still dead on iOS (#3045).
|
|
625
|
+
onTap={(e) => console.log(e.nativeEvent.nodeName)}
|
|
567
626
|
/>
|
|
568
627
|
);
|
|
569
628
|
}
|
|
@@ -580,6 +639,19 @@ const REACT_NATIVE_AR = `## SceneView React Native — AR Setup
|
|
|
580
639
|
|
|
581
640
|
### 1. Install
|
|
582
641
|
|
|
642
|
+
Both \`ios/Podfile\` lines are required before \`pod install\`: \`SceneViewSwift\` is
|
|
643
|
+
not on the CocoaPods trunk, so the module's \`s.dependency\` on it cannot resolve
|
|
644
|
+
without an explicit coordinate, and a stock React Native Podfile's 13.4
|
|
645
|
+
deployment target is below its iOS 18.0 floor. A Swift package added in Xcode
|
|
646
|
+
does not replace that line — this module compiles inside \`Pods.xcodeproj\`,
|
|
647
|
+
which cannot see the host project's packages.
|
|
648
|
+
|
|
649
|
+
\`\`\`ruby
|
|
650
|
+
platform :ios, '18.0'
|
|
651
|
+
pod 'SceneViewSwift',
|
|
652
|
+
:podspec => 'https://raw.githubusercontent.com/sceneview/sceneview/main/SceneViewSwift.podspec'
|
|
653
|
+
\`\`\`
|
|
654
|
+
|
|
583
655
|
\`\`\`bash
|
|
584
656
|
npm install @sceneview/react-native
|
|
585
657
|
cd ios && pod install
|
|
@@ -613,11 +685,16 @@ export default function MyARScreen() {
|
|
|
613
685
|
return (
|
|
614
686
|
<ARSceneView
|
|
615
687
|
style={{ flex: 1 }}
|
|
616
|
-
|
|
617
|
-
planeDetection=
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
688
|
+
modelNodes={[{ src: 'models/robot.glb', scale: 0.5 }]}
|
|
689
|
+
planeDetection={true}
|
|
690
|
+
// Declared so the API surface is stable, but NOT bridged natively yet:
|
|
691
|
+
// setting it true changes nothing today (#909). Left explicitly false so
|
|
692
|
+
// nobody ships an app that silently expects LiDAR occlusion.
|
|
693
|
+
depthOcclusion={false}
|
|
694
|
+
onPlaneDetected={(e) => console.log(e.nativeEvent.type)}
|
|
695
|
+
// Android only: SceneViewSwift's ARSceneView exposes no entity
|
|
696
|
+
// hit-test hook, so on iOS this never fires (#2051).
|
|
697
|
+
onTap={(e) => console.log(e.nativeEvent.nodeName)}
|
|
621
698
|
/>
|
|
622
699
|
);
|
|
623
700
|
}
|
|
@@ -637,32 +714,31 @@ plugins {
|
|
|
637
714
|
|
|
638
715
|
dependencies {
|
|
639
716
|
implementation(compose.desktop.currentOs)
|
|
640
|
-
|
|
717
|
+
// NOTE: there is no published \`io.github.sceneview:sceneview-desktop\`
|
|
718
|
+
// artifact. Desktop is a Compose Canvas placeholder living in
|
|
719
|
+
// \`samples/desktop-demo\`, not a library you can depend on yet.
|
|
641
720
|
}
|
|
642
721
|
\`\`\`
|
|
643
722
|
|
|
644
723
|
### 2. Basic Desktop Scene
|
|
645
724
|
|
|
725
|
+
There is no \`SceneView\` composable on desktop. The sample draws its wireframe
|
|
726
|
+
with a plain Compose \`Canvas\`, so the starting point is ordinary Compose
|
|
727
|
+
Desktop — copy \`samples/desktop-demo/src/desktopMain/kotlin/io/github/sceneview/desktop/Main.kt\`
|
|
728
|
+
rather than importing a SceneView type that does not exist.
|
|
729
|
+
|
|
646
730
|
\`\`\`kotlin
|
|
647
731
|
import androidx.compose.ui.window.Window
|
|
648
732
|
import androidx.compose.ui.window.application
|
|
649
|
-
import { LATEST_SCENEVIEW_RELEASE } from "./generated/version.js";
|
|
650
733
|
|
|
651
734
|
fun main() = application {
|
|
652
735
|
Window(
|
|
653
736
|
onCloseRequest = ::exitApplication,
|
|
654
737
|
title = "SceneView Desktop"
|
|
655
738
|
) {
|
|
656
|
-
//
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
shapes = listOf(
|
|
660
|
-
WireframeCube(position = Float3(0f, 0f, 0f), size = 1f),
|
|
661
|
-
WireframeSphere(position = Float3(2f, 0f, 0f), radius = 0.5f)
|
|
662
|
-
),
|
|
663
|
-
cameraOrbit = true,
|
|
664
|
-
backgroundColor = Color(0xFF1A1A2E)
|
|
665
|
-
)
|
|
739
|
+
// From samples/desktop-demo — a Compose Canvas animating a wireframe,
|
|
740
|
+
// NOT a Filament scene. The only public entry point that exists today.
|
|
741
|
+
WireframeCubeViewer()
|
|
666
742
|
}
|
|
667
743
|
}
|
|
668
744
|
\`\`\`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sceneview-mcp",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.16",
|
|
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": [
|