mirror of
https://github.com/storytold/spark.git
synced 2026-10-09 00:09:53 +00:00
Replace package with forge-gfx/forge.
This commit is contained in:
@@ -53,13 +53,13 @@ Copy the following code into an `index.html` file.
|
||||
{
|
||||
"imports": {
|
||||
"three": "https://cdnjs.cloudflare.com/ajax/libs/three.js/0.174.0/three.module.js",
|
||||
"@worldlabsai/forge": "https://forge.dev/releases/forge/0.1.0/forge.module.js"
|
||||
"@forge-gfx/forge": "https://forge.dev/releases/forge/0.1.0/forge.module.js"
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<script type="module">
|
||||
import * as THREE from "three";
|
||||
import { SplatMesh } from "@worldlabsai/forge";
|
||||
import { SplatMesh } from "@forge-gfx/forge";
|
||||
|
||||
const scene = new THREE.Scene();
|
||||
const camera = new THREE.PerspectiveCamera(60, window.innerWidth / window.innerHeight, 0.1, 1000);
|
||||
|
||||
+2
-2
@@ -10,13 +10,13 @@ Copy and paste code below in an `index.html` file or remix in the [Web Playgroun
|
||||
{
|
||||
"imports": {
|
||||
"three": "https://cdnjs.cloudflare.com/ajax/libs/three.js/0.174.0/three.module.js",
|
||||
"@worldlabsai/forge": "https://forge.dev/releases/forge/0.1.0/forge.module.js"
|
||||
"@forge-gfx/forge": "https://forge.dev/releases/forge/0.1.0/forge.module.js"
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<script type="module">
|
||||
import * as THREE from "three";
|
||||
import { SplatMesh } from "@worldlabsai/forge";
|
||||
import { SplatMesh } from "@forge-gfx/forge";
|
||||
|
||||
const scene = new THREE.Scene();
|
||||
const camera = new THREE.PerspectiveCamera(60, window.innerWidth / window.innerHeight, 0.1, 1000);
|
||||
|
||||
@@ -55,7 +55,7 @@ scene.add(mesh);
|
||||
## Grid
|
||||
|
||||
```javascript
|
||||
import { constructGrid } from "@worldlabsai/forge";
|
||||
import { constructGrid } from "@forge-gfx/forge";
|
||||
|
||||
const grid = new SplatMesh({
|
||||
constructSplats: (splats) => constructGrid({
|
||||
@@ -90,7 +90,7 @@ scene.add(grid);
|
||||
## XYZ axis
|
||||
|
||||
```javascript
|
||||
import { constructAxes } from "@worldlabsai/forge";
|
||||
import { constructAxes } from "@forge-gfx/forge";
|
||||
|
||||
const axes = new SplatMesh({
|
||||
constructSplats: (splats) => constructAxes({ splats }),
|
||||
@@ -118,7 +118,7 @@ scene.add(axes);
|
||||
## Splat sphere
|
||||
|
||||
```javascript
|
||||
import { constructSpherePoints } from "@worldlabsai/forge";
|
||||
import { constructSpherePoints } from "@forge-gfx/forge";
|
||||
|
||||
const sphere = new SplatMesh({
|
||||
constructSplats: (splats) => constructSpherePoints({
|
||||
|
||||
Reference in New Issue
Block a user