mirror of
https://github.com/storytold/spark.git
synced 2026-10-25 08:40:23 +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": {
|
"imports": {
|
||||||
"three": "https://cdnjs.cloudflare.com/ajax/libs/three.js/0.174.0/three.module.js",
|
"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>
|
||||||
<script type="module">
|
<script type="module">
|
||||||
import * as THREE from "three";
|
import * as THREE from "three";
|
||||||
import { SplatMesh } from "@worldlabsai/forge";
|
import { SplatMesh } from "@forge-gfx/forge";
|
||||||
|
|
||||||
const scene = new THREE.Scene();
|
const scene = new THREE.Scene();
|
||||||
const camera = new THREE.PerspectiveCamera(60, window.innerWidth / window.innerHeight, 0.1, 1000);
|
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": {
|
"imports": {
|
||||||
"three": "https://cdnjs.cloudflare.com/ajax/libs/three.js/0.174.0/three.module.js",
|
"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>
|
||||||
<script type="module">
|
<script type="module">
|
||||||
import * as THREE from "three";
|
import * as THREE from "three";
|
||||||
import { SplatMesh } from "@worldlabsai/forge";
|
import { SplatMesh } from "@forge-gfx/forge";
|
||||||
|
|
||||||
const scene = new THREE.Scene();
|
const scene = new THREE.Scene();
|
||||||
const camera = new THREE.PerspectiveCamera(60, window.innerWidth / window.innerHeight, 0.1, 1000);
|
const camera = new THREE.PerspectiveCamera(60, window.innerWidth / window.innerHeight, 0.1, 1000);
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ scene.add(mesh);
|
|||||||
## Grid
|
## Grid
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
import { constructGrid } from "@worldlabsai/forge";
|
import { constructGrid } from "@forge-gfx/forge";
|
||||||
|
|
||||||
const grid = new SplatMesh({
|
const grid = new SplatMesh({
|
||||||
constructSplats: (splats) => constructGrid({
|
constructSplats: (splats) => constructGrid({
|
||||||
@@ -90,7 +90,7 @@ scene.add(grid);
|
|||||||
## XYZ axis
|
## XYZ axis
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
import { constructAxes } from "@worldlabsai/forge";
|
import { constructAxes } from "@forge-gfx/forge";
|
||||||
|
|
||||||
const axes = new SplatMesh({
|
const axes = new SplatMesh({
|
||||||
constructSplats: (splats) => constructAxes({ splats }),
|
constructSplats: (splats) => constructAxes({ splats }),
|
||||||
@@ -118,7 +118,7 @@ scene.add(axes);
|
|||||||
## Splat sphere
|
## Splat sphere
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
import { constructSpherePoints } from "@worldlabsai/forge";
|
import { constructSpherePoints } from "@forge-gfx/forge";
|
||||||
|
|
||||||
const sphere = new SplatMesh({
|
const sphere = new SplatMesh({
|
||||||
constructSplats: (splats) => constructSpherePoints({
|
constructSplats: (splats) => constructSpherePoints({
|
||||||
|
|||||||
Reference in New Issue
Block a user