Catalog npm
Back to packageRELEASE DETAILS

1.0.1-alpha.0

npm

3d-viewer-core

render

Published4 Jan 2022
Direct dependencies0
Transitive dependenciesNot calculated

README

Current package documentation

3d-viewer-core

是gltf的主渲染库

使用方法:

const options = {};

import ThreeDViewer from '3d-viewer-core';

const container = document.querySelector('#app')

const viewer = new ThreeDViewer(container, options)

viewer.load('http://gltf.url').then((gltf) => {
  console.log('gltf loaded');
})


options参数

autoRotate boolean 自动旋转 默认: true

autoRotateSpeed number 渲染转速度 默认: 1.0

stats boolean 是否开启帧数、内存显示 默认: false

isBgColor boolean 是否开启渐变色彩背景 默认: true

bgColor1 string 渐变背景色1 默认: #ffffff

bgColor2 string 渐变背景色2 默认: #353535

ambientIntensity number 环境光强度 默认: 0.3

ambientColor number 环境光颜色 默认: 0xFFFFFF

directIntensity number 平行光强度 默认: 0.8 * Math.PI

ambientColor number 平行光颜色 默认: 0xFFFFFF

对外函数

加载gltf前 viewer.on('preLoad', (gltf, new ThreeDViewer) => {})

加载gltf时 viewer.on('loading', (ProgressEvent, new ThreeDViewer) => {})

加载gltf完成 viewer.on('loaded', (gltf, new ThreeDViewer) => {})

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 0

Native requirements
0 direct targetsNot calculated transitive count
No declared dependencies in this collected response

Declarations describe requirements; they are not a resolved dependency graph.

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "integrity": "sha512-psyqGayC9nByliARMywWWMXk+dFQJk+IlEsLmKvfDYuekCGKyKzqie3hGy4gt0iSRuj5ihzwnHUK27J3kpViRA==",
  "shasum": "3662cde3a1bb5c6c36ff8672c2d18b0f2d9ed40e",
  "tarball": "https://registry.npmjs.org/3d-viewer-core/-/3d-viewer-core-1.0.1-alpha.0.tgz",
  "fileCount": 4,
  "unpackedSize": 1908,
  "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh08KCCRA9TVsSAnZWagAATLUP/1PKrjPfR4UqaeRCExxp\nZ2gZ08n4W5x7VD0jxjtkxOOcfA5OtsnbkEHeZx2eqMExMvRAt9hb1Q2mA54j\nrLqVoCgaoVAnq907ax6EFco51EFiD3xO5sCVHhJj2E2GLugOt6evlLn2gqbP\nhe8loAcYCqvIMP9wPm/XgmZeg9kL0v+QNRI1KQwXsMCseiAnso/JC8FgUy++\nDUudaiZFWrcpnEmqG9PP5XYQ+9MWhVlolObexICV3+bBgiOwTBQbrnnjiB5t\npL+HIGxLQVLCO8XeLvXnnKyzp2KM6XerafZU1w7u2X6T660lgplJLwAv/+UL\njY7tW9vzmcxVDDy55cdRfjB+v3SzRI1lrtxs2c47v5O5inKWaq3xjuna/xRk\nNoFHgSuX4vPy3FFJ7Q60vucwms5UugMr27/b9vVnXxEz/SWJ8SKSyXbIIgCm\nvdjRpoCRzKajUx2qpW5q4D7CPtEqBJTJRoRspn59YtvxbMxjCgCPvBbuC+15\ngI9lc0mAlGDkmk8BD0Dhlr2vT60ViIH1BrsVNeSa1smixI/M6BCU2snDbjWF\nHes9qksRcmCZ8wbQq+WNjLdrlmb5eNTvoLVUmz7FWRa9t47JaFFxGA05/Yhz\nAGC0TQgzR/CqikmKVrsk5jlLTQ0+lbSt9bZYzueRsJCkRgyk/ZTakP4us31C\npYZO\r\n=/frv\r\n-----END PGP SIGNATURE-----\r\n",
  "signatures": [
    {
      "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
      "sig": "MEUCIQDH07dy9MNquF5JGTpvN0aAXLT3lWxqbXx3jHiKAfzA5QIgV6jQP27BKiMq64s84fv1FaCmkp+nWuv2S5q7/J7L11Q="
    }
  ]
}

Repository

ACCESSIBLE
guiqide/3d-viewer

Shared repository data · GitHub

License detected in repository
MIT
License branch / ref
main
Last push
9 Feb 2022
Archived
No
Contributor identities
— · partial collection

Public sponsor counts have not been collected. These signals belong to the repository owner.

Downloads & popularity

0count
Gauge · observed snapshots23 Oct 2026
10.50
2026-10-23: 0 · observed 2026-10-23T17:31:21.3102118Z
23 Oct23 Oct

github · 1 observations shown. Missing days are unknown.

View observed values
Date / source periodValueObserved at
2026-10-2302026-10-23T17:31:21.3102118Z

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 19:37 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:2ea923a0e79b2a5a4a8d1c02cae4ec1c86496bd59de4febd925b96d10d03b9f9

Other collected versions

1.0.28 Feb1.0.111 Jan1.0.1-alpha.57 Jan1.0.1-alpha.47 Jan1.0.1-alpha.27 JanView all collected versions →