Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: VERSION情報を送るように変更 #19

Merged
merged 3 commits into from
Nov 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
VERSION: ${{ env.GITHUB_SHA }}
VERSION: ${{ github.sha }}
- name: slack notification on success
if: ${{ success() }}
uses: rtCamp/action-slack-notify@v2
Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@

[![npm version](https://badge.fury.io/js/@cynack%2Ffigni-viewer.svg)](https://badge.fury.io/js/@cynack%2Ffigni-viewer)

## ドキュメント

[figni-viewer document](https://cynack.notion.site/figni-viewer-e5f236458b9d4c889d4d57f7bcbce862)

## 開発方法

1. `npm install`で必要なパッケージをダウンロードする
2. src/のファイルを編集(index.htmlはテスト用のhtmlファイル)
2. src/のファイルを編集(index.html はテスト用の html ファイル)
3. `npm run watch`で test/にテスト用のファイルを出力し、`npm run test`でサーバーを起動して検証
4. `npm run build`でdist/にビルド
4. `npm run build`で dist/にビルド

## 便利コマンド

Expand Down
4 changes: 4 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
<meta charset="utf-8" />
<title>Figni Viewer Sample</title>
<meta name="viewport" content="width=device-width" />
<link
rel="icon"
href="https://icongr.am/simple/git.svg?size=32&color=ff733b&colored=false"
/>
</head>
<body>
<div style="background-color: rgb(247, 247, 247)">
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cynack/figni-viewer",
"version": "0.0.13",
"version": "0.0.14",
"description": "",
"main": "./dist/figni-viewer.min.js",
"files": [
Expand Down
3 changes: 2 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ class FigniViewerElement extends ModelViewerElement {
this.arScale = 'fixed'
this.arPlacement = 'floor'
this.interactionPrompt = 'none'
this.shadowIntensity = 1
this.initCameraTarget = this.getAttribute('target') || this.initCameraTarget
this.initCameraOrbit = this.getAttribute('orbit') || this.initCameraOrbit
this.state = this.getAttribute('state') || this.state
Expand Down Expand Up @@ -362,7 +363,7 @@ class FigniViewerElement extends ModelViewerElement {
headers: {
accept: 'application/json',
'X-Figni-Client-Token': this.token,
// 'X-Figni-Client-Version': VERSION,
'X-Figni-Client-Version': VERSION,
},
}
)
Expand Down
1 change: 1 addition & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ module.exports = () => {
plugins: config.plugins.concat([
new HtmlWebpackPlugin({
template: 'index.html',
hash: true,
}),
]),
})
Expand Down