浏览代码

Rename README, fix codepen link

master
Palash Bansal 3 年前
父节点
当前提交
177c305060
没有帐户链接到提交者的电子邮件
共有 3 个文件被更改,包括 6 次插入4 次删除
  1. 1
    1
      .github/workflows/deploy-pages.yml
  2. 2
    2
      README.md
  3. 3
    1
      examples/js-utils/simple-code-preview.mjs

+ 1
- 1
.github/workflows/deploy-pages.yml 查看文件

@@ -44,7 +44,7 @@ jobs:
cache: 'npm'
- run: npm ci
- run: mkdir _site
- run: mv -t _site docs dist examples Readme.md LICENSE
- run: mv -t _site docs dist examples README.md LICENSE
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact

Readme.md → README.md 查看文件

@@ -44,8 +44,8 @@ First, create a canvas element in your HTML page:
Then, import the viewer and create a new instance:

```typescript
import {ThreeViewer} from 'threepipe'
import {IObject3D} from './IObject'
import {ThreeViewer, IObject3D} from 'threepipe'
// Create a viewer
const viewer = new ThreeViewer({canvas: document.getElementById('three-canvas') as HTMLCanvasElement})


+ 3
- 1
examples/js-utils/simple-code-preview.mjs 查看文件

@@ -10,7 +10,9 @@ setupCodePreview(
scripts,
scripts.map(s=>s.textContent ? 'js' : s.split('.').pop()), // title
scripts.map(s=>(typeof s === 'string' && s.endsWith('.js')) ? s : 'https://github.com/repalash/threepipe/tree/master/examples/'+ window.location.pathname.split('/examples/').pop().replace('index.html', '')+(s.textContent ? 'index.html' : s)), // todo: github link
(c)=>c.replaceAll(" from 'threepipe'", " from 'https://repalash.com/threepipe/dist/index.mjs'"), // todo: fix link
(c)=>c
.replaceAll(" from 'threepipe'", " from 'https://threepipe.org/dist/index.mjs'")
.replaceAll(" from '../", " from 'https://threepipe.org/examples/"),
{
title: 'ThreePipe: ' + document.title,
css,

正在加载...
取消
保存