sceneview-web 3.5.1 → 3.6.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/README.md +39 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -29,6 +29,40 @@ SceneView.create(
|
|
|
29
29
|
)
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
+
## JavaScript API (sceneview.js v1.5.0)
|
|
33
|
+
|
|
34
|
+
For browser usage without Kotlin, use `sceneview.js` directly:
|
|
35
|
+
|
|
36
|
+
```html
|
|
37
|
+
<script src="https://cdn.jsdelivr.net/npm/sceneview-web@3.6.0/sceneview.js"></script>
|
|
38
|
+
<script>
|
|
39
|
+
SceneView.modelViewer("canvas", "model.glb", {
|
|
40
|
+
backgroundColor: [0.05, 0.05, 0.08, 1],
|
|
41
|
+
lightIntensity: 150000,
|
|
42
|
+
fov: 35
|
|
43
|
+
});
|
|
44
|
+
</script>
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Full API
|
|
48
|
+
|
|
49
|
+
| Method | Description |
|
|
50
|
+
|---|---|
|
|
51
|
+
| `SceneView.modelViewer(canvas, url, options?)` | One-line 3D model viewer |
|
|
52
|
+
| `SceneView.create(canvas, options?)` | Create instance for full API |
|
|
53
|
+
| `instance.loadModel(url)` | Load glTF/GLB model |
|
|
54
|
+
| `instance.setAutoRotate(enabled)` | Toggle auto-rotation |
|
|
55
|
+
| `instance.setCameraDistance(d)` | Set orbit camera distance |
|
|
56
|
+
| `instance.setBackgroundColor(r, g, b, a?)` | Set clear color |
|
|
57
|
+
| `instance.setQuality('low'\|'medium'\|'high')` | AO + anti-aliasing quality |
|
|
58
|
+
| `instance.setBloom(true\|false\|options)` | Bloom post-processing |
|
|
59
|
+
| `instance.addLight(options)` | Add directional/point/spot light |
|
|
60
|
+
| `instance.createText(options)` | Render text as 3D quad |
|
|
61
|
+
| `instance.createImage(options)` | Render image as 3D quad |
|
|
62
|
+
| `instance.createVideo(options)` | Stream video to 3D quad |
|
|
63
|
+
| `instance.removeNode(entity)` | Remove node from scene |
|
|
64
|
+
| `instance.dispose()` | Clean up resources |
|
|
65
|
+
|
|
32
66
|
## Features
|
|
33
67
|
|
|
34
68
|
- Same Filament PBR renderer as Android (compiled to WASM)
|
|
@@ -37,7 +71,11 @@ SceneView.create(
|
|
|
37
71
|
- Camera configuration (FOV, position, exposure)
|
|
38
72
|
- Directional, point, and spot lights
|
|
39
73
|
- Animation playback
|
|
40
|
-
-
|
|
74
|
+
- Quality presets (low/medium/high)
|
|
75
|
+
- Bloom post-processing
|
|
76
|
+
- Text, image, and video nodes
|
|
77
|
+
- Billboard mode (always face camera)
|
|
78
|
+
- Kotlin/JS DSL API + vanilla JavaScript API
|
|
41
79
|
|
|
42
80
|
## Requirements
|
|
43
81
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sceneview-web",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.6.0",
|
|
4
4
|
"description": "SceneView for Web \u2014 3D rendering with Filament.js (WebGL2/WASM). Same engine as SceneView Android.",
|
|
5
5
|
"main": "build/dist/js/productionExecutable/sceneview-web.js",
|
|
6
6
|
"files": [
|