sceneview-mcp 3.2.0 → 3.4.0

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/dist/index.js CHANGED
@@ -10,6 +10,7 @@ import { validateCode, formatValidationReport } from "./validator.js";
10
10
  import { MIGRATION_GUIDE } from "./migration.js";
11
11
  import { fetchKnownIssues } from "./issues.js";
12
12
  import { parseNodeSections, findNodeSection, listNodeTypes } from "./node-reference.js";
13
+ import { PLATFORM_ROADMAP, BEST_PRACTICES, AR_SETUP_GUIDE, TROUBLESHOOTING_GUIDE } from "./guides.js";
13
14
  const __dirname = dirname(fileURLToPath(import.meta.url));
14
15
  let API_DOCS;
15
16
  try {
@@ -19,14 +20,14 @@ catch {
19
20
  API_DOCS = "SceneView API docs not found. Run `npm run prepare` to bundle llms.txt.";
20
21
  }
21
22
  const NODE_SECTIONS = parseNodeSections(API_DOCS);
22
- const server = new Server({ name: "@sceneview/mcp", version: "3.2.0" }, { capabilities: { resources: {}, tools: {} } });
23
+ const server = new Server({ name: "@sceneview/mcp", version: "3.4.0" }, { capabilities: { resources: {}, tools: {} } });
23
24
  // ─── Resources ───────────────────────────────────────────────────────────────
24
25
  server.setRequestHandler(ListResourcesRequestSchema, async () => ({
25
26
  resources: [
26
27
  {
27
28
  uri: "sceneview://api",
28
29
  name: "SceneView API Reference",
29
- description: "Complete SceneView 3.1.1 API — Scene, ARScene, SceneScope DSL, ARSceneScope DSL, node types, resource loading, camera, gestures, math types, threading rules, and common patterns. Read this before writing any SceneView code.",
30
+ description: "Complete SceneView 3.3.0 API — Scene, ARScene, SceneScope DSL, ARSceneScope DSL, node types, resource loading, camera, gestures, math types, threading rules, and common patterns. Read this before writing any SceneView code.",
30
31
  mimeType: "text/markdown",
31
32
  },
32
33
  {
@@ -79,7 +80,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => ({
79
80
  properties: {
80
81
  tag: {
81
82
  type: "string",
82
- description: "Optional tag to filter by (e.g. \"ar\", \"3d\", \"anchor\", \"face-tracking\", \"geometry\", \"animation\"). Omit to list all samples.",
83
+ description: "Optional tag to filter by (e.g. \"ar\", \"3d\", \"ios\", \"swift\", \"anchor\", \"geometry\", \"animation\", \"video\", \"lighting\"). Omit to list all samples.",
83
84
  },
84
85
  },
85
86
  required: [],
@@ -102,13 +103,13 @@ server.setRequestHandler(ListToolsRequestSchema, async () => ({
102
103
  },
103
104
  {
104
105
  name: "validate_code",
105
- description: "Checks a Kotlin SceneView snippet for common mistakes: threading violations, wrong destroy order, missing null-checks on rememberModelInstance, LightNode trailing-lambda bug, deprecated 2.x APIs, and more. Always call this before presenting generated SceneView code to the user.",
106
+ description: "Checks a Kotlin or Swift SceneView snippet for common mistakes. For Kotlin: threading violations, wrong destroy order, missing null-checks, LightNode trailing-lambda bug, deprecated 2.x APIs. For Swift: missing @MainActor, async/await patterns, missing imports, RealityKit mistakes. Language is auto-detected. Always call this before presenting generated SceneView code to the user.",
106
107
  inputSchema: {
107
108
  type: "object",
108
109
  properties: {
109
110
  code: {
110
111
  type: "string",
111
- description: "The Kotlin source code to validate (composable function, class, or file).",
112
+ description: "The Kotlin or Swift source code to validate (composable function, SwiftUI view, class, or file). Language is auto-detected.",
112
113
  },
113
114
  },
114
115
  required: ["code"],
@@ -137,6 +138,71 @@ server.setRequestHandler(ListToolsRequestSchema, async () => ({
137
138
  required: ["nodeType"],
138
139
  },
139
140
  },
141
+ {
142
+ name: "get_platform_roadmap",
143
+ description: "Returns the SceneView multi-platform roadmap — current Android support status, planned iOS/KMP/web targets, and timeline. Use this when the user asks about cross-platform support, iOS, Kotlin Multiplatform, or future plans.",
144
+ inputSchema: {
145
+ type: "object",
146
+ properties: {},
147
+ required: [],
148
+ },
149
+ },
150
+ {
151
+ name: "get_best_practices",
152
+ description: "Returns SceneView performance and architecture best practices — memory management, model optimization, threading rules, Compose integration patterns, and common anti-patterns. Use this when the user asks about performance, optimization, best practices, or architecture.",
153
+ inputSchema: {
154
+ type: "object",
155
+ properties: {
156
+ category: {
157
+ type: "string",
158
+ enum: ["all", "performance", "architecture", "memory", "threading"],
159
+ description: 'Category to filter by. "all" returns everything. Defaults to "all" if omitted.',
160
+ },
161
+ },
162
+ required: [],
163
+ },
164
+ },
165
+ {
166
+ name: "get_ar_setup",
167
+ description: "Returns detailed AR setup instructions — AndroidManifest permissions and features, Gradle dependencies, ARCore session configuration options (depth, light estimation, instant placement, plane detection, image tracking, cloud anchors), and a complete working AR starter template. More detailed than `get_setup` for AR-specific configuration.",
168
+ inputSchema: {
169
+ type: "object",
170
+ properties: {},
171
+ required: [],
172
+ },
173
+ },
174
+ {
175
+ name: "get_troubleshooting",
176
+ description: "Returns the SceneView troubleshooting guide — common crashes (SIGABRT, model not showing), build failures, AR issues (drift, overexposure, image detection), and performance problems. Use this when a user reports something not working, a crash, or unexpected behavior.",
177
+ inputSchema: {
178
+ type: "object",
179
+ properties: {},
180
+ required: [],
181
+ },
182
+ },
183
+ {
184
+ name: "get_ios_setup",
185
+ description: "Returns the complete iOS setup guide for SceneViewSwift — SPM dependency, Package.swift example, minimum platform versions, Info.plist entries for AR (camera permission), and basic SwiftUI integration code. Use this when a user wants to set up SceneView for iOS, macOS, or visionOS.",
186
+ inputSchema: {
187
+ type: "object",
188
+ properties: {
189
+ type: {
190
+ type: "string",
191
+ enum: ["3d", "ar"],
192
+ description: '"3d" for 3D-only scenes. "ar" for augmented reality (requires iOS, not macOS/visionOS via this path).',
193
+ },
194
+ },
195
+ required: ["type"],
196
+ },
197
+ },
198
+ {
199
+ name: "get_web_setup",
200
+ description: "Returns the complete Web setup guide for SceneView Web — npm install, Kotlin/JS Gradle config, HTML canvas setup, and basic Filament.js integration code. SceneView Web uses the same Filament rendering engine as Android, compiled to WebAssembly. Use this when a user wants to set up SceneView for browsers.",
201
+ inputSchema: {
202
+ type: "object",
203
+ properties: {},
204
+ },
205
+ },
140
206
  ],
141
207
  }));
142
208
  // ─── Tool handlers ────────────────────────────────────────────────────────────
@@ -157,6 +223,22 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
157
223
  isError: true,
158
224
  };
159
225
  }
226
+ const isIos = sample.language === "swift";
227
+ const depBlock = isIos
228
+ ? [
229
+ `**SPM dependency:**`,
230
+ `\`\`\`swift`,
231
+ `.package(url: "${sample.spmDependency ?? sample.dependency}", from: "3.3.0")`,
232
+ `\`\`\``,
233
+ ]
234
+ : [
235
+ `**Gradle dependency:**`,
236
+ `\`\`\`kotlin`,
237
+ `implementation("${sample.dependency}")`,
238
+ `\`\`\``,
239
+ ];
240
+ const codeLang = isIos ? "swift" : "kotlin";
241
+ const codeLabel = isIos ? "**Swift (SwiftUI):**" : "**Kotlin (Jetpack Compose):**";
160
242
  return {
161
243
  content: [
162
244
  {
@@ -166,13 +248,10 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
166
248
  ``,
167
249
  `**Tags:** ${sample.tags.join(", ")}`,
168
250
  ``,
169
- `**Gradle dependency:**`,
170
- `\`\`\`kotlin`,
171
- `implementation("${sample.dependency}")`,
172
- `\`\`\``,
251
+ ...depBlock,
173
252
  ``,
174
- `**Kotlin (Jetpack Compose):**`,
175
- `\`\`\`kotlin`,
253
+ codeLabel,
254
+ `\`\`\`${codeLang}`,
176
255
  sample.code,
177
256
  `\`\`\``,
178
257
  ``,
@@ -192,7 +271,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
192
271
  content: [
193
272
  {
194
273
  type: "text",
195
- text: `No samples found with tag "${filterTag}". Available tags: 3d, ar, model, geometry, animation, camera, environment, anchor, plane-detection, image-tracking, face-tracking, placement, gestures`,
274
+ text: `No samples found with tag "${filterTag}". Available tags: 3d, ar, model, geometry, animation, camera, environment, anchor, plane-detection, image-tracking, cloud-anchor, point-cloud, placement, gestures, physics, sky, fog, lines, text, reflection, post-processing, ios, swift, video, lighting`,
196
275
  },
197
276
  ],
198
277
  };
@@ -201,7 +280,10 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
201
280
  ? `## SceneView samples tagged \`${filterTag}\` (${entries.length})\n`
202
281
  : `## All SceneView samples (${entries.length})\n`;
203
282
  const rows = entries
204
- .map((s) => `### \`${s.id}\`\n**${s.title}**\n${s.description}\n*Tags:* ${s.tags.join(", ")}\n*Dependency:* \`${s.dependency}\`\n\nCall \`get_sample("${s.id}")\` for the full code.`)
283
+ .map((s) => {
284
+ const depLabel = s.language === "swift" ? "*SPM:*" : "*Dependency:*";
285
+ return `### \`${s.id}\`\n**${s.title}**${s.language === "swift" ? " (Swift/iOS)" : ""}\n${s.description}\n*Tags:* ${s.tags.join(", ")}\n${depLabel} \`${s.dependency}\`\n\nCall \`get_sample("${s.id}")\` for the full code.`;
286
+ })
205
287
  .join("\n\n---\n\n");
206
288
  return { content: [{ type: "text", text: header + rows }] };
207
289
  }
@@ -219,7 +301,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
219
301
  `### build.gradle.kts`,
220
302
  `\`\`\`kotlin`,
221
303
  `dependencies {`,
222
- ` implementation("io.github.sceneview:sceneview:3.1.1")`,
304
+ ` implementation("io.github.sceneview:sceneview:3.3.0")`,
223
305
  `}`,
224
306
  `\`\`\``,
225
307
  ``,
@@ -240,7 +322,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
240
322
  `### build.gradle.kts`,
241
323
  `\`\`\`kotlin`,
242
324
  `dependencies {`,
243
- ` implementation("io.github.sceneview:arsceneview:3.1.1")`,
325
+ ` implementation("io.github.sceneview:arsceneview:3.3.0")`,
244
326
  `}`,
245
327
  `\`\`\``,
246
328
  ``,
@@ -318,6 +400,299 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
318
400
  ],
319
401
  };
320
402
  }
403
+ // ── get_platform_roadmap ────────────────────────────────────────────────
404
+ case "get_platform_roadmap": {
405
+ return { content: [{ type: "text", text: PLATFORM_ROADMAP }] };
406
+ }
407
+ // ── get_best_practices ───────────────────────────────────────────────────
408
+ case "get_best_practices": {
409
+ const category = request.params.arguments?.category || "all";
410
+ const text = BEST_PRACTICES[category] ?? BEST_PRACTICES["all"];
411
+ return { content: [{ type: "text", text }] };
412
+ }
413
+ // ── get_ar_setup ─────────────────────────────────────────────────────────
414
+ case "get_ar_setup": {
415
+ return { content: [{ type: "text", text: AR_SETUP_GUIDE }] };
416
+ }
417
+ // ── get_troubleshooting ──────────────────────────────────────────────────
418
+ case "get_troubleshooting": {
419
+ return { content: [{ type: "text", text: TROUBLESHOOTING_GUIDE }] };
420
+ }
421
+ // ── get_ios_setup ─────────────────────────────────────────────────────────
422
+ case "get_ios_setup": {
423
+ const iosType = request.params.arguments?.type;
424
+ if (iosType === "3d") {
425
+ return {
426
+ content: [
427
+ {
428
+ type: "text",
429
+ text: [
430
+ `## SceneViewSwift — iOS/macOS/visionOS 3D Setup`,
431
+ ``,
432
+ `### 1. Add SPM Dependency`,
433
+ ``,
434
+ `In Xcode: **File → Add Package Dependencies** → paste:`,
435
+ `\`\`\``,
436
+ `https://github.com/SceneView/sceneview`,
437
+ `\`\`\``,
438
+ `Set version rule to **"from: 3.3.0"**.`,
439
+ ``,
440
+ `Or in Package.swift:`,
441
+ `\`\`\`swift`,
442
+ `// swift-tools-version: 5.10`,
443
+ `import PackageDescription`,
444
+ ``,
445
+ `let package = Package(`,
446
+ ` name: "MyApp",`,
447
+ ` platforms: [.iOS(.v17), .macOS(.v14), .visionOS(.v1)],`,
448
+ ` dependencies: [`,
449
+ ` .package(url: "https://github.com/SceneView/sceneview", from: "3.3.0")`,
450
+ ` ],`,
451
+ ` targets: [`,
452
+ ` .executableTarget(`,
453
+ ` name: "MyApp",`,
454
+ ` dependencies: [`,
455
+ ` .product(name: "SceneViewSwift", package: "sceneview")`,
456
+ ` ]`,
457
+ ` )`,
458
+ ` ]`,
459
+ `)`,
460
+ `\`\`\``,
461
+ ``,
462
+ `### 2. Minimum Platform Versions`,
463
+ ``,
464
+ `| Platform | Minimum Version |`,
465
+ `|----------|-----------------|`,
466
+ `| iOS | 17.0 |`,
467
+ `| macOS | 14.0 |`,
468
+ `| visionOS | 1.0 |`,
469
+ ``,
470
+ `### 3. Basic SwiftUI Integration`,
471
+ ``,
472
+ `\`\`\`swift`,
473
+ `import SwiftUI`,
474
+ `import SceneViewSwift`,
475
+ `import RealityKit`,
476
+ ``,
477
+ `struct ContentView: View {`,
478
+ ` @State private var model: ModelNode?`,
479
+ ``,
480
+ ` var body: some View {`,
481
+ ` SceneView { root in`,
482
+ ` if let model {`,
483
+ ` root.addChild(model.entity)`,
484
+ ` }`,
485
+ ` }`,
486
+ ` .cameraControls(.orbit)`,
487
+ ` .task {`,
488
+ ` model = try? await ModelNode.load("models/car.usdz")`,
489
+ ` model?.scaleToUnits(1.0)`,
490
+ ` }`,
491
+ ` }`,
492
+ `}`,
493
+ `\`\`\``,
494
+ ``,
495
+ `### 4. Model Formats`,
496
+ ``,
497
+ `| Format | Support |`,
498
+ `|--------|---------|`,
499
+ `| USDZ | Native — recommended for iOS |`,
500
+ `| .reality | Native — RealityKit format |`,
501
+ `| glTF/GLB | Planned via GLTFKit2 |`,
502
+ ``,
503
+ `No manifest or permission changes needed for 3D-only scenes.`,
504
+ ].join("\n"),
505
+ },
506
+ ],
507
+ };
508
+ }
509
+ if (iosType === "ar") {
510
+ return {
511
+ content: [
512
+ {
513
+ type: "text",
514
+ text: [
515
+ `## SceneViewSwift — iOS AR Setup`,
516
+ ``,
517
+ `### 1. Add SPM Dependency`,
518
+ ``,
519
+ `\`\`\`swift`,
520
+ `.package(url: "https://github.com/SceneView/sceneview", from: "3.3.0")`,
521
+ `\`\`\``,
522
+ ``,
523
+ `### 2. Minimum Platform`,
524
+ ``,
525
+ `AR requires **iOS 17.0+** (ARKit + RealityKit). macOS and visionOS use different AR APIs.`,
526
+ ``,
527
+ `### 3. Info.plist — Camera Permission`,
528
+ ``,
529
+ `Add to your Info.plist (required for AR camera access):`,
530
+ `\`\`\`xml`,
531
+ `<key>NSCameraUsageDescription</key>`,
532
+ `<string>This app uses the camera for augmented reality.</string>`,
533
+ `\`\`\``,
534
+ ``,
535
+ `### 4. Basic AR Integration`,
536
+ ``,
537
+ `\`\`\`swift`,
538
+ `import SwiftUI`,
539
+ `import SceneViewSwift`,
540
+ `import RealityKit`,
541
+ ``,
542
+ `struct ARContentView: View {`,
543
+ ` @State private var model: ModelNode?`,
544
+ ``,
545
+ ` var body: some View {`,
546
+ ` ARSceneView(`,
547
+ ` planeDetection: .horizontal,`,
548
+ ` showCoachingOverlay: true,`,
549
+ ` onTapOnPlane: { position, arView in`,
550
+ ` guard let model else { return }`,
551
+ ` let anchor = AnchorNode.world(position: position)`,
552
+ ` let clone = model.entity.clone(recursive: true)`,
553
+ ` clone.scale = .init(repeating: 0.3)`,
554
+ ` anchor.add(clone)`,
555
+ ` arView.scene.addAnchor(anchor.entity)`,
556
+ ` }`,
557
+ ` )`,
558
+ ` .edgesIgnoringSafeArea(.all)`,
559
+ ` .task {`,
560
+ ` model = try? await ModelNode.load("models/robot.usdz")`,
561
+ ` }`,
562
+ ` }`,
563
+ `}`,
564
+ `\`\`\``,
565
+ ``,
566
+ `### 5. AR Configuration Options`,
567
+ ``,
568
+ `| Parameter | Options | Default |`,
569
+ `|-----------|---------|---------|`,
570
+ `| \`planeDetection\` | \`.none\`, \`.horizontal\`, \`.vertical\`, \`.both\` | \`.horizontal\` |`,
571
+ `| \`showPlaneOverlay\` | \`true\` / \`false\` | \`true\` |`,
572
+ `| \`showCoachingOverlay\` | \`true\` / \`false\` | \`true\` |`,
573
+ `| \`imageTrackingDatabase\` | \`Set<ARReferenceImage>\` | \`nil\` |`,
574
+ ``,
575
+ `### 6. Image Tracking`,
576
+ ``,
577
+ `\`\`\`swift`,
578
+ `let images = AugmentedImageNode.createImageDatabase([`,
579
+ ` AugmentedImageNode.ReferenceImage(`,
580
+ ` name: "poster",`,
581
+ ` image: UIImage(named: "poster_ref")!,`,
582
+ ` physicalWidth: 0.3 // meters`,
583
+ ` )`,
584
+ `])`,
585
+ ``,
586
+ `ARSceneView(`,
587
+ ` imageTrackingDatabase: images,`,
588
+ ` onImageDetected: { name, anchor, arView in`,
589
+ ` let cube = GeometryNode.cube(size: 0.1, color: .blue)`,
590
+ ` anchor.add(cube.entity)`,
591
+ ` arView.scene.addAnchor(anchor.entity)`,
592
+ ` }`,
593
+ `)`,
594
+ `\`\`\``,
595
+ ].join("\n"),
596
+ },
597
+ ],
598
+ };
599
+ }
600
+ return {
601
+ content: [{ type: "text", text: `Unknown type "${iosType}". Use "3d" or "ar".` }],
602
+ isError: true,
603
+ };
604
+ }
605
+ // ── get_web_setup ────────────────────────────────────────────────────────
606
+ case "get_web_setup": {
607
+ return {
608
+ content: [
609
+ {
610
+ type: "text",
611
+ text: [
612
+ `## SceneView Web — Browser 3D Setup`,
613
+ ``,
614
+ `SceneView Web uses **Filament.js** — the same rendering engine as Android, compiled to WebAssembly (WebGL2).`,
615
+ ``,
616
+ `### 1. Install`,
617
+ ``,
618
+ `\`\`\`bash`,
619
+ `npm install @sceneview/sceneview-web`,
620
+ `\`\`\``,
621
+ ``,
622
+ `Or in a Kotlin/JS Gradle project:`,
623
+ `\`\`\`kotlin`,
624
+ `// build.gradle.kts`,
625
+ `kotlin {`,
626
+ ` js(IR) { browser(); binaries.executable() }`,
627
+ ` sourceSets {`,
628
+ ` jsMain.dependencies {`,
629
+ ` implementation("@sceneview/sceneview-web")`,
630
+ ` // or: implementation(project(":sceneview-web"))`,
631
+ ` }`,
632
+ ` }`,
633
+ `}`,
634
+ `\`\`\``,
635
+ ``,
636
+ `### 2. HTML`,
637
+ ``,
638
+ `\`\`\`html`,
639
+ `<canvas id="scene-canvas" style="width:100%;height:100vh"></canvas>`,
640
+ `<script src="your-app.js"></script>`,
641
+ `\`\`\``,
642
+ ``,
643
+ `### 3. Kotlin/JS Code`,
644
+ ``,
645
+ `\`\`\`kotlin`,
646
+ `import io.github.sceneview.web.SceneView`,
647
+ `import kotlinx.browser.document`,
648
+ `import org.w3c.dom.HTMLCanvasElement`,
649
+ ``,
650
+ `fun main() {`,
651
+ ` val canvas = document.getElementById("scene-canvas") as HTMLCanvasElement`,
652
+ ` canvas.width = canvas.clientWidth`,
653
+ ` canvas.height = canvas.clientHeight`,
654
+ ``,
655
+ ` SceneView.create(`,
656
+ ` canvas = canvas,`,
657
+ ` configure = {`,
658
+ ` camera {`,
659
+ ` eye(0.0, 1.5, 5.0)`,
660
+ ` target(0.0, 0.0, 0.0)`,
661
+ ` fov(45.0)`,
662
+ ` }`,
663
+ ` light {`,
664
+ ` directional()`,
665
+ ` intensity(100_000.0)`,
666
+ ` }`,
667
+ ` model("models/DamagedHelmet.glb")`,
668
+ ` autoRotate()`,
669
+ ` },`,
670
+ ` onReady = { sceneView ->`,
671
+ ` sceneView.startRendering()`,
672
+ ` }`,
673
+ ` )`,
674
+ `}`,
675
+ `\`\`\``,
676
+ ``,
677
+ `### 4. Features`,
678
+ ``,
679
+ `- Same Filament PBR renderer as Android (WASM)`,
680
+ `- glTF 2.0 / GLB model loading`,
681
+ `- IBL environment lighting (KTX)`,
682
+ `- Orbit camera with mouse/touch/pinch controls`,
683
+ `- Auto-rotation`,
684
+ `- Directional, point, and spot lights`,
685
+ ``,
686
+ `### 5. Limitations`,
687
+ ``,
688
+ `- No AR (requires native sensors)`,
689
+ `- WebGL2 required (~95% of browsers)`,
690
+ `- glTF/GLB format only (same as Android)`,
691
+ ].join("\n"),
692
+ },
693
+ ],
694
+ };
695
+ }
321
696
  default:
322
697
  return {
323
698
  content: [{ type: "text", text: `Unknown tool: ${request.params.name}` }],
package/dist/issues.js CHANGED
@@ -9,10 +9,10 @@ export async function fetchKnownIssues() {
9
9
  let issues = [];
10
10
  let fetchError = null;
11
11
  try {
12
- const response = await fetch("https://api.github.com/repos/SceneView/sceneview-android/issues?state=open&per_page=30", {
12
+ const response = await fetch("https://api.github.com/repos/SceneView/sceneview/issues?state=open&per_page=30", {
13
13
  headers: {
14
14
  Accept: "application/vnd.github+json",
15
- "User-Agent": "sceneview-mcp/3.0",
15
+ "User-Agent": "sceneview-mcp/3.3.0",
16
16
  "X-GitHub-Api-Version": "2022-11-28",
17
17
  },
18
18
  });
package/dist/migration.js CHANGED
@@ -8,8 +8,8 @@ SceneView 3.0 is a full rewrite from Android Views to **Jetpack Compose**. Nearl
8
8
 
9
9
  | 2.x | 3.0 |
10
10
  |-----|-----|
11
- | \`io.github.sceneview:sceneview:2.x.x\` | \`io.github.sceneview:sceneview:3.1.1\` |
12
- | \`io.github.sceneview:arsceneview:2.x.x\` | \`io.github.sceneview:arsceneview:3.1.1\` |
11
+ | \`io.github.sceneview:sceneview:2.x.x\` | \`io.github.sceneview:sceneview:3.3.0\` |
12
+ | \`io.github.sceneview:arsceneview:2.x.x\` | \`io.github.sceneview:arsceneview:3.3.0\` |
13
13
 
14
14
  ---
15
15
 
@@ -174,7 +174,7 @@ LightNode(
174
174
  val environmentLoader = rememberEnvironmentLoader(engine)
175
175
  Scene(
176
176
  environment = rememberEnvironment(environmentLoader) {
177
- environmentLoader.createHDREnvironment("environments/sky_2k.hdr")!!
177
+ environmentLoader.createHDREnvironment("environments/sky_2k.hdr") ?: createEnvironment(environmentLoader)
178
178
  }
179
179
  ) { … }
180
180
  \`\`\`