mirror of
https://github.com/storytold/spark.git
synced 2026-10-17 00:12:59 +00:00
Change remaining references from sparkjs-dev to sparkjsdev
This commit is contained in:
+4
-4
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
## Quick Start
|
## Quick Start
|
||||||
|
|
||||||
Copy and paste code below in an `index.html` file or remix in the [Web Playground](https://glitch.com/edit/#!/sparkjs-dev)
|
Copy and paste code below in an `index.html` file or remix in the [Web Playground](https://glitch.com/edit/#!/sparkjsdev)
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<style> body {margin: 0;} </style>
|
<style> body {margin: 0;} </style>
|
||||||
@@ -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",
|
||||||
"@sparkjs-dev/spark": "https://sparkjs.dev/releases/spark/0.2.0/spark.module.js"
|
"@sparkjsdev/spark": "https://sparkjs.dev/releases/spark/0.2.0/spark.module.js"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<script type="module">
|
<script type="module">
|
||||||
import * as THREE from "three";
|
import * as THREE from "three";
|
||||||
import { SplatMesh } from "@sparkjs-dev/spark";
|
import { SplatMesh } from "@sparkjsdev/spark";
|
||||||
|
|
||||||
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);
|
||||||
@@ -39,7 +39,7 @@ Copy and paste code below in an `index.html` file or remix in the [Web Playgroun
|
|||||||
## Install with NPM
|
## Install with NPM
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
npm install @sparkjs-dev/spark
|
npm install @sparkjsdev/spark
|
||||||
```
|
```
|
||||||
## Develop and contribute to Spark
|
## Develop and contribute to Spark
|
||||||
|
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ Utility functions are provided in Javascript to pack/unpack these encodings:
|
|||||||
packedSplats.setSplat(index, center, scales, quaternion, opacity, color);
|
packedSplats.setSplat(index, center, scales, quaternion, opacity, color);
|
||||||
|
|
||||||
// Set underlying Uint32 array directly
|
// Set underlying Uint32 array directly
|
||||||
import { utils } from "@sparkjs-dev/spark";
|
import { utils } from "@sparkjsdev/spark";
|
||||||
utils.setPackedSplat(packedSplats.packedArray, index, x, y, z, scaleX, scaleY, ...);
|
utils.setPackedSplat(packedSplats.packedArray, index, x, y, z, scaleX, scaleY, ...);
|
||||||
|
|
||||||
// Set rotation components of underlying Uint32 array directly
|
// Set rotation components of underlying Uint32 array directly
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ scene.add(mesh);
|
|||||||
## Grid
|
## Grid
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
import { constructGrid } from "@sparkjs-dev/spark";
|
import { constructGrid } from "@sparkjsdev/spark";
|
||||||
|
|
||||||
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 "@sparkjs-dev/spark";
|
import { constructAxes } from "@sparkjsdev/spark";
|
||||||
|
|
||||||
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 "@sparkjs-dev/spark";
|
import { constructSpherePoints } from "@sparkjsdev/spark";
|
||||||
|
|
||||||
const sphere = new SplatMesh({
|
const sphere = new SplatMesh({
|
||||||
constructSplats: (splats) => constructSpherePoints({
|
constructSplats: (splats) => constructSpherePoints({
|
||||||
|
|||||||
Reference in New Issue
Block a user